home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
FGIN131.ZIP
/
SOURCE.ZIP
/
KEYWAIT.C
< prev
next >
Wrap
Text File
|
1994-01-21
|
754b
|
37 lines
/****************************************************************************\
\****************************************************************************/
/****************************************************************************\
int wait_key(void)
Clears keyboard and then wait's for a key. Returns 2 byte key code.
\****************************************************************************/
int wait_key(void)
{
asm {
mov ax,0x0C07; //Clears keyboard strobe, then waits for key
int 0x21; //get key
and ax,0x00FF;
jnz End; //if key is extended (al==0)
mov ax,0x0700;
int 0x21; //get extended key
mov ah,0x01; //set extended byte
}
End:
return(_AX);
}