1 | ; File name : Int13h.inc |
---|
2 | ; Project name : IDE BIOS |
---|
3 | ; Created date : 23.3.2010 |
---|
4 | ; Last update : 29.7.2010 |
---|
5 | ; Author : Tomi Tilli |
---|
6 | ; Description : Equates used in INT 13h functions. |
---|
7 | %ifndef INT13H_INC |
---|
8 | %define INT13H_INC |
---|
9 | |
---|
10 | ; Hard Disk function (INT 13h) return status codes in AH |
---|
11 | RET_HD_SUCCESS EQU 0h ; Operation succesfull, no error occurred |
---|
12 | RET_HD_INVALID EQU 1h ; Invalid value passed or unsupported func |
---|
13 | RET_HD_ADDRMARK EQU 2h ; Missing address mark |
---|
14 | RET_HD_WRITEPROT EQU 3h ; Removable media is write protected |
---|
15 | RET_HD_NOT_FOUND EQU 4h ; Requested sector not found |
---|
16 | RET_HD_RESETFAIL EQU 5h ; Reset failed |
---|
17 | RET_HD_CHANGED EQU 6h ; Media changed |
---|
18 | RET_HD_PARAMACT EQU 7h ; Drive parameter activity failed |
---|
19 | RET_HD_OVERRUN EQU 8h ; DMA overrun |
---|
20 | RET_HD_BOUNDARY EQU 9h ; Data boundary error |
---|
21 | RET_HD_BADSECTOR EQU 0Ah ; Bad sector detected |
---|
22 | RET_HD_BADTRACK EQU 0Bh ; Bad track detected |
---|
23 | RET_HD_UNCORRECC EQU 10h ; Uncorrectable ECC error |
---|
24 | RET_HD_ECC EQU 11h ; Corrected ECC error |
---|
25 | RET_HD_CONTROLLER EQU 20h ; Hard disk controller or drive problem |
---|
26 | RET_HD_NOMEDIA EQU 31h ; No media in removable media drive |
---|
27 | RET_HD_SEEK_FAIL EQU 40h ; Seek operation failed |
---|
28 | RET_HD_TIMEOUT EQU 80h ; Drive failed to respond |
---|
29 | RET_HD_NOTREADY EQU 0AAh ; Drive is not ready or is not selected |
---|
30 | RET_HD_NOTLOCKED EQU 0B0h ; Volume not locked in drive |
---|
31 | RET_HD_LOCKED EQU 0B1h ; Volume locked in drive |
---|
32 | RET_HD_NOTREMOVABLE EQU 0B2h ; Volume not removable |
---|
33 | RET_HD_INUSE EQU 0B3h ; Volume in use |
---|
34 | RET_HD_LOCKEXCEEDED EQU 0B4h ; Lock count exceeded |
---|
35 | RET_HD_EJECTFAIL EQU 0B5h ; Valid eject request failed |
---|
36 | RET_HD_UNDEFINED EQU 0BBh ; Undefined error occurred |
---|
37 | RET_HD_WRFAULT EQU 0CCh ; Write fault on selected drive |
---|
38 | RET_HD_STATUSERR EQU 0E0h ; Status error without error |
---|
39 | RET_HD_SENSEFAIL EQU 0FFh ; Sense operation failed |
---|
40 | |
---|
41 | |
---|
42 | ; Timeout values for IDE controller timeout |
---|
43 | ; 255 is the maximum value. Zero means immediate timeout. |
---|
44 | B_TIMEOUT_BSY EQU (1000/55) ; 1000 ms |
---|
45 | B_TIMEOUT_RDY EQU (1000/55) ; 1000 ms |
---|
46 | B_TIMEOUT_DRQ EQU 255 ; 14 s (some CF cards occasionally have long write delays) |
---|
47 | B_TIMEOUT_DRVINFO EQU (500/55) ; 500 ms |
---|
48 | B_TIMEOUT_RESET EQU 255 ; 14 s |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | ; Floppy Drive types returned by INT 13h, AH=08h |
---|
53 | FLOPPY_TYPE_525_OR_35_DD EQU 0 |
---|
54 | FLOPPY_TYPE_525_DD EQU 1 |
---|
55 | FLOPPY_TYPE_525_HD EQU 2 |
---|
56 | FLOPPY_TYPE_35_DD EQU 3 |
---|
57 | FLOPPY_TYPE_35_HD EQU 4 |
---|
58 | FLOPPY_TYPE_35_ED EQU 6 |
---|
59 | |
---|
60 | |
---|
61 | %endif ; INT13H_INC |
---|