Subversion Repositories Kolibri OS

Rev

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

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