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