Getting mouse position in assembly TASM -
i'm taking course in assembly language , i'm required make calculator (gui?) , of course use mouse choose numbers , on ...
i'm done i'm stuck, how can position of mouse? know have use ax=3 , int33 , values of coordinates stored in cx & dx. now, layout of numbers 3x3, how can check if particular position equals 4?
if using emulator doesn't have ms-dos, big problem. since said you're taking course, emulator has ms-dos.
int 33h mouse handling event register ax input. output results may vary depending on graphics mode have on (40x85, 320x200, ext). here of basics need know.
- mov ax, 0000h: resets driver (may wanna first)
- mov ax, 0001h: show cursor
- mov ax, 0002h: hide cursor
- mov ax, 0003h: return cursor position
- mov ax, 0004h: set cursor position
- mov ax, 001ah: set mouse sensitivity
- mov ax, 001bh: mouse sensitivity
in syntax asking cursor position [no. 4]. first need ax 0003h. return values cx (horizontal position (x)), dx (vertical position (y)), , bx (button status). infomation can found here.
Comments
Post a Comment