Subversion Repositories Kolibri OS

Rev

Rev 4430 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4429 Serge 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2012. 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
 
16
$Revision: 4420 $
17
 
18
struct  POINT
19
        x       dd ?
20
        y       dd ?
21
ends
22
 
23
struct  RECT
24
        left    dd ?
25
        top     dd ?
26
        right   dd ?
27
        bottom  dd ?
28
ends
29
 
30
struct  BOX
31
        left    dd ?
32
        top     dd ?
33
        width   dd ?
34
        height  dd ?
35
ends
36
 
37
struct  DISPMODE
38
        width   dw ?
39
        height  dw ?
40
        bpp     dw ?
41
        freq    dw ?
42
ends
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
 
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
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
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
 
91
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
92
 
93
struct  DBG_REGS
94
        dr0             dd ?
95
        dr1             dd ?
96
        dr2             dd ?
97
        dr3             dd ?
98
        dr7             dd ?
99
ends
100
 
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
4433 Serge 108
        dlls_list_ptr   rd 1
4429 Serge 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
 
114
        unused          rb 4096-$
115
        pdt_0           rd 1024
116
ends
117
 
118
struct  APPDATA
119
        app_name        rb 11
120
                        rb 5
121
 
122
        process         dd ?            ;+16
123
        fpu_state       dd ?            ;+20
124
        exc_handler     dd ?            ;+24
125
        except_mask     dd ?            ;+28
126
        pl0_stack       dd ?            ;+32
4430 Serge 127
                        dd ?            ;+36
128
                        dd ?            ;+40
4429 Serge 129
        cursor          dd ?            ;+44
130
        fd_ev           dd ?            ;+48
131
        bk_ev           dd ?            ;+52
132
        fd_obj          dd ?            ;+56
133
        bk_obj          dd ?            ;+60
134
        saved_esp       dd ?            ;+64
135
        io_map          rd 2            ;+68
136
        dbg_state       dd ?            ;+76
137
        cur_dir         dd ?            ;+80
138
        wait_timeout    dd ?            ;+84
139
        saved_esp0      dd ?            ;+88
140
        wait_begin      dd ?            ;+92   +++
141
        wait_test       dd ?            ;+96   +++
142
        wait_param      dd ?            ;+100  +++
143
        tls_base        dd ?            ;+104
4433 Serge 144
                        dd ?            ;+108
4429 Serge 145
        event_filter    dd ?            ;+112
146
        draw_bgr_x      dd ?            ;+116
147
        draw_bgr_y      dd ?            ;+120
148
                        dd ?            ;+124
149
 
150
        wnd_shape       dd ?            ;+128
151
        wnd_shape_scale dd ?            ;+132
152
                        dd ?            ;+136
4430 Serge 153
                        dd ?            ;+140
4429 Serge 154
        saved_box       BOX             ;+144
155
        ipc_start       dd ?            ;+160
156
        ipc_size        dd ?            ;+164
157
        event_mask      dd ?            ;+168
158
        debugger_slot   dd ?            ;+172
159
        terminate_protection dd ?       ;+176
160
        keyboard_mode   db ?            ;+180
161
                        rb 3
162
                        dd ?            ;+184
163
        dbg_event_mem   dd ?            ;+188
164
        dbg_regs        DBG_REGS        ;+192
165
        wnd_caption     dd ?            ;+212
166
        wnd_clientbox   BOX             ;+216
167
        priority        dd ?            ;+232
168
        in_schedule     LHEAD           ;+236
169
 
170
ends
171
 
172
 
173
; Core functions
174
include "core/sync.inc"     ; macros for synhronization objects
175
include "core/sys32.inc"    ; process management
176
include "core/sched.inc"    ; process scheduling
177
include "core/syscall.inc"  ; system call
178
include "core/fpu.inc"      ; all fpu/sse support
179
include "core/memory.inc"
180
include "core/heap.inc"     ; kernel and app heap
181
include "core/malloc.inc"   ; small kernel heap
182
include "core/taskman.inc"
183
include "core/dll.inc"
184
include "core/peload.inc"   ;
185
include "core/exports.inc"
186
include "core/string.inc"
187
include "core/v86.inc"      ; virtual-8086 manager
188
include "core/irq.inc"      ; irq handling functions
189
include "core/apic.inc"     ; Interrupt Controller functions
190
include "core/timers.inc"
191
include "core/clipboard.inc" ; custom clipboard
192
 
193
; GUI stuff
194
include "gui/window.inc"
195
include "gui/event.inc"
196
include "gui/font.inc"
197
include "gui/button.inc"
198
 
199
; shutdown
200
 
201
; file system
202
 
203
include "blkdev/disk.inc" ; support for plug-n-play disks
204
include "blkdev/disk_cache.inc" ; caching for plug-n-play disks
205
include "blkdev/rd.inc"   ; ramdisk read /write
206
include "fs/fat.inc"      ; read / write for fat filesystem
207
include "fs/ntfs.inc"     ; read / write for ntfs filesystem
208
include "fs/fs_lfn.inc"    ; syscall, version 2
209
include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
210
include "fs/ext2/ext2.asm"     ; read / write for ext2 filesystem
211
include "fs/xfs.asm"      ; read / write for xfs filesystem
212
 
213
; sound
214
 
215
include "sound/playnote.inc" ; player Note for Speaker PC
216
 
217
; display
218
 
219
;include "video/vesa12.inc"   ; Vesa 1.2 functions
220
include "video/vesa20.inc"   ; Vesa 2.0 functions
221
include "video/blitter.inc"  ;
222
include "video/vga.inc"      ; VGA 16 color functions
223
include "video/cursors.inc"  ; cursors functions
224
 
225
; Network Interface & TCPIP Stack
226
 
227
include "network/stack.inc"
228
 
229
;include "drivers/uart.inc"
230
 
231
 
232
; Mouse pointer
233
 
234
include "gui/mouse.inc"
235
 
236
; Window skinning
237
 
238
include "gui/skincode.inc"
239
 
240
; Pci functions
241
 
242
include "bus/pci/pci32.inc"
243
 
244
; USB functions
245
include "bus/usb/init.inc"
246
 
247
; Floppy drive controller
248
 
249
include "blkdev/fdc.inc"
250
include "blkdev/flp_drv.inc"
251
 
252
; IDE cache
253
include "blkdev/ide_cache.inc"
254
 
255
; HD drive controller
256
include "blkdev/hd_drv.inc"
257
; Access through BIOS
258
include "blkdev/bd_drv.inc"
259
 
260
; CD drive controller
261
 
262
include "blkdev/cdrom.inc"
263
include "blkdev/cd_drv.inc"
264
 
265
; Character devices
266
 
267
include "hid/keyboard.inc"
268
include "hid/mousedrv.inc"
269
 
270
; setting date,time,clock and alarm-clock
271
 
272
include "hid/set_dtc.inc"
273
 
274
;% -include
275
 
276
;parser file names
277
include "fs/parse_fn.inc"
278
 
279
; work with conf lib
280
include "core/conf_lib.inc"
281
 
282
; load external lib
283
include "core/ext_lib.inc"
284
 
285
; list of external functions
286
include "imports.inc"