Добавил:
korayakov
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
#include<dos.h>
#include<stdlib.h>
void initmouse(){
asm{
mov AX,0
int 0x33
};
}
void showmouse(){
asm{
mov AX,1
int 0x33
};
}
void hidemouse(){
asm{
mov AX,2
int 0x33
};
}
void mouselimit(int x1,int y1,int x2,int y2)
{
asm{ mov AX,7
mov CX,x1
mov DX,x2
int 0x33
mov AX,8
mov CX,y1
mov DX,y2
int 0x33
};
}
int mousepressed()
{
int f;
asm {
mov ax,5
mov bx,1
int 33h
and ax,1
mov f,ax
}
return f;
}
int mousegetx()
{
int x;
asm {
mov ax,3
int 33h
mov x,cx
}
return x;
}
int mousegety()
{
int y;
asm {
mov ax,3
int 33h
mov y,dx
}
return y;
}