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