[NTVDM]
[reactos.git] / subsystems / ntvdm / bios.h
index 0b6320f..27e2578 100644 (file)
 #define BIOS_PIC_MASTER_INT 0x08
 #define BIOS_PIC_SLAVE_INT 0x70
 #define BIOS_SEGMENT 0xF000
+
 #define BIOS_VIDEO_INTERRUPT 0x10
 #define BIOS_EQUIPMENT_INTERRUPT 0x11
 #define BIOS_KBD_INTERRUPT 0x16
 #define BIOS_TIME_INTERRUPT 0x1A
 #define BIOS_SYS_TIMER_INTERRUPT 0x1C
+
 #define CONSOLE_FONT_HEIGHT 8
 #define BIOS_KBD_BUFFER_SIZE 16
 #define BIOS_EQUIPMENT_LIST 0x2C // HACK: Disable FPU for now
 #define GRAPHICS_VIDEO_SEG 0xA000
 #define TEXT_VIDEO_SEG 0xB800
 
+#define BDA_KBDFLAG_RSHIFT      (1 << 0)
+#define BDA_KBDFLAG_LSHIFT      (1 << 1)
+#define BDA_KBDFLAG_CTRL        (1 << 2)
+#define BDA_KBDFLAG_ALT         (1 << 3)
+#define BDA_KBDFLAG_SCROLL_ON   (1 << 4)
+#define BDA_KBDFLAG_NUMLOCK_ON  (1 << 5)
+#define BDA_KBDFLAG_CAPSLOCK_ON (1 << 6)
+#define BDA_KBDFLAG_INSERT_ON   (1 << 7)
+#define BDA_KBDFLAG_RALT        (1 << 8)
+#define BDA_KBDFLAG_LALT        (1 << 9)
+#define BDA_KBDFLAG_SYSRQ       (1 << 10)
+#define BDA_KBDFLAG_PAUSE       (1 << 11)
+#define BDA_KBDFLAG_SCROLL      (1 << 12)
+#define BDA_KBDFLAG_NUMLOCK     (1 << 13)
+#define BDA_KBDFLAG_CAPSLOCK    (1 << 14)
+#define BDA_KBDFLAG_INSERT      (1 << 15)
+
 enum
 {
     SCROLL_DIRECTION_UP,
@@ -51,12 +70,12 @@ typedef struct
 {
     WORD SerialPorts[4];
     WORD ParallelPorts[3];
-    WORD EbdaSegment;
+    WORD EbdaSegment;       // Sometimes, ParallelPort
     WORD EquipmentList;
-    BYTE Reserved0;
+    BYTE Reserved0;         // Errors in PCjr infrared keyboard link
     WORD MemorySize;
-    WORD Reserved1;
-    WORD KeyboardFlags;
+    WORD Reserved1;         // Scratch pad for manufacturing error tests
+    WORD KeybdShiftFlags;
     BYTE AlternateKeypad;
     WORD KeybdBufferHead;
     WORD KeybdBufferTail;