Rev 3777 | Rev 4588 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3777 | Rev 4418 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | 7 | ||
8 | $Revision: 3777 $ |
8 | $Revision: 4418 $ |
9 | 9 | ||
10 | 10 | ||
11 | dpl0 equ 10010000b ; data read dpl0 |
11 | dpl0 equ 10010000b ; data read dpl0 |
12 | drw0 equ 10010010b ; data read/write dpl0 |
12 | drw0 equ 10010010b ; data read/write dpl0 |
13 | drw3 equ 11110010b ; data read/write dpl3 |
13 | drw3 equ 11110010b ; data read/write dpl3 |
14 | cpl0 equ 10011010b ; code read dpl0 |
14 | cpl0 equ 10011010b ; code read dpl0 |
15 | cpl3 equ 11111010b ; code read dpl3 |
15 | cpl3 equ 11111010b ; code read dpl3 |
16 | 16 | ||
17 | D32 equ 01000000b ; 32bit segment |
17 | D32 equ 01000000b ; 32bit segment |
18 | G32 equ 10000000b ; page gran |
18 | G32 equ 10000000b ; page gran |
19 | 19 | ||
20 | 20 | ||
21 | ;;;;;;;;;;;;cpu_caps flags;;;;;;;;;;;;;;;; |
21 | ;;;;;;;;;;;;cpu_caps flags;;;;;;;;;;;;;;;; |
22 | 22 | ||
23 | CPU_386 equ 3 |
23 | CPU_386 equ 3 |
24 | CPU_486 equ 4 |
24 | CPU_486 equ 4 |
25 | CPU_PENTIUM equ 5 |
25 | CPU_PENTIUM equ 5 |
26 | CPU_P6 equ 6 |
26 | CPU_P6 equ 6 |
27 | CPU_PENTIUM4 equ 0x0F |
27 | CPU_PENTIUM4 equ 0x0F |
28 | 28 | ||
29 | CAPS_FPU equ 00 ;on-chip x87 floating point unit |
29 | CAPS_FPU equ 00 ;on-chip x87 floating point unit |
30 | CAPS_VME equ 01 ;virtual-mode enhancements |
30 | CAPS_VME equ 01 ;virtual-mode enhancements |
31 | CAPS_DE equ 02 ;debugging extensions |
31 | CAPS_DE equ 02 ;debugging extensions |
32 | CAPS_PSE equ 03 ;page-size extensions |
32 | CAPS_PSE equ 03 ;page-size extensions |
33 | CAPS_TSC equ 04 ;time stamp counter |
33 | CAPS_TSC equ 04 ;time stamp counter |
34 | CAPS_MSR equ 05 ;model-specific registers |
34 | CAPS_MSR equ 05 ;model-specific registers |
35 | CAPS_PAE equ 06 ;physical-address extensions |
35 | CAPS_PAE equ 06 ;physical-address extensions |
36 | CAPS_MCE equ 07 ;machine check exception |
36 | CAPS_MCE equ 07 ;machine check exception |
37 | CAPS_CX8 equ 08 ;CMPXCHG8B instruction |
37 | CAPS_CX8 equ 08 ;CMPXCHG8B instruction |
38 | CAPS_APIC equ 09 ;on-chip advanced programmable |
38 | CAPS_APIC equ 09 ;on-chip advanced programmable |
39 | ; interrupt controller |
39 | ; interrupt controller |
40 | ; 10 ;unused |
40 | ; 10 ;unused |
41 | CAPS_SEP equ 11 ;SYSENTER and SYSEXIT instructions |
41 | CAPS_SEP equ 11 ;SYSENTER and SYSEXIT instructions |
42 | CAPS_MTRR equ 12 ;memory-type range registers |
42 | CAPS_MTRR equ 12 ;memory-type range registers |
43 | CAPS_PGE equ 13 ;page global extension |
43 | CAPS_PGE equ 13 ;page global extension |
44 | CAPS_MCA equ 14 ;machine check architecture |
44 | CAPS_MCA equ 14 ;machine check architecture |
45 | CAPS_CMOV equ 15 ;conditional move instructions |
45 | CAPS_CMOV equ 15 ;conditional move instructions |
46 | CAPS_PAT equ 16 ;page attribute table |
46 | CAPS_PAT equ 16 ;page attribute table |
47 | 47 | ||
48 | CAPS_PSE36 equ 17 ;page-size extensions |
48 | CAPS_PSE36 equ 17 ;page-size extensions |
49 | CAPS_PSN equ 18 ;processor serial number |
49 | CAPS_PSN equ 18 ;processor serial number |
50 | CAPS_CLFLUSH equ 19 ;CLFUSH instruction |
50 | CAPS_CLFLUSH equ 19 ;CLFUSH instruction |
51 | 51 | ||
52 | CAPS_DS equ 21 ;debug store |
52 | CAPS_DS equ 21 ;debug store |
53 | CAPS_ACPI equ 22 ;thermal monitor and software |
53 | CAPS_ACPI equ 22 ;thermal monitor and software |
54 | ;controlled clock supported |
54 | ;controlled clock supported |
55 | CAPS_MMX equ 23 ;MMX instructions |
55 | CAPS_MMX equ 23 ;MMX instructions |
56 | CAPS_FXSR equ 24 ;FXSAVE and FXRSTOR instructions |
56 | CAPS_FXSR equ 24 ;FXSAVE and FXRSTOR instructions |
57 | CAPS_SSE equ 25 ;SSE instructions |
57 | CAPS_SSE equ 25 ;SSE instructions |
58 | CAPS_SSE2 equ 26 ;SSE2 instructions |
58 | CAPS_SSE2 equ 26 ;SSE2 instructions |
59 | CAPS_SS equ 27 ;self-snoop |
59 | CAPS_SS equ 27 ;self-snoop |
60 | CAPS_HTT equ 28 ;hyper-threading technology |
60 | CAPS_HTT equ 28 ;hyper-threading technology |
61 | CAPS_TM equ 29 ;thermal monitor supported |
61 | CAPS_TM equ 29 ;thermal monitor supported |
62 | CAPS_IA64 equ 30 ;IA64 capabilities |
62 | CAPS_IA64 equ 30 ;IA64 capabilities |
63 | CAPS_PBE equ 31 ;pending break enable |
63 | CAPS_PBE equ 31 ;pending break enable |
64 | 64 | ||
65 | ;ecx |
65 | ;ecx |
66 | CAPS_SSE3 equ 32 ;SSE3 instructions |
66 | CAPS_SSE3 equ 32 ;SSE3 instructions |
67 | ; 33 |
67 | ; 33 |
68 | ; 34 |
68 | ; 34 |
69 | CAPS_MONITOR equ 35 ;MONITOR/MWAIT instructions |
69 | CAPS_MONITOR equ 35 ;MONITOR/MWAIT instructions |
70 | CAPS_DS_CPL equ 36 ; |
70 | CAPS_DS_CPL equ 36 ; |
71 | CAPS_VMX equ 37 ;virtual mode extensions |
71 | CAPS_VMX equ 37 ;virtual mode extensions |
72 | ; 38 ; |
72 | ; 38 ; |
73 | CAPS_EST equ 39 ;enhansed speed step |
73 | CAPS_EST equ 39 ;enhansed speed step |
74 | CAPS_TM2 equ 40 ;thermal monitor2 supported |
74 | CAPS_TM2 equ 40 ;thermal monitor2 supported |
75 | ; 41 |
75 | ; 41 |
76 | CAPS_CID equ 42 ; |
76 | CAPS_CID equ 42 ; |
77 | ; 43 |
77 | ; 43 |
78 | ; 44 |
78 | ; 44 |
79 | CAPS_CX16 equ 45 ;CMPXCHG16B instruction |
79 | CAPS_CX16 equ 45 ;CMPXCHG16B instruction |
80 | CAPS_xTPR equ 46 ; |
80 | CAPS_xTPR equ 46 ; |
81 | ; |
81 | ; |
82 | ;reserved |
82 | ;reserved |
83 | ; |
83 | ; |
84 | ;ext edx /ecx |
84 | ;ext edx /ecx |
85 | CAPS_SYSCAL equ 64 ; |
85 | CAPS_SYSCAL equ 64 ; |
86 | CAPS_XD equ 65 ;execution disable |
86 | CAPS_XD equ 65 ;execution disable |
87 | CAPS_FFXSR equ 66 ; |
87 | CAPS_FFXSR equ 66 ; |
88 | CAPS_RDTSCP equ 67 ; |
88 | CAPS_RDTSCP equ 67 ; |
89 | CAPS_X64 equ 68 ; |
89 | CAPS_X64 equ 68 ; |
90 | CAPS_3DNOW equ 69 ; |
90 | CAPS_3DNOW equ 69 ; |
91 | CAPS_3DNOWEXT equ 70 ; |
91 | CAPS_3DNOWEXT equ 70 ; |
92 | CAPS_LAHF equ 71 ; |
92 | CAPS_LAHF equ 71 ; |
93 | CAPS_CMP_LEG equ 72 ; |
93 | CAPS_CMP_LEG equ 72 ; |
94 | CAPS_SVM equ 73 ;secure virual machine |
94 | CAPS_SVM equ 73 ;secure virual machine |
95 | CAPS_ALTMOVCR8 equ 74 ; |
95 | CAPS_ALTMOVCR8 equ 74 ; |
96 | 96 | ||
97 | ; CPU MSR names |
97 | ; CPU MSR names |
98 | MSR_SYSENTER_CS equ 0x174 |
98 | MSR_SYSENTER_CS equ 0x174 |
99 | MSR_SYSENTER_ESP equ 0x175 |
99 | MSR_SYSENTER_ESP equ 0x175 |
100 | MSR_SYSENTER_EIP equ 0x176 |
100 | MSR_SYSENTER_EIP equ 0x176 |
101 | MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register |
101 | MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register |
102 | MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register |
102 | MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register |
103 | 103 | ||
104 | CR0_PE equ 0x00000001 ;protected mode |
104 | CR0_PE equ 0x00000001 ;protected mode |
105 | CR0_MP equ 0x00000002 ;monitor fpu |
105 | CR0_MP equ 0x00000002 ;monitor fpu |
106 | CR0_EM equ 0x00000004 ;fpu emulation |
106 | CR0_EM equ 0x00000004 ;fpu emulation |
107 | CR0_TS equ 0x00000008 ;task switch |
107 | CR0_TS equ 0x00000008 ;task switch |
108 | CR0_ET equ 0x00000010 ;extension type hardcoded to 1 |
108 | CR0_ET equ 0x00000010 ;extension type hardcoded to 1 |
109 | CR0_NE equ 0x00000020 ;numeric error |
109 | CR0_NE equ 0x00000020 ;numeric error |
110 | CR0_WP equ 0x00010000 ;write protect |
110 | CR0_WP equ 0x00010000 ;write protect |
111 | CR0_AM equ 0x00040000 ;alignment check |
111 | CR0_AM equ 0x00040000 ;alignment check |
112 | CR0_NW equ 0x20000000 ;not write-through |
112 | CR0_NW equ 0x20000000 ;not write-through |
113 | CR0_CD equ 0x40000000 ;cache disable |
113 | CR0_CD equ 0x40000000 ;cache disable |
114 | CR0_PG equ 0x80000000 ;paging |
114 | CR0_PG equ 0x80000000 ;paging |
115 | 115 | ||
116 | 116 | ||
117 | CR4_VME equ 0x0001 |
117 | CR4_VME equ 0x0001 |
118 | CR4_PVI equ 0x0002 |
118 | CR4_PVI equ 0x0002 |
119 | CR4_TSD equ 0x0004 |
119 | CR4_TSD equ 0x0004 |
120 | CR4_DE equ 0x0008 |
120 | CR4_DE equ 0x0008 |
121 | CR4_PSE equ 0x0010 |
121 | CR4_PSE equ 0x0010 |
122 | CR4_PAE equ 0x0020 |
122 | CR4_PAE equ 0x0020 |
123 | CR4_MCE equ 0x0040 |
123 | CR4_MCE equ 0x0040 |
124 | CR4_PGE equ 0x0080 |
124 | CR4_PGE equ 0x0080 |
125 | CR4_PCE equ 0x0100 |
125 | CR4_PCE equ 0x0100 |
126 | CR4_OSFXSR equ 0x0200 |
126 | CR4_OSFXSR equ 0x0200 |
127 | CR4_OSXMMEXPT equ 0x0400 |
127 | CR4_OSXMMEXPT equ 0x0400 |
128 | 128 | ||
129 | SSE_IE equ 0x0001 |
129 | SSE_IE equ 0x0001 |
130 | SSE_DE equ 0x0002 |
130 | SSE_DE equ 0x0002 |
131 | SSE_ZE equ 0x0004 |
131 | SSE_ZE equ 0x0004 |
132 | SSE_OE equ 0x0008 |
132 | SSE_OE equ 0x0008 |
133 | SSE_UE equ 0x0010 |
133 | SSE_UE equ 0x0010 |
134 | SSE_PE equ 0x0020 |
134 | SSE_PE equ 0x0020 |
135 | SSE_DAZ equ 0x0040 |
135 | SSE_DAZ equ 0x0040 |
136 | SSE_IM equ 0x0080 |
136 | SSE_IM equ 0x0080 |
137 | SSE_DM equ 0x0100 |
137 | SSE_DM equ 0x0100 |
138 | SSE_ZM equ 0x0200 |
138 | SSE_ZM equ 0x0200 |
139 | SSE_OM equ 0x0400 |
139 | SSE_OM equ 0x0400 |
140 | SSE_UM equ 0x0800 |
140 | SSE_UM equ 0x0800 |
141 | SSE_PM equ 0x1000 |
141 | SSE_PM equ 0x1000 |
142 | SSE_FZ equ 0x8000 |
142 | SSE_FZ equ 0x8000 |
143 | 143 | ||
144 | SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM) |
144 | SSE_INIT equ (SSE_IM+SSE_DM+SSE_ZM+SSE_OM+SSE_UM+SSE_PM) |
145 | 145 | ||
146 | IRQ_PIC equ 0 |
146 | IRQ_PIC equ 0 |
147 | IRQ_APIC equ 1 |
147 | IRQ_APIC equ 1 |
148 | 148 | ||
149 | struct TSS |
149 | struct TSS |
150 | _back rw 2 |
150 | _back rw 2 |
151 | _esp0 rd 1 |
151 | _esp0 rd 1 |
152 | _ss0 rw 2 |
152 | _ss0 rw 2 |
153 | _esp1 rd 1 |
153 | _esp1 rd 1 |
154 | _ss1 rw 2 |
154 | _ss1 rw 2 |
155 | _esp2 rd 1 |
155 | _esp2 rd 1 |
156 | _ss2 rw 2 |
156 | _ss2 rw 2 |
157 | _cr3 rd 1 |
157 | _cr3 rd 1 |
158 | _eip rd 1 |
158 | _eip rd 1 |
159 | _eflags rd 1 |
159 | _eflags rd 1 |
160 | _eax rd 1 |
160 | _eax rd 1 |
161 | _ecx rd 1 |
161 | _ecx rd 1 |
162 | _edx rd 1 |
162 | _edx rd 1 |
163 | _ebx rd 1 |
163 | _ebx rd 1 |
164 | _esp rd 1 |
164 | _esp rd 1 |
165 | _ebp rd 1 |
165 | _ebp rd 1 |
166 | _esi rd 1 |
166 | _esi rd 1 |
167 | _edi rd 1 |
167 | _edi rd 1 |
168 | _es rw 2 |
168 | _es rw 2 |
169 | _cs rw 2 |
169 | _cs rw 2 |
170 | _ss rw 2 |
170 | _ss rw 2 |
171 | _ds rw 2 |
171 | _ds rw 2 |
172 | _fs rw 2 |
172 | _fs rw 2 |
173 | _gs rw 2 |
173 | _gs rw 2 |
174 | _ldt rw 2 |
174 | _ldt rw 2 |
175 | _trap rw 1 |
175 | _trap rw 1 |
176 | _io rw 1 |
176 | _io rw 1 |
177 | rb 24 |
177 | rb 24 |
178 | _io_map_0 rb 4096 |
178 | _io_map_0 rb 4096 |
179 | _io_map_1 rb 4096 |
179 | _io_map_1 rb 4096 |
180 | ends |
180 | ends |
181 | 181 | ||
182 | PARTITION_COUNT equ 64 |
182 | PARTITION_COUNT equ 64 |
183 | DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100) |
183 | DRIVE_DATA_SIZE equ (16+PARTITION_COUNT*100) |
184 | 184 | ||
185 | OS_BASE equ 0x80000000 |
185 | OS_BASE equ 0x80000000 |
186 | 186 | ||
187 | window_data equ (OS_BASE+0x0001000) |
187 | window_data equ (OS_BASE+0x0001000) |
188 | 188 | ||
189 | CURRENT_TASK equ (OS_BASE+0x0003000) |
189 | CURRENT_TASK equ (OS_BASE+0x0003000) |
190 | TASK_COUNT equ (OS_BASE+0x0003004) |
190 | TASK_COUNT equ (OS_BASE+0x0003004) |
191 | TASK_BASE equ (OS_BASE+0x0003010) |
191 | TASK_BASE equ (OS_BASE+0x0003010) |
192 | TASK_DATA equ (OS_BASE+0x0003020) |
192 | TASK_DATA equ (OS_BASE+0x0003020) |
193 | TASK_EVENT equ (OS_BASE+0x0003020) |
193 | TASK_EVENT equ (OS_BASE+0x0003020) |
194 | 194 | ||
195 | CDDataBuf equ (OS_BASE+0x0005000) |
195 | CDDataBuf equ (OS_BASE+0x0005000) |
196 | 196 | ||
197 | ;unused 0x6000 - 0x8fff |
197 | ;unused 0x6000 - 0x8fff |
198 | 198 | ||
199 | BOOT_VARS equ (OS_BASE) ;0x9000 |
199 | BOOT_VARS equ (OS_BASE) ;0x9000 |
200 | 200 | ||
201 | idts equ (OS_BASE+0x000B100) |
201 | idts equ (OS_BASE+0x000B100) |
202 | WIN_STACK equ (OS_BASE+0x000C000) |
202 | WIN_STACK equ (OS_BASE+0x000C000) |
203 | WIN_POS equ (OS_BASE+0x000C400) |
203 | WIN_POS equ (OS_BASE+0x000C400) |
204 | FDD_BUFF equ (OS_BASE+0x000D000) ;512 |
204 | FDD_BUFF equ (OS_BASE+0x000D000) ;512 |
205 | 205 | ||
206 | WIN_TEMP_XY equ (OS_BASE+0x000F300) |
206 | WIN_TEMP_XY equ (OS_BASE+0x000F300) |
207 | KEY_COUNT equ (OS_BASE+0x000F400) |
207 | KEY_COUNT equ (OS_BASE+0x000F400) |
208 | KEY_BUFF equ (OS_BASE+0x000F401) |
208 | KEY_BUFF equ (OS_BASE+0x000F401) |
209 | 209 | ||
210 | BTN_COUNT equ (OS_BASE+0x000F500) |
210 | BTN_COUNT equ (OS_BASE+0x000F500) |
211 | BTN_BUFF equ (OS_BASE+0x000F501) |
211 | BTN_BUFF equ (OS_BASE+0x000F501) |
212 | 212 | ||
213 | 213 | ||
214 | BTN_ADDR equ (OS_BASE+0x000FE88) |
214 | BTN_ADDR equ (OS_BASE+0x000FE88) |
215 | MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
215 | MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
216 | 216 | ||
217 | SYS_SHUTDOWN equ (OS_BASE+0x000FF00) |
217 | SYS_SHUTDOWN equ (OS_BASE+0x000FF00) |
218 | TASK_ACTIVATE equ (OS_BASE+0x000FF01) |
218 | TASK_ACTIVATE equ (OS_BASE+0x000FF01) |
219 | 219 | ||
220 | 220 | ||
221 | TMP_STACK_TOP equ 0x006CC00 |
221 | TMP_STACK_TOP equ 0x006CC00 |
222 | 222 | ||
223 | sys_pgdir equ (OS_BASE+0x006F000) |
223 | sys_pgdir equ (OS_BASE+0x006F000) |
224 | 224 | ||
225 | SLOT_BASE equ (OS_BASE+0x0080000) |
225 | SLOT_BASE equ (OS_BASE+0x0080000) |
226 | 226 | ||
227 | VGABasePtr equ (OS_BASE+0x00A0000) |
227 | VGABasePtr equ (OS_BASE+0x00A0000) |
228 | 228 | ||
229 | CLEAN_ZONE equ (_CLEAN_ZONE-OS_BASE) |
229 | CLEAN_ZONE equ (_CLEAN_ZONE-OS_BASE) |
230 | IDE_DMA equ (_IDE_DMA-OS_BASE) |
230 | IDE_DMA equ (_IDE_DMA-OS_BASE) |
231 | 231 | ||
232 | ; unused? |
232 | ; unused? |
233 | SB16Buffer equ (OS_BASE+0x02A0000) |
233 | SB16Buffer equ (OS_BASE+0x02A0000) |
234 | SB16_Status equ (OS_BASE+0x02B0000) |
234 | SB16_Status equ (OS_BASE+0x02B0000) |
235 | 235 | ||
236 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
236 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
237 | 237 | ||
238 | virtual at (OS_BASE+0x05FFF80) |
238 | virtual at (OS_BASE+0x05FFF80) |
239 | tss TSS |
239 | tss TSS |
240 | end virtual |
240 | end virtual |
241 | 241 | ||
242 | HEAP_BASE equ (OS_BASE+0x0800000) |
242 | HEAP_BASE equ (OS_BASE+0x0800000) |
243 | HEAP_MIN_SIZE equ 0x01000000 |
243 | HEAP_MIN_SIZE equ 0x01000000 |
244 | 244 | ||
245 | page_tabs equ 0xFDC00000 |
245 | page_tabs equ 0xFDC00000 |
246 | app_page_tabs equ 0xFDC00000 |
246 | app_page_tabs equ 0xFDC00000 |
247 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
247 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
248 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
248 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
249 | 249 | ||
250 | LFB_BASE equ 0xFE000000 |
250 | LFB_BASE equ 0xFE000000 |
251 | 251 | ||
252 | 252 | ||
253 | new_app_base equ 0; |
253 | new_app_base equ 0; |
254 | 254 | ||
255 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
255 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
256 | 256 | ||
257 | std_application_base_address equ new_app_base |
257 | std_application_base_address equ new_app_base |
258 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 байт для контекста FPU |
258 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 байт для контекста FPU |
259 | 259 | ||
260 | REG_SS equ (RING0_STACK_SIZE-4) |
260 | REG_SS equ (RING0_STACK_SIZE-4) |
261 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
261 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
262 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
262 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
263 | REG_CS equ (RING0_STACK_SIZE-16) |
263 | REG_CS equ (RING0_STACK_SIZE-16) |
264 | REG_EIP equ (RING0_STACK_SIZE-20) |
264 | REG_EIP equ (RING0_STACK_SIZE-20) |
265 | REG_EAX equ (RING0_STACK_SIZE-24) |
265 | REG_EAX equ (RING0_STACK_SIZE-24) |
266 | REG_ECX equ (RING0_STACK_SIZE-28) |
266 | REG_ECX equ (RING0_STACK_SIZE-28) |
267 | REG_EDX equ (RING0_STACK_SIZE-32) |
267 | REG_EDX equ (RING0_STACK_SIZE-32) |
268 | REG_EBX equ (RING0_STACK_SIZE-36) |
268 | REG_EBX equ (RING0_STACK_SIZE-36) |
269 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
269 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
270 | REG_EBP equ (RING0_STACK_SIZE-44) |
270 | REG_EBP equ (RING0_STACK_SIZE-44) |
271 | REG_ESI equ (RING0_STACK_SIZE-48) |
271 | REG_ESI equ (RING0_STACK_SIZE-48) |
272 | REG_EDI equ (RING0_STACK_SIZE-52) |
272 | REG_EDI equ (RING0_STACK_SIZE-52) |
273 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
273 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
274 | 274 | ||
275 | 275 | ||
276 | PG_UNMAP equ 0x000 |
276 | PG_UNMAP equ 0x000 |
277 | PG_MAP equ 0x001 |
277 | PG_MAP equ 0x001 |
278 | PG_WRITE equ 0x002 |
278 | PG_WRITE equ 0x002 |
279 | PG_SW equ 0x003 |
279 | PG_SW equ 0x003 |
280 | PG_USER equ 0x005 |
280 | PG_USER equ 0x005 |
281 | PG_UW equ 0x007 |
281 | PG_UW equ 0x007 |
282 | PG_NOCACHE equ 0x018 |
282 | PG_NOCACHE equ 0x018 |
283 | PG_LARGE equ 0x080 |
283 | PG_LARGE equ 0x080 |
284 | PG_GLOBAL equ 0x100 |
284 | PG_GLOBAL equ 0x100 |
285 | 285 | ||
286 | PG_SHARED equ 0x200 |
286 | PG_SHARED equ 0x200 |
287 | 287 | ||
288 | ;;;;;;;;;;;boot time variables |
288 | ;;;;;;;;;;;boot time variables |
289 | 289 | ||
290 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
290 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
291 | BOOT_PITCH equ 0x9001 ;word scanline length |
291 | BOOT_PITCH equ 0x9001 ;word scanline length |
292 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
292 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
293 | BOOT_X_RES equ 0x900A ;word X res |
293 | BOOT_X_RES equ 0x900A ;word X res |
294 | BOOT_Y_RES equ 0x900C ;word Y res |
294 | BOOT_Y_RES equ 0x900C ;word Y res |
295 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
295 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
296 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
296 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
297 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
297 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
298 | ;BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
298 | ;BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
299 | BOOT_LAUNCHER_START equ 0x901D ;byte (0 or 1) start the first app (right now it's LAUNCHER) after kernel is loaded? |
299 | BOOT_LAUNCHER_START equ 0x901D ;byte (0 or 1) start the first app (right now it's LAUNCHER) after kernel is loaded? |
300 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
300 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
301 | BOOT_DEBUG_PRINT equ 0x901E ;byte If nonzero, duplicates debug output to the screen. |
301 | BOOT_DEBUG_PRINT equ 0x901E ;byte If nonzero, duplicates debug output to the screen. |
302 | BOOT_DMA equ 0x901F ; |
302 | BOOT_DMA equ 0x901F ; |
303 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
303 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
304 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
304 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
305 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
305 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
306 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
306 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
307 | 307 | ||
308 | BOOT_APM_ENTRY equ 0x9040 |
308 | BOOT_APM_ENTRY equ 0x9040 |
309 | BOOT_APM_VERSION equ 0x9044 |
309 | BOOT_APM_VERSION equ 0x9044 |
310 | BOOT_APM_FLAGS equ 0x9046 ;unused |
310 | BOOT_APM_FLAGS equ 0x9046 ;unused |
311 | BOOT_APM_CODE_32 equ 0x9050 |
311 | BOOT_APM_CODE_32 equ 0x9050 |
312 | BOOT_APM_CODE_16 equ 0x9052 |
312 | BOOT_APM_CODE_16 equ 0x9052 |
313 | BOOT_APM_DATA_16 equ 0x9054 |
313 | BOOT_APM_DATA_16 equ 0x9054 |
314 | BOOT_IDE_BAR0_16 equ 0x9056 |
314 | BOOT_IDE_BAR0_16 equ 0x9056 |
315 | BOOT_IDE_BAR1_16 equ 0x9058 |
315 | BOOT_IDE_BAR1_16 equ 0x9058 |
316 | BOOT_IDE_BAR2_16 equ 0x905A |
316 | BOOT_IDE_BAR2_16 equ 0x905A |
317 | BOOT_IDE_BAR3_16 equ 0x905C |
317 | BOOT_IDE_BAR3_16 equ 0x905C |
318 | BOOT_IDE_PI_16 equ 0x905E |
318 | BOOT_IDE_PI_16 equ 0x905E |
319 | BOOT_IDE_INTERR_16 equ 0x9060 |
319 | BOOT_IDE_INTERR_16 equ 0x9060 |
320 | 320 | ||
321 | TMP_FILE_NAME equ 0 |
321 | TMP_FILE_NAME equ 0 |
322 | TMP_CMD_LINE equ 1024 |
322 | TMP_CMD_LINE equ 1024 |
323 | TMP_ICON_OFFS equ 1280 |
323 | TMP_ICON_OFFS equ 1280 |
324 | 324 | ||
325 | 325 | ||
326 | EVENT_REDRAW equ 0x00000001 |
326 | EVENT_REDRAW equ 0x00000001 |
327 | EVENT_KEY equ 0x00000002 |
327 | EVENT_KEY equ 0x00000002 |
328 | EVENT_BUTTON equ 0x00000004 |
328 | EVENT_BUTTON equ 0x00000004 |
329 | EVENT_BACKGROUND equ 0x00000010 |
329 | EVENT_BACKGROUND equ 0x00000010 |
330 | EVENT_MOUSE equ 0x00000020 |
330 | EVENT_MOUSE equ 0x00000020 |
331 | EVENT_IPC equ 0x00000040 |
331 | EVENT_IPC equ 0x00000040 |
332 | EVENT_NETWORK equ 0x00000080 |
332 | EVENT_NETWORK equ 0x00000080 |
333 | EVENT_DEBUG equ 0x00000100 |
333 | EVENT_DEBUG equ 0x00000100 |
334 | EVENT_NETWORK2 equ 0x00000200 |
334 | EVENT_NETWORK2 equ 0x00000200 |
335 | EVENT_EXTENDED equ 0x00000400 |
335 | EVENT_EXTENDED equ 0x00000400 |
336 | 336 | ||
337 | EV_INTR equ 1 |
337 | EV_INTR equ 1 |
338 | 338 | ||
339 | struct THR_DATA |
339 | struct THR_DATA |
340 | rb (8192-512) |
340 | rb (8192-512) |
341 | ; pl0_stack |
341 | ; pl0_stack |
342 | fpu_state rb 512 |
342 | fpu_state rb 512 |
343 | tls_page rb 4096 |
343 | tls_page rb 4096 |
344 | pdbr rb 4096 |
344 | pdbr rb 4096 |
345 | ends |
345 | ends |
346 | 346 | ||
347 | virtual at (OS_BASE-sizeof.THR_DATA) |
347 | virtual at (OS_BASE-sizeof.THR_DATA) |
348 | thr_data THR_DATA |
348 | thr_data THR_DATA |
349 | end virtual |
349 | end virtual |
350 | 350 | ||
351 | struct SYS_VARS |
351 | struct SYS_VARS |
352 | bpp dd ? |
352 | bpp dd ? |
353 | scanline dd ? |
353 | scanline dd ? |
354 | vesa_mode dd ? |
354 | vesa_mode dd ? |
355 | x_res dd ? |
355 | x_res dd ? |
356 | y_res dd ? |
356 | y_res dd ? |
357 | ends |
357 | ends |
358 | 358 | ||
359 | struct APPOBJ ; common object header |
359 | struct APPOBJ ; common object header |
360 | magic dd ? ; |
360 | magic dd ? ; |
361 | destroy dd ? ; internal destructor |
361 | destroy dd ? ; internal destructor |
362 | fd dd ? ; next object in list |
362 | fd dd ? ; next object in list |
363 | bk dd ? ; prev object in list |
363 | bk dd ? ; prev object in list |
364 | pid dd ? ; owner id |
364 | pid dd ? ; owner id |
365 | ends |
365 | ends |
366 | 366 | ||
367 | APP_OBJ_OFFSET equ 48 |
367 | APP_OBJ_OFFSET equ 48 |
368 | APP_EV_OFFSET equ 40 |
368 | APP_EV_OFFSET equ 40 |
369 | 369 | ||
370 | struct CURSOR APPOBJ |
370 | struct CURSOR APPOBJ |
371 | base dd ? ;allocated memory |
371 | base dd ? ;allocated memory |
372 | hot_x dd ? ;hotspot coords |
372 | hot_x dd ? ;hotspot coords |
373 | hot_y dd ? |
373 | hot_y dd ? |
374 | 374 | ||
375 | list_next dd ? ;next cursor in cursor list |
375 | list_next dd ? ;next cursor in cursor list |
376 | list_prev dd ? ;prev cursor in cursor list |
376 | list_prev dd ? ;prev cursor in cursor list |
377 | dev_obj dd ? ;device depended data |
377 | dev_obj dd ? ;device depended data |
378 | ends |
378 | ends |
379 | 379 | ||
380 | 380 | ||
381 | struct EVENT APPOBJ |
381 | struct EVENT APPOBJ |
382 | id dd ? ;event uid |
382 | id dd ? ;event uid |
383 | state dd ? ;internal flags |
383 | state dd ? ;internal flags |
384 | code dd ? |
384 | code dd ? |
385 | rd 5 |
385 | rd 5 |
386 | ends |
386 | ends |
387 | 387 | ||
388 | 388 | ||
389 | struct SMEM |
389 | struct SMEM |
390 | bk dd ? |
390 | bk dd ? |
391 | fd dd ? ;+4 |
391 | fd dd ? ;+4 |
392 | base dd ? ;+8 |
392 | base dd ? ;+8 |
393 | size dd ? ;+12 |
393 | size dd ? ;+12 |
394 | access dd ? ;+16 |
394 | access dd ? ;+16 |
395 | refcount dd ? ;+20 |
395 | refcount dd ? ;+20 |
396 | name rb 32 ;+24 |
396 | name rb 32 ;+24 |
397 | ends |
397 | ends |
398 | 398 | ||
399 | struct SMAP APPOBJ |
399 | struct SMAP APPOBJ |
400 | base dd ? ;mapped base |
400 | base dd ? ;mapped base |
401 | parent dd ? ;SMEM |
401 | parent dd ? ;SMEM |
402 | ends |
402 | ends |
403 | 403 | ||
404 | struct DLLDESCR |
404 | struct DLLDESCR |
405 | bk dd ? |
405 | bk dd ? |
406 | fd dd ? ;+4 |
406 | fd dd ? ;+4 |
407 | data dd ? ;+8 |
407 | data dd ? ;+8 |
408 | size dd ? ;+12 |
408 | size dd ? ;+12 |
409 | timestamp dq ? |
409 | timestamp dq ? |
410 | refcount dd ? |
410 | refcount dd ? |
411 | defaultbase dd ? |
411 | defaultbase dd ? |
412 | coff_hdr dd ? |
412 | coff_hdr dd ? |
413 | symbols_ptr dd ? |
413 | symbols_ptr dd ? |
414 | symbols_num dd ? |
414 | symbols_num dd ? |
415 | symbols_lim dd ? |
415 | symbols_lim dd ? |
416 | exports dd ? ;export table |
416 | exports dd ? ;export table |
417 | name rb 260 |
417 | name rb 260 |
418 | ends |
418 | ends |
419 | 419 | ||
420 | struct HDLL |
420 | struct HDLL |
421 | fd dd ? ;next object in list |
421 | fd dd ? ;next object in list |
422 | bk dd ? ;prev object in list |
422 | bk dd ? ;prev object in list |
423 | pid dd ? ;owner id |
423 | pid dd ? ;owner id |
424 | 424 | ||
425 | base dd ? ;mapped base |
425 | base dd ? ;mapped base |
426 | size dd ? ;mapped size |
426 | size dd ? ;mapped size |
427 | refcount dd ? ;reference counter for this process and this lib |
427 | refcount dd ? ;reference counter for this process and this lib |
428 | parent dd ? ;DLLDESCR |
428 | parent dd ? ;DLLDESCR |
429 | ends |
429 | ends |
430 | 430 | ||
431 | struct display_t |
431 | struct display_t |
432 | x dd ? |
432 | x dd ? |
433 | y dd ? |
433 | y dd ? |
434 | width dd ? |
434 | width dd ? |
435 | height dd ? |
435 | height dd ? |
436 | bpp dd ? |
436 | bpp dd ? |
437 | vrefresh dd ? |
437 | vrefresh dd ? |
438 | pitch dd ? |
438 | pitch dd ? |
439 | lfb dd ? |
439 | lfb dd ? |
440 | 440 | ||
441 | modes dd ? |
441 | modes dd ? |
442 | ddev dd ? |
442 | ddev dd ? |
443 | connector dd ? |
443 | connector dd ? |
444 | crtc dd ? |
444 | crtc dd ? |
445 | 445 | ||
446 | cr_list.next dd ? |
446 | cr_list.next dd ? |
447 | cr_list.prev dd ? |
447 | cr_list.prev dd ? |
448 | 448 | ||
449 | cursor dd ? |
449 | cursor dd ? |
450 | 450 | ||
451 | init_cursor dd ? |
451 | init_cursor dd ? |
452 | select_cursor dd ? |
452 | select_cursor dd ? |
453 | show_cursor dd ? |
453 | show_cursor dd ? |
454 | move_cursor dd ? |
454 | move_cursor dd ? |
455 | restore_cursor dd ? |
455 | restore_cursor dd ? |
456 | disable_mouse dd ? |
456 | disable_mouse dd ? |
457 | mask_seqno dd ? |
457 | mask_seqno dd ? |
458 | check_mouse dd ? |
458 | check_mouse dd ? |
459 | check_m_pixel dd ? |
459 | check_m_pixel dd ? |
460 | ends |
460 | ends |
461 | 461 | ||
462 | struct BOOT_DATA |
462 | struct BOOT_DATA |
463 | bpp dd ? |
463 | bpp dd ? |
464 | scanline dd ? |
464 | scanline dd ? |
465 | vesa_mode dd ? |
465 | vesa_mode dd ? |
466 | x_res dd ? |
466 | x_res dd ? |
467 | y_res dd ? |
467 | y_res dd ? |
468 | mouse_port dd ? |
468 | mouse_port dd ? |
469 | bank_switch dd ? |
469 | bank_switch dd ? |
470 | lfb dd ? |
470 | lfb dd ? |
471 | vesa_mem dd ? |
471 | vesa_mem dd ? |
472 | log dd ? |
472 | log dd ? |
473 | direct_lfb dd ? |
473 | direct_lfb dd ? |
474 | pci_data dd ? |
474 | pci_data dd ? |
475 | dd ? |
475 | dd ? |
476 | vrr dd ? |
476 | vrr dd ? |
477 | ide_base dd ? |
477 | ide_base dd ? |
478 | mem_amount dd ? |
478 | mem_amount dd ? |
479 | pages_count dd ? |
479 | pages_count dd ? |
480 | pagemap_size dd ? |
480 | pagemap_size dd ? |
481 | kernel_max dd ? |
481 | kernel_max dd ? |
482 | kernel_pages dd ? |
482 | kernel_pages dd ? |
483 | kernel_tables dd ? |
483 | kernel_tables dd ? |
484 | 484 | ||
485 | cpu_vendor dd ? |
485 | cpu_vendor dd ? |
486 | dd ? |
486 | dd ? |
487 | dd ? |
487 | dd ? |
488 | cpu_sign dd ? |
488 | cpu_sign dd ? |
489 | cpu_info dd ? |
489 | cpu_info dd ? |
490 | cpu_caps dd ? |
490 | cpu_caps dd ? |
491 | dd ? |
491 | dd ? |
492 | dd ? |
492 | dd ? |
493 | ends |
493 | ends |
494 | 494 | ||
495 | struct LHEAD |
495 | struct LHEAD |
496 | next dd ? ;next object in list |
496 | next dd ? ;next object in list |
497 | prev dd ? ;prev object in list |
497 | prev dd ? ;prev object in list |
498 | ends |
498 | ends |
499 | 499 | ||
500 | struct MUTEX |
500 | struct MUTEX |
501 | lhead LHEAD |
501 | lhead LHEAD |
502 | count dd ? |
502 | count dd ? |
503 | ends |
503 | ends |
504 | 504 | ||
505 | struct PCIDEV |
505 | struct PCIDEV |
506 | bk dd ? |
506 | bk dd ? |
507 | fd dd ? |
507 | fd dd ? |
508 | vendor_device_id dd ? |
508 | vendor_device_id dd ? |
509 | class dd ? |
509 | class dd ? |
510 | devfn db ? |
510 | devfn db ? |
511 | bus db ? |
511 | bus db ? |
- | 512 | rb 2 |
|
- | 513 | owner dd ? ; pointer to SRV or 0 |
|
512 | ends |
514 | ends |
513 | 515 | ||
514 | ; The following macro assume that we are on uniprocessor machine. |
516 | ; The following macro assume that we are on uniprocessor machine. |
515 | ; Serious work is needed for multiprocessor machines. |
517 | ; Serious work is needed for multiprocessor machines. |
516 | macro spin_lock_irqsave spinlock |
518 | macro spin_lock_irqsave spinlock |
517 | { |
519 | { |
518 | pushf |
520 | pushf |
519 | cli |
521 | cli |
520 | } |
522 | } |
521 | macro spin_unlock_irqrestore spinlock |
523 | macro spin_unlock_irqrestore spinlock |
522 | { |
524 | { |
523 | popf |
525 | popf |
524 | } |
526 | } |
525 | macro spin_lock_irq spinlock |
527 | macro spin_lock_irq spinlock |
526 | { |
528 | { |
527 | cli |
529 | cli |
528 | } |
530 | } |
529 | macro spin_unlock_irq spinlock |
531 | macro spin_unlock_irq spinlock |
530 | { |
532 | { |
531 | sti |
533 | sti |
532 | } |
534 | } |
533 | 535 | ||
534 | struct MEM_STATE |
536 | struct MEM_STATE |
535 | mutex MUTEX |
537 | mutex MUTEX |
536 | smallmap dd ? |
538 | smallmap dd ? |
537 | treemap dd ? |
539 | treemap dd ? |
538 | topsize dd ? |
540 | topsize dd ? |
539 | top dd ? |
541 | top dd ? |
540 | smallbins rd 4*32 |
542 | smallbins rd 4*32 |
541 | treebins rd 32 |
543 | treebins rd 32 |
542 | ends |
544 | ends |
543 | 545 | ||
544 | struct PG_DATA |
546 | struct PG_DATA |
545 | mem_amount dd ? |
547 | mem_amount dd ? |
546 | vesa_mem dd ? |
548 | vesa_mem dd ? |
547 | pages_count dd ? |
549 | pages_count dd ? |
548 | pages_free dd ? |
550 | pages_free dd ? |
549 | pages_faults dd ? |
551 | pages_faults dd ? |
550 | pagemap_size dd ? |
552 | pagemap_size dd ? |
551 | kernel_pages dd ? |
553 | kernel_pages dd ? |
552 | kernel_tables dd ? |
554 | kernel_tables dd ? |
553 | sys_page_dir dd ? |
555 | sys_page_dir dd ? |
554 | mutex MUTEX |
556 | mutex MUTEX |
555 | ends |
557 | ends |
556 | 558 | ||
557 | struct SRV |
559 | struct SRV |
558 | srv_name rb 16 ;ASCIIZ string |
560 | srv_name rb 16 ;ASCIIZ string |
559 | magic dd ? ;+0x10 ;'SRV ' |
561 | magic dd ? ;+0x10 ;'SRV ' |
560 | size dd ? ;+0x14 ;size of structure SRV |
562 | size dd ? ;+0x14 ;size of structure SRV |
561 | fd dd ? ;+0x18 ;next SRV descriptor |
563 | fd dd ? ;+0x18 ;next SRV descriptor |
562 | bk dd ? ;+0x1C ;prev SRV descriptor |
564 | bk dd ? ;+0x1C ;prev SRV descriptor |
563 | base dd ? ;+0x20 ;service base address |
565 | base dd ? ;+0x20 ;service base address |
564 | entry dd ? ;+0x24 ;service START function |
566 | entry dd ? ;+0x24 ;service START function |
565 | srv_proc dd ? ;+0x28 ;user mode service handler |
567 | srv_proc dd ? ;+0x28 ;user mode service handler |
566 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
568 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
567 | ends |
569 | ends |
568 | 570 | ||
569 | struct USBSRV |
571 | struct USBSRV |
570 | srv SRV |
572 | srv SRV |
571 | usb_func dd ? |
573 | usb_func dd ? |
572 | ends |
574 | ends |
573 | 575 | ||
574 | struct USBFUNC |
576 | struct USBFUNC |
575 | strucsize dd ? |
577 | strucsize dd ? |
576 | add_device dd ? |
578 | add_device dd ? |
577 | device_disconnect dd ? |
579 | device_disconnect dd ? |
578 | ends |
580 | ends |
579 | 581 | ||
580 | DRV_ENTRY equ 1 |
582 | DRV_ENTRY equ 1 |
581 | DRV_EXIT equ -1 |
583 | DRV_EXIT equ -1 |
582 | 584 | ||
583 | struct COFF_HEADER |
585 | struct COFF_HEADER |
584 | machine dw ? |
586 | machine dw ? |
585 | nSections dw ? |
587 | nSections dw ? |
586 | DataTime dd ? |
588 | DataTime dd ? |
587 | pSymTable dd ? |
589 | pSymTable dd ? |
588 | nSymbols dd ? |
590 | nSymbols dd ? |
589 | optHeader dw ? |
591 | optHeader dw ? |
590 | flags dw ? |
592 | flags dw ? |
591 | ends |
593 | ends |
592 | 594 | ||
593 | struct COFF_SECTION |
595 | struct COFF_SECTION |
594 | Name rb 8 |
596 | Name rb 8 |
595 | VirtualSize dd ? |
597 | VirtualSize dd ? |
596 | VirtualAddress dd ? |
598 | VirtualAddress dd ? |
597 | SizeOfRawData dd ? |
599 | SizeOfRawData dd ? |
598 | PtrRawData dd ? |
600 | PtrRawData dd ? |
599 | PtrReloc dd ? |
601 | PtrReloc dd ? |
600 | PtrLinenumbers dd ? |
602 | PtrLinenumbers dd ? |
601 | NumReloc dw ? |
603 | NumReloc dw ? |
602 | NumLinenum dw ? |
604 | NumLinenum dw ? |
603 | Characteristics dd ? |
605 | Characteristics dd ? |
604 | ends |
606 | ends |
605 | 607 | ||
606 | struct COFF_RELOC |
608 | struct COFF_RELOC |
607 | VirtualAddress dd ? |
609 | VirtualAddress dd ? |
608 | SymIndex dd ? |
610 | SymIndex dd ? |
609 | Type dw ? |
611 | Type dw ? |
610 | ends |
612 | ends |
611 | 613 | ||
612 | struct COFF_SYM |
614 | struct COFF_SYM |
613 | Name rb 8 |
615 | Name rb 8 |
614 | Value dd ? |
616 | Value dd ? |
615 | SectionNumber dw ? |
617 | SectionNumber dw ? |
616 | Type dw ? |
618 | Type dw ? |
617 | StorageClass db ? |
619 | StorageClass db ? |
618 | NumAuxSymbols db ? |
620 | NumAuxSymbols db ? |
619 | ends |
621 | ends |
620 | 622 | ||
621 | struct IOCTL |
623 | struct IOCTL |
622 | handle dd ? |
624 | handle dd ? |
623 | io_code dd ? |
625 | io_code dd ? |
624 | input dd ? |
626 | input dd ? |
625 | inp_size dd ? |
627 | inp_size dd ? |
626 | output dd ? |
628 | output dd ? |
627 | out_size dd ? |
629 | out_size dd ? |
628 | ends |
630 | ends |
629 | 631 | ||
630 | struct IRQH |
632 | struct IRQH |
631 | list LHEAD |
633 | list LHEAD |
632 | handler dd ? ;handler roututine |
634 | handler dd ? ;handler roututine |
633 | data dd ? ;user-specific data |
635 | data dd ? ;user-specific data |
634 | num_ints dd ? ;how many times handled |
636 | num_ints dd ? ;how many times handled |
635 | ends |
637 | ends |