#include <iostream.h>
#include <dos.h>
#include <conio.h>
void showm()
{
_AX = 1;
geninterrupt(0x33);
}
unsigned x = 0,y= 0, button;
void updatestatus()
{
_AX = 3;
geninterrupt(0x33);
x = _CX;
y = _DX;
button = _BX;
}
void main()
{
clrscr();
_setcursortype(_NOCURSOR);
showm();
while(!kbhit())
{
updatestatus();
textcolor(GREEN);
gotoxy(5,2);cprintf("X = %0.2d", (x / 8 +1));
gotoxy(5,3);cprintf("Y = %0.2d", (y / 8 + 1));
gotoxy(5,4);cprintf("Button = %d", button);
}
}
"I have not failed. I've just found 10,000 ways that won't work."
--Thomas Edison
"Not everything that can be counted counts, and not everything that counts can be counted."
--Albert Einstein
"If you can't make it good, at least make it look good."
"Your most unhappy customers are your greatest source of learning."
--Bill Gates
No comments:
Post a Comment