Subversion Repositories Kolibri OS

Rev

Rev 4429 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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