function mousex:word;assembler;asm {Lấy vị trí x chuột}
mov ax,3; int 33h; mov ax,cx end;
function mousey:word;assembler;asm {Lấy vị trí y chuột}
mov ax,3; int 33h; mov ax,dx end;
function leftclick:boolean;assembler;asm
mov ax,3; int 33h; and bx,1; mov ax,bx end;
function rightclick:boolean;assembler;asm
mov ax,3; int 33h; and bx,2; mov ax,bx end;
Function InitMouse : boolean;
var r: registers;
Begin
r.ax:=$00;intr($33,r);
if r.ax<>0 then InitMouse:=true
else InitMouse:=false;
End;
Procedure ShowMouse; (Dùng để hiện con trỏ chuột)
Var r: registers;
begin
r.ax:=$01;intr($33,r);
End;
Procedure HideMouse; {Dùng để ẩn con trỏ chuột}
Var r:registers;
Begin
r.ax:=$002;
intr($33,r);
End;