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