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