Rev 1567 | Rev 3618 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1567 | Rev 1937 | ||
---|---|---|---|
1 | @^ fix macro comment { |
1 | @^ fix macro comment { |
2 | ^@ fix } |
2 | ^@ fix } |
3 | 3 | ||
4 | ; ------------------------- |
4 | ; ------------------------- |
5 | macro library [lname,fname] |
5 | macro library [lname,fname] |
6 | { |
6 | { |
7 | forward |
7 | forward |
8 | dd __#lname#_library_table__,__#lname#_library_name__ |
8 | dd __#lname#_library_table__,__#lname#_library_name__ |
9 | common |
9 | common |
10 | dd 0 |
10 | dd 0 |
11 | forward |
11 | forward |
12 | align 4 |
12 | align 4 |
13 | __#lname#_library_name__ db fname,0 |
13 | __#lname#_library_name__ db fname,0 |
14 | } |
14 | } |
15 | 15 | ||
16 | macro import lname,[name,sname] |
16 | macro import lname,[name,sname] |
17 | { |
17 | { |
18 | common |
18 | common |
19 | align 4 |
19 | align 4 |
20 | __#lname#_library_table__: |
20 | __#lname#_library_table__: |
21 | forward |
21 | forward |
22 | if used name |
22 | if used name |
23 | name dd __#name#_import_name__ |
23 | name dd __#name#_import_name__ |
24 | end if |
24 | end if |
25 | common |
25 | common |
26 | dd 0 |
26 | dd 0 |
27 | forward |
27 | forward |
28 | if used name |
28 | if used name |
29 | align 4 |
29 | align 4 |
30 | __#name#_import_name__ db sname,0 |
30 | __#name#_import_name__ db sname,0 |
31 | end if |
31 | end if |
32 | } |
32 | } |
33 | 33 | ||
34 | macro export [name,sname] |
34 | macro export [name,sname] |
35 | { |
35 | { |
36 | forward |
36 | forward |
37 | dd __#name#_export_name__,name |
37 | dd __#name#_export_name__,name |
38 | common |
38 | common |
39 | dd 0 |
39 | dd 0 |
40 | forward |
40 | forward |
41 | align 4 |
41 | align 4 |
42 | __#name#_export_name__ db sname,0 |
42 | __#name#_export_name__ db sname,0 |
43 | } |
43 | } |
44 | ; ------------------------- |
44 | ; ------------------------- |
45 | 45 | ||
46 | macro m2m dest,src { |
46 | macro m2m dest,src { |
47 | push src |
47 | push src |
48 | pop dest |
48 | pop dest |
49 | } |
49 | } |
50 | 50 | ||
51 | 51 | ||
52 | macro iglobal { |
52 | macro iglobal { |
53 | IGlobals equ IGlobals, |
53 | IGlobals equ IGlobals, |
54 | macro __IGlobalBlock { } |
54 | macro __IGlobalBlock { } |
55 | 55 | ||
56 | macro uglobal { |
56 | macro uglobal { |
57 | UGlobals equ UGlobals, |
57 | UGlobals equ UGlobals, |
58 | macro __UGlobalBlock { } |
58 | macro __UGlobalBlock { } |
59 | 59 | ||
60 | endg fix } ; Use endg for ending iglobal and uglobal blocks. |
60 | endg fix } ; Use endg for ending iglobal and uglobal blocks. |
61 | 61 | ||
62 | 62 | ||
63 | macro IncludeIGlobals{ |
63 | macro IncludeIGlobals{ |
64 | macro IGlobals dummy,[n] \{ __IGlobalBlock |
64 | macro IGlobals dummy,[n] \{ __IGlobalBlock |
65 | purge __IGlobalBlock \} |
65 | purge __IGlobalBlock \} |
66 | match I, IGlobals \{ I \} } |
66 | match I, IGlobals \{ I \} } |
67 | 67 | ||
68 | macro IncludeUGlobals{ |
68 | macro IncludeUGlobals{ |
69 | macro UGlobals dummy,[n] \{ |
69 | macro UGlobals dummy,[n] \{ |
70 | \common |
70 | \common |
71 | \local begin, size |
71 | \local begin, size |
72 | begin = $ |
72 | begin = $ |
73 | virtual at $ |
73 | virtual at $ |
74 | \forward |
74 | \forward |
75 | __UGlobalBlock |
75 | __UGlobalBlock |
76 | purge __UGlobalBlock |
76 | purge __UGlobalBlock |
77 | \common |
77 | \common |
78 | size = $ - begin |
78 | size = $ - begin |
79 | end virtual |
79 | end virtual |
80 | rb size |
80 | rb size |
81 | \} |
81 | \} |
82 | match U, UGlobals \{ U \} } |
82 | match U, UGlobals \{ U \} } |
83 | 83 | ||
84 | uglobal |
84 | uglobal |
85 | endg |
85 | endg |
86 | 86 | ||
87 | iglobal |
87 | iglobal |
88 | endg |
88 | endg |
89 | 89 | ||
90 | 90 | ||
91 | ; new application structure |
91 | ; new application structure |
92 | macro meos_app_start |
92 | macro meos_app_start |
93 | { |
93 | { |
94 | use32 |
94 | use32 |
95 | org 0x0 |
95 | org 0x0 |
96 | 96 | ||
97 | db 'MENUET01' |
97 | db 'MENUET01' |
98 | dd 0x01 |
98 | dd 0x01 |
99 | dd __start |
99 | dd __start |
100 | dd __end |
100 | dd __end |
101 | dd __memory |
101 | dd __memory |
102 | dd __stack |
102 | dd __stack |
103 | 103 | ||
104 | if used __params & ~defined __params |
104 | if used __params & ~defined __params |
105 | dd __params |
105 | dd __params |
106 | else |
106 | else |
107 | dd 0x0 |
107 | dd 0x0 |
108 | end if |
108 | end if |
109 | 109 | ||
110 | dd 0x0 |
110 | dd 0x0 |
111 | } |
111 | } |
112 | MEOS_APP_START fix meos_app_start |
112 | MEOS_APP_START fix meos_app_start |
113 | 113 | ||
114 | macro code |
114 | macro code |
115 | { |
115 | { |
116 | __start: |
116 | __start: |
117 | } |
117 | } |
118 | CODE fix code |
118 | CODE fix code |
119 | 119 | ||
120 | macro data |
120 | macro data |
121 | { |
121 | { |
122 | __data: |
122 | __data: |
123 | IncludeIGlobals |
123 | IncludeIGlobals |
124 | } |
124 | } |
125 | DATA fix data |
125 | DATA fix data |
126 | 126 | ||
127 | macro udata |
127 | macro udata |
128 | { |
128 | { |
129 | if used __params & ~defined __params |
129 | if used __params & ~defined __params |
130 | __params: |
130 | __params: |
131 | db 0 |
131 | db 0 |
132 | __end: |
132 | __end: |
133 | rb 255 |
133 | rb 255 |
134 | else |
134 | else |
135 | __end: |
135 | __end: |
136 | end if |
136 | end if |
137 | __udata: |
137 | __udata: |
138 | IncludeUGlobals |
138 | IncludeUGlobals |
139 | } |
139 | } |
140 | UDATA fix udata |
140 | UDATA fix udata |
141 | 141 | ||
142 | macro meos_app_end |
142 | macro meos_app_end |
143 | { |
143 | { |
144 | align 32 |
144 | align 32 |
145 | rb 2048 |
145 | rb 2048 |
146 | __stack: |
146 | __stack: |
147 | __memory: |
147 | __memory: |
148 | } |
148 | } |
149 | MEOS_APP_END fix meos_app_end |
149 | MEOS_APP_END fix meos_app_end |
150 | 150 | ||
151 | 151 | ||
152 | ; macro for defining multiline text data |
152 | ; macro for defining multiline text data |
153 | struc mstr [sstring] |
153 | struc mstr [sstring] |
154 | { |
154 | { |
155 | forward |
155 | forward |
156 | local ssize |
156 | local ssize |
157 | virtual at 0 |
157 | virtual at 0 |
158 | db sstring |
158 | db sstring |
159 | ssize = $ |
159 | ssize = $ |
160 | end virtual |
160 | end virtual |
161 | dd ssize |
161 | dd ssize |
162 | db sstring |
162 | db sstring |
163 | common |
163 | common |
164 | dd -1 |
164 | dd -1 |
165 | } |
165 | } |
166 | 166 | ||
167 | ; macro for defining multiline text data |
167 | ; macro for defining multiline text data |
168 | struc mls [sstring] |
168 | struc mls [sstring] |
169 | { |
169 | { |
170 | forward |
170 | forward |
171 | local ssize |
171 | local ssize |
172 | virtual at 0 |
172 | virtual at 0 |
173 | db sstring ; mod |
173 | db sstring ; mod |
174 | ssize = $ |
174 | ssize = $ |
175 | end virtual |
175 | end virtual |
176 | db ssize |
176 | db ssize |
177 | db sstring |
177 | db sstring |
178 | common |
178 | common |
179 | db -1 ; mod |
179 | db -1 ; mod |
180 | } |
180 | } |
181 | 181 | ||
182 | 182 | ||
183 | 183 | ||
184 | ; strings |
184 | ; strings |
185 | macro sz name,[data] { ; from MFAR [mike.dld] |
185 | macro sz name,[data] { ; from MFAR [mike.dld] |
186 | common |
186 | common |
187 | if used name |
187 | if used name |
188 | name db data |
188 | name db data |
189 | .size = $-name |
189 | .size = $-name |
190 | end if |
190 | end if |
191 | } |
191 | } |
192 | 192 | ||
193 | macro szZ name,[data] { ; same as sz, but with 0 at the end of line (ASCIIZ string) [dunkaist] |
193 | macro szZ name,[data] { ; same as sz, but with 0 at the end of line (ASCIIZ string) [dunkaist] |
194 | common |
194 | common |
195 | if used name |
195 | if used name |
196 | name db data,0 |
196 | name db data,0 |
197 | .size = $-name-1 |
197 | .size = $-name-1 |
198 | end if |
198 | end if |
199 | } |
199 | } |
200 | sz0 fix szZ |
200 | sz0 fix szZ |
201 | 201 | ||
202 | macro lsz name,[lng,data] { ; from MFAR [mike.dld] |
202 | macro lsz name,[lng,data] { ; from MFAR [mike.dld] |
203 | common |
203 | common |
204 | if used name |
204 | if used name |
205 | label name |
205 | label name |
206 | forward |
206 | forward |
207 | if lang eq lng |
207 | if lang eq lng |
208 | db data |
208 | db data |
209 | end if |
209 | end if |
210 | common |
210 | common |
211 | .size = $-name |
211 | .size = $-name |
212 | end if |
212 | end if |
213 | } |
213 | } |
214 | 214 | ||
215 | macro szc name,elsz,[data] { ; from MFAR [mike.dld] |
215 | macro szc name,elsz,[data] { ; from MFAR [mike.dld] |
216 | common |
216 | common |
217 | local s,m |
217 | local s,m |
218 | m = 0 |
218 | m = 0 |
219 | if used name |
219 | if used name |
220 | label name |
220 | label name |
221 | forward |
221 | forward |
222 | virtual at 0 |
222 | virtual at 0 |
223 | db data |
223 | db data |
224 | s = $ |
224 | s = $ |
225 | end virtual |
225 | end virtual |
226 | d#elsz s |
226 | d#elsz s |
227 | if m < s |
227 | if m < s |
228 | m = s |
228 | m = s |
229 | end if |
229 | end if |
230 | db data |
230 | db data |
231 | common |
231 | common |
232 | .size = $-name |
232 | .size = $-name |
233 | .maxl = m |
233 | .maxl = m |
234 | end if |
234 | end if |
235 | } |
235 | } |
236 | 236 | ||
237 | macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld] |
237 | macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld] |
238 | common |
238 | common |
239 | local s,m,c |
239 | local s,m,c |
240 | m = 0 |
240 | m = 0 |
241 | c = 0 |
241 | c = 0 |
242 | if used name |
242 | if used name |
243 | label name |
243 | label name |
244 | forward |
244 | forward |
245 | if lang eq lng |
245 | if lang eq lng |
246 | virtual at 0 |
246 | virtual at 0 |
247 | db data |
247 | db data |
248 | s = $ |
248 | s = $ |
249 | end virtual |
249 | end virtual |
250 | d#elsz s |
250 | d#elsz s |
251 | if m < s |
251 | if m < s |
252 | m = s |
252 | m = s |
253 | end if |
253 | end if |
254 | db data |
254 | db data |
255 | c = c+1 |
255 | c = c+1 |
256 | end if |
256 | end if |
257 | common |
257 | common |
258 | .size = $-name |
258 | .size = $-name |
259 | .maxl = m |
259 | .maxl = m |
260 | .count = c |
260 | .count = c |
261 | end if |
261 | end if |
262 | } |
262 | } |
263 | 263 | ||
264 | 264 | ||
265 | ; easy system call macro |
265 | ; easy system call macro |
266 | macro mpack dest, hsrc, lsrc |
266 | macro mpack dest, hsrc, lsrc |
267 | { |
267 | { |
268 | if (hsrc eqtype 0) & (lsrc eqtype 0) |
268 | if (hsrc eqtype 0) & (lsrc eqtype 0) |
269 | mov dest, (hsrc) shl 16 + lsrc |
269 | mov dest, (hsrc) shl 16 + lsrc |
270 | else |
270 | else |
271 | if (hsrc eqtype 0) & (~lsrc eqtype 0) |
271 | if (hsrc eqtype 0) & (~lsrc eqtype 0) |
272 | mov dest, (hsrc) shl 16 |
272 | mov dest, (hsrc) shl 16 |
273 | add dest, lsrc |
273 | add dest, lsrc |
274 | else |
274 | else |
275 | mov dest, hsrc |
275 | mov dest, hsrc |
276 | shl dest, 16 |
276 | shl dest, 16 |
277 | add dest, lsrc |
277 | add dest, lsrc |
278 | end if |
278 | end if |
279 | end if |
279 | end if |
280 | } |
280 | } |
281 | 281 | ||
282 | macro __mov reg,a,b { ; mike.dld |
282 | macro __mov reg,a,b { ; mike.dld |
283 | if (~a eq)&(~b eq) |
283 | if (~a eq)&(~b eq) |
284 | mpack reg,a,b |
284 | mpack reg,a,b |
285 | else if (~a eq)&(b eq) |
285 | else if (~a eq)&(b eq) |
286 | mov reg,a |
286 | mov reg,a |
287 | end if |
287 | end if |
288 | } |
288 | } |
289 | 289 | ||
290 | 290 | ||
291 | include 'config.inc' |
291 | include 'config.inc' |
292 | ;__CPU_type equ p5 |
292 | ;__CPU_type equ p5 |
293 | SYSENTER_VAR equ 0 |
293 | SYSENTER_VAR equ 0 |
294 | 294 | ||
295 | macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls |
- | |
296 | local ..ret_point |
295 | macro mcall a,b,c,d,e,f { ; mike.dld |
297 | __mov eax,a |
296 | __mov eax,a |
298 | __mov ebx,b |
297 | __mov ebx,b |
299 | __mov ecx,c |
298 | __mov ecx,c |
300 | __mov edx,d |
299 | __mov edx,d |
301 | __mov esi,e |
300 | __mov esi,e |
302 | __mov edi,f |
301 | __mov edi,f |
303 | - | ||
304 | if __CPU_type eq p5 |
302 | |
305 | int 0x40 |
- | |
306 | else |
- | |
307 | if __CPU_type eq p6 |
- | |
308 | push ebp |
- | |
309 | mov ebp, esp |
- | |
310 | push ..ret_point ; it may be 2 or 5 byte |
- | |
311 | sysenter |
- | |
312 | ..ret_point: |
- | |
313 | pop edx |
- | |
314 | pop ecx |
- | |
315 | - | ||
316 | else |
- | |
317 | if __CPU_type eq k6 |
- | |
318 | push ecx |
- | |
319 | syscall |
- | |
320 | pop ecx |
- | |
321 | else |
- | |
322 | display 'ERROR : unknown CPU type (set to p5)', 10, 13 |
- | |
323 | __CPU_type equ p5 |
- | |
324 | int 0x40 |
- | |
325 | end if |
- | |
326 | end if |
- | |
327 | end if |
303 | int 0x40 |
328 | } |
304 | } |
329 | 305 | ||
330 | 306 | ||
331 | ; ------------------------- |
307 | ; ------------------------- |
332 | macro header a,[b] { |
308 | macro header a,[b] { |
333 | common |
309 | common |
334 | use32 |
310 | use32 |
335 | org 0 |
311 | org 0 |
336 | db 'MENUET',a |
312 | db 'MENUET',a |
337 | forward |
313 | forward |
338 | if b eq |
314 | if b eq |
339 | dd 0 |
315 | dd 0 |
340 | else |
316 | else |
341 | dd b |
317 | dd b |
342 | end if } |
318 | end if } |
343 | macro section name { align 16 |
319 | macro section name { align 16 |
344 | label name } |
320 | label name } |
345 | macro func name { |
321 | macro func name { |
346 | if ~used name |
322 | if ~used name |
347 | display 'FUNC NOT USED: ',`name,13,10 |
323 | display 'FUNC NOT USED: ',`name,13,10 |
348 | else |
324 | else |
349 | align 4 |
325 | align 4 |
350 | name: |
326 | name: |
351 | ;diff16 `name,0,name |
327 | ;diff16 `name,0,name |
352 | ;pushad |
328 | ;pushad |
353 | ;pushfd |
329 | ;pushfd |
354 | ;dps `name |
330 | ;dps `name |
355 | ;newline |
331 | ;newline |
356 | ;mcall 5,1 |
332 | ;mcall 5,1 |
357 | ;popfd |
333 | ;popfd |
358 | ;popad |
334 | ;popad |
359 | } |
335 | } |
360 | macro endf { end if } |
336 | macro endf { end if } |
361 | 337 | ||
362 | macro diff16 title,l1,l2 |
338 | macro diff16 title,l1,l2 |
363 | { |
339 | { |
364 | local s,d |
340 | local s,d |
365 | s = l2-l1 |
341 | s = l2-l1 |
366 | display title,': 0x' |
342 | display title,': 0x' |
367 | repeat 8 |
343 | repeat 8 |
368 | d = '0' + s shr ((8-%) shl 2) and $0F |
344 | d = '0' + s shr ((8-%) shl 2) and $0F |
369 | if d > '9' |
345 | if d > '9' |
370 | d = d + 'A'-'9'-1 |
346 | d = d + 'A'-'9'-1 |
371 | end if |
347 | end if |
372 | display d |
348 | display d |
373 | end repeat |
349 | end repeat |
374 | display 13,10 |
350 | display 13,10 |
375 | } |
351 | } |
376 | 352 | ||
377 | macro diff10 title,l1,l2 |
353 | macro diff10 title,l1,l2 |
378 | { |
354 | { |
379 | local s,d,z,m |
355 | local s,d,z,m |
380 | s = l2-l1 |
356 | s = l2-l1 |
381 | z = 0 |
357 | z = 0 |
382 | m = 1000000000 |
358 | m = 1000000000 |
383 | display title,': ' |
359 | display title,': ' |
384 | repeat 10 |
360 | repeat 10 |
385 | d = '0' + s / m |
361 | d = '0' + s / m |
386 | s = s - (s/m)*m |
362 | s = s - (s/m)*m |
387 | m = m / 10 |
363 | m = m / 10 |
388 | if d <> '0' |
364 | if d <> '0' |
389 | z = 1 |
365 | z = 1 |
390 | end if |
366 | end if |
391 | if z <> 0 |
367 | if z <> 0 |
392 | display d |
368 | display d |
393 | end if |
369 | end if |
394 | end repeat |
370 | end repeat |
395 | display 13,10 |
371 | display 13,10 |
396 | } |
372 | } |
397 | 373 | ||
398 | ; optimize the code for size |
374 | ; optimize the code for size |
399 | __regs fix |
375 | __regs fix |
400 | 376 | ||
401 | macro add arg1,arg2 |
377 | macro add arg1,arg2 |
402 | { |
378 | { |
403 | if (arg2 eqtype 0) |
379 | if (arg2 eqtype 0) |
404 | if (arg2) = 1 |
380 | if (arg2) = 1 |
405 | inc arg1 |
381 | inc arg1 |
406 | else |
382 | else |
407 | add arg1,arg2 |
383 | add arg1,arg2 |
408 | end if |
384 | end if |
409 | else |
385 | else |
410 | add arg1,arg2 |
386 | add arg1,arg2 |
411 | end if |
387 | end if |
412 | } |
388 | } |
413 | 389 | ||
414 | macro sub arg1,arg2 |
390 | macro sub arg1,arg2 |
415 | { |
391 | { |
416 | if (arg2 eqtype 0) |
392 | if (arg2 eqtype 0) |
417 | if (arg2) = 1 |
393 | if (arg2) = 1 |
418 | dec arg1 |
394 | dec arg1 |
419 | else |
395 | else |
420 | sub arg1,arg2 |
396 | sub arg1,arg2 |
421 | end if |
397 | end if |
422 | else |
398 | else |
423 | sub arg1,arg2 |
399 | sub arg1,arg2 |
424 | end if |
400 | end if |
425 | } |
401 | } |
426 | 402 | ||
427 | macro mov arg1,arg2 |
403 | macro mov arg1,arg2 |
428 | { |
404 | { |
429 | if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) |
405 | if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) |
430 | if (arg2) = 0 |
406 | if (arg2) = 0 |
431 | xor arg1,arg1 |
407 | xor arg1,arg1 |
432 | else if (arg2) = 1 |
408 | else if (arg2) = 1 |
433 | xor arg1,arg1 |
409 | xor arg1,arg1 |
434 | inc arg1 |
410 | inc arg1 |
435 | else if (arg2) = -1 |
411 | else if (arg2) = -1 |
436 | or arg1,-1 |
412 | or arg1,-1 |
437 | else if (arg2) > -128 & (arg2) < 128 |
413 | else if (arg2) > -128 & (arg2) < 128 |
438 | push arg2 |
414 | push arg2 |
439 | pop arg1 |
415 | pop arg1 |
440 | else |
416 | else |
441 | mov arg1,arg2 |
417 | mov arg1,arg2 |
442 | end if |
418 | end if |
443 | else |
419 | else |
444 | mov arg1,arg2 |
420 | mov arg1,arg2 |
445 | end if |
421 | end if |
446 | } |
422 | } |
447 | 423 | ||
448 | 424 | ||
449 | macro RGB [a] { |
425 | macro RGB [a] { |
450 | common |
426 | common |
451 | match (r=,g=,b),a \{ |
427 | match (r=,g=,b),a \{ |
452 | \dd ((r) shl 16) or ((g) shl 8) or (b) |
428 | \dd ((r) shl 16) or ((g) shl 8) or (b) |
453 | \} |
429 | \} |
454 | } |
430 | } |
455 | 431 | ||
456 | 432 | ||
457 | struc POINT _t,_dx,_dy { |
433 | struc POINT _t,_dx,_dy { |
458 | .x _t _dx |
434 | .x _t _dx |
459 | .y _t _dy |
435 | .y _t _dy |
460 | } |
436 | } |
461 | 437 | ||
462 | ; structure definition helper |
438 | ; structure definition helper |
463 | include 'struct.inc' |
439 | include 'struct.inc' |
464 | 440 | ||
465 | struct RECT |
441 | struct RECT |
466 | left dd ? |
442 | left dd ? |
467 | top dd ? |
443 | top dd ? |
468 | right dd ? |
444 | right dd ? |
469 | bottom dd ? |
445 | bottom dd ? |
470 | ends |
446 | ends |
471 | 447 | ||
472 | struct BOX |
448 | struct BOX |
473 | left dd ? |
449 | left dd ? |
474 | top dd ? |
450 | top dd ? |
475 | width dd ? |
451 | width dd ? |
476 | height dd ? |
452 | height dd ? |
477 | ends |
453 | ends |
478 | 454 | ||
479 | ; structures used in MeOS |
455 | ; structures used in MeOS |
480 | struct process_information |
456 | struct process_information |
481 | cpu_usage dd ? ; +0 |
457 | cpu_usage dd ? ; +0 |
482 | window_stack_position dw ? ; +4 |
458 | window_stack_position dw ? ; +4 |
483 | window_stack_value dw ? ; +6 |
459 | window_stack_value dw ? ; +6 |
484 | dw ? ; +8 |
460 | dw ? ; +8 |
485 | process_name rb 12 ; +10 |
461 | process_name rb 12 ; +10 |
486 | memory_start dd ? ; +22 |
462 | memory_start dd ? ; +22 |
487 | used_memory dd ? ; +26 |
463 | used_memory dd ? ; +26 |
488 | PID dd ? ; +30 |
464 | PID dd ? ; +30 |
489 | box BOX ; +34 |
465 | box BOX ; +34 |
490 | slot_state dw ? ; +50 |
466 | slot_state dw ? ; +50 |
491 | dw ? ; +52 |
467 | dw ? ; +52 |
492 | client_box BOX ; +54 |
468 | client_box BOX ; +54 |
493 | wnd_state db ? ; +70 |
469 | wnd_state db ? ; +70 |
494 | rb (1024-71) |
470 | rb (1024-71) |
495 | ends |
471 | ends |
496 | 472 | ||
497 | struct system_colors |
473 | struct system_colors |
498 | frame dd ? |
474 | frame dd ? |
499 | grab dd ? |
475 | grab dd ? |
500 | grab_button dd ? |
476 | grab_button dd ? |
501 | grab_button_text dd ? |
477 | grab_button_text dd ? |
502 | grab_text dd ? |
478 | grab_text dd ? |
503 | work dd ? |
479 | work dd ? |
504 | work_button dd ? |
480 | work_button dd ? |
505 | work_button_text dd ? |
481 | work_button_text dd ? |
506 | work_text dd ? |
482 | work_text dd ? |
507 | work_graph dd ? |
483 | work_graph dd ? |
508 | ends |
484 | ends |
509 | 485 | ||
510 | struct FILEDATE |
486 | struct FILEDATE |
511 | Second db ? |
487 | Second db ? |
512 | Minute db ? |
488 | Minute db ? |
513 | Hour db ? |
489 | Hour db ? |
514 | db ? |
490 | db ? |
515 | Day db ? |
491 | Day db ? |
516 | Month db ? |
492 | Month db ? |
517 | Year dw ? |
493 | Year dw ? |
518 | ends |
494 | ends |
519 | 495 | ||
520 | struct FILEINFO |
496 | struct FILEINFO |
521 | Attributes dd ? |
497 | Attributes dd ? |
522 | IsUnicode db ? |
498 | IsUnicode db ? |
523 | db 3 dup(?) |
499 | db 3 dup(?) |
524 | DateCreate FILEDATE |
500 | DateCreate FILEDATE |
525 | DateAccess FILEDATE |
501 | DateAccess FILEDATE |
526 | DateModify FILEDATE |
502 | DateModify FILEDATE |
527 | Size dq ? |
503 | Size dq ? |
528 | ends |
504 | ends |
529 | 505 | ||
530 | ; constants |
506 | ; constants |
531 | 507 | ||
532 | ; events |
508 | ; events |
533 | EV_IDLE = 0 |
509 | EV_IDLE = 0 |
534 | EV_TIMER = 0 |
510 | EV_TIMER = 0 |
535 | EV_REDRAW = 1 |
511 | EV_REDRAW = 1 |
536 | EV_KEY = 2 |
512 | EV_KEY = 2 |
537 | EV_BUTTON = 3 |
513 | EV_BUTTON = 3 |
538 | EV_EXIT = 4 |
514 | EV_EXIT = 4 |
539 | EV_BACKGROUND = 5 |
515 | EV_BACKGROUND = 5 |
540 | EV_MOUSE = 6 |
516 | EV_MOUSE = 6 |
541 | EV_IPC = 7 |
517 | EV_IPC = 7 |
542 | EV_STACK = 8 |
518 | EV_STACK = 8 |
543 | 519 | ||
544 | ; event mask bits for function 40 |
520 | ; event mask bits for function 40 |
545 | EVM_REDRAW = 1b |
521 | EVM_REDRAW = 1b |
546 | EVM_KEY = 10b |
522 | EVM_KEY = 10b |
547 | EVM_BUTTON = 100b |
523 | EVM_BUTTON = 100b |
548 | EVM_EXIT = 1000b |
524 | EVM_EXIT = 1000b |
549 | EVM_BACKGROUND = 10000b |
525 | EVM_BACKGROUND = 10000b |
550 | EVM_MOUSE = 100000b |
526 | EVM_MOUSE = 100000b |
551 | EVM_IPC = 1000000b |
527 | EVM_IPC = 1000000b |
552 | EVM_STACK = 10000000b>>>>> |
528 | EVM_STACK = 10000000b>>>>> |