Rev 5595 | Rev 5865 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5595 | Rev 5836 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. 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 | ;; KERNEL32.INC ;; |
6 | ;; KERNEL32.INC ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; Included 32 bit kernel files for MenuetOS ;; |
8 | ;; Included 32 bit kernel files for MenuetOS ;; |
9 | ;; ;; |
9 | ;; ;; |
10 | ;; This file is kept separate as it will be easier to ;; |
10 | ;; This file is kept separate as it will be easier to ;; |
11 | ;; maintain and compile with an automated SETUP program ;; |
11 | ;; maintain and compile with an automated SETUP program ;; |
12 | ;; in the future. ;; |
12 | ;; in the future. ;; |
13 | ;; ;; |
13 | ;; ;; |
14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
15 | 15 | ||
16 | $Revision: 5595 $ |
16 | $Revision: 5836 $ |
17 | 17 | ||
18 | struct POINT |
18 | struct POINT |
19 | x dd ? |
19 | x dd ? |
20 | y dd ? |
20 | y dd ? |
21 | ends |
21 | ends |
22 | 22 | ||
23 | struct RECT |
23 | struct RECT |
24 | left dd ? |
24 | left dd ? |
25 | top dd ? |
25 | top dd ? |
26 | right dd ? |
26 | right dd ? |
27 | bottom dd ? |
27 | bottom dd ? |
28 | ends |
28 | ends |
29 | 29 | ||
30 | struct BOX |
30 | struct BOX |
31 | left dd ? |
31 | left dd ? |
32 | top dd ? |
32 | top dd ? |
33 | width dd ? |
33 | width dd ? |
34 | height dd ? |
34 | height dd ? |
35 | ends |
35 | ends |
36 | 36 | ||
37 | struct DISPMODE |
37 | struct DISPMODE |
38 | width dw ? |
38 | width dw ? |
39 | height dw ? |
39 | height dw ? |
40 | bpp dw ? |
40 | bpp dw ? |
41 | freq dw ? |
41 | freq dw ? |
42 | ends |
42 | ends |
43 | 43 | ||
44 | ; constants definition |
44 | ; constants definition |
45 | WSTATE_NORMAL = 00000000b |
45 | WSTATE_NORMAL = 00000000b |
46 | WSTATE_MAXIMIZED = 00000001b |
46 | WSTATE_MAXIMIZED = 00000001b |
47 | WSTATE_MINIMIZED = 00000010b |
47 | WSTATE_MINIMIZED = 00000010b |
48 | WSTATE_ROLLEDUP = 00000100b |
48 | WSTATE_ROLLEDUP = 00000100b |
49 | 49 | ||
50 | WSTATE_REDRAW = 00000001b |
50 | WSTATE_REDRAW = 00000001b |
51 | WSTATE_WNDDRAWN = 00000010b |
51 | WSTATE_WNDDRAWN = 00000010b |
52 | 52 | ||
53 | WSTYLE_HASCAPTION = 00010000b |
53 | WSTYLE_HASCAPTION = 00010000b |
54 | WSTYLE_CLIENTRELATIVE = 00100000b |
54 | WSTYLE_CLIENTRELATIVE = 00100000b |
55 | 55 | ||
56 | struct TASKDATA |
56 | struct TASKDATA |
57 | event_mask dd ? |
57 | event_mask dd ? |
58 | pid dd ? |
58 | pid dd ? |
59 | dw ? |
59 | dw ? |
60 | state db ? |
60 | state db ? |
61 | db ? |
61 | db ? |
62 | dw ? |
62 | dw ? |
63 | wnd_number db ? |
63 | wnd_number db ? |
64 | db ? |
64 | db ? |
65 | mem_start dd ? |
65 | mem_start dd ? |
66 | counter_sum dd ? |
66 | counter_sum dd ? |
67 | counter_add dd ? |
67 | counter_add dd ? |
68 | cpu_usage dd ? |
68 | cpu_usage dd ? |
69 | ends |
69 | ends |
70 | 70 | ||
71 | TSTATE_RUNNING = 0 |
71 | TSTATE_RUNNING = 0 |
72 | TSTATE_RUN_SUSPENDED = 1 |
72 | TSTATE_RUN_SUSPENDED = 1 |
73 | TSTATE_WAIT_SUSPENDED = 2 |
73 | TSTATE_WAIT_SUSPENDED = 2 |
74 | TSTATE_ZOMBIE = 3 |
74 | TSTATE_ZOMBIE = 3 |
75 | TSTATE_TERMINATING = 4 |
75 | TSTATE_TERMINATING = 4 |
76 | TSTATE_WAITING = 5 |
76 | TSTATE_WAITING = 5 |
77 | TSTATE_FREE = 9 |
77 | TSTATE_FREE = 9 |
- | 78 | ||
- | 79 | ZPOS_NORMAL = 0 |
|
- | 80 | ZPOS_ALWAYS_BACK = 1 |
|
- | 81 | ZPOS_DESKTOP = 2 |
|
78 | 82 | ZPOS_ALWAYS_TOP = 3 ;ZPOS_ALWAYS_TOP is always last and has max number! |
|
79 | ; structures definition |
83 | ; structures definition |
80 | struct WDATA |
84 | struct WDATA |
81 | box BOX |
85 | box BOX |
82 | cl_workarea dd ? |
86 | cl_workarea dd ? |
83 | cl_titlebar dd ? |
87 | cl_titlebar dd ? |
84 | cl_frames dd ? |
88 | cl_frames dd ? |
85 | reserved db ? |
89 | z_modif db ? |
86 | fl_wstate db ? |
90 | fl_wstate db ? |
87 | fl_wdrawn db ? |
91 | fl_wdrawn db ? |
88 | fl_redraw db ? |
92 | fl_redraw db ? |
89 | ends |
93 | ends |
90 | 94 | ||
91 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
95 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
92 | 96 | ||
93 | struct DBG_REGS |
97 | struct DBG_REGS |
94 | dr0 dd ? |
98 | dr0 dd ? |
95 | dr1 dd ? |
99 | dr1 dd ? |
96 | dr2 dd ? |
100 | dr2 dd ? |
97 | dr3 dd ? |
101 | dr3 dd ? |
98 | dr7 dd ? |
102 | dr7 dd ? |
99 | ends |
103 | ends |
100 | 104 | ||
101 | struct PROC |
105 | struct PROC |
102 | list LHEAD |
106 | list LHEAD |
103 | thr_list LHEAD |
107 | thr_list LHEAD |
104 | heap_lock MUTEX |
108 | heap_lock MUTEX |
105 | heap_base rd 1 |
109 | heap_base rd 1 |
106 | heap_top rd 1 |
110 | heap_top rd 1 |
107 | mem_used rd 1 |
111 | mem_used rd 1 |
108 | dlls_list_ptr rd 1 |
112 | dlls_list_ptr rd 1 |
109 | pdt_0_phys rd 1 |
113 | pdt_0_phys rd 1 |
110 | pdt_1_phys rd 1 |
114 | pdt_1_phys rd 1 |
111 | io_map_0 rd 1 |
115 | io_map_0 rd 1 |
112 | io_map_1 rd 1 |
116 | io_map_1 rd 1 |
113 | 117 | ||
114 | ht_lock rd 1 |
118 | ht_lock rd 1 |
115 | ht_free rd 1 ;htab[0] stdin |
119 | ht_free rd 1 ;htab[0] stdin |
116 | ht_next rd 1 ;htab[1] stdout |
120 | ht_next rd 1 ;htab[1] stdout |
117 | htab rd (4096-$)/4 ;htab[2] stderr |
121 | htab rd (4096-$)/4 ;htab[2] stderr |
118 | pdt_0 rd 1024 |
122 | pdt_0 rd 1024 |
119 | ends |
123 | ends |
120 | 124 | ||
121 | struct APPDATA |
125 | struct APPDATA |
122 | app_name rb 11 |
126 | app_name rb 11 |
123 | rb 5 |
127 | rb 5 |
124 | 128 | ||
125 | list LHEAD ;+16 |
129 | list LHEAD ;+16 |
126 | process dd ? ;+24 |
130 | process dd ? ;+24 |
127 | fpu_state dd ? ;+28 |
131 | fpu_state dd ? ;+28 |
128 | exc_handler dd ? ;+32 |
132 | exc_handler dd ? ;+32 |
129 | except_mask dd ? ;+36 |
133 | except_mask dd ? ;+36 |
130 | pl0_stack dd ? ;+40 |
134 | pl0_stack dd ? ;+40 |
131 | cursor dd ? ;+44 |
135 | cursor dd ? ;+44 |
132 | fd_ev dd ? ;+48 |
136 | fd_ev dd ? ;+48 |
133 | bk_ev dd ? ;+52 |
137 | bk_ev dd ? ;+52 |
134 | fd_obj dd ? ;+56 |
138 | fd_obj dd ? ;+56 |
135 | bk_obj dd ? ;+60 |
139 | bk_obj dd ? ;+60 |
136 | saved_esp dd ? ;+64 |
140 | saved_esp dd ? ;+64 |
137 | io_map rd 2 ;+68 |
141 | io_map rd 2 ;+68 |
138 | dbg_state dd ? ;+76 |
142 | dbg_state dd ? ;+76 |
139 | cur_dir dd ? ;+80 |
143 | cur_dir dd ? ;+80 |
140 | wait_timeout dd ? ;+84 |
144 | wait_timeout dd ? ;+84 |
141 | saved_esp0 dd ? ;+88 |
145 | saved_esp0 dd ? ;+88 |
142 | wait_begin dd ? ;+92 +++ |
146 | wait_begin dd ? ;+92 +++ |
143 | wait_test dd ? ;+96 +++ |
147 | wait_test dd ? ;+96 +++ |
144 | wait_param dd ? ;+100 +++ |
148 | wait_param dd ? ;+100 +++ |
145 | tls_base dd ? ;+104 |
149 | tls_base dd ? ;+104 |
146 | dd ? ;+108 |
150 | dd ? ;+108 |
147 | event_filter dd ? ;+112 |
151 | event_filter dd ? ;+112 |
148 | draw_bgr_x dd ? ;+116 |
152 | draw_bgr_x dd ? ;+116 |
149 | draw_bgr_y dd ? ;+120 |
153 | draw_bgr_y dd ? ;+120 |
150 | dd ? ;+124 |
154 | dd ? ;+124 |
151 | 155 | ||
152 | wnd_shape dd ? ;+128 |
156 | wnd_shape dd ? ;+128 |
153 | wnd_shape_scale dd ? ;+132 |
157 | wnd_shape_scale dd ? ;+132 |
154 | dd ? ;+136 |
158 | dd ? ;+136 |
155 | dd ? ;+140 |
159 | dd ? ;+140 |
156 | saved_box BOX ;+144 |
160 | saved_box BOX ;+144 |
157 | ipc_start dd ? ;+160 |
161 | ipc_start dd ? ;+160 |
158 | ipc_size dd ? ;+164 |
162 | ipc_size dd ? ;+164 |
159 | event_mask dd ? ;+168 |
163 | event_mask dd ? ;+168 |
160 | debugger_slot dd ? ;+172 |
164 | debugger_slot dd ? ;+172 |
161 | terminate_protection dd ? ;+176 |
165 | terminate_protection dd ? ;+176 |
162 | keyboard_mode db ? ;+180 |
166 | keyboard_mode db ? ;+180 |
163 | rb 3 |
167 | rb 3 |
164 | dd ? ;+184 |
168 | dd ? ;+184 |
165 | dbg_event_mem dd ? ;+188 |
169 | dbg_event_mem dd ? ;+188 |
166 | dbg_regs DBG_REGS ;+192 |
170 | dbg_regs DBG_REGS ;+192 |
167 | wnd_caption dd ? ;+212 |
171 | wnd_caption dd ? ;+212 |
168 | wnd_clientbox BOX ;+216 |
172 | wnd_clientbox BOX ;+216 |
169 | priority dd ? ;+232 |
173 | priority dd ? ;+232 |
170 | in_schedule LHEAD ;+236 |
174 | in_schedule LHEAD ;+236 |
171 | 175 | ||
172 | ends |
176 | ends |
173 | 177 | ||
174 | struct IDE_DATA |
178 | struct IDE_DATA |
175 | ProgrammingInterface dd ? |
179 | ProgrammingInterface dd ? |
176 | Interrupt dw ? |
180 | Interrupt dw ? |
177 | RegsBaseAddres dw ? |
181 | RegsBaseAddres dw ? |
178 | BAR0_val dw ? |
182 | BAR0_val dw ? |
179 | BAR1_val dw ? |
183 | BAR1_val dw ? |
180 | BAR2_val dw ? |
184 | BAR2_val dw ? |
181 | BAR3_val dw ? |
185 | BAR3_val dw ? |
182 | dma_hdd_channel_1 db ? |
186 | dma_hdd_channel_1 db ? |
183 | dma_hdd_channel_2 db ? |
187 | dma_hdd_channel_2 db ? |
184 | ends |
188 | ends |
185 | 189 | ||
186 | struct IDE_CACHE |
190 | struct IDE_CACHE |
187 | pointer dd ? |
191 | pointer dd ? |
188 | size dd ? ; not use |
192 | size dd ? ; not use |
189 | data_pointer dd ? |
193 | data_pointer dd ? |
190 | system_data_size dd ? ; not use |
194 | system_data_size dd ? ; not use |
191 | appl_data_size dd ? ; not use |
195 | appl_data_size dd ? ; not use |
192 | system_data dd ? |
196 | system_data dd ? |
193 | appl_data dd ? |
197 | appl_data dd ? |
194 | system_sad_size dd ? |
198 | system_sad_size dd ? |
195 | appl_sad_size dd ? |
199 | appl_sad_size dd ? |
196 | search_start dd ? |
200 | search_start dd ? |
197 | appl_search_start dd ? |
201 | appl_search_start dd ? |
198 | ends |
202 | ends |
199 | 203 | ||
200 | struct IDE_DEVICE |
204 | struct IDE_DEVICE |
201 | UDMA_possible_modes db ? |
205 | UDMA_possible_modes db ? |
202 | UDMA_set_mode db ? |
206 | UDMA_set_mode db ? |
203 | ends |
207 | ends |
204 | 208 | ||
205 | ; Core functions |
209 | ; Core functions |
206 | include "core/sync.inc" ; macros for synhronization objects |
210 | include "core/sync.inc" ; macros for synhronization objects |
207 | include "core/sys32.inc" ; process management |
211 | include "core/sys32.inc" ; process management |
208 | include "core/sched.inc" ; process scheduling |
212 | include "core/sched.inc" ; process scheduling |
209 | include "core/syscall.inc" ; system call |
213 | include "core/syscall.inc" ; system call |
210 | include "core/fpu.inc" ; all fpu/sse support |
214 | include "core/fpu.inc" ; all fpu/sse support |
211 | include "core/memory.inc" |
215 | include "core/memory.inc" |
212 | include "core/mtrr.inc" |
216 | include "core/mtrr.inc" |
213 | include "core/heap.inc" ; kernel and app heap |
217 | include "core/heap.inc" ; kernel and app heap |
214 | include "core/malloc.inc" ; small kernel heap |
218 | include "core/malloc.inc" ; small kernel heap |
215 | include "core/taskman.inc" |
219 | include "core/taskman.inc" |
216 | include "core/dll.inc" |
220 | include "core/dll.inc" |
217 | include "core/peload.inc" ; |
221 | include "core/peload.inc" ; |
218 | include "core/exports.inc" |
222 | include "core/exports.inc" |
219 | include "core/string.inc" |
223 | include "core/string.inc" |
220 | include "core/v86.inc" ; virtual-8086 manager |
224 | include "core/v86.inc" ; virtual-8086 manager |
221 | include "core/irq.inc" ; irq handling functions |
225 | include "core/irq.inc" ; irq handling functions |
222 | include "core/apic.inc" ; Interrupt Controller functions |
226 | include "core/apic.inc" ; Interrupt Controller functions |
223 | include "core/timers.inc" |
227 | include "core/timers.inc" |
224 | include "core/clipboard.inc" ; custom clipboard |
228 | include "core/clipboard.inc" ; custom clipboard |
225 | 229 | ||
226 | ; GUI stuff |
230 | ; GUI stuff |
227 | include "gui/window.inc" |
231 | include "gui/window.inc" |
228 | include "gui/event.inc" |
232 | include "gui/event.inc" |
229 | include "gui/font.inc" |
233 | include "gui/font.inc" |
230 | include "gui/button.inc" |
234 | include "gui/button.inc" |
231 | 235 | ||
232 | ; shutdown |
236 | ; shutdown |
233 | 237 | ||
234 | ; file system |
238 | ; file system |
235 | 239 | ||
236 | include "blkdev/disk.inc" ; support for plug-n-play disks |
240 | include "blkdev/disk.inc" ; support for plug-n-play disks |
237 | include "blkdev/disk_cache.inc" ; caching for plug-n-play disks |
241 | include "blkdev/disk_cache.inc" ; caching for plug-n-play disks |
238 | include "blkdev/rd.inc" ; ramdisk read /write |
242 | include "blkdev/rd.inc" ; ramdisk read /write |
239 | include "fs/fat.inc" ; read / write for fat filesystem |
243 | include "fs/fat.inc" ; read / write for fat filesystem |
240 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
244 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
241 | include "fs/fs_lfn.inc" ; syscall, version 2 |
245 | include "fs/fs_lfn.inc" ; syscall, version 2 |
242 | include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
246 | include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
243 | include "fs/ext2/ext2.asm" ; read / write for ext2 filesystem |
247 | include "fs/ext2/ext2.asm" ; read / write for ext2 filesystem |
244 | include "fs/xfs.asm" ; read / write for xfs filesystem |
248 | include "fs/xfs.asm" ; read / write for xfs filesystem |
245 | 249 | ||
246 | ; sound |
250 | ; sound |
247 | 251 | ||
248 | include "sound/playnote.inc" ; player Note for Speaker PC |
252 | include "sound/playnote.inc" ; player Note for Speaker PC |
249 | 253 | ||
250 | ; display |
254 | ; display |
251 | 255 | ||
252 | ;include "video/vesa12.inc" ; Vesa 1.2 functions |
256 | ;include "video/vesa12.inc" ; Vesa 1.2 functions |
253 | include "video/vesa20.inc" ; Vesa 2.0 functions |
257 | include "video/vesa20.inc" ; Vesa 2.0 functions |
254 | include "video/blitter.inc" ; |
258 | include "video/blitter.inc" ; |
255 | include "video/vga.inc" ; VGA 16 color functions |
259 | include "video/vga.inc" ; VGA 16 color functions |
256 | include "video/cursors.inc" ; cursors functions |
260 | include "video/cursors.inc" ; cursors functions |
257 | 261 | ||
258 | ; Network Interface & TCPIP Stack |
262 | ; Network Interface & TCPIP Stack |
259 | 263 | ||
260 | include "network/stack.inc" |
264 | include "network/stack.inc" |
261 | 265 | ||
262 | ;include "drivers/uart.inc" |
266 | ;include "drivers/uart.inc" |
263 | 267 | ||
264 | 268 | ||
265 | ; Mouse pointer |
269 | ; Mouse pointer |
266 | 270 | ||
267 | include "gui/mouse.inc" |
271 | include "gui/mouse.inc" |
268 | 272 | ||
269 | ; Window skinning |
273 | ; Window skinning |
270 | 274 | ||
271 | include "gui/skincode.inc" |
275 | include "gui/skincode.inc" |
272 | 276 | ||
273 | ; Pci functions |
277 | ; Pci functions |
274 | 278 | ||
275 | include "bus/pci/pci32.inc" |
279 | include "bus/pci/pci32.inc" |
276 | 280 | ||
277 | ; USB functions |
281 | ; USB functions |
278 | include "bus/usb/init.inc" |
282 | include "bus/usb/init.inc" |
279 | 283 | ||
280 | ; Floppy drive controller |
284 | ; Floppy drive controller |
281 | 285 | ||
282 | include "blkdev/fdc.inc" |
286 | include "blkdev/fdc.inc" |
283 | include "blkdev/flp_drv.inc" |
287 | include "blkdev/flp_drv.inc" |
284 | 288 | ||
285 | ; IDE cache |
289 | ; IDE cache |
286 | include "blkdev/ide_cache.inc" |
290 | include "blkdev/ide_cache.inc" |
287 | 291 | ||
288 | ; HD drive controller |
292 | ; HD drive controller |
289 | include "blkdev/hd_drv.inc" |
293 | include "blkdev/hd_drv.inc" |
290 | ; Access through BIOS |
294 | ; Access through BIOS |
291 | include "blkdev/bd_drv.inc" |
295 | include "blkdev/bd_drv.inc" |
292 | 296 | ||
293 | ; CD drive controller |
297 | ; CD drive controller |
294 | 298 | ||
295 | include "blkdev/cd_drv.inc" |
299 | include "blkdev/cd_drv.inc" |
296 | 300 | ||
297 | ; Character devices |
301 | ; Character devices |
298 | 302 | ||
299 | include "hid/keyboard.inc" |
303 | include "hid/keyboard.inc" |
300 | include "hid/mousedrv.inc" |
304 | include "hid/mousedrv.inc" |
301 | 305 | ||
302 | ; setting date,time,clock and alarm-clock |
306 | ; setting date,time,clock and alarm-clock |
303 | 307 | ||
304 | include "hid/set_dtc.inc" |
308 | include "hid/set_dtc.inc" |
305 | 309 | ||
306 | ;% -include |
310 | ;% -include |
307 | 311 | ||
308 | ;parser file names |
312 | ;parser file names |
309 | include "fs/parse_fn.inc" |
313 | include "fs/parse_fn.inc" |
310 | 314 | ||
311 | ; work with conf lib |
315 | ; work with conf lib |
312 | include "core/conf_lib.inc" |
316 | include "core/conf_lib.inc" |
313 | 317 | ||
314 | ; load external lib |
318 | ; load external lib |
315 | include "core/ext_lib.inc" |
319 | include "core/ext_lib.inc" |
316 | 320 | ||
317 | ; list of external functions |
321 | ; list of external functions |
318 | include "imports.inc" |
322 | include "imports.inc" |