Subversion Repositories Kolibri OS

Rev

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

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