source: xtideuniversalbios/trunk/Assembly_Library/Inc/BiosData.inc@ 251

Last change on this file since 251 was 245, checked in by aitotat@…, 13 years ago

Changes to Assembly Library:

  • Added functions to reboot computer.
  • Added JMP_DELAY macro.
File size: 6.3 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Equates for BIOS Data Area.
3%ifndef BIOSDATA_INC
4%define BIOSDATA_INC
5
6;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7; BIOS DATA AREA VARIABLES ;
8;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9
10; BIOS Data Area (related to floppy drives and hard disks)
11struc BDA
12 resb 400h ; 40:0h, Start of BDA
13 .wCOM1 resb 2 ; 0:400h, Serial I/O Address, Port 1
14 .wCOM2 resb 2 ; 0:402h, Serial I/O Address, Port 2
15 .wCOM3 resb 2 ; 0:404h, Serial I/O Address, Port 3
16 .wCOM4 resb 2 ; 0:406h, Serial I/O Address, Port 4
17 .wLPT1 resb 2 ; 0:408h, Parallel I/O Address, Port 1
18 .wLPT2 resb 2 ; 0:40Ah, Parallel I/O Address, Port 2
19 .wLPT3 resb 2 ; 0:40Ch, Parallel I/O Address, Port 3
20 .wLPT4: ; 0:40Eh, Parallel I/O Address, Port 4 (PC/XT)
21 .wSegEBDA resb 2 ; 0:40Eh, Extended BIOS Data Area segment (AT+)
22
23 .wEquipment resb 2 ; 0:410h, Equipment Word
24 .bTest resb 1 ; 0:412h, Manufacturing test
25 .wBaseMem resb 2 ; 0:413h, Base Memory Size in kB
26 .wAdptrMem: ; 0:415h, Adapter Memory Size (PC/XT)
27 .wError resb 2 ; 0:415h, Error Codes (AT+)
28 .bKBFlgs1 resb 1 ; 0:417h, Keyboard, Shift Flags, Set 1
29 .bKBFlgs2 resb 1 ; 0:418h, Keyboard, Shift Flags, Set 2
30 .bKBNumpad resb 1 ; 0:419h, Keyboard, ALT+Numpad work area
31 .wKBHead resb 2 ; 0:41Ah, Keyboard, Head of buffer pointer
32 .wKBTail resb 2 ; 0:41Ch, Keyboard, Tail of buffer pointer
33 .rgwKBBuff resb 32 ; 0:41Eh, Keyboard, 16-word buffer
34
35 .bFDRecal resb 1 ; 0:43Eh, Diskette, Recalibrate status
36 .bFDMotor resb 1 ; 0:43Fh, Diskette, Motor status
37
38 .bFDMotTime resb 1 ; 0:440h, Diskette, Motor timeout counter
39 .bFDRetST resb 1 ; 0:441h, Diskette, Controller status return code
40 .rgbFDStatus resb 7 ; 0:442h, Diskette, Diskette and Disk Controller status bytes
41 .bVidMode resb 1 ; 0:449h, Video, Mode
42 .wVidColumns resb 2 ; 0:44Ah, Video, Number of columns
43 .wVidBpP resb 2 ; 0:44Ch, Video, Total number of bytes per page
44 .wVidPageOff resb 2 ; 0:44Eh, Video, Current page offset
45
46 .rgwVidCurPos resb 16 ; 0:450h, Video, Cursor position, pages 0...7
47
48 .wVidCurShape resb 2 ; 0:460h, Video, Cursor shape
49 .bVidPageIdx resb 1 ; 0:462h, Video, Active display page
50 .wVidPort resb 2 ; 0:463h, Video, I/O Port number base
51 .bVidModeReg resb 1 ; 0:465h, Video, Internal mode register
52 .bVidPalette resb 1 ; 0:466h, Video, Color palette
53 .wCasTimeCnt: ; 0:467h, Cassette, Time count at data edge (PC)
54 .wGenOff resb 2 ; 0:467h, General use offset (XT+)
55 .wCasCRC: ; 0:469h, Cassette, CRC register (PC)
56 .wGenSeg resb 2 ; 0:469h, General use segment (XT+)
57 .bCasLast: ; 0:46Bh, Cassette, Last value read
58 .bLastIRQ resb 1 ; 0:46Bh, Last interrupt that occurred (XT+)
59 .dwTimerTicks resb 4 ; 0:46Ch, Timer ticks count
60
61 .bTimer24h resb 1 ; 0:470h, Timer ticks rollover flag
62 .bKBCtrlBrk resb 1 ; 0:471h, Keyboard, Ctrl+Break flag
63 .wBoot resb 2 ; 0:472h, Warm boot flag
64 .bHDLastSt resb 1 ; 0:474h, Hard Disk, Status of Last Operation (XT+)
65 .bHDCount resb 1 ; 0:475h, Hard Disk, Number of HDs Attached (XT+)
66 .bHDCtrl resb 1 ; 0:476h, Hard Disk, Control Byte (temp, XT+)
67 .bHDPortOff resb 1 ; 0:477h, Hard Disk, Port Offset (XT)
68 .bLPT1Timeout resb 1 ; 0:478h, Parallel Printer 1, Timeout (XT+)
69 .bLPT2Timeout resb 1 ; 0:479h, Parallel Printer 2, Timeout (XT+)
70 .bLPT3Timeout resb 1 ; 0:47Ah, Parallel Printer 3, Timeout (XT+)
71 .bLPT4Timeout resb 1 ; 0:47Bh, Parallel Printer 4, Timeout (XT+)
72 .bCOM1Timeout resb 1 ; 0:47Ch, Serial 1, Timeout (XT+)
73 .bCOM2Timeout resb 1 ; 0:47Dh, Serial 2, Timeout (XT+)
74 .bCOM3Timeout resb 1 ; 0:47Eh, Serial 3, Timeout (XT+)
75 .bCOM4Timeout resb 1 ; 0:47Fh, Serial 4, Timeout (XT+)
76
77 .wKBPtrStart resb 2 ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
78 .wKBPtrEnd resb 2 ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
79 .bVidRows resb 1 ; 0:484h, Video, Number of rows (EGA+)
80 .wVidPpC resb 2 ; 0:485h, Video, Pixels per character (EGA+)
81 .bVidOptns resb 1 ; 0:487h, Video, Options (EGA+)
82 .bVidSwitches resb 1 ; 0:488h, Video, Switches (EGA+)
83 .bVidSave1 resb 1 ; 0:489h, Video, Save area 1 (VGA+)
84 .bVidSave2 resb 1 ; 0:48Ah, Video, Save area 2 (VGA+)
85 .bFDCfgData resb 1 ; 0:48Bh, Diskette, Configuration data (AT+)
86 .bHDStatus resb 1 ; 0:48Ch, Hard Disk, Status Register (AT+)
87 .bHDError resb 1 ; 0:48Dh, Hard Disk, Error Register (AT+)
88 .bHDTaskFlg resb 1 ; 0:48Eh, Hard Disk, Task Complete Flag (AT+)
89 .bFDCtrlInfo resb 1 ; 0:48Fh, Diskette, Controller information (AT+)
90
91 .bFDMedia0 resb 1 ; 0:490h, Diskette 0, Media state (AT+)
92 .bFDMedia1 resb 1 ; 0:491h, Diskette 1, Media state (AT+)
93 .bFDOpStart0 resb 1 ; 0:492h, Diskette 0, Operational starting state (AT+)
94 .bFDOpStart1 resb 1 ; 0:493h, Diskette 1, Operational starting state (AT+)
95 .bFDCurCyl0 resb 1 ; 0:494h, Diskette 0, Current cylinder (AT+)
96 .bFDCurCyl1 resb 1 ; 0:495h, Diskette 1, Current cylinder (AT+)
97 .bKBFlgs3 resb 1 ; 0:496h, Keyboard, Status flags 3 (AT+)
98 .bKBFlgs4 resb 1 ; 0:497h, Keyboard, Status flags 4 (AT+)
99 .dwWaitPtr resb 4 ; 0:498h, User's wait flag pointer (AT+)
100 .dwWaitCnt resb 4 ; 0:49Ch, User's wait count (AT+)
101
102 .bWaitFlg resb 1 ; 0:4A0h, Wait flag (AT+)
103 .rgbLAN resb 7 ; 0:4A1h, Local Area Network (AT+)
104 .dwVidPtr resb 4 ; 0:4A8h, Video, Parameter Control Block Pointer (EGA+)
105 resb 22h ; Reserved from 0:4ACh...0:4CDh
106
107 .dwDays resb 4 ; 0:4CEh, Clock, Days since 1980 (some BIOSes, AT+)
108 resb 2Eh ; Reserved from 0:4D2h...0:4FFh
109
110 .bPrntScrn resb 1 ; 0:500, Print screen status
111endstruc
112
113; BDA struct with only Hard Disk related locations
114struc HDBDA
115 resb 474h
116 .bHDLastSt resb 1 ; 0:474h, Status of Last Operation (XT+)
117 .bHDCount resb 1 ; 0:475h, Number of HDs Attached (XT+)
118 .bHDCtrl resb 1 ; 0:476h, Control Byte (temp, XT+)
119 .bHDPortOff resb 1 ; 0:477h, Port Offset (XT)
120 resb 15h
121 .bHDStatus: ; 0:48Ch, Status Register (AT+)
122 .bHDError: ; 0:48Dh, Error Register (AT+)
123 .wHDStAndErr resb 2
124 .bHDTaskFlg resb 1 ; 0:48Eh, Task Complete Flag (AT+)
125endstruc
126
127
128; Warm Boot Flags for BDA.wBoot
129BOOT_FLAG_COLD EQU 0
130BOOT_FLAG_WARM EQU 1234h ; Same effect as CTRL + ALT + DEL, skips memory tests
131BOOT_FLAG_PRESERVE_RAM EQU 4321h ; No mem test, leave memory unchanged (AT+)
132
133
134%endif ; BIOSDATA_INC
Note: See TracBrowser for help on using the repository browser.