Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. IDEAL
  2. MODEL small
  3. STACK 100h
  4. INCLUDE "gvahim.mac"
  5.  
  6. DATASEG
  7. ; -------------------------- tar2
  8. ; Your variables here
  9. a dw ?
  10. b dw ?
  11. ; --------------------------
  12. CODESEG
  13. start:
  14. mov ax, @data
  15. mov ds, ax
  16. ; --------------------------
  17. ; Your code here
  18. ; --------------------------
  19. call SCAN_NUM
  20. mov [a], dx
  21. call SCAN_NUM
  22. mov [b], dx
  23. mov ax, [a]
  24. add ax, [b]
  25. cmp ax, 100
  26. jbe lessequal
  27. mov [a], 50
  28. mov [b], 50
  29. jmp exit
  30. lessequal:
  31. mov [a], 0
  32. mov [b], 0
  33.  
  34.  
  35.  
  36.  
  37. exit:
  38. mov ax, 4c00h
  39. int 21h
  40.  
  41. INCLUDE "gvahim.asm"
  42. END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement