source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc@ 157

Last change on this file since 157 was 155, checked in by Tomi Tilli, 14 years ago

Changes to XTIDE Universal BIOS:

  • AH=4h again uses VERIFY command (copy-pasting had changed it to WRITE).
  • Timeout should now work on all overflow situations.
  • Cleaned code a bit.
File size: 1.9 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : RAMVARS struct containing BIOS variables stored in RAM.
3%ifndef RAMVARS_INC
4%define RAMVARS_INC
5
6; Segment when RAMVARS is stored to top of interrupt vectors.
7LITE_MODE_RAMVARS_SEGMENT EQU 30h
8
9
10; Variables for translating drive numbers.
11struc XLATEVARS
12 .bFDSwap resb 1 ; Floppy Drive to swap to 00h and vice versa
13 .bHDSwap resb 1 ; Hard Drive to swap to 80h and vice versa
14 .bXlatedDrv resb 1 ; Drive number after translation
15 resb 1 ; For WORD alignment
16endstruc
17
18; RAM Variables.
19; Variables should be kept to minimum since they might be located
20; at the top of interrupt vectors.
21struc RAMVARS
22 .fpOldI13h resb 4 ; Far pointer to old INT 13h handler
23 .wSignature resb 2 ; Sign for finding stolen 1 kiB
24 .bTimeoutTicksLeft resb 1
25 .bLastTimeoutUpdate resb 1
26
27 .wDrvCntAndFirst:
28 .bDrvCnt resb 1 ; Number of drives handled by this BIOS
29 .bFirstDrv resb 1 ; Number of first drive for this BIOS
30
31 ; Variables for drive number translation
32 .xlateVars resb XLATEVARS_size
33endstruc
34
35RAMVARS_SIGNATURE EQU "Xu" ; RAMVARS signature for .wSignature
36
37
38struc IDEPACK
39 .bDrvAndHead resb 1 ; LBA28 27...24
40 .bFeatures resb 1
41
42 .wSectorCountAndLbaLow:
43 .bSectorCount resb 1
44 .bSectorNumber:
45 .bLbaLow resb 1 ; LBA 7...0
46
47 .wCylinder:
48 .wLbaMiddleAndHigh:
49 .bLbaMiddle resb 1 ; LBA 15...8
50 .bLbaHigh resb 1 ; LBA 23...16
51
52 .bCommand resb 1
53 .bDeviceControl resb 1 ; Offset 7 shared with PIOVARS
54
55 ; Parameters for 48-bit LBA
56 .wSectorCountHighAndLbaLowExt:
57 .bSectorCountHighExt resb 1 ; LBA48 Sector Count 15...8
58 .bLbaLowExt resb 1 ; LBA48 31...24
59
60 .wLbaMiddleAndHighExt:
61 .bLbaMiddleExt resb 1 ; LBA48 39...32
62 .bLbaHighExt resb 1 ; LBA48 47...40
63
64 .intpack resb INTPACK_size
65endstruc
66
67EXTRA_BYTES_FOR_INTPACK EQU (IDEPACK_size - INTPACK_size)
68
69
70%endif ; RAMVARS_INC
Note: See TracBrowser for help on using the repository browser.