Rev 2465 | Rev 3555 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2465 | Rev 3500 | ||
---|---|---|---|
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 | ;; 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: 2465 $ |
16 | $Revision: 3500 $ |
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 | 78 | ||
79 | ; structures definition |
79 | ; structures definition |
80 | struct WDATA |
80 | struct WDATA |
81 | box BOX |
81 | box BOX |
82 | cl_workarea dd ? |
82 | cl_workarea dd ? |
83 | cl_titlebar dd ? |
83 | cl_titlebar dd ? |
84 | cl_frames dd ? |
84 | cl_frames dd ? |
85 | reserved db ? |
85 | reserved db ? |
86 | fl_wstate db ? |
86 | fl_wstate db ? |
87 | fl_wdrawn db ? |
87 | fl_wdrawn db ? |
88 | fl_redraw db ? |
88 | fl_redraw db ? |
89 | ends |
89 | ends |
90 | 90 | ||
91 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
91 | label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3 |
92 | 92 | ||
93 | struct DBG_REGS |
93 | struct DBG_REGS |
94 | dr0 dd ? |
94 | dr0 dd ? |
95 | dr1 dd ? |
95 | dr1 dd ? |
96 | dr2 dd ? |
96 | dr2 dd ? |
97 | dr3 dd ? |
97 | dr3 dd ? |
98 | dr7 dd ? |
98 | dr7 dd ? |
99 | ends |
99 | ends |
100 | 100 | ||
101 | struct APPDATA |
101 | struct APPDATA |
102 | app_name rb 11 |
102 | app_name rb 11 |
103 | rb 5 |
103 | rb 5 |
104 | 104 | ||
105 | fpu_state dd ? ;+16 |
105 | fpu_state dd ? ;+16 |
106 | ev_count_ dd ? ;unused ;+20 |
106 | ev_count_ dd ? ;unused ;+20 |
107 | exc_handler dd ? ;+24 |
107 | exc_handler dd ? ;+24 |
108 | except_mask dd ? ;+28 |
108 | except_mask dd ? ;+28 |
109 | pl0_stack dd ? ;+32 |
109 | pl0_stack dd ? ;+32 |
110 | heap_base dd ? ;+36 |
110 | heap_base dd ? ;+36 |
111 | heap_top dd ? ;+40 |
111 | heap_top dd ? ;+40 |
112 | cursor dd ? ;+44 |
112 | cursor dd ? ;+44 |
113 | fd_ev dd ? ;+48 |
113 | fd_ev dd ? ;+48 |
114 | bk_ev dd ? ;+52 |
114 | bk_ev dd ? ;+52 |
115 | fd_obj dd ? ;+56 |
115 | fd_obj dd ? ;+56 |
116 | bk_obj dd ? ;+60 |
116 | bk_obj dd ? ;+60 |
117 | saved_esp dd ? ;+64 |
117 | saved_esp dd ? ;+64 |
118 | io_map rd 2 ;+68 |
118 | io_map rd 2 ;+68 |
119 | dbg_state dd ? ;+76 |
119 | dbg_state dd ? ;+76 |
120 | cur_dir dd ? ;+80 |
120 | cur_dir dd ? ;+80 |
121 | wait_timeout dd ? ;+84 |
121 | wait_timeout dd ? ;+84 |
122 | saved_esp0 dd ? ;+88 |
122 | saved_esp0 dd ? ;+88 |
123 | wait_begin dd ? ;+92 +++ |
123 | wait_begin dd ? ;+92 +++ |
124 | wait_test dd ? ;+96 +++ |
124 | wait_test dd ? ;+96 +++ |
125 | wait_param dd ? ;+100 +++ |
125 | wait_param dd ? ;+100 +++ |
126 | tls_base dd ? ;+104 |
126 | tls_base dd ? ;+104 |
127 | dlls_list_ptr dd ? ;+108 |
127 | dlls_list_ptr dd ? ;+108 |
128 | event_filter dd ? ;+112 |
128 | event_filter dd ? ;+112 |
129 | rb 12 ;+116 |
129 | rb 12 ;+116 |
130 | 130 | ||
131 | wnd_shape dd ? ;+128 |
131 | wnd_shape dd ? ;+128 |
132 | wnd_shape_scale dd ? ;+132 |
132 | wnd_shape_scale dd ? ;+132 |
133 | dd ? ;+136 |
133 | dd ? ;+136 |
134 | mem_size dd ? ;+140 |
134 | mem_size dd ? ;+140 |
135 | saved_box BOX |
135 | saved_box BOX |
136 | ipc_start dd ? |
136 | ipc_start dd ? |
137 | ipc_size dd ? |
137 | ipc_size dd ? |
138 | event_mask dd ? |
138 | event_mask dd ? |
139 | debugger_slot dd ? |
139 | debugger_slot dd ? |
140 | dd ? |
140 | terminate_protection dd ? |
141 | keyboard_mode db ? |
141 | keyboard_mode db ? |
142 | rb 3 |
142 | rb 3 |
143 | dir_table dd ? |
143 | dir_table dd ? |
144 | dbg_event_mem dd ? |
144 | dbg_event_mem dd ? |
145 | dbg_regs DBG_REGS |
145 | dbg_regs DBG_REGS |
146 | wnd_caption dd ? |
146 | wnd_caption dd ? |
147 | wnd_clientbox BOX |
147 | wnd_clientbox BOX |
148 | 148 | ||
149 | ends |
149 | ends |
150 | 150 | ||
151 | 151 | ||
152 | ; Core functions |
152 | ; Core functions |
153 | include "core/sync.inc" ; macros for synhronization objects |
153 | include "core/sync.inc" ; macros for synhronization objects |
154 | include "core/sys32.inc" ; process management |
154 | include "core/sys32.inc" ; process management |
155 | include "core/sched.inc" ; process scheduling |
155 | include "core/sched.inc" ; process scheduling |
156 | include "core/syscall.inc" ; system call |
156 | include "core/syscall.inc" ; system call |
157 | include "core/fpu.inc" ; all fpu/sse support |
157 | include "core/fpu.inc" ; all fpu/sse support |
158 | include "core/memory.inc" |
158 | include "core/memory.inc" |
159 | include "core/heap.inc" ; kernel and app heap |
159 | include "core/heap.inc" ; kernel and app heap |
160 | include "core/malloc.inc" ; small kernel heap |
160 | include "core/malloc.inc" ; small kernel heap |
161 | include "core/taskman.inc" |
161 | include "core/taskman.inc" |
162 | include "core/dll.inc" |
162 | include "core/dll.inc" |
163 | include "core/peload.inc" ; |
163 | include "core/peload.inc" ; |
164 | include "core/exports.inc" |
164 | include "core/exports.inc" |
165 | include "core/string.inc" |
165 | include "core/string.inc" |
166 | include "core/v86.inc" ; virtual-8086 manager |
166 | include "core/v86.inc" ; virtual-8086 manager |
167 | include "core/irq.inc" ; irq handling functions |
167 | include "core/irq.inc" ; irq handling functions |
168 | include "core/apic.inc" ; Interrupt Controller functions |
168 | include "core/apic.inc" ; Interrupt Controller functions |
169 | include "core/timers.inc" |
169 | include "core/timers.inc" |
170 | 170 | ||
171 | ; GUI stuff |
171 | ; GUI stuff |
172 | include "gui/window.inc" |
172 | include "gui/window.inc" |
173 | include "gui/event.inc" |
173 | include "gui/event.inc" |
174 | include "gui/font.inc" |
174 | include "gui/font.inc" |
175 | include "gui/button.inc" |
175 | include "gui/button.inc" |
176 | 176 | ||
177 | ; shutdown |
177 | ; shutdown |
178 | 178 | ||
179 | ; file system |
179 | ; file system |
180 | 180 | ||
181 | include "blkdev/disk.inc" ; support for plug-n-play disks |
181 | include "blkdev/disk.inc" ; support for plug-n-play disks |
182 | include "blkdev/disk_cache.inc" ; caching for plug-n-play disks |
182 | include "blkdev/disk_cache.inc" ; caching for plug-n-play disks |
183 | include "fs/fs.inc" ; syscall |
183 | include "fs/fs.inc" ; syscall |
184 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
184 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
185 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
185 | include "fs/ntfs.inc" ; read / write for ntfs filesystem |
186 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
186 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
187 | include "blkdev/rd.inc" ; ramdisk read /write |
187 | include "blkdev/rd.inc" ; ramdisk read /write |
188 | include "fs/fs_lfn.inc" ; syscall, version 2 |
188 | include "fs/fs_lfn.inc" ; syscall, version 2 |
189 | include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
189 | include "fs/iso9660.inc" ; read for iso9660 filesystem CD |
190 | include "fs/ext2.inc" ; read / write for ext2 filesystem |
190 | include "fs/ext2.inc" ; read / write for ext2 filesystem |
191 | 191 | ||
192 | ; sound |
192 | ; sound |
193 | 193 | ||
194 | include "sound/playnote.inc" ; player Note for Speaker PC |
194 | include "sound/playnote.inc" ; player Note for Speaker PC |
195 | 195 | ||
196 | ; display |
196 | ; display |
197 | 197 | ||
198 | ;include "video/vesa12.inc" ; Vesa 1.2 functions |
198 | ;include "video/vesa12.inc" ; Vesa 1.2 functions |
199 | include "video/vesa20.inc" ; Vesa 2.0 functions |
199 | include "video/vesa20.inc" ; Vesa 2.0 functions |
200 | include "video/blitter.inc" ; |
200 | include "video/blitter.inc" ; |
201 | include "video/vga.inc" ; VGA 16 color functions |
201 | include "video/vga.inc" ; VGA 16 color functions |
202 | include "video/cursors.inc" ; cursors functions |
202 | include "video/cursors.inc" ; cursors functions |
203 | 203 | ||
204 | ; Network Interface & TCPIP Stack |
204 | ; Network Interface & TCPIP Stack |
205 | 205 | ||
206 | include "network/stack.inc" |
206 | include "network/stack.inc" |
207 | 207 | ||
208 | ;include "drivers/uart.inc" |
208 | ;include "drivers/uart.inc" |
209 | 209 | ||
210 | 210 | ||
211 | ; Mouse pointer |
211 | ; Mouse pointer |
212 | 212 | ||
213 | include "gui/mouse.inc" |
213 | include "gui/mouse.inc" |
214 | 214 | ||
215 | ; Window skinning |
215 | ; Window skinning |
216 | 216 | ||
217 | include "gui/skincode.inc" |
217 | include "gui/skincode.inc" |
218 | 218 | ||
219 | ; Pci functions |
219 | ; Pci functions |
220 | 220 | ||
221 | include "bus/pci/pci32.inc" |
221 | include "bus/pci/pci32.inc" |
222 | 222 | ||
223 | ; Floppy drive controller |
223 | ; Floppy drive controller |
224 | 224 | ||
225 | include "blkdev/fdc.inc" |
225 | include "blkdev/fdc.inc" |
226 | include "blkdev/flp_drv.inc" |
226 | include "blkdev/flp_drv.inc" |
227 | 227 | ||
228 | ; IDE cache |
228 | ; IDE cache |
229 | include "blkdev/ide_cache.inc" |
229 | include "blkdev/ide_cache.inc" |
230 | 230 | ||
231 | ; HD drive controller |
231 | ; HD drive controller |
232 | include "blkdev/hd_drv.inc" |
232 | include "blkdev/hd_drv.inc" |
233 | 233 | ||
234 | ; CD drive controller |
234 | ; CD drive controller |
235 | 235 | ||
236 | include "blkdev/cdrom.inc" |
236 | include "blkdev/cdrom.inc" |
237 | include "blkdev/cd_drv.inc" |
237 | include "blkdev/cd_drv.inc" |
238 | 238 | ||
239 | ; Character devices |
239 | ; Character devices |
240 | 240 | ||
241 | include "hid/keyboard.inc" |
241 | include "hid/keyboard.inc" |
242 | include "hid/mousedrv.inc" |
242 | include "hid/mousedrv.inc" |
243 | 243 | ||
244 | ; setting date,time,clock and alarm-clock |
244 | ; setting date,time,clock and alarm-clock |
245 | 245 | ||
246 | include "hid/set_dtc.inc" |
246 | include "hid/set_dtc.inc" |
247 | 247 | ||
248 | ;% -include |
248 | ;% -include |
249 | 249 | ||
250 | ;parser file names |
250 | ;parser file names |
251 | include "fs/parse_fn.inc" |
251 | include "fs/parse_fn.inc" |
252 | 252 | ||
253 | ; work with conf lib |
253 | ; work with conf lib |
254 | include "core/conf_lib.inc" |
254 | include "core/conf_lib.inc" |
255 | 255 | ||
256 | ; load external lib |
256 | ; load external lib |
257 | include "core/ext_lib.inc" |
257 | include "core/ext_lib.inc" |
258 | 258 | ||
259 | ; list of external functions |
259 | ; list of external functions |
260 | include "imports.inc" |
260 | include "imports.inc" |