Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
1551 art_zh 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2008. 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: 1626 $
17
 
18
 
19
;struc db [a] { common . db a
20
;  if ~used .
21
;    display 'not used db: ',`.,13,10
22
;  end if }
23
;struc dw [a] { common . dw a
24
;  if ~used .
25
;    display 'not used dw: ',`.,13,10
26
;  end if }
27
;struc dd [a] { common . dd a
28
;  if ~used .
29
;    display 'not used dd: ',`.,13,10
30
;  end if }
31
;struc dp [a] { common . dp a
32
;  if ~used .
33
;    display 'not used dp: ',`.,13,10
34
;  end if }
35
;struc dq [a] { common . dq a
36
;  if ~used .
37
;    display 'not used dq: ',`.,13,10
38
;  end if }
39
;struc dt [a] { common . dt a
40
;  if ~used .
41
;    display 'not used dt: ',`.,13,10
42
;  end if }
43
 
44
struc POINT {
45
  .x dd ?
46
  .y dd ?
47
  .sizeof:
48
}
49
virtual at 0
50
 POINT POINT
51
end virtual
52
 
53
struc RECT {
54
  .left   dd ?
55
  .top    dd ?
56
  .right  dd ?
57
  .bottom dd ?
58
  .sizeof:
59
}
60
virtual at 0
61
 RECT RECT
62
end virtual
63
 
64
struc BOX {
65
  .left   dd ?
66
  .top    dd ?
67
  .width  dd ?
68
  .height dd ?
69
  .sizeof:
70
}
71
virtual at 0
72
 BOX BOX
73
end virtual
74
 
75
struc DISPMODE {
76
  .width   rw 1
77
  .height  rw 1
78
  .bpp     rw 1
79
  .freq    rw 1
80
}
81
 
82
; constants definition
83
WSTATE_NORMAL    = 00000000b
84
WSTATE_MAXIMIZED = 00000001b
85
WSTATE_MINIMIZED = 00000010b
86
WSTATE_ROLLEDUP  = 00000100b
87
 
88
WSTATE_REDRAW    = 00000001b
89
WSTATE_WNDDRAWN  = 00000010b
90
 
91
WSTYLE_HASCAPTION     = 00010000b
92
WSTYLE_CLIENTRELATIVE = 00100000b
93
 
94
struc TASKDATA
95
{
96
  .event_mask  dd ?
97
  .pid         dd ?
98
               dw ?
99
  .state       db ?
100
               db ?
101
               dw ?
102
  .wnd_number  db ?
103
               db ?
104
  .mem_start   dd ?
105
  .counter_sum dd ?
106
  .counter_add dd ?
107
  .cpu_usage   dd ?
108
}
109
virtual at 0
110
 TASKDATA TASKDATA
111
end virtual
112
 
113
TSTATE_RUNNING        = 0
114
TSTATE_RUN_SUSPENDED  = 1
115
TSTATE_WAIT_SUSPENDED = 2
116
TSTATE_ZOMBIE         = 3
117
TSTATE_TERMINATING    = 4
118
TSTATE_WAITING        = 5
119
TSTATE_FREE           = 9
120
 
121
; structures definition
122
struc WDATA {
123
  .box             BOX
124
  .cl_workarea     dd ?
125
  .cl_titlebar     dd ?
126
  .cl_frames       dd ?
127
  .reserved        db ?
128
  .fl_wstate       db ?
129
  .fl_wdrawn       db ?
130
  .fl_redraw       db ?
131
  .sizeof:
132
}
133
virtual at 0
134
 WDATA WDATA
135
end virtual
136
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
137
 
138
struc APPDATA
139
{
140
  .app_name        db 11  dup(?)
141
                   db 5   dup(?)
142
 
143
  .fpu_state       dd ?            ;+16
144
  .ev_count_       dd ? ;unused    ;+20
145
  .exc_handler     dd ?            ;+24
146
  .except_mask     dd ?            ;+28
147
  .pl0_stack       dd ? ;unused    ;+32
148
  .heap_base       dd ?            ;+36
149
  .heap_top        dd ?            ;+40
150
  .cursor          dd ?            ;+44
151
  .fd_ev           dd ?            ;+48
152
  .bk_ev           dd ?            ;+52
153
  .fd_obj          dd ?            ;+56
154
  .bk_obj          dd ?            ;+60
155
  .saved_esp       dd ?            ;+64
156
  .io_map          rd 2            ;+68
157
  .dbg_state       dd ?            ;+76
158
  .cur_dir         dd ?            ;+80
159
  .wait_timeout    dd ?            ;+84
160
  .saved_esp0      dd ?            ;+88
161
  .wait_begin      dd ?            ;+92   +++
162
  .wait_test       dd ?            ;+96   +++
163
  .wait_param      dd ?            ;+100  +++
164
  .tls_base        dd ?            ;+104
165
  .dlls_list_ptr   dd ?            ;+108
166
                   db 16 dup(?)    ;+112
167
 
168
  .wnd_shape       dd ?            ;+128
169
  .wnd_shape_scale dd ?            ;+132
170
                   dd ?            ;+136
171
  .mem_size        dd ?            ;+140
172
  .saved_box       BOX
173
  .ipc_start       dd ?
174
  .ipc_size        dd ?
175
  .event_mask      dd ?
176
  .debugger_slot   dd ?
177
                   dd ?
178
  .keyboard_mode   db ?
179
                   db 3   dup(?)
180
  .dir_table       dd ?
181
  .dbg_event_mem   dd ?
182
  .dbg_regs:
183
  .dbg_regs.dr0    dd ?
184
  .dbg_regs.dr1    dd ?
185
  .dbg_regs.dr2    dd ?
186
  .dbg_regs.dr3    dd ?
187
  .dbg_regs.dr7    dd ?
188
  .wnd_caption     dd ?
189
  .wnd_clientbox   BOX
190
}
191
virtual at 0
192
 APPDATA APPDATA
193
end virtual
194
 
195
;// mike.dld, 2006-29-01 ]
196
 
197
struc MUTEX
198
{
199
    .count  rd 1
200
    .next   rd 1
201
    .prev   rd 1
202
}
203
 
204
virtual at 0
205
 MUTEX MUTEX
206
end virtual
207
 
208
 
209
; Core functions
210
include "core/sync.inc"     ; macros for synhronization objects
211
include "core/sys32.inc"    ; process management
212
include "core/sched.inc"    ; process scheduling
213
include "core/syscall.inc"  ; system call
214
include "core/fpu.inc"      ; all fpu/sse support
215
include "core/memory.inc"
216
include "core/heap.inc"     ; kernel and app heap
217
include "core/malloc.inc"   ; small kernel heap
218
include "core/taskman.inc"
219
include "core/dll.inc"
220
include "core/peload.inc"   ;
221
include "core/exports.inc"
222
include "core/string.inc"
223
include "core/v86.inc"      ; virtual-8086 manager
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 "fs/fs.inc"       ; syscall
236
include "fs/fat32.inc"    ; read / write for fat32 filesystem
237
include "fs/ntfs.inc"     ; read / write for ntfs filesystem
238
include "fs/fat12.inc"    ; read / write for fat12 filesystem
239
include "blkdev/rd.inc"   ; ramdisk read /write
240
include "fs/fs_lfn.inc"    ; syscall, version 2
241
include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
242
include "fs/ext2.inc"     ; read / write for ext2 filesystem
243
 
244
; sound
245
 
1626 art_zh 246
include "sound/playnote.inc" 	; player Note for Speaker PC
247
include "sound/FFT.inc" 	; fast Fourier transform routines
1551 art_zh 248
 
249
; display
250
 
251
;include "video/vesa12.inc"   ; Vesa 1.2 functions
252
include "video/vesa20.inc"   ; Vesa 2.0 functions
253
include "video/vga.inc"      ; VGA 16 color functions
254
include "video/cursors.inc"  ; cursors functions
255
 
256
; Network Interface & TCPIP Stack
257
 
258
include "network/stack.inc"
259
 
260
;include "drivers/uart.inc"
261
 
262
 
263
; Mouse pointer
264
 
265
include "gui/mouse.inc"
266
 
267
; Window skinning
268
 
269
include "gui/skincode.inc"
270
 
271
; Pci functions
272
include "bus/pci/pci32.inc"
273
include "bus/pci/pcie.inc"
274
include "bus/ht.inc"		; AMD HyperTransport bus control
275
 
276
; Floppy drive controller
277
 
278
include "blkdev/fdc.inc"
279
include "blkdev/flp_drv.inc"
280
 
281
; IDE cache
282
include "blkdev/ide_cache.inc"
283
 
284
; HD drive controller
285
include "blkdev/hd_drv.inc"
286
 
287
; CD drive controller
288
 
289
include "blkdev/cdrom.inc"
290
include "blkdev/cd_drv.inc"
291
 
292
; Character devices
293
 
294
include "hid/keyboard.inc"
295
include "hid/mousedrv.inc"
296
 
297
; setting date,time,clock and alarm-clock
298
 
299
include "hid/set_dtc.inc"
300
 
301
;% -include
302
 
303
;parser file names
304
include "fs/parse_fn.inc"
305
 
306
; work with conf lib
307
include "core/conf_lib.inc"
308
 
309
; load external lib
310
include "core/ext_lib.inc"
311
 
312
; list of external functions
313
include "imports.inc"