Subversion Repositories Kolibri OS

Rev

Rev 753 | Rev 983 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 753 Rev 802
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;; KERNEL32.INC                                                 ;;
6
;; KERNEL32.INC                                                 ;;
7
;;                                                              ;;
7
;;                                                              ;;
8
;; Included 32 bit kernel files for MenuetOS                    ;;
8
;; Included 32 bit kernel files for MenuetOS                    ;;
9
;;                                                              ;;
9
;;                                                              ;;
10
;; This file is kept separate as it will be easier to           ;;
10
;; This file is kept separate as it will be easier to           ;;
11
;; maintain and compile with an automated SETUP program         ;;
11
;; maintain and compile with an automated SETUP program         ;;
12
;; in the future.                                               ;;
12
;; in the future.                                               ;;
13
;;                                                              ;;
13
;;                                                              ;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
 
15
 
16
$Revision: 753 $
16
$Revision: 802 $
17
 
17
 
18
 
18
 
19
;struc db [a] { common . db a
19
;struc db [a] { common . db a
20
;  if ~used .
20
;  if ~used .
21
;    display 'not used db: ',`.,13,10
21
;    display 'not used db: ',`.,13,10
22
;  end if }
22
;  end if }
23
;struc dw [a] { common . dw a
23
;struc dw [a] { common . dw a
24
;  if ~used .
24
;  if ~used .
25
;    display 'not used dw: ',`.,13,10
25
;    display 'not used dw: ',`.,13,10
26
;  end if }
26
;  end if }
27
;struc dd [a] { common . dd a
27
;struc dd [a] { common . dd a
28
;  if ~used .
28
;  if ~used .
29
;    display 'not used dd: ',`.,13,10
29
;    display 'not used dd: ',`.,13,10
30
;  end if }
30
;  end if }
31
;struc dp [a] { common . dp a
31
;struc dp [a] { common . dp a
32
;  if ~used .
32
;  if ~used .
33
;    display 'not used dp: ',`.,13,10
33
;    display 'not used dp: ',`.,13,10
34
;  end if }
34
;  end if }
35
;struc dq [a] { common . dq a
35
;struc dq [a] { common . dq a
36
;  if ~used .
36
;  if ~used .
37
;    display 'not used dq: ',`.,13,10
37
;    display 'not used dq: ',`.,13,10
38
;  end if }
38
;  end if }
39
;struc dt [a] { common . dt a
39
;struc dt [a] { common . dt a
40
;  if ~used .
40
;  if ~used .
41
;    display 'not used dt: ',`.,13,10
41
;    display 'not used dt: ',`.,13,10
42
;  end if }
42
;  end if }
43
 
43
 
44
struc RECT {
44
struc RECT {
45
  .left   dd ?
45
  .left   dd ?
46
  .top    dd ?
46
  .top    dd ?
47
  .right  dd ?
47
  .right  dd ?
48
  .bottom dd ?
48
  .bottom dd ?
49
}
49
}
50
virtual at 0
50
virtual at 0
51
 RECT RECT
51
 RECT RECT
52
end virtual
52
end virtual
53
 
53
 
54
struc BOX {
54
struc BOX {
55
  .left   dd ?
55
  .left   dd ?
56
  .top    dd ?
56
  .top    dd ?
57
  .width  dd ?
57
  .width  dd ?
58
  .height dd ?
58
  .height dd ?
59
}
59
}
60
virtual at 0
60
virtual at 0
61
 BOX BOX
61
 BOX BOX
62
end virtual
62
end virtual
63
 
63
 
64
struc DISPMODE {
64
struc DISPMODE {
65
  .width   rw 1
65
  .width   rw 1
66
  .height  rw 1
66
  .height  rw 1
67
  .bpp     rw 1
67
  .bpp     rw 1
68
  .freq    rw 1
68
  .freq    rw 1
69
}
69
}
70
 
70
 
71
; constants definition
71
; constants definition
72
WSTATE_NORMAL    = 00000000b
72
WSTATE_NORMAL    = 00000000b
73
WSTATE_MAXIMIZED = 00000001b
73
WSTATE_MAXIMIZED = 00000001b
74
WSTATE_MINIMIZED = 00000010b
74
WSTATE_MINIMIZED = 00000010b
75
WSTATE_ROLLEDUP  = 00000100b
75
WSTATE_ROLLEDUP  = 00000100b
76
 
76
 
77
WSTATE_REDRAW	 = 00000001b
77
WSTATE_REDRAW	 = 00000001b
78
WSTATE_WNDDRAWN  = 00000010b
78
WSTATE_WNDDRAWN  = 00000010b
79
 
79
 
80
WSTYLE_HASCAPTION     = 00010000b
80
WSTYLE_HASCAPTION     = 00010000b
81
WSTYLE_CLIENTRELATIVE = 00100000b
81
WSTYLE_CLIENTRELATIVE = 00100000b
82
 
82
 
83
struc TASKDATA
83
struc TASKDATA
84
{
84
{
85
  .event_mask  dd ?
85
  .event_mask  dd ?
86
  .pid	       dd ?
86
  .pid	       dd ?
87
	       dw ?
87
	       dw ?
88
  .state       db ?
88
  .state       db ?
89
               db ?
89
               db ?
90
	       dw ?
90
	       dw ?
91
  .wnd_number  db ?
91
  .wnd_number  db ?
92
	       db ?
92
	       db ?
93
  .mem_start   dd ?
93
  .mem_start   dd ?
94
  .counter_sum dd ?
94
  .counter_sum dd ?
95
  .counter_add dd ?
95
  .counter_add dd ?
96
  .cpu_usage   dd ?
96
  .cpu_usage   dd ?
97
}
97
}
98
virtual at 0
98
virtual at 0
99
 TASKDATA TASKDATA
99
 TASKDATA TASKDATA
100
end virtual
100
end virtual
101
 
101
 
102
; structures definition
102
; structures definition
103
struc WDATA {
103
struc WDATA {
104
  .box		   BOX
104
  .box		   BOX
105
  .cl_workarea	   dd ?
105
  .cl_workarea	   dd ?
106
  .cl_titlebar	   dd ?
106
  .cl_titlebar	   dd ?
107
  .cl_frames	   dd ?
107
  .cl_frames	   dd ?
108
  .reserved	   db ?
108
  .reserved	   db ?
109
  .fl_wstate	   db ?
109
  .fl_wstate	   db ?
110
  .fl_wdrawn	   db ?
110
  .fl_wdrawn	   db ?
111
  .fl_redraw	   db ?
111
  .fl_redraw	   db ?
112
}
112
}
113
virtual at 0
113
virtual at 0
114
 WDATA WDATA
114
 WDATA WDATA
115
end virtual
115
end virtual
116
label WDATA.fl_wstyle byte at 0x13
116
label WDATA.fl_wstyle byte at 0x13
117
 
117
 
118
struc APPDATA
118
struc APPDATA
119
{
119
{
120
  .app_name	   db 11  dup(?)
120
  .app_name	   db 11  dup(?)
121
		   db 5   dup(?)
121
		   db 5   dup(?)
122
 
122
 
123
  .fpu_state       dd ?            ;+16
123
  .fpu_state       dd ?            ;+16
124
  .ev_count        dd ?            ;+20
124
  .ev_count        dd ?            ;+20
125
  .fpu_handler     dd ?            ;+24
125
  .fpu_handler     dd ?            ;+24
126
  .sse_handler     dd ?            ;+28
126
  .sse_handler     dd ?            ;+28
127
  .pl0_stack       dd ? ;unused    ;+32
127
  .pl0_stack       dd ? ;unused    ;+32
128
  .heap_base       dd ?            ;+36
128
  .heap_base       dd ?            ;+36
129
  .heap_top        dd ?            ;+40
129
  .heap_top        dd ?            ;+40
130
  .cursor          dd ?            ;+44
130
  .cursor          dd ?            ;+44
131
  .fd_ev           dd ?            ;+48
131
  .fd_ev           dd ?            ;+48
132
  .bk_ev           dd ?            ;+52
132
  .bk_ev           dd ?            ;+52
133
  .fd_obj          dd ?            ;+56
133
  .fd_obj          dd ?            ;+56
134
  .bk_obj          dd ?            ;+60
134
  .bk_obj          dd ?            ;+60
135
  .saved_esp       dd ?            ;+64
135
  .saved_esp       dd ?            ;+64
136
  .io_map          rd 2            ;+68
136
  .io_map          rd 2            ;+68
137
  .dbg_state       dd ?            ;+76
137
  .dbg_state       dd ?            ;+76
138
  .cur_dir         dd ?            ;+80
138
  .cur_dir         dd ?            ;+80
139
  .wait_timeout    dd ?            ;+84
139
  .wait_timeout    dd ?            ;+84
140
  .saved_esp0      dd ?            ;+88
140
  .saved_esp0      dd ?            ;+88
141
 
141
 
142
                   db 36 dup(?)    ;+92
142
                   db 36 dup(?)    ;+92
143
 
143
 
144
  .wnd_shape       dd ?            ;+128
144
  .wnd_shape       dd ?            ;+128
145
  .wnd_shape_scale dd ?            ;+132
145
  .wnd_shape_scale dd ?            ;+132
146
                   dd ?            ;+136
146
                   dd ?            ;+136
147
  .mem_size        dd ?            ;+140
147
  .mem_size        dd ?            ;+140
148
  .saved_box	   BOX
148
  .saved_box	   BOX
149
  .ipc_start	   dd ?
149
  .ipc_start	   dd ?
150
  .ipc_size	   dd ?
150
  .ipc_size	   dd ?
151
  .event_mask	   dd ?
151
  .event_mask	   dd ?
152
  .debugger_slot   dd ?
152
  .debugger_slot   dd ?
153
		   dd ?
153
		   dd ?
154
  .keyboard_mode   db ?
154
  .keyboard_mode   db ?
155
		   db 3   dup(?)
155
		   db 3   dup(?)
156
  .dir_table	   dd ?
156
  .dir_table	   dd ?
157
  .dbg_event_mem   dd ?
157
  .dbg_event_mem   dd ?
158
  .dbg_regs:
158
  .dbg_regs:
159
  .dbg_regs.dr0    dd ?
159
  .dbg_regs.dr0    dd ?
160
  .dbg_regs.dr1    dd ?
160
  .dbg_regs.dr1    dd ?
161
  .dbg_regs.dr2    dd ?
161
  .dbg_regs.dr2    dd ?
162
  .dbg_regs.dr3    dd ?
162
  .dbg_regs.dr3    dd ?
163
  .dbg_regs.dr7    dd ?
163
  .dbg_regs.dr7    dd ?
164
  .wnd_caption	   dd ?
164
  .wnd_caption	   dd ?
165
  .wnd_clientbox   BOX
165
  .wnd_clientbox   BOX
166
}
166
}
167
virtual at 0
167
virtual at 0
168
 APPDATA APPDATA
168
 APPDATA APPDATA
169
end virtual
169
end virtual
170
 
170
 
171
;// mike.dld, 2006-29-01 ]
171
;// mike.dld, 2006-29-01 ]
172
 
172
 
173
 
173
 
174
; Core functions
174
; Core functions
175
include "core/sync.inc"     ; macros for synhronization objects
175
include "core/sync.inc"     ; macros for synhronization objects
176
include "core/sys32.inc"    ; process management
176
include "core/sys32.inc"    ; process management
177
include "core/sched.inc"    ; process scheduling
177
include "core/sched.inc"    ; process scheduling
178
include "core/syscall.inc"  ; system call
178
include "core/syscall.inc"  ; system call
179
include "core/fpu.inc"      ; all fpu/sse support
179
include "core/fpu.inc"      ; all fpu/sse support
180
include "core/memory.inc"
180
include "core/memory.inc"
181
include "core/heap.inc"     ; kernel and app heap
181
include "core/heap.inc"     ; kernel and app heap
182
include "core/malloc.inc"   ; small kernel heap
182
include "core/malloc.inc"   ; small kernel heap
183
include "core/taskman.inc"
183
include "core/taskman.inc"
184
include "core/dll.inc"
184
include "core/dll.inc"
185
include "core/peload.inc"   ;
185
include "core/peload.inc"   ;
186
include "core/exports.inc"
186
include "core/exports.inc"
187
include "core/string.inc"
187
include "core/string.inc"
188
include "core/v86.inc"      ; virtual-8086 manager
188
include "core/v86.inc"      ; virtual-8086 manager
189
 
189
 
190
; GUI stuff
190
; GUI stuff
191
include "gui/window.inc"
191
include "gui/window.inc"
192
include "gui/event.inc"
192
include "gui/event.inc"
193
include "gui/font.inc"
193
include "gui/font.inc"
194
include "gui/button.inc"
194
include "gui/button.inc"
195
 
195
 
196
; shutdown
196
; shutdown
197
 
197
 
198
; file system
198
; file system
199
 
199
 
200
include "fs/fs.inc"       ; syscall
200
include "fs/fs.inc"       ; syscall
201
include "fs/fat32.inc"    ; read / write for fat32 filesystem
201
include "fs/fat32.inc"    ; read / write for fat32 filesystem
202
include "fs/ntfs.inc"     ; read / write for ntfs filesystem
202
include "fs/ntfs.inc"     ; read / write for ntfs filesystem
203
include "fs/fat12.inc"    ; read / write for fat12 filesystem
203
include "fs/fat12.inc"    ; read / write for fat12 filesystem
204
include "blkdev/rd.inc"   ; ramdisk read /write
204
include "blkdev/rd.inc"   ; ramdisk read /write
205
include "fs/fs_lfn.inc"    ; syscall, version 2
205
include "fs/fs_lfn.inc"    ; syscall, version 2
206
include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
206
include "fs/iso9660.inc"  ; read for iso9660 filesystem CD
207
 
207
 
208
; sound
208
; sound
209
 
-
 
210
include "sound/sb16.inc"     ; playback for Sound Blaster 16
209
 
211
include "sound/playnote.inc" ; player Note for Speaker PC
210
include "sound/playnote.inc" ; player Note for Speaker PC
212
 
211
 
213
; display
212
; display
214
 
213
 
215
include "video/vesa12.inc"   ; Vesa 1.2 functions
214
include "video/vesa12.inc"   ; Vesa 1.2 functions
216
include "video/vesa20.inc"   ; Vesa 2.0 functions
215
include "video/vesa20.inc"   ; Vesa 2.0 functions
217
include "video/vga.inc"      ; VGA 16 color functions
216
include "video/vga.inc"      ; VGA 16 color functions
218
include "video/cursors.inc"  ; cursors functions
217
include "video/cursors.inc"  ; cursors functions
219
 
218
 
220
; Network Interface & TCPIP Stack
219
; Network Interface & TCPIP Stack
221
 
220
 
222
include "network/stack.inc"
221
include "network/stack.inc"
223
 
222
 
224
;include "drivers/uart.inc"
223
;include "drivers/uart.inc"
225
 
224
 
226
 
225
 
227
; Mouse pointer
226
; Mouse pointer
228
 
227
 
229
include "gui/mouse.inc"
228
include "gui/mouse.inc"
230
 
229
 
231
; Window skinning
230
; Window skinning
232
 
231
 
233
include "gui/skincode.inc"
232
include "gui/skincode.inc"
234
 
233
 
235
; Pci functions
234
; Pci functions
236
 
235
 
237
include "bus/pci/pci32.inc"
236
include "bus/pci/pci32.inc"
238
 
237
 
239
; Floppy drive controller
238
; Floppy drive controller
240
 
239
 
241
include "blkdev/fdc.inc"
240
include "blkdev/fdc.inc"
242
include "blkdev/flp_drv.inc"
241
include "blkdev/flp_drv.inc"
243
 
242
 
244
; IDE cache
243
; IDE cache
245
include "blkdev/ide_cache.inc"
244
include "blkdev/ide_cache.inc"
246
 
245
 
247
; HD drive controller
246
; HD drive controller
248
include "blkdev/hd_drv.inc"
247
include "blkdev/hd_drv.inc"
249
 
248
 
250
; CD drive controller
249
; CD drive controller
251
 
250
 
252
include "blkdev/cdrom.inc"
251
include "blkdev/cdrom.inc"
253
include "blkdev/cd_drv.inc"
252
include "blkdev/cd_drv.inc"
254
 
253
 
255
; Character devices
254
; Character devices
256
 
255
 
257
include "hid/keyboard.inc"
256
include "hid/keyboard.inc"
258
include "hid/mousedrv.inc"
257
include "hid/mousedrv.inc"
259
 
258
 
260
; setting date,time,clock and alarm-clock
259
; setting date,time,clock and alarm-clock
261
 
260
 
262
include "hid/set_dtc.inc"
261
include "hid/set_dtc.inc"
263
 
262
 
264
;% -include
263
;% -include
265
 
264
 
266
;parser file names
265
;parser file names
267
include "fs/parse_fn.inc"
266
include "fs/parse_fn.inc"
268
 
267
 
269
; work with conf lib
268
; work with conf lib
270
include "core/conf_lib.inc"
269
include "core/conf_lib.inc"
271
 
270
 
272
; load external lib
271
; load external lib
273
include "core/ext_lib.inc"
272
include "core/ext_lib.inc"
274
 
273
 
275
; list of external functions
274
; list of external functions
276
include "imports.inc"
275
include "imports.inc"