#include "typedefs.h"
WORD MouseX, MouseY, MouseB, ActX, ActY;
char IfMouse();
void ShowMouse();
void HideMouse();
void ReadMouse();
void SetMousePos(WORD X, WORD Y);
void SetMinMaxX(WORD Min, WORD Max);
void SetMinMaxY(WORD Min, WORD Max);
char IfMouse() {
WORD Result;
asm {
xor ax, ax
int 0x33
mov Result, ax
}
return Result;
}
void ShowMouse() {
asm {
mov ax, 0x1
int 0x33
}
}
void HideMouse() {
asm {
mov ax, 0x2
int 0x33
}
}
void ReadMouse() {
asm {
mov ax, 0x3
int 0x33
mov MouseB, bx
mov MouseX, cx
mov MouseY, dx
shr cx, 3
shr dx, 3
mov ActX, cx
mov ActY, dx
}
}
void SetMousePos(WORD X, WORD Y) {
asm {
mov ax, 0x4
mov cx, X
mov dx, Y
int 0x33
}
}
void SetMinMaxX (WORD Min, WORD Max) {
asm {
mov ax, 0x7
mov cx, Min
mov dx, Max
int 0x33
}
}
void SetMinMaxY (WORD Min, WORD Max) {
asm {
mov ax, 0x8
mov cx, Min
mov dx, Max
int 0x33
}
}