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.

  1. mov ax, 0000h: resets driver (may wanna first)
  2. mov ax, 0001h: show cursor
  3. mov ax, 0002h: hide cursor
  4. mov ax, 0003h: return cursor position
  5. mov ax, 0004h: set cursor position
  6. mov ax, 001ah: set mouse sensitivity
  7. 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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -