Mail Archives: djgpp/1997/10/18/16:02:24
At 03:45 10/16/1997 +0200, Thomas Demmer wrote:
>And, is NASM case sensitive? I never tried it, so I
>don't know.
Yes it is.
Nate Eldredge
eldredge AT ap DOT net
b?
No. You have to poke the BIOS's byte directly. Here is an excerpt from the
Interrupt List:
MEM 0040h:0017h - KEYBOARD - STATUS FLAGS 1
Size: BYTE
Bitfields for keyboard status flags 1:
Bit(s) Description (Table M009)
7 INSert active
6 Caps Lock active
5 Num Lock active
4 Scroll Lock active
3 either Alt pressed
2 either Ctrl pressed
1 Left Shift pressed
0 Right Shift pressed
So, for instance, to turn Numlock and its associated LED on:
int b;
b = _farpeekb(_dos_ds,0x00417);
b |= (1 << 5) /* set 5th bit */
_farpokeb(_dos_ds,0x00417,b);
Hope this helps.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -