// Unfortunately, these two functions work just in real DOS mode. #define drive_a 0 #define drive_b 1 void lightdrvon(unsigned char drive) { outport(0x3f2, 12 +drive +1 << (4 +drive)); } void lightdrvoff(unsigned char drive) { outport(0x3f2, 12 +drive); } // Keyboard Leds void scroll_lockon() { pokeb(0x40, 0x17, peekb(0x40, 0x17) | 0x10); } void scroll_lockoff() { pokeb(0x40, 0x17, peekb(0x40, 0x17) & 0xef); } void num_lockon() { pokeb(0x40, 0x17, peekb(0x40, 0x17) | 0x20); } void num_lockoff() { pokeb(0x40, 0x17, peekb(0x40, 0x17) & 0xdf); } void caps_lockon() { pokeb(0x40, 0x17, peekb(0x40, 0x17) | 0x40); } void caps_lockoff() { pokeb(0x40, 0x17, peekb(0x40, 0x17) & 0xbf); } // text mode Cursor void showcursor() { asm{ mov ax, 0x100 mov cx, 0x506 int 0x10 } } void hidecursor() { asm{ mov ax, 0x100 mov cx, 0x2607 int 0x10 } } // monitor void screenon() { outport(0x3c4, 1); outport(0x3c5, 0x00); } void screenoff() { outport(0x3c4, 1); outport(0x3c5, inport(0x3c5) | 0x20); }