Subversion Repositories Kolibri OS

Rev

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