Advertisement
NB52053

MOUSE

Sep 30th, 2018
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                        
  2. ; You may customize this and other start-up templates;
  3. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  4.  
  5. org 100h
  6. .stack
  7. .data
  8.  
  9.    
  10.    
  11.    
  12.  
  13. .code
  14.  
  15. mov dx, @data
  16. mov ds, dx    
  17.    
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. proc main
  25. mov dx, @data
  26. mov ds, dx
  27.  
  28. mov al, 12h
  29. mov ah, 0   ; set graphics video mode.
  30. int 10h  
  31.  
  32. mov ax, 1   ;shows mouse cursor
  33. int 33h
  34.  
  35. Next:
  36. mov ax, 3   ;get cursor positon in cx,dx
  37. int 33h
  38.  
  39. call putpix ;call procedure
  40. jmp Next
  41.  
  42. mov ah,4ch
  43. int 21h  
  44.  
  45.  
  46.    
  47. mov ah, 4ch
  48. int 21h
  49. endp main
  50.  
  51.  
  52.  
  53. ;======================================================    
  54. ;procedure to print
  55. putpix proc  
  56. mov al, 13   ;color of pixel  
  57. mov ah, 0ch    
  58. shr cx,1    ; cx will get double so we divide it by two
  59. int 10h     ; set pixel.
  60. ret
  61. putpix endp
  62.  
  63. ;======================================================
  64.  
  65. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement