atm959

Untitled

Jul 12th, 2019
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. tempX: dw 0 ;Earlier in the file
  2. tempY: dw 0 ;Earlier in the file
  3.  
  4. pointerX: db 0
  5. pointerY: db 0
  6. calculatedX: dw 0
  7. calculatedY: dw 0
  8.  
  9. drawPointer:
  10. mov [tempX], WORD -1
  11. mov [tempY], WORD -1
  12.  
  13. .pointerLoopX:
  14. add [tempX], WORD 1
  15. mov [tempY], WORD -1
  16. .pointerLoopY:
  17. add [tempY], WORD 1
  18.  
  19. mov ecx, MousePointer
  20. mov edx, 0A0000h
  21.  
  22. mov ax, [pointerX]
  23. mov bx, [tempX]
  24. add ax, bx
  25. mov [calculatedX], ax
  26.  
  27. mov ax, [pointerY]
  28. mov bx, [tempY]
  29. add ax, bx
  30. mov [calculatedX], ax
  31.  
  32. mov ax, [calculatedY]
  33. mov bx, 320
  34. mul bx
  35. mov bx, [calculatedX]
  36. add ax, bx
  37. add edx, eax
  38.  
  39. mov ax, [tempY]
  40. mov bx, 8
  41. mul bx
  42. mov bx, [tempX]
  43. add ax, bx
  44. add ecx, eax
  45.  
  46. mov cl, [ecx]
  47. mov [edx], cl
  48.  
  49. cmp [tempX], WORD 8
  50. jne .pointerLoopY
  51. cmp [tempY], WORD 8
  52. jne .pointerLoopX
  53.  
  54. ret
Advertisement
Add Comment
Please, Sign In to add comment