Subversion Repositories Kolibri OS

Rev

Rev 1311 | Details | Compare with Previous | Last modification | View Log | RSS feed

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