title: TASM mouse input
body: <p>I am working on an assembly project with TASM, DosBox and Notepad++.
  I draw a dot on the screen and I need to know if the user clicked on it (right mouse).
  I tried to check if the user clicked right mouse and then if the click coordinates are the same as the dot coordinates.<br>
  For some reason it's not working.
  Here's my proc:</p>
  
  <pre><code> proc SetCursor
  
  ;initialize the mouse
  
   mov ax, 0h
  
   int 33h
  
   ;show mouse
  
   mov ax, 1h
  
   int 33h
  
  ; get mouse place and status
  
  mov ax, 3h
  
  int 33h
  
  ret
  
  endp SetCursor
  </code></pre>
  
  <p>Here I call it:</p>
  
  <pre><code>DotGame:
  ;enter graphics mode
  mov ax, 13h
  int 10h
  call SetCursor ; mouse input
  call DotOne
  
  cmp bx, 01 ; check if left mouse was clicked
  je Check_X_Cords
   ;check if the player clicked the dot cords
  
  Check_X_Cords:
  cmp cx, [XCords1]
  je Check_Y_Cords
  
  Check_Y_Cords:
  cmp dx, [YCords1]
  je ScoreLabel
  
  ScoreLabel:
  inc [score]
  </code></pre>
  
  <p>The program is just jumping between the labels, it doesn't matter if the coordinates are the same or not.</p>