Subversion Repositories Kolibri OS

Rev

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

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