Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help in controlling mouse pointer using int33h in ASM

Status
Not open for further replies.

DoraSzasz

Junior Member level 1
Joined
May 17, 2009
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,459
Hello,all!

I am interesting in controlling the mouse in assembling language, using int 33h.
I want to move the mouse at different locations and to display the coordinates of the mouse pointer and other interesting things.

Can anyone help me?

Thank you!
 

Unless your application is 16-Bit real mode, you have to use respective Windows API functions.
 

Yes, I know that, but I don't know how to program it...

PAGE 60,132
TITLE PROGRAM CONTROL MOUSE
;
COMMENT *Program 1*
;
;---------------------------------------------------
STIVA SEGMENT PARA STACK 'STACK'
DW 256 DUP(?)
STIVA ENDS
;---------------------------------------------------
;
;---------------------------------------------------
DATA SEGMENT PARA PUBLIC 'DATA'
msg DB 'Program pentru controlul mouseului'
DB 'Tastati ESC pentru oprire',0dh,0ah,'$'
DATA ENDS
;----------------------------------------------------
;
;----------------------------------------------------
; Sectiune CODE
;----------------------------------------------------
;
CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE,DS:DATA,SS:STIVA,ES:NOTHING

MAIN PROC FAR
mov ax, 0001h
int 33h
ret

mov ax, 0003h
int 33h
mov ax, dx
ret

MousePointerOn PROC
mov ax,0001h
int 33h
ret
MousePointerOn ENDP



MousePointerOff PROC
mov ax,0002h
int 33h
ret
MousePointerOff ENDP


MouseGetXCoord PROC
mov ax,0003h
int 33h
mov ax, dx
ret
MouseGetXCoord ENDP

MouseGetYCoord PROC
mov ax,0003h
int 33h
mov ax, cx
ret
MouseGetYCoord ENDP


MouseReadButtons PROC
mov ax,0003h
int 33h
mov ax, bx
ret
MouseReadButtons ENDP

CODE ENDS
END MAIN

This is what I've done, but it doesn't work....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top