root / lab4 / .minix-src / include / i386 / int86.h @ 13
History | View | Annotate | Download (2.24 KB)
1 |
#ifndef _INT86_H
|
---|---|
2 |
#define _INT86_H
|
3 |
|
4 |
#if defined(__i386__)
|
5 |
|
6 |
# include <sys/types.h> |
7 |
|
8 |
/* registers used in an PC real mode call for BIOS services */
|
9 |
typedef struct reg86 { |
10 |
union {
|
11 |
/* 32-bit (double word [dword] or long word) access */
|
12 |
struct {
|
13 |
u32_t ef; /* 32-bit flags (output only) */
|
14 |
u32_t vec; /* Driver vector (input only) */
|
15 |
u32_t : 32; /* unused */ |
16 |
u32_t eax; /* 32-bit general register */
|
17 |
u32_t ebx; /* 32-bit general register */
|
18 |
u32_t ecx; /* 32-bit general register */
|
19 |
u32_t edx; /* 32-bit general register */
|
20 |
u32_t esi; /* 32-bit index register */
|
21 |
u32_t edi; /* 32-bit index register */
|
22 |
u32_t ebp; /* 32-bit pointer register */
|
23 |
}; |
24 |
|
25 |
/* 16-bit (word) access */
|
26 |
struct {
|
27 |
u16_t f; /* 16-bit flags (output only) */
|
28 |
u16_t : 16; /* unused */ |
29 |
u16_t off, seg; /* Driver vector (input only) */
|
30 |
u16_t ds, es; /* DS and ES real mode segment registers */
|
31 |
u16_t ax; /* 16-bit general register */
|
32 |
u16_t : 16; /* unused */ |
33 |
u16_t bx; /* 16-bit general register */
|
34 |
u16_t : 16; /* unused */ |
35 |
u16_t cx; /* 16-bit general register */
|
36 |
u16_t : 16; /* unused */ |
37 |
u16_t dx; /* 16-bit general register */
|
38 |
u16_t : 16; /*unused */ |
39 |
u16_t si; /* 16-bit index register */
|
40 |
u16_t : 16; /*unused */ |
41 |
u16_t di; /* 16-bit index register */
|
42 |
u16_t : 16; /* unused */ |
43 |
u16_t bp; /* 16-bit pointer register */
|
44 |
u16_t : 16; /*unused */ |
45 |
}; |
46 |
|
47 |
/* 8-bit (byte) access */
|
48 |
struct {
|
49 |
u8_t intno; /* Interrupt number (input only) */
|
50 |
u8_t : 8; /* unused */ |
51 |
u16_t : 16; /* unused */ |
52 |
u32_t : 32; /* unused */ |
53 |
u32_t : 32; /* unused */ |
54 |
u8_t al, ah; /* 8-bit general registers */
|
55 |
u16_t : 16; /* unused */ |
56 |
u8_t bl, bh; /* 8-bit general registers */
|
57 |
u16_t : 16; /* unused */ |
58 |
u8_t cl, ch; /* 8-bit general registers */
|
59 |
u16_t : 16; /* unused */ |
60 |
u8_t dl, dh; /* 8-bit general registers */
|
61 |
u16_t : 16; /* unused */ |
62 |
u32_t : 32; /* unused */ |
63 |
u32_t : 32; /* unused */ |
64 |
u32_t : 32; /* unused */ |
65 |
}; |
66 |
}; |
67 |
} reg86_t; |
68 |
|
69 |
#endif
|
70 |
|
71 |
#endif /* _INT86_H */ |