1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
static volatile unsigned char far *keyflags = (char far *)0x00400017; void setcaps(void) { *keyflags |= 0x40; } void clrcaps(void) { *keyflags &= ~0x40; } void setnumlock(void) { *keyflags |= 0x20; } void clrnumlock(void) { *keyflags &= ~0x20; }