Thread: mouse
View Single Post
Old 06-12-2005, 02:35 PM   #1 (permalink)
jyrka
Registered User
 
Join Date: Jun 2005
Posts: 1
jyrka is on a distinguished road
mouse

i dont know much about C but i need to get access to my
PS/2 mouse driver. i found this:
Mouse driver functions are accessed through interrupt 33h. The following code sequence portrays what a typical call to the mouse driver looks like in assembly language:

MOV AX,5
MOV BX,l
INT 33H
TEST BX,l
Jz NOT_DEPRESSED

In general, function codes are passed in register AX, and other parameters in BX, CX, and DX. This particular sequence calls function 5 to retrieve the status of the right mouse button (BX=l for the right button, BX=O for the left). On return, bit I of the BX register is tested and a branch is made if it's set to 0, indicating the button is not currently depressed.

can anyone explain it and maby lighten me a lil bout syntax of accessing registers?
jyrka is offline   Reply With Quote