Subversion Repositories Kolibri OS

Rev

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