Rev 2047 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2047 | Rev 3168 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. 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: 2047 $ |
16 | $Revision: 3168 $ |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | struc POINT { |
20 | struc POINT { |
21 | .x dd ? |
21 | .x dd ? |
22 | .y dd ? |
22 | .y dd ? |
23 | .sizeof: |
23 | .sizeof: |
24 | } |
24 | } |
25 | virtual at 0 |
25 | virtual at 0 |
26 | POINT POINT |
26 | POINT POINT |
27 | end virtual |
27 | end virtual |
28 | 28 | ||
29 | struc RECT { |
29 | struc RECT { |
30 | .left dd ? |
30 | .left dd ? |
31 | .top dd ? |
31 | .top dd ? |
32 | .right dd ? |
32 | .right dd ? |
33 | .bottom dd ? |
33 | .bottom dd ? |
34 | .sizeof: |
34 | .sizeof: |
35 | } |
35 | } |
36 | virtual at 0 |
36 | virtual at 0 |
37 | RECT RECT |
37 | RECT RECT |
38 | end virtual |
38 | end virtual |
39 | 39 | ||
40 | struc BOX { |
40 | struc BOX { |
41 | .left dd ? |
41 | .left dd ? |
42 | .top dd ? |
42 | .top dd ? |
43 | .width dd ? |
43 | .width dd ? |
44 | .height dd ? |
44 | .height dd ? |
45 | .sizeof: |
45 | .sizeof: |
46 | } |
46 | } |
47 | virtual at 0 |
47 | virtual at 0 |
48 | BOX BOX |
48 | BOX BOX |
49 | end virtual |
49 | end virtual |
50 | 50 | ||
51 | struc DISPMODE { |
51 | struc DISPMODE { |
52 | .width rw 1 |
52 | .width rw 1 |
53 | .height rw 1 |
53 | .height rw 1 |
54 | .bpp rw 1 |
54 | .bpp rw 1 |
55 | .freq rw 1 |
55 | .freq rw 1 |
56 | } |
56 | } |
57 | 57 | ||
58 | ; constants definition |
58 | ; constants definition |
59 | WSTATE_NORMAL = 00000000b |
59 | WSTATE_NORMAL = 00000000b |
60 | WSTATE_MAXIMIZED = 00000001b |
60 | WSTATE_MAXIMIZED = 00000001b |
61 | WSTATE_MINIMIZED = 00000010b |
61 | WSTATE_MINIMIZED = 00000010b |
62 | WSTATE_ROLLEDUP = 00000100b |
62 | WSTATE_ROLLEDUP = 00000100b |
63 | 63 | ||
64 | WSTATE_REDRAW = 00000001b |
64 | WSTATE_REDRAW = 00000001b |
65 | WSTATE_WNDDRAWN = 00000010b |
65 | WSTATE_WNDDRAWN = 00000010b |
66 | 66 | ||
67 | WSTYLE_HASCAPTION = 00010000b |
67 | WSTYLE_HASCAPTION = 00010000b |
68 | WSTYLE_CLIENTRELATIVE = 00100000b |
68 | WSTYLE_CLIENTRELATIVE = 00100000b |
69 | 69 | ||
70 | struc TASKDATA |
70 | struc TASKDATA |
71 | { |
71 | { |
72 | .event_mask dd ? |
72 | .event_mask dd ? |
73 | .pid dd ? |
73 | .pid dd ? |
74 | dw ? |
74 | dw ? |
75 | .state db ? |
75 | .state db ? |
76 | db ? |
76 | db ? |
77 | dw ? |
77 | dw ? |
78 | .wnd_number db ? |
78 | .wnd_number db ? |
79 | db ? |
79 | db ? |
80 | .mem_start dd ? |
80 | .mem_start dd ? |
81 | .counter_sum dd ? |
81 | .counter_sum dd ? |
82 | .counter_add dd ? |
82 | .counter_add dd ? |
83 | .cpu_usage dd ? |
83 | .cpu_usage dd ? |
84 | } |
84 | } |
85 | virtual at 0 |
85 | virtual at 0 |
86 | TASKDATA TASKDATA |
86 | TASKDATA TASKDATA |
87 | end virtual |
87 | end virtual |
88 | 88 | ||
89 | TSTATE_RUNNING = 0 |
89 | TSTATE_RUNNING = 0 |
90 | TSTATE_RUN_SUSPENDED = 1 |
90 | TSTATE_RUN_SUSPENDED = 1 |
91 | TSTATE_WAIT_SUSPENDED = 2 |
91 | TSTATE_WAIT_SUSPENDED = 2 |
92 | TSTATE_ZOMBIE = 3 |
92 | TSTATE_ZOMBIE = 3 |
93 | TSTATE_TERMINATING = 4 |
93 | TSTATE_TERMINATING = 4 |
94 | TSTATE_WAITING = 5 |
94 | TSTATE_WAITING = 5 |
95 | TSTATE_FREE = 9 |
95 | TSTATE_FREE = 9 |
96 | 96 | ||
97 | ; structures definition |
97 | ; structures definition |
98 | struc WDATA { |
98 | struc WDATA { |
99 | .box BOX |
99 | .box BOX |
100 | .cl_workarea dd ? |
100 | .cl_workarea dd ? |
101 | .cl_titlebar dd ? |
101 | .cl_titlebar dd ? |
102 | .cl_frames dd ? |
102 | .cl_frames dd ? |
103 | .reserved db ? |
103 | .reserved db ? |
104 | .fl_wstate db ? |
104 | .fl_wstate db ? |
105 | .fl_wdrawn db ? |
105 | .fl_wdrawn db ? |
106 | .fl_redraw db ? |
106 | .fl_redraw db ? |
107 | .sizeof: |
107 | .sizeof: |
108 | } |
108 | } |
109 | virtual at 0 |
109 | virtual at 0 |
110 | WDATA WDATA |
110 | WDATA WDATA |
111 | end virtual |
111 | end virtual |
112 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
112 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
113 | 113 | ||
114 | struc APPDATA |
114 | struc APPDATA |
115 | { |
115 | { |
116 | .app_name db 11 dup(?) |
116 | .app_name db 11 dup(?) |
117 | db 5 dup(?) |
117 | db 5 dup(?) |
118 | 118 | ||
119 | .fpu_state dd ? ;+16 |
119 | .fpu_state dd ? ;+16 |
120 | .ev_count_ dd ? ;unused ;+20 |
120 | .ev_count_ dd ? ;unused ;+20 |
121 | .exc_handler dd ? ;+24 |
121 | .exc_handler dd ? ;+24 |
122 | .except_mask dd ? ;+28 |
122 | .except_mask dd ? ;+28 |
123 | .pl0_stack dd ? ;unused ;+32 |
123 | .pl0_stack dd ? ;unused ;+32 |
124 | .heap_base dd ? ;+36 |
124 | .heap_base dd ? ;+36 |
125 | .heap_top dd ? ;+40 |
125 | .heap_top dd ? ;+40 |
126 | .cursor dd ? ;+44 |
126 | .cursor dd ? ;+44 |
127 | .fd_ev dd ? ;+48 |
127 | .fd_ev dd ? ;+48 |
128 | .bk_ev dd ? ;+52 |
128 | .bk_ev dd ? ;+52 |
129 | .fd_obj dd ? ;+56 |
129 | .fd_obj dd ? ;+56 |
130 | .bk_obj dd ? ;+60 |
130 | .bk_obj dd ? ;+60 |
131 | .saved_esp dd ? ;+64 |
131 | .saved_esp dd ? ;+64 |
132 | .io_map rd 2 ;+68 |
132 | .io_map rd 2 ;+68 |
133 | .dbg_state dd ? ;+76 |
133 | .dbg_state dd ? ;+76 |
134 | .cur_dir dd ? ;+80 |
134 | .cur_dir dd ? ;+80 |
135 | .wait_timeout dd ? ;+84 |
135 | .wait_timeout dd ? ;+84 |
136 | .saved_esp0 dd ? ;+88 |
136 | .saved_esp0 dd ? ;+88 |
137 | .wait_begin dd ? ;+92 +++ |
137 | .wait_begin dd ? ;+92 +++ |
138 | .wait_test dd ? ;+96 +++ |
138 | .wait_test dd ? ;+96 +++ |
139 | .wait_param dd ? ;+100 +++ |
139 | .wait_param dd ? ;+100 +++ |
140 | .tls_base dd ? ;+104 |
140 | .tls_base dd ? ;+104 |
141 | .dlls_list_ptr dd ? ;+108 |
141 | .dlls_list_ptr dd ? ;+108 |
142 | db 16 dup(?) ;+112 |
142 | db 16 dup(?) ;+112 |
143 | 143 | ||
144 | .wnd_shape dd ? ;+128 |
144 | .wnd_shape dd ? ;+128 |
145 | .wnd_shape_scale dd ? ;+132 |
145 | .wnd_shape_scale dd ? ;+132 |
146 | dd ? ;+136 |
146 | dd ? ;+136 |
147 | .mem_size dd ? ;+140 |
147 | .mem_size dd ? ;+140 |
148 | .saved_box BOX |
148 | .saved_box BOX |
149 | .ipc_start dd ? |
149 | .ipc_start dd ? |
150 | .ipc_size dd ? |
150 | .ipc_size dd ? |
151 | .event_mask dd ? |
151 | .event_mask dd ? |
152 | .debugger_slot dd ? |
152 | .debugger_slot dd ? |
153 | dd ? |
153 | dd ? |
154 | .keyboard_mode db ? |
154 | .keyboard_mode db ? |
155 | db 3 dup(?) |
155 | db 3 dup(?) |
156 | .dir_table dd ? |
156 | .dir_table dd ? |
157 | .dbg_event_mem dd ? |
157 | .dbg_event_mem dd ? |
158 | .dbg_regs: |
158 | .dbg_regs: |
159 | .dbg_regs.dr0 dd ? |
159 | .dbg_regs.dr0 dd ? |
160 | .dbg_regs.dr1 dd ? |
160 | .dbg_regs.dr1 dd ? |
161 | .dbg_regs.dr2 dd ? |
161 | .dbg_regs.dr2 dd ? |
162 | .dbg_regs.dr3 dd ? |
162 | .dbg_regs.dr3 dd ? |
163 | .dbg_regs.dr7 dd ? |
163 | .dbg_regs.dr7 dd ? |
164 | .wnd_caption dd ? |
164 | .wnd_caption dd ? |
165 | .wnd_clientbox BOX |
165 | .wnd_clientbox BOX |
166 | } |
166 | } |
167 | virtual at 0 |
167 | virtual at 0 |
168 | APPDATA APPDATA |
168 | APPDATA APPDATA |
169 | end virtual |
169 | end virtual |
170 | 170 | ||
171 | ;// mike.dld, 2006-29-01 ] |
171 | ;// mike.dld, 2006-29-01 ] |
172 | 172 | ||
173 | struc MUTEX |
173 | struc MUTEX |
174 | { |
174 | { |
175 | .count rd 1 |
175 | .count rd 1 |
176 | .next rd 1 |
176 | .next rd 1 |
177 | .prev rd 1 |
177 | .prev rd 1 |
178 | } |
178 | } |
179 | 179 | ||
180 | virtual at 0 |
180 | virtual at 0 |
181 | MUTEX MUTEX |
181 | MUTEX MUTEX |
182 | end virtual |
182 | end virtual |
183 | 183 | ||
184 | 184 | ||
185 | ; Core functions |
185 | ; Core functions |
186 | include "core/sync.inc" ; macros for synhronization objects |
186 | include "core/sync.inc" ; macros for synhronization objects |
187 | include "core/sys32.inc" ; process management |
187 | include "core/sys32.inc" ; process management |
188 | include "core/sched.inc" ; process scheduling |
188 | include "core/sched.inc" ; process scheduling |
189 | include "core/syscall.inc" ; system call |
189 | include "core/syscall.inc" ; system call |
190 | include "core/fpu.inc" ; all fpu/sse support |
190 | include "core/fpu.inc" ; all fpu/sse support |
191 | include "core/memory.inc" |
191 | include "core/memory.inc" |
192 | include "core/heap.inc" ; kernel and app heap |
192 | include "core/heap.inc" ; kernel and app heap |
193 | include "core/malloc.inc" ; small kernel heap |
193 | include "core/malloc.inc" ; small kernel heap |
194 | include "core/taskman.inc" |
194 | include "core/taskman.inc" |
195 | include "core/dll.inc" |
195 | include "core/dll.inc" |
196 | include "core/peload.inc" ; |
196 | include "core/peload.inc" ; |
197 | include "core/exports.inc" |
197 | include "core/exports.inc" |
198 | include "core/string.inc" |
198 | include "core/string.inc" |
199 | include "core/v86.inc" ; virtual-8086 manager |
199 | include "core/v86.inc" ; virtual-8086 manager |
200 | 200 | ||
201 | ; GUI stuff |
201 | ; GUI stuff |
202 | include "gui/window.inc" |
202 | include "gui/window.inc" |
203 | include "gui/event.inc" |
203 | include "gui/event.inc" |
204 | include "gui/font.inc" |
204 | include "gui/font.inc" |
205 | include "gui/button.inc" |
205 | include "gui/button.inc" |
206 | 206 | ||
207 | ; shutdown |
207 | ; shutdown |
208 | 208 | ||
209 | ; file system |
209 | ; file system |
210 | 210 | ||
211 | include "fs/fs.inc" ; syscall |
211 | include "fs/fs.inc" ; syscall |
212 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
212 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
213 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
213 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
214 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
214 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
215 | include "blkdev/rd.inc" ; ramdisk read /write |
215 | include "blkdev/rd.inc" ; ramdisk read /write |
216 | include "fs/fs_lfn.inc" ; syscall, version 2 |
216 | include "fs/fs_lfn.inc" ; syscall, version 2 |
217 | ;include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
217 | ;include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
218 | include "fs/ext2.inc" ; read / write for ext2 filesystem |
218 | include "fs/ext2.inc" ; read / write for ext2 filesystem |
219 | 219 | ||
220 | ; sound |
220 | ; sound |
221 | 221 | ||
222 | include "sound/playnote.inc" ; player Note for Speaker PC |
222 | ;include "sound/playnote.inc" ; player Note for Speaker PC |
223 | ;include "sound/FHT.inc" ; fast Fourier transform routines |
223 | ;include "sound/FHT.inc" ; fast Fourier transform routines |
224 | 224 | ||
225 | ; display |
225 | ; display |
226 | 226 | ||
227 | ;include "video/graph32.inc" ; 32bpp graphics |
227 | ;include "video/graph32.inc" ; 32bpp graphics |
228 | include "video/vesa20.inc" ; older graphics engine |
228 | include "video/vesa20.inc" ; older graphics engine |
229 | include "video/cursors.inc" ; cursors functions |
229 | include "video/cursors.inc" ; cursors functions |
230 | 230 | ||
231 | ; Network Interface & TCPIP Stack |
231 | ; Network Interface & TCPIP Stack |
232 | 232 | ||
233 | include "network/stack.inc" |
233 | include "network/stack.inc" |
234 | 234 | ||
235 | ;include "drivers/uart.inc" |
235 | ;include "drivers/uart.inc" |
236 | 236 | ||
237 | 237 | ||
238 | ; Mouse pointer |
238 | ; Mouse pointer |
239 | 239 | ||
240 | include "gui/mouse.inc" |
240 | include "gui/mouse.inc" |
241 | 241 | ||
242 | ; Window skinning |
242 | ; Window skinning |
243 | 243 | ||
244 | include "gui/skincode.inc" |
244 | include "gui/skincode.inc" |
245 | 245 | ||
246 | ; Pci functions |
246 | ; Pci functions |
247 | include "bus/pci/pci32.inc" |
247 | include "bus/pci/pci32.inc" |
248 | ;include "bus/pci/PCIe.inc" |
248 | ;include "bus/pci/PCIe.inc" |
249 | include "bus/HT.inc" ; AMD HyperTransport bus control |
249 | include "bus/HT.inc" ; AMD HyperTransport bus control |
250 | include "bus/SB/SB.inc" |
250 | include "bus/SB/SB.inc" |
251 | include "bus/user/special.inc" |
251 | include "bus/user/special.inc" |
252 | 252 | ||
253 | ; Floppy drive controller |
253 | ; Floppy drive controller |
254 | 254 | ||
255 | include "blkdev/fdc.inc" |
255 | include "blkdev/fdc.inc" |
256 | include "blkdev/flp_drv.inc" |
256 | include "blkdev/flp_drv.inc" |
257 | 257 | ||
258 | ; IDE cache |
258 | ; IDE cache |
259 | include "blkdev/ide_cache.inc" |
259 | include "blkdev/ide_cache.inc" |
260 | 260 | ||
261 | ; HD drive controller |
261 | ; HD drive controller |
262 | include "blkdev/hd_drv.inc" |
262 | include "blkdev/hd_drv.inc" |
263 | 263 | ||
264 | ; CD drive controller |
264 | ; CD drive controller |
265 | 265 | ||
266 | ;include "blkdev/cdrom.inc" |
266 | ;include "blkdev/cdrom.inc" |
267 | ;include "blkdev/cd_drv.inc" |
267 | ;include "blkdev/cd_drv.inc" |
268 | 268 | ||
269 | ; Character devices |
269 | ; Character devices |
270 | 270 | ||
271 | include "hid/keyboard.inc" |
271 | include "hid/keyboard.inc" |
272 | include "hid/mousedrv.inc" |
272 | include "hid/mousedrv.inc" |
273 | 273 | ||
274 | ; setting date,time,clock and alarm-clock |
274 | ; setting date,time,clock and alarm-clock |
275 | 275 | ||
276 | include "hid/set_dtc.inc" |
276 | include "hid/set_dtc.inc" |
277 | 277 | ||
278 | ;% -include |
278 | ;% -include |
279 | 279 | ||
280 | ;parser file names |
280 | ;parser file names |
281 | include "fs/parse_fn.inc" |
281 | include "fs/parse_fn.inc" |
282 | 282 | ||
283 | ; work with conf lib |
283 | ; work with conf lib |
284 | include "core/conf_lib.inc" |
284 | include "core/conf_lib.inc" |
285 | 285 | ||
286 | ; load external lib |
286 | ; load external lib |
287 | include "core/ext_lib.inc" |
287 | include "core/ext_lib.inc" |
288 | 288 | ||
289 | ; list of external functions |
289 | ; list of external functions |
290 | include "imports.inc" |
290 | include "imports.inc" |