Rev 2466 | Rev 2485 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2466 | Rev 2480 | ||
---|---|---|---|
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: 2466 $ |
8 | $Revision: 2480 $ |
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 | OS_BASE equ 0x80000000 |
182 | OS_BASE equ 0x80000000 |
183 | 183 | ||
184 | window_data equ (OS_BASE+0x0001000) |
184 | window_data equ (OS_BASE+0x0001000) |
185 | 185 | ||
186 | CURRENT_TASK equ (OS_BASE+0x0003000) |
186 | CURRENT_TASK equ (OS_BASE+0x0003000) |
187 | TASK_COUNT equ (OS_BASE+0x0003004) |
187 | TASK_COUNT equ (OS_BASE+0x0003004) |
188 | TASK_BASE equ (OS_BASE+0x0003010) |
188 | TASK_BASE equ (OS_BASE+0x0003010) |
189 | TASK_DATA equ (OS_BASE+0x0003020) |
189 | TASK_DATA equ (OS_BASE+0x0003020) |
190 | TASK_EVENT equ (OS_BASE+0x0003020) |
190 | TASK_EVENT equ (OS_BASE+0x0003020) |
191 | 191 | ||
192 | d_width_calc_area equ (OS_BASE+0x0005000) |
192 | d_width_calc_area equ (OS_BASE+0x0005000) |
- | 193 | BPSLine_calc_area equ (OS_BASE+0x0339000) |
|
- | 194 | ||
193 | mouseunder equ (OS_BASE+0x0006900) |
195 | mouseunder equ (OS_BASE+0x0006900) |
194 | CDDataBuf equ (OS_BASE+0x0007000) |
196 | CDDataBuf equ (OS_BASE+0x0007000) |
195 | FLOPPY_BUFF equ (OS_BASE+0x0008000) |
197 | FLOPPY_BUFF equ (OS_BASE+0x0008000) |
196 | ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused |
198 | ACTIVE_PROC_STACK equ (OS_BASE+0x000A400) ;unused |
197 | idts equ (OS_BASE+0x000B100) |
199 | idts equ (OS_BASE+0x000B100) |
198 | WIN_STACK equ (OS_BASE+0x000C000) |
200 | WIN_STACK equ (OS_BASE+0x000C000) |
199 | WIN_POS equ (OS_BASE+0x000C400) |
201 | WIN_POS equ (OS_BASE+0x000C400) |
200 | FDD_BUFF equ (OS_BASE+0x000D000) |
202 | FDD_BUFF equ (OS_BASE+0x000D000) |
201 | 203 | ||
202 | ;unused ? only one reference |
204 | ;unused ? only one reference |
203 | ENABLE_TASKSWITCH equ (OS_BASE+0x000E000) |
205 | ENABLE_TASKSWITCH equ (OS_BASE+0x000E000) |
204 | 206 | ||
205 | PUTPIXEL equ (OS_BASE+0x000E020) |
207 | PUTPIXEL equ (OS_BASE+0x000E020) |
206 | GETPIXEL equ (OS_BASE+0x000E024) |
208 | GETPIXEL equ (OS_BASE+0x000E024) |
207 | 209 | ||
208 | ;unused ? only one reference |
210 | ;unused ? only one reference |
209 | BANK_SWITCH equ (OS_BASE+0x000E030) |
211 | BANK_SWITCH equ (OS_BASE+0x000E030) |
210 | 212 | ||
211 | ;unused ? store mousepointer |
213 | ;unused ? store mousepointer |
212 | MOUSE_PICTURE equ (OS_BASE+0x000F200) |
214 | MOUSE_PICTURE equ (OS_BASE+0x000F200) |
213 | 215 | ||
214 | ;MOUSE_VISIBLE equ (OS_BASE+0x000F204) |
216 | ;MOUSE_VISIBLE equ (OS_BASE+0x000F204) |
215 | WIN_TEMP_XY equ (OS_BASE+0x000F300) |
217 | WIN_TEMP_XY equ (OS_BASE+0x000F300) |
216 | KEY_COUNT equ (OS_BASE+0x000F400) |
218 | KEY_COUNT equ (OS_BASE+0x000F400) |
217 | KEY_BUFF equ (OS_BASE+0x000F401) |
219 | KEY_BUFF equ (OS_BASE+0x000F401) |
218 | 220 | ||
219 | BTN_COUNT equ (OS_BASE+0x000F500) |
221 | BTN_COUNT equ (OS_BASE+0x000F500) |
220 | BTN_BUFF equ (OS_BASE+0x000F501) |
222 | BTN_BUFF equ (OS_BASE+0x000F501) |
221 | 223 | ||
222 | CPU_FREQ equ (OS_BASE+0x000F600) |
224 | CPU_FREQ equ (OS_BASE+0x000F600) |
223 | 225 | ||
224 | ;unused ? no active references |
226 | ;unused ? no active references |
225 | MOUSE_PORT equ (OS_BASE+0x000F604) |
227 | MOUSE_PORT equ (OS_BASE+0x000F604) |
226 | 228 | ||
227 | ;unused |
229 | ;unused |
228 | PS2_CHUNK equ (OS_BASE+0x000FB00) |
230 | PS2_CHUNK equ (OS_BASE+0x000FB00) |
229 | 231 | ||
230 | MOUSE_SCROLL_H equ (OS_BASE+0x000FB08) |
232 | MOUSE_SCROLL_H equ (OS_BASE+0x000FB08) |
231 | MOUSE_X equ (OS_BASE+0x000FB0A) |
233 | MOUSE_X equ (OS_BASE+0x000FB0A) |
232 | MOUSE_Y equ (OS_BASE+0x000FB0C) |
234 | MOUSE_Y equ (OS_BASE+0x000FB0C) |
233 | MOUSE_SCROLL_V equ (OS_BASE+0x000FB0E) |
235 | MOUSE_SCROLL_V equ (OS_BASE+0x000FB0E) |
234 | 236 | ||
235 | MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10) |
237 | MOUSE_COLOR_MEM equ (OS_BASE+0x000FB10) |
236 | COLOR_TEMP equ (OS_BASE+0x000FB30) |
238 | COLOR_TEMP equ (OS_BASE+0x000FB30) |
237 | BTN_DOWN equ (OS_BASE+0x000FB40) |
239 | BTN_DOWN equ (OS_BASE+0x000FB40) |
238 | MOUSE_DOWN equ (OS_BASE+0x000FB44) |
240 | MOUSE_DOWN equ (OS_BASE+0x000FB44) |
239 | X_UNDER equ (OS_BASE+0x000FB4A) |
241 | X_UNDER equ (OS_BASE+0x000FB4A) |
240 | Y_UNDER equ (OS_BASE+0x000FB4C) |
242 | Y_UNDER equ (OS_BASE+0x000FB4C) |
241 | ScreenBPP equ (OS_BASE+0x000FBF1) |
243 | ScreenBPP equ (OS_BASE+0x000FBF1) |
242 | 244 | ||
243 | ;unused ? only one reference |
245 | ;unused ? only one reference |
244 | MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) |
246 | MOUSE_BUFF_COUNT equ (OS_BASE+0x000FCFF) |
245 | 247 | ||
246 | Screen_Max_X equ (OS_BASE+0x000FE00) |
248 | Screen_Max_X equ (OS_BASE+0x000FE00) |
247 | Screen_Max_Y equ (OS_BASE+0x000FE04) |
249 | Screen_Max_Y equ (OS_BASE+0x000FE04) |
248 | BytesPerScanLine equ (OS_BASE+0x000FE08) |
250 | BytesPerScanLine equ (OS_BASE+0x000FE08) |
249 | SCR_MODE equ (OS_BASE+0x000FE0C) |
251 | SCR_MODE equ (OS_BASE+0x000FE0C) |
250 | 252 | ||
251 | LFBAddress equ (OS_BASE+0x000FE80) |
253 | LFBAddress equ (OS_BASE+0x000FE80) |
252 | BTN_ADDR equ (OS_BASE+0x000FE88) |
254 | BTN_ADDR equ (OS_BASE+0x000FE88) |
253 | MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
255 | MEM_AMOUNT equ (OS_BASE+0x000FE8C) |
254 | 256 | ||
255 | SYS_SHUTDOWN equ (OS_BASE+0x000FF00) |
257 | SYS_SHUTDOWN equ (OS_BASE+0x000FF00) |
256 | TASK_ACTIVATE equ (OS_BASE+0x000FF01) |
258 | TASK_ACTIVATE equ (OS_BASE+0x000FF01) |
257 | 259 | ||
258 | REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0) |
260 | REDRAW_BACKGROUND equ (OS_BASE+0x000FFF0) |
259 | BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1) |
261 | BACKGROUND_CHANGED equ (OS_BASE+0x000FFF1) |
260 | BANK_RW equ (OS_BASE+0x000FFF2) |
262 | BANK_RW equ (OS_BASE+0x000FFF2) |
261 | MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4) |
263 | MOUSE_BACKGROUND equ (OS_BASE+0x000FFF4) |
262 | DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5) |
264 | DONT_DRAW_MOUSE equ (OS_BASE+0x000FFF5) |
263 | DONT_SWITCH equ (OS_BASE+0x000FFFF) |
265 | DONT_SWITCH equ (OS_BASE+0x000FFFF) |
264 | 266 | ||
265 | TMP_STACK_TOP equ 0x006CC00 |
267 | TMP_STACK_TOP equ 0x006CC00 |
266 | 268 | ||
267 | FONT_II equ (OS_BASE+0x006DC00) |
269 | FONT_II equ (OS_BASE+0x006DC00) |
268 | FONT_I equ (OS_BASE+0x006E600) |
270 | FONT_I equ (OS_BASE+0x006E600) |
269 | 271 | ||
270 | sys_pgdir equ (OS_BASE+0x006F000) |
272 | sys_pgdir equ (OS_BASE+0x006F000) |
271 | 273 | ||
272 | DRIVE_DATA equ (OS_BASE+0x0070000) |
274 | DRIVE_DATA equ (OS_BASE+0x0070000) |
273 | 275 | ||
274 | SLOT_BASE equ (OS_BASE+0x0080000) |
276 | SLOT_BASE equ (OS_BASE+0x0080000) |
275 | 277 | ||
276 | ;unused |
278 | ;unused |
277 | TMP_BUFF equ (OS_BASE+0x0090000) |
279 | TMP_BUFF equ (OS_BASE+0x0090000) |
278 | 280 | ||
279 | VGABasePtr equ (OS_BASE+0x00A0000) |
281 | VGABasePtr equ (OS_BASE+0x00A0000) |
280 | 282 | ||
281 | RAMDISK equ (OS_BASE+0x0100000) |
283 | RAMDISK equ (OS_BASE+0x0100000) |
282 | RAMDISK_FAT equ (OS_BASE+0x0280000) |
284 | RAMDISK_FAT equ (OS_BASE+0x0280000) |
283 | FLOPPY_FAT equ (OS_BASE+0x0282000) |
285 | FLOPPY_FAT equ (OS_BASE+0x0282000) |
284 | 286 | ||
285 | CLEAN_ZONE equ 0x284000 |
287 | CLEAN_ZONE equ 0x284000 |
286 | IDE_DMA equ 0x284000 |
288 | IDE_DMA equ 0x284000 |
287 | 289 | ||
288 | BgrAuxTable equ (OS_BASE+0x0298000) |
290 | BgrAuxTable equ (OS_BASE+0x0298000) |
289 | ; unused? |
291 | ; unused? |
290 | SB16Buffer equ (OS_BASE+0x02A0000) |
292 | SB16Buffer equ (OS_BASE+0x02A0000) |
291 | SB16_Status equ (OS_BASE+0x02B0000) |
293 | SB16_Status equ (OS_BASE+0x02B0000) |
292 | 294 | ||
293 | BUTTON_INFO equ (OS_BASE+0x02C0000) |
295 | BUTTON_INFO equ (OS_BASE+0x02C0000) |
294 | RESERVED_PORTS equ (OS_BASE+0x02D0000) |
296 | RESERVED_PORTS equ (OS_BASE+0x02D0000) |
295 | BOOT_VAR equ (OS_BASE+0x02E0000) |
297 | BOOT_VAR equ (OS_BASE+0x02E0000) |
296 | 298 | ||
297 | stack_data_start equ (OS_BASE+0x02F0000) |
299 | stack_data_start equ (OS_BASE+0x02F0000) |
298 | eth_data_start equ (OS_BASE+0x02F0000) |
300 | eth_data_start equ (OS_BASE+0x02F0000) |
299 | stack_data equ (OS_BASE+0x02F4000) |
301 | stack_data equ (OS_BASE+0x02F4000) |
300 | stack_data_end equ (OS_BASE+0x030ffff) |
302 | stack_data_end equ (OS_BASE+0x030ffff) |
301 | resendQ equ (OS_BASE+0x0310000) |
303 | resendQ equ (OS_BASE+0x0310000) |
302 | 304 | ||
303 | skin_data equ (OS_BASE+0x0318000) |
305 | skin_data equ (OS_BASE+0x0318000) |
304 | draw_data equ (OS_BASE+0x0320000) |
306 | draw_data equ (OS_BASE+0x0320000) |
305 | 307 | ||
306 | BgrDrawMode equ (OS_BASE+0x0323FF4) |
308 | BgrDrawMode equ (OS_BASE+0x0323FF4) |
307 | BgrDataWidth equ (OS_BASE+0x0323FF8) |
309 | BgrDataWidth equ (OS_BASE+0x0323FF8) |
308 | BgrDataHeight equ (OS_BASE+0x0323FFC) |
310 | BgrDataHeight equ (OS_BASE+0x0323FFC) |
309 | 311 | ||
310 | sys_pgmap equ (OS_BASE+0x0324000) |
312 | sys_pgmap equ (OS_BASE+0x0324000) |
311 | 313 | ||
312 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
314 | UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000) |
313 | 315 | ||
314 | virtual at (OS_BASE+0x05FFF80) |
316 | virtual at (OS_BASE+0x05FFF80) |
315 | tss TSS |
317 | tss TSS |
316 | end virtual |
318 | end virtual |
317 | 319 | ||
318 | HEAP_BASE equ (OS_BASE+0x0800000) |
320 | HEAP_BASE equ (OS_BASE+0x0800000) |
319 | HEAP_MIN_SIZE equ 0x01000000 |
321 | HEAP_MIN_SIZE equ 0x01000000 |
320 | 322 | ||
321 | page_tabs equ 0xFDC00000 |
323 | page_tabs equ 0xFDC00000 |
322 | app_page_tabs equ 0xFDC00000 |
324 | app_page_tabs equ 0xFDC00000 |
323 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
325 | kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
324 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
326 | master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
325 | 327 | ||
326 | LFB_BASE equ 0xFE000000 |
328 | LFB_BASE equ 0xFE000000 |
327 | 329 | ||
328 | 330 | ||
329 | new_app_base equ 0; |
331 | new_app_base equ 0; |
330 | 332 | ||
331 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
333 | twdw equ 0x2000 ;(CURRENT_TASK-window_data) |
332 | 334 | ||
333 | std_application_base_address equ new_app_base |
335 | std_application_base_address equ new_app_base |
334 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 áà éò äëÿ êîÃòåêñòà FPU |
336 | RING0_STACK_SIZE equ (0x2000 - 512) ;512 áà éò äëÿ êîÃòåêñòà FPU |
335 | 337 | ||
336 | REG_SS equ (RING0_STACK_SIZE-4) |
338 | REG_SS equ (RING0_STACK_SIZE-4) |
337 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
339 | REG_APP_ESP equ (RING0_STACK_SIZE-8) |
338 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
340 | REG_EFLAGS equ (RING0_STACK_SIZE-12) |
339 | REG_CS equ (RING0_STACK_SIZE-16) |
341 | REG_CS equ (RING0_STACK_SIZE-16) |
340 | REG_EIP equ (RING0_STACK_SIZE-20) |
342 | REG_EIP equ (RING0_STACK_SIZE-20) |
341 | REG_EAX equ (RING0_STACK_SIZE-24) |
343 | REG_EAX equ (RING0_STACK_SIZE-24) |
342 | REG_ECX equ (RING0_STACK_SIZE-28) |
344 | REG_ECX equ (RING0_STACK_SIZE-28) |
343 | REG_EDX equ (RING0_STACK_SIZE-32) |
345 | REG_EDX equ (RING0_STACK_SIZE-32) |
344 | REG_EBX equ (RING0_STACK_SIZE-36) |
346 | REG_EBX equ (RING0_STACK_SIZE-36) |
345 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
347 | REG_ESP equ (RING0_STACK_SIZE-40) ;RING0_STACK_SIZE-20 |
346 | REG_EBP equ (RING0_STACK_SIZE-44) |
348 | REG_EBP equ (RING0_STACK_SIZE-44) |
347 | REG_ESI equ (RING0_STACK_SIZE-48) |
349 | REG_ESI equ (RING0_STACK_SIZE-48) |
348 | REG_EDI equ (RING0_STACK_SIZE-52) |
350 | REG_EDI equ (RING0_STACK_SIZE-52) |
349 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
351 | REG_RET equ (RING0_STACK_SIZE-56) ;irq0.return |
350 | 352 | ||
351 | 353 | ||
352 | PG_UNMAP equ 0x000 |
354 | PG_UNMAP equ 0x000 |
353 | PG_MAP equ 0x001 |
355 | PG_MAP equ 0x001 |
354 | PG_WRITE equ 0x002 |
356 | PG_WRITE equ 0x002 |
355 | PG_SW equ 0x003 |
357 | PG_SW equ 0x003 |
356 | PG_USER equ 0x005 |
358 | PG_USER equ 0x005 |
357 | PG_UW equ 0x007 |
359 | PG_UW equ 0x007 |
358 | PG_NOCACHE equ 0x018 |
360 | PG_NOCACHE equ 0x018 |
359 | PG_LARGE equ 0x080 |
361 | PG_LARGE equ 0x080 |
360 | PG_GLOBAL equ 0x100 |
362 | PG_GLOBAL equ 0x100 |
361 | 363 | ||
362 | PG_SHARED equ 0x200 |
364 | PG_SHARED equ 0x200 |
363 | 365 | ||
364 | ;;;;;;;;;;;boot time variables |
366 | ;;;;;;;;;;;boot time variables |
365 | 367 | ||
366 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
368 | BOOT_BPP equ 0x9000 ;byte bits per pixel |
367 | BOOT_PITCH equ 0x9001 ;word scanline length |
369 | BOOT_PITCH equ 0x9001 ;word scanline length |
368 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
370 | BOOT_VESA_MODE equ 0x9008 ;word vesa video mode |
369 | BOOT_X_RES equ 0x900A ;word X res |
371 | BOOT_X_RES equ 0x900A ;word X res |
370 | BOOT_Y_RES equ 0x900C ;word Y res |
372 | BOOT_Y_RES equ 0x900C ;word Y res |
371 | ;;BOOT_MOUSE_PORT equ 0x9010 ;byte mouse port - not used |
373 | ;;BOOT_MOUSE_PORT equ 0x9010 ;byte mouse port - not used |
372 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
374 | BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch |
373 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
375 | BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address |
374 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
376 | BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration |
375 | BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
377 | BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) |
376 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
378 | ;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled |
377 | BOOT_DMA equ 0x901F ; |
379 | BOOT_DMA equ 0x901F ; |
378 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
380 | BOOT_PCI_DATA equ 0x9020 ;8bytes pci data |
379 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
381 | BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no |
380 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
382 | BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr |
381 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
383 | BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount |
382 | 384 | ||
383 | BOOT_APM_ENTRY equ 0x9040 |
385 | BOOT_APM_ENTRY equ 0x9040 |
384 | BOOT_APM_VERSION equ 0x9044 |
386 | BOOT_APM_VERSION equ 0x9044 |
385 | BOOT_APM_FLAGS equ 0x9046 ;unused |
387 | BOOT_APM_FLAGS equ 0x9046 ;unused |
386 | BOOT_APM_CODE_32 equ 0x9050 |
388 | BOOT_APM_CODE_32 equ 0x9050 |
387 | BOOT_APM_CODE_16 equ 0x9052 |
389 | BOOT_APM_CODE_16 equ 0x9052 |
388 | BOOT_APM_DATA_16 equ 0x9054 |
390 | BOOT_APM_DATA_16 equ 0x9054 |
389 | 391 | ||
390 | TMP_FILE_NAME equ 0 |
392 | TMP_FILE_NAME equ 0 |
391 | TMP_CMD_LINE equ 1024 |
393 | TMP_CMD_LINE equ 1024 |
392 | TMP_ICON_OFFS equ 1280 |
394 | TMP_ICON_OFFS equ 1280 |
393 | 395 | ||
394 | 396 | ||
395 | EVENT_REDRAW equ 0x00000001 |
397 | EVENT_REDRAW equ 0x00000001 |
396 | EVENT_KEY equ 0x00000002 |
398 | EVENT_KEY equ 0x00000002 |
397 | EVENT_BUTTON equ 0x00000004 |
399 | EVENT_BUTTON equ 0x00000004 |
398 | EVENT_BACKGROUND equ 0x00000010 |
400 | EVENT_BACKGROUND equ 0x00000010 |
399 | EVENT_MOUSE equ 0x00000020 |
401 | EVENT_MOUSE equ 0x00000020 |
400 | EVENT_IPC equ 0x00000040 |
402 | EVENT_IPC equ 0x00000040 |
401 | EVENT_NETWORK equ 0x00000080 |
403 | EVENT_NETWORK equ 0x00000080 |
402 | EVENT_DEBUG equ 0x00000100 |
404 | EVENT_DEBUG equ 0x00000100 |
403 | EVENT_EXTENDED equ 0x00000200 |
405 | EVENT_EXTENDED equ 0x00000200 |
404 | 406 | ||
405 | EV_INTR equ 1 |
407 | EV_INTR equ 1 |
406 | 408 | ||
407 | struct THR_DATA |
409 | struct THR_DATA |
408 | rb (8192-512) |
410 | rb (8192-512) |
409 | ; pl0_stack |
411 | ; pl0_stack |
410 | fpu_state rb 512 |
412 | fpu_state rb 512 |
411 | tls_page rb 4096 |
413 | tls_page rb 4096 |
412 | pdbr rb 4096 |
414 | pdbr rb 4096 |
413 | ends |
415 | ends |
414 | 416 | ||
415 | virtual at (OS_BASE-sizeof.THR_DATA) |
417 | virtual at (OS_BASE-sizeof.THR_DATA) |
416 | thr_data THR_DATA |
418 | thr_data THR_DATA |
417 | end virtual |
419 | end virtual |
418 | 420 | ||
419 | struct SYS_VARS |
421 | struct SYS_VARS |
420 | bpp dd ? |
422 | bpp dd ? |
421 | scanline dd ? |
423 | scanline dd ? |
422 | vesa_mode dd ? |
424 | vesa_mode dd ? |
423 | x_res dd ? |
425 | x_res dd ? |
424 | y_res dd ? |
426 | y_res dd ? |
425 | ends |
427 | ends |
426 | 428 | ||
427 | struct APPOBJ ; common object header |
429 | struct APPOBJ ; common object header |
428 | magic dd ? ; |
430 | magic dd ? ; |
429 | destroy dd ? ; internal destructor |
431 | destroy dd ? ; internal destructor |
430 | fd dd ? ; next object in list |
432 | fd dd ? ; next object in list |
431 | bk dd ? ; prev object in list |
433 | bk dd ? ; prev object in list |
432 | pid dd ? ; owner id |
434 | pid dd ? ; owner id |
433 | ends |
435 | ends |
434 | 436 | ||
435 | APP_OBJ_OFFSET equ 48 |
437 | APP_OBJ_OFFSET equ 48 |
436 | APP_EV_OFFSET equ 40 |
438 | APP_EV_OFFSET equ 40 |
437 | 439 | ||
438 | struct CURSOR APPOBJ |
440 | struct CURSOR APPOBJ |
439 | base dd ? ;allocated memory |
441 | base dd ? ;allocated memory |
440 | hot_x dd ? ;hotspot coords |
442 | hot_x dd ? ;hotspot coords |
441 | hot_y dd ? |
443 | hot_y dd ? |
442 | 444 | ||
443 | list_next dd ? ;next cursor in cursor list |
445 | list_next dd ? ;next cursor in cursor list |
444 | list_prev dd ? ;prev cursor in cursor list |
446 | list_prev dd ? ;prev cursor in cursor list |
445 | dev_obj dd ? ;device depended data |
447 | dev_obj dd ? ;device depended data |
446 | ends |
448 | ends |
447 | 449 | ||
448 | 450 | ||
449 | struct EVENT APPOBJ |
451 | struct EVENT APPOBJ |
450 | id dd ? ;event uid |
452 | id dd ? ;event uid |
451 | state dd ? ;internal flags |
453 | state dd ? ;internal flags |
452 | code dd ? |
454 | code dd ? |
453 | rd 5 |
455 | rd 5 |
454 | ends |
456 | ends |
455 | 457 | ||
456 | 458 | ||
457 | struct SMEM |
459 | struct SMEM |
458 | bk dd ? |
460 | bk dd ? |
459 | fd dd ? ;+4 |
461 | fd dd ? ;+4 |
460 | base dd ? ;+8 |
462 | base dd ? ;+8 |
461 | size dd ? ;+12 |
463 | size dd ? ;+12 |
462 | access dd ? ;+16 |
464 | access dd ? ;+16 |
463 | refcount dd ? ;+20 |
465 | refcount dd ? ;+20 |
464 | name rb 32 ;+24 |
466 | name rb 32 ;+24 |
465 | ends |
467 | ends |
466 | 468 | ||
467 | struct SMAP APPOBJ |
469 | struct SMAP APPOBJ |
468 | base dd ? ;mapped base |
470 | base dd ? ;mapped base |
469 | parent dd ? ;SMEM |
471 | parent dd ? ;SMEM |
470 | ends |
472 | ends |
471 | 473 | ||
472 | struct DLLDESCR |
474 | struct DLLDESCR |
473 | bk dd ? |
475 | bk dd ? |
474 | fd dd ? ;+4 |
476 | fd dd ? ;+4 |
475 | data dd ? ;+8 |
477 | data dd ? ;+8 |
476 | size dd ? ;+12 |
478 | size dd ? ;+12 |
477 | timestamp dq ? |
479 | timestamp dq ? |
478 | refcount dd ? |
480 | refcount dd ? |
479 | defaultbase dd ? |
481 | defaultbase dd ? |
480 | coff_hdr dd ? |
482 | coff_hdr dd ? |
481 | symbols_ptr dd ? |
483 | symbols_ptr dd ? |
482 | symbols_num dd ? |
484 | symbols_num dd ? |
483 | symbols_lim dd ? |
485 | symbols_lim dd ? |
484 | exports dd ? ;export table |
486 | exports dd ? ;export table |
485 | name rb 260 |
487 | name rb 260 |
486 | ends |
488 | ends |
487 | 489 | ||
488 | struct HDLL |
490 | struct HDLL |
489 | fd dd ? ;next object in list |
491 | fd dd ? ;next object in list |
490 | bk dd ? ;prev object in list |
492 | bk dd ? ;prev object in list |
491 | pid dd ? ;owner id |
493 | pid dd ? ;owner id |
492 | 494 | ||
493 | base dd ? ;mapped base |
495 | base dd ? ;mapped base |
494 | size dd ? ;mapped size |
496 | size dd ? ;mapped size |
495 | refcount dd ? ;reference counter for this process and this lib |
497 | refcount dd ? ;reference counter for this process and this lib |
496 | parent dd ? ;DLLDESCR |
498 | parent dd ? ;DLLDESCR |
497 | ends |
499 | ends |
498 | 500 | ||
499 | struct display_t |
501 | struct display_t |
500 | x dd ? |
502 | x dd ? |
501 | y dd ? |
503 | y dd ? |
502 | width dd ? |
504 | width dd ? |
503 | height dd ? |
505 | height dd ? |
504 | bpp dd ? |
506 | bpp dd ? |
505 | vrefresh dd ? |
507 | vrefresh dd ? |
506 | pitch dd ? |
508 | pitch dd ? |
507 | lfb dd ? |
509 | lfb dd ? |
508 | 510 | ||
509 | modes dd ? |
511 | modes dd ? |
510 | ddev dd ? |
512 | ddev dd ? |
511 | connector dd ? |
513 | connector dd ? |
512 | crtc dd ? |
514 | crtc dd ? |
513 | 515 | ||
514 | cr_list.next dd ? |
516 | cr_list.next dd ? |
515 | cr_list.prev dd ? |
517 | cr_list.prev dd ? |
516 | 518 | ||
517 | cursor dd ? |
519 | cursor dd ? |
518 | 520 | ||
519 | init_cursor dd ? |
521 | init_cursor dd ? |
520 | select_cursor dd ? |
522 | select_cursor dd ? |
521 | show_cursor dd ? |
523 | show_cursor dd ? |
522 | move_cursor dd ? |
524 | move_cursor dd ? |
523 | restore_cursor dd ? |
525 | restore_cursor dd ? |
524 | disable_mouse dd ? |
526 | disable_mouse dd ? |
525 | mask_seqno dd ? |
527 | mask_seqno dd ? |
526 | check_mouse dd ? |
528 | check_mouse dd ? |
527 | check_m_pixel dd ? |
529 | check_m_pixel dd ? |
528 | ends |
530 | ends |
529 | 531 | ||
530 | struct BOOT_DATA |
532 | struct BOOT_DATA |
531 | bpp dd ? |
533 | bpp dd ? |
532 | scanline dd ? |
534 | scanline dd ? |
533 | vesa_mode dd ? |
535 | vesa_mode dd ? |
534 | x_res dd ? |
536 | x_res dd ? |
535 | y_res dd ? |
537 | y_res dd ? |
536 | mouse_port dd ? |
538 | mouse_port dd ? |
537 | bank_switch dd ? |
539 | bank_switch dd ? |
538 | lfb dd ? |
540 | lfb dd ? |
539 | vesa_mem dd ? |
541 | vesa_mem dd ? |
540 | log dd ? |
542 | log dd ? |
541 | direct_lfb dd ? |
543 | direct_lfb dd ? |
542 | pci_data dd ? |
544 | pci_data dd ? |
543 | dd ? |
545 | dd ? |
544 | vrr dd ? |
546 | vrr dd ? |
545 | ide_base dd ? |
547 | ide_base dd ? |
546 | mem_amount dd ? |
548 | mem_amount dd ? |
547 | pages_count dd ? |
549 | pages_count dd ? |
548 | pagemap_size dd ? |
550 | pagemap_size dd ? |
549 | kernel_max dd ? |
551 | kernel_max dd ? |
550 | kernel_pages dd ? |
552 | kernel_pages dd ? |
551 | kernel_tables dd ? |
553 | kernel_tables dd ? |
552 | 554 | ||
553 | cpu_vendor dd ? |
555 | cpu_vendor dd ? |
554 | dd ? |
556 | dd ? |
555 | dd ? |
557 | dd ? |
556 | cpu_sign dd ? |
558 | cpu_sign dd ? |
557 | cpu_info dd ? |
559 | cpu_info dd ? |
558 | cpu_caps dd ? |
560 | cpu_caps dd ? |
559 | dd ? |
561 | dd ? |
560 | dd ? |
562 | dd ? |
561 | ends |
563 | ends |
562 | 564 | ||
563 | struct LHEAD |
565 | struct LHEAD |
564 | next dd ? ;next object in list |
566 | next dd ? ;next object in list |
565 | prev dd ? ;prev object in list |
567 | prev dd ? ;prev object in list |
566 | ends |
568 | ends |
567 | 569 | ||
568 | struct MUTEX |
570 | struct MUTEX |
569 | lhead LHEAD |
571 | lhead LHEAD |
570 | count dd ? |
572 | count dd ? |
571 | ends |
573 | ends |
572 | 574 | ||
573 | struct MEM_STATE |
575 | struct MEM_STATE |
574 | mutex MUTEX |
576 | mutex MUTEX |
575 | smallmap dd ? |
577 | smallmap dd ? |
576 | treemap dd ? |
578 | treemap dd ? |
577 | topsize dd ? |
579 | topsize dd ? |
578 | top dd ? |
580 | top dd ? |
579 | smallbins rd 4*32 |
581 | smallbins rd 4*32 |
580 | treebins rd 32 |
582 | treebins rd 32 |
581 | ends |
583 | ends |
582 | 584 | ||
583 | struct PG_DATA |
585 | struct PG_DATA |
584 | mem_amount dd ? |
586 | mem_amount dd ? |
585 | vesa_mem dd ? |
587 | vesa_mem dd ? |
586 | pages_count dd ? |
588 | pages_count dd ? |
587 | pages_free dd ? |
589 | pages_free dd ? |
588 | pages_faults dd ? |
590 | pages_faults dd ? |
589 | pagemap_size dd ? |
591 | pagemap_size dd ? |
590 | kernel_pages dd ? |
592 | kernel_pages dd ? |
591 | kernel_tables dd ? |
593 | kernel_tables dd ? |
592 | sys_page_dir dd ? |
594 | sys_page_dir dd ? |
593 | mutex MUTEX |
595 | mutex MUTEX |
594 | ends |
596 | ends |
595 | 597 | ||
596 | struct SRV |
598 | struct SRV |
597 | srv_name rb 16 ;ASCIIZ string |
599 | srv_name rb 16 ;ASCIIZ string |
598 | magic dd ? ;+0x10 ;'SRV ' |
600 | magic dd ? ;+0x10 ;'SRV ' |
599 | size dd ? ;+0x14 ;size of structure SRV |
601 | size dd ? ;+0x14 ;size of structure SRV |
600 | fd dd ? ;+0x18 ;next SRV descriptor |
602 | fd dd ? ;+0x18 ;next SRV descriptor |
601 | bk dd ? ;+0x1C ;prev SRV descriptor |
603 | bk dd ? ;+0x1C ;prev SRV descriptor |
602 | base dd ? ;+0x20 ;service base address |
604 | base dd ? ;+0x20 ;service base address |
603 | entry dd ? ;+0x24 ;service START function |
605 | entry dd ? ;+0x24 ;service START function |
604 | srv_proc dd ? ;+0x28 ;user mode service handler |
606 | srv_proc dd ? ;+0x28 ;user mode service handler |
605 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
607 | srv_proc_ex dd ? ;+0x2C ;kernel mode service handler |
606 | ends |
608 | ends |
607 | 609 | ||
608 | DRV_ENTRY equ 1 |
610 | DRV_ENTRY equ 1 |
609 | DRV_EXIT equ -1 |
611 | DRV_EXIT equ -1 |
610 | 612 | ||
611 | struct COFF_HEADER |
613 | struct COFF_HEADER |
612 | machine dw ? |
614 | machine dw ? |
613 | nSections dw ? |
615 | nSections dw ? |
614 | DataTime dd ? |
616 | DataTime dd ? |
615 | pSymTable dd ? |
617 | pSymTable dd ? |
616 | nSymbols dd ? |
618 | nSymbols dd ? |
617 | optHeader dw ? |
619 | optHeader dw ? |
618 | flags dw ? |
620 | flags dw ? |
619 | ends |
621 | ends |
620 | 622 | ||
621 | struct COFF_SECTION |
623 | struct COFF_SECTION |
622 | Name rb 8 |
624 | Name rb 8 |
623 | VirtualSize dd ? |
625 | VirtualSize dd ? |
624 | VirtualAddress dd ? |
626 | VirtualAddress dd ? |
625 | SizeOfRawData dd ? |
627 | SizeOfRawData dd ? |
626 | PtrRawData dd ? |
628 | PtrRawData dd ? |
627 | PtrReloc dd ? |
629 | PtrReloc dd ? |
628 | PtrLinenumbers dd ? |
630 | PtrLinenumbers dd ? |
629 | NumReloc dw ? |
631 | NumReloc dw ? |
630 | NumLinenum dw ? |
632 | NumLinenum dw ? |
631 | Characteristics dd ? |
633 | Characteristics dd ? |
632 | ends |
634 | ends |
633 | 635 | ||
634 | struct COFF_RELOC |
636 | struct COFF_RELOC |
635 | VirtualAddress dd ? |
637 | VirtualAddress dd ? |
636 | SymIndex dd ? |
638 | SymIndex dd ? |
637 | Type dw ? |
639 | Type dw ? |
638 | ends |
640 | ends |
639 | 641 | ||
640 | struct COFF_SYM |
642 | struct COFF_SYM |
641 | Name rb 8 |
643 | Name rb 8 |
642 | Value dd ? |
644 | Value dd ? |
643 | SectionNumber dw ? |
645 | SectionNumber dw ? |
644 | Type dw ? |
646 | Type dw ? |
645 | StorageClass db ? |
647 | StorageClass db ? |
646 | NumAuxSymbols db ? |
648 | NumAuxSymbols db ? |
647 | ends |
649 | ends |
648 | 650 | ||
649 | struct IOCTL |
651 | struct IOCTL |
650 | handle dd ? |
652 | handle dd ? |
651 | io_code dd ? |
653 | io_code dd ? |
652 | input dd ? |
654 | input dd ? |
653 | inp_size dd ? |
655 | inp_size dd ? |
654 | output dd ? |
656 | output dd ? |
655 | out_size dd ? |
657 | out_size dd ? |
656 | ends |
658 | ends |
657 | 659 | ||
658 | struct IRQH |
660 | struct IRQH |
659 | list LHEAD |
661 | list LHEAD |
660 | handler dd ? ;handler roututine |
662 | handler dd ? ;handler roututine |
661 | data dd ? ;user-specific data |
663 | data dd ? ;user-specific data |
662 | ends |
664 | ends |