Advertisement
green1ant

cmps demo

Mar 19th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. org 100h
  2.  
  3. start:
  4.  
  5. ;greeting:
  6. ; mov ah, $09
  7. ;mov dx, greeting
  8. ; int 21h
  9.  
  10. comparison:
  11. mov si, shit
  12. mov di, shitty
  13. mov cx, 11
  14. repe cmpsb
  15. je equal
  16.  
  17. not_equal:
  18. mov ah, $09
  19. mov dx, ansNo
  20. int 21h
  21. jmp exit
  22.  
  23. equal:
  24. mov ah, $09
  25. mov dx, ansYes
  26. int 21h
  27. jmp exit
  28. exit:
  29. mov ah, $09
  30. mov dx, press_any_key
  31. int 21h
  32. mov ah, $08
  33. int 21h
  34. ret
  35.  
  36. shit db "hello mans$"
  37. shitty db "hello mans$"
  38. text db "hello world$"
  39. ;greeting db "Hello!", 13, 10, "$"
  40. inputString db 11, 0, 10 dup (?)
  41. nextLine db 13, 10, "$"
  42. ansYes db "Yes!", 13, 10, "$"
  43. ansNo db "No!", 13, 10, "$"
  44. press_any_key db 13, 10, "Press any key to exit...$"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement