Subversion Repositories Kolibri OS

Rev

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

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