Rev 43 | Rev 73 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 43 | Rev 70 | ||
---|---|---|---|
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; KERNEL32.INC ;; |
3 | ;; KERNEL32.INC ;; |
4 | ;; ;; |
4 | ;; ;; |
5 | ;; Included 32 bit kernel files for MenuetOS ;; |
5 | ;; Included 32 bit kernel files for MenuetOS ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;; This file is kept separate as it will be easier to ;; |
7 | ;; This file is kept separate as it will be easier to ;; |
8 | ;; maintain and compile with an automated SETUP program ;; |
8 | ;; maintain and compile with an automated SETUP program ;; |
9 | ;; in the future. ;; |
9 | ;; in the future. ;; |
10 | ;; ;; |
10 | ;; ;; |
11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
12 | 12 | ||
13 | ; structure definition helper |
13 | ; structure definition helper |
14 | macro struct name, [arg] |
14 | macro struct name, [arg] |
15 | { |
15 | { |
16 | common |
16 | common |
17 | name@struct equ name |
17 | name@struct equ name |
18 | struc name arg { |
18 | struc name arg { |
19 | } |
19 | } |
20 | 20 | ||
21 | macro struct_helper name |
21 | macro struct_helper name |
22 | { |
22 | { |
23 | match xname,name |
23 | match xname,name |
24 | \{ |
24 | \{ |
25 | virtual at 0 |
25 | virtual at 0 |
26 | xname xname |
26 | xname xname |
27 | sizeof.#xname = $ - xname |
27 | sizeof.#xname = $ - xname |
28 | name equ sizeof.#xname |
28 | name equ sizeof.#xname |
29 | end virtual |
29 | end virtual |
30 | \} |
30 | \} |
31 | } |
31 | } |
32 | 32 | ||
33 | ends fix } struct_helper name@struct |
33 | ends fix } struct_helper name@struct |
34 | 34 | ||
35 | ;// mike.dld, 2006-29-01 [ |
35 | ;// mike.dld, 2006-29-01 [ |
36 | 36 | ||
37 | ; macros definition |
37 | ; macros definition |
38 | macro diff16 title,l1,l2 |
38 | macro diff16 title,l1,l2 |
39 | { |
39 | { |
40 | local s,d |
40 | local s,d |
41 | s = l2-l1 |
41 | s = l2-l1 |
42 | display title,': 0x' |
42 | display title,': 0x' |
43 | repeat 8 |
43 | repeat 8 |
44 | d = 48 + s shr ((8-%) shl 2) and $0F |
44 | d = 48 + s shr ((8-%) shl 2) and $0F |
45 | if d > 57 |
45 | if d > 57 |
46 | d = d + 65-57-1 |
46 | d = d + 65-57-1 |
47 | end if |
47 | end if |
48 | display d |
48 | display d |
49 | end repeat |
49 | end repeat |
50 | display 13,10 |
50 | display 13,10 |
51 | } |
51 | } |
52 | 52 | ||
53 | struc db [a] { common . db a |
53 | struc db [a] { common . db a |
54 | if ~used . |
54 | if ~used . |
55 | display 'not used db: ',`.,13,10 |
55 | display 'not used db: ',`.,13,10 |
56 | end if } |
56 | end if } |
57 | struc dw [a] { common . dw a |
57 | struc dw [a] { common . dw a |
58 | if ~used . |
58 | if ~used . |
59 | display 'not used dw: ',`.,13,10 |
59 | display 'not used dw: ',`.,13,10 |
60 | end if } |
60 | end if } |
61 | struc dd [a] { common . dd a |
61 | struc dd [a] { common . dd a |
62 | if ~used . |
62 | if ~used . |
63 | display 'not used dd: ',`.,13,10 |
63 | display 'not used dd: ',`.,13,10 |
64 | end if } |
64 | end if } |
65 | struc dp [a] { common . dp a |
65 | struc dp [a] { common . dp a |
66 | if ~used . |
66 | if ~used . |
67 | display 'not used dp: ',`.,13,10 |
67 | display 'not used dp: ',`.,13,10 |
68 | end if } |
68 | end if } |
69 | struc dq [a] { common . dq a |
69 | struc dq [a] { common . dq a |
70 | if ~used . |
70 | if ~used . |
71 | display 'not used dq: ',`.,13,10 |
71 | display 'not used dq: ',`.,13,10 |
72 | end if } |
72 | end if } |
73 | struc dt [a] { common . dt a |
73 | struc dt [a] { common . dt a |
74 | if ~used . |
74 | if ~used . |
75 | display 'not used dt: ',`.,13,10 |
75 | display 'not used dt: ',`.,13,10 |
76 | end if } |
76 | end if } |
77 | 77 | ||
78 | ; constants definition |
78 | ; constants definition |
79 | WSTATE_NORMAL = 00000000b |
79 | WSTATE_NORMAL = 00000000b |
80 | WSTATE_MAXIMIZED = 00000001b |
80 | WSTATE_MAXIMIZED = 00000001b |
81 | WSTATE_MINIMIZED = 00000010b |
81 | WSTATE_MINIMIZED = 00000010b |
82 | WSTATE_ROLLEDUP = 00000100b |
82 | WSTATE_ROLLEDUP = 00000100b |
83 | 83 | ||
84 | ; structures definition |
84 | ; structures definition |
85 | struc WDATA { |
85 | struc WDATA { |
86 | .left dd ? |
86 | .left dd ? |
87 | .top dd ? |
87 | .top dd ? |
88 | .width dd ? |
88 | .width dd ? |
89 | .height dd ? |
89 | .height dd ? |
90 | .cl_workarea dd ? |
90 | .cl_workarea dd ? |
91 | .cl_titlebar dd ? |
91 | .cl_titlebar dd ? |
92 | .cl_frames dd ? |
92 | .cl_frames dd ? |
93 | .reserved db ? |
93 | .reserved db ? |
94 | .fl_wstate db ? |
94 | .fl_wstate db ? |
95 | .fl_wdrawn db ? |
95 | .fl_wdrawn db ? |
96 | .fl_redraw db ? |
96 | .fl_redraw db ? |
97 | } |
97 | } |
98 | virtual at 0 |
98 | virtual at 0 |
99 | WDATA WDATA |
99 | WDATA WDATA |
100 | end virtual |
100 | end virtual |
101 | label WDATA.fl_wstyle byte at 0x13 ; WDATA.cl_workarea+3 |
101 | label WDATA.fl_wstyle byte at 0x13 ; WDATA.cl_workarea+3 |
102 | 102 | ||
103 | struc RECT { |
103 | struc RECT { |
104 | .left dd ? |
104 | .left dd ? |
105 | .top dd ? |
105 | .top dd ? |
106 | .right dd ? |
106 | .right dd ? |
107 | .bottom dd ? |
107 | .bottom dd ? |
108 | } |
108 | } |
109 | virtual at 0 |
109 | virtual at 0 |
110 | RECT RECT |
110 | RECT RECT |
111 | end virtual |
111 | end virtual |
112 | 112 | ||
113 | struc BOX { |
113 | struc BOX { |
114 | .left dd ? |
114 | .left dd ? |
115 | .top dd ? |
115 | .top dd ? |
116 | .width dd ? |
116 | .width dd ? |
117 | .height dd ? |
117 | .height dd ? |
118 | } |
118 | } |
119 | virtual at 0 |
119 | virtual at 0 |
120 | BOX BOX |
120 | BOX BOX |
121 | end virtual |
121 | end virtual |
122 | 122 | ||
123 | ;// mike.dld, 2006-29-01 ] |
123 | ;// mike.dld, 2006-29-01 ] |
124 | 124 | ||
125 | 125 | ||
126 | ; Core functions |
126 | ; Core functions |
127 | include "core/sync.inc" |
127 | include "core/sync.inc" |
128 | include "core/sys32.inc" ; process management |
128 | include "core/sys32.inc" ; process management |
129 | include "core/sched.inc" ; process scheduling |
129 | include "core/sched.inc" ; process scheduling |
130 | include "core/syscall.inc" ; system call |
130 | include "core/syscall.inc" ; system call |
131 | include "core/mem.inc" ; high-level memory management |
131 | include "core/mem.inc" ; high-level memory management |
132 | include "core/newproce.inc" ;new process management |
132 | include "core/newproce.inc" ;new process management |
133 | include "core/physmem.inc" ; access to physical memory for applications |
133 | include "core/physmem.inc" ; access to physical memory for applications |
134 | include "core/sync.inc" ; macros for synhronization objects |
134 | include "core/sync.inc" ; macros for synhronization objects |
135 | 135 | ||
136 | ; GUI stuff |
136 | ; GUI stuff |
137 | include "gui/window.inc" |
137 | include "gui/window.inc" |
138 | include "gui/event.inc" |
138 | include "gui/event.inc" |
139 | include "gui/font.inc" |
139 | include "gui/font.inc" |
140 | include "gui/button.inc" |
140 | include "gui/button.inc" |
141 | 141 | ||
142 | ; shutdown |
142 | ; shutdown |
143 | 143 | ||
144 | include "boot/shutdown.inc" ; shutdown or restart |
144 | include "boot/shutdown.inc" ; shutdown or restart |
145 | 145 | ||
146 | ; file system |
146 | ; file system |
147 | 147 | ||
148 | include "fs/fs.inc" ; syscall |
148 | include "fs/fs.inc" ; syscall |
149 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
149 | include "fs/fat32.inc" ; read / write for fat32 filesystem |
150 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
150 | include "fs/fat12.inc" ; read / write for fat12 filesystem |
151 | include "blkdev/rd.inc" ; ramdisk read /write |
151 | include "blkdev/rd.inc" ; ramdisk read /write |
- | 152 | include "fs/fs_v2.inc" ; syscall, version 2 |
|
152 | 153 | ||
153 | ; sound |
154 | ; sound |
154 | 155 | ||
155 | include "sound/sb16.inc" ; playback for Sound Blaster 16 |
156 | include "sound/sb16.inc" ; playback for Sound Blaster 16 |
156 | include "sound/playnote.inc" ; player Note for Speaker PC |
157 | include "sound/playnote.inc" ; player Note for Speaker PC |
157 | 158 | ||
158 | ; display |
159 | ; display |
159 | 160 | ||
160 | include "video/vesa12.inc" ; Vesa 1.2 functions |
161 | include "video/vesa12.inc" ; Vesa 1.2 functions |
161 | include "video/vesa20.inc" ; Vesa 2.0 functions |
162 | include "video/vesa20.inc" ; Vesa 2.0 functions |
162 | include "video/vga.inc" ; VGA 16 color functions |
163 | include "video/vga.inc" ; VGA 16 color functions |
163 | 164 | ||
164 | ; Network Interface & TCPIP Stack |
165 | ; Network Interface & TCPIP Stack |
165 | 166 | ||
166 | include "network/stack.inc" |
167 | include "network/stack.inc" |
167 | 168 | ||
168 | ; Mouse pointer |
169 | ; Mouse pointer |
169 | 170 | ||
170 | include "gui/mouse.inc" |
171 | include "gui/mouse.inc" |
171 | 172 | ||
172 | ; Window skinning |
173 | ; Window skinning |
173 | 174 | ||
174 | include "gui/skincode.inc" |
175 | include "gui/skincode.inc" |
175 | 176 | ||
176 | ; Pci functions |
177 | ; Pci functions |
177 | 178 | ||
178 | include "bus/pci/pci32.inc" |
179 | include "bus/pci/pci32.inc" |
179 | 180 | ||
180 | ; Floppy drive controller |
181 | ; Floppy drive controller |
181 | 182 | ||
182 | include "blkdev/fdc.inc" |
183 | include "blkdev/fdc.inc" |
183 | include "blkdev/flp_drv.inc" |
184 | include "blkdev/flp_drv.inc" |
184 | 185 | ||
185 | ; CD drive controller |
186 | ; CD drive controller |
186 | 187 | ||
187 | include "blkdev/cdrom.inc" |
188 | include "blkdev/cdrom.inc" |
188 | 189 | ||
189 | ; Character devices |
190 | ; Character devices |
190 | 191 | ||
191 | include "hid/keyboard.inc" |
192 | include "hid/keyboard.inc" |
192 | include "hid/mousedrv.inc" |
193 | include "hid/mousedrv.inc" |
193 | 194 | ||
194 | ; setting date,time,clock and alarm-clock |
195 | ; setting date,time,clock and alarm-clock |
195 | 196 | ||
196 | include "hid/set_dtc.inc" |
197 | include "hid/set_dtc.inc" |
197 | 198 | ||
198 | ;% -include |
199 | ;% -include |