1
2
3
4
5
6 #ifndef _HDREG_H
7 #define _HDREG_H
8
9
10 #define HD_DATA 0x1f0
11 #define HD_ERROR 0x1f1
12 #define HD_NSECTOR 0x1f2
13 #define HD_SECTOR 0x1f3
14 #define HD_LCYL 0x1f4
15 #define HD_HCYL 0x1f5
16 #define HD_CURRENT 0x1f6
17 #define HD_STATUS 0x1f7
18 #define HD_PRECOMP HD_ERROR
19 #define HD_COMMAND HD_STATUS
20
21 #define HD_CMD 0x3f6
22
23
24 #define ERR_STAT 0x01
25 #define INDEX_STAT 0x02
26 #define ECC_STAT 0x04
27 #define DRQ_STAT 0x08
28 #define SEEK_STAT 0x10
29 #define WRERR_STAT 0x20
30 #define READY_STAT 0x40
31 #define BUSY_STAT 0x80
32
33
34 #define WIN_RESTORE 0x10
35 #define WIN_READ 0x20
36 #define WIN_WRITE 0x30
37 #define WIN_VERIFY 0x40
38 #define WIN_FORMAT 0x50
39 #define WIN_INIT 0x60
40 #define WIN_SEEK 0x70
41 #define WIN_DIAGNOSE 0x90
42 #define WIN_SPECIFY 0x91
43
44
45 #define MARK_ERR 0x01
46 #define TRK0_ERR 0x02
47 #define ABRT_ERR 0x04
48 #define ID_ERR 0x10
49 #define ECC_ERR 0x40
50 #define BBD_ERR 0x80
51
52 struct partition {
53 unsigned char boot_ind;
54 unsigned char head;
55 unsigned char sector;
56 unsigned char cyl;
57 unsigned char sys_ind;
58 unsigned char end_head;
59 unsigned char end_sector;
60 unsigned char end_cyl;
61 unsigned int start_sect;
62 unsigned int nr_sects;
63 };
64
65 #endif