home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
Geneve
/
9640news
/
CAT36
/
EMULSRC.ZIP
/
KSCAN.C
< prev
next >
Wrap
Text File
|
1993-04-27
|
514b
|
30 lines
/* KSCAN emulatie */
/* F1..F10 key code mapping, plus translation of cursor control keys */
int FCTN[]={
3, 4, 7, 2, 14, 12, 1, 6, 15, 5,
255,255,255, 11, 12,255, 8,255, 9,255,
255, 10, 2, 4, 3};
void KSCAN(void)
{
if (KBHIT)
{
word key;
key=GETKEY;
if (!key&&KBHIT)
{
key=GETKEY-59;
if (key<26) key=FCTN[key];
}
memory_write(WP+12,0x2000);
memory_write(WP,key<<8);
}
else
{
memory_write(WP+12,0);
memory_write(WP,0xFF00);
}
PC=0x478;
}