summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/SNIP/keylocks.c
blob: 2c0880f0d430720946b3dd04d3b1a80a3d4f05ac (plain)
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;
}