Advertisement
NB52053

Ass.Lab_Keyboard_INT 16h

Sep 9th, 2018
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4.  
  5.  
  6. org 100h
  7. .model small
  8. .stack 100h
  9. .data
  10. nl db 0dh, 0ah, '$'
  11.  
  12. .code
  13. proc main
  14. mov dx, @data
  15. mov ds,dx
  16. L0:
  17.  
  18.  mov cx, 5
  19.  
  20.  
  21.  
  22. L1:
  23. mov dl, '*'
  24. mov ah,2
  25. int 21h
  26. loop L1
  27.  
  28.  
  29.  
  30. lea dx, nl
  31. mov ah,9
  32. int 21h
  33.  
  34. L2:
  35. mov ah, 1
  36. int 16h
  37. jnz key_pressed
  38. jmp L0
  39.  
  40.  
  41. key_pressed:
  42.  
  43. mov ah, 0
  44. int 16h
  45. mov dl,al
  46.  
  47. mov ah,2
  48. int 21h
  49. cmp al, 'q'
  50. je exit
  51. jmp L0
  52. exit:
  53.  
  54. mov ah,4ch
  55. int 21h
  56. endp main
  57.  
  58.  
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement