Rev 1937 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
587 | Ghost | 1 | |
2 | macro iglobal { |
||
3 | IGlobals equ IGlobals, |
||
4 | macro __IGlobalBlock { } |
||
5 | |||
6 | |||
7 | UGlobals equ UGlobals, |
||
8 | macro __UGlobalBlock { } |
||
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | macro IGlobals dummy,[n] \{ __IGlobalBlock |
||
15 | purge __IGlobalBlock \} |
||
16 | match I, IGlobals \{ I \} } |
||
17 | |||
18 | |||
19 | macro UGlobals dummy,[n] \{ |
||
20 | \common |
||
21 | \local begin, size |
||
22 | begin = $ |
||
23 | virtual at $ |
||
24 | \forward |
||
25 | __UGlobalBlock |
||
26 | purge __UGlobalBlock |
||
27 | \common |
||
28 | size = $ - begin |
||
29 | end virtual |
||
30 | rb size |
||
31 | \} |
||
32 | match U, UGlobals \{ U \} } |
||
33 | |||
34 | |||
35 | endg |
||
36 | |||
37 | |||
38 | endg |
||
39 | |||
40 | |||
41 | ; new application structure |
||
42 | macro meos_app_start |
||
43 | { |
||
44 | use32 |
||
45 | org 0x0 |
||
46 | |||
47 | |||
48 | dd 0x01 |
||
49 | dd __start |
||
50 | dd __end |
||
51 | dd __memory |
||
52 | dd __stack |
||
53 | |||
54 | |||
55 | dd __params |
||
56 | else |
||
57 | dd 0x0 |
||
58 | end if |
||
59 | |||
60 | |||
61 | } |
||
62 | MEOS_APP_START fix meos_app_start |
||
63 | |||
64 | |||
65 | { |
||
66 | __start: |
||
67 | } |
||
68 | CODE fix code |
||
69 | |||
70 | |||
71 | { |
||
72 | __data: |
||
73 | IncludeIGlobals |
||
74 | } |
||
75 | DATA fix data |
||
76 | |||
77 | |||
78 | { |
||
79 | if used __params & ~defined __params |
||
80 | __params: |
||
81 | db 0 |
||
82 | __end: |
||
83 | rb 255 |
||
84 | else |
||
85 | __end: |
||
86 | end if |
||
87 | __udata: |
||
88 | IncludeUGlobals |
||
89 | } |
||
90 | UDATA fix udata |
||
91 | |||
92 | |||
93 | { |
||
94 | align 32 |
||
95 | rb 2048 |
||
96 | __stack: |
||
97 | __memory: |
||
98 | } |
||
99 | MEOS_APP_END fix meos_app_end |
||
100 | |||
101 | |||
102 | |||
103 | struc mstr [sstring] |
||
104 | { |
||
105 | forward |
||
106 | local ssize |
||
107 | virtual at 0 |
||
108 | db sstring |
||
109 | ssize = $ |
||
110 | end virtual |
||
111 | dd ssize |
||
112 | db sstring |
||
113 | common |
||
114 | dd -1 |
||
115 | } |
||
116 | |||
117 | |||
118 | struc mls [sstring] { |
||
119 | forward |
||
120 | local ssize |
||
121 | virtual at 0 |
||
122 | db sstring ; mod |
||
123 | ssize = $ |
||
124 | end virtual |
||
125 | db ssize |
||
126 | db sstring |
||
127 | common |
||
128 | |||
129 | |||
130 | } |
||
131 | |||
132 | |||
133 | |||
134 | |||
135 | macro sz name,[data] { ; from MFAR [mike.dld] |
||
136 | common |
||
137 | if used name |
||
138 | label name |
||
139 | end if |
||
140 | forward |
||
141 | if used name |
||
142 | db data |
||
143 | end if |
||
144 | common |
||
145 | if used name |
||
146 | .size = $-name |
||
147 | end if |
||
148 | } |
||
149 | |||
150 | |||
151 | common |
||
152 | if used name |
||
153 | label name |
||
154 | end if |
||
155 | forward |
||
156 | if (used name)&(lang eq lng) |
||
157 | db data |
||
158 | end if |
||
159 | common |
||
160 | if used name |
||
161 | .size = $-name |
||
162 | end if |
||
163 | } |
||
164 | |||
165 | |||
166 | |||
167 | |||
168 | macro mpack dest, hsrc, lsrc |
||
169 | { |
||
170 | if (hsrc eqtype 0) & (lsrc eqtype 0) |
||
171 | mov dest, (hsrc) shl 16 + lsrc |
||
172 | else |
||
173 | if (hsrc eqtype 0) & (~lsrc eqtype 0) |
||
174 | mov dest, (hsrc) shl 16 |
||
175 | add dest, lsrc |
||
176 | else |
||
177 | mov dest, hsrc |
||
178 | shl dest, 16 |
||
179 | add dest, lsrc |
||
180 | end if |
||
181 | end if |
||
182 | } |
||
183 | |||
184 | |||
185 | if (~a eq)&(~b eq) |
||
186 | mpack reg,a,b |
||
187 | else if (~a eq)&(b eq) |
||
188 | mov reg,a |
||
189 | end if |
||
190 | } |
||
191 | |||
192 | |||
193 | SYSENTER_VAR equ 0 |
||
194 | |||
195 | |||
1937 | art_zh | 196 | __mov eax,a |
587 | Ghost | 197 | __mov ebx,b |
198 | __mov ecx,c |
||
199 | __mov edx,d |
||
200 | __mov esi,e |
||
201 | __mov edi,f |
||
202 | |||
203 | |||
204 | } |
||
205 | |||
206 | |||
207 | |||
208 | |||
209 | |||
210 | __regs fix |
||
211 | |||
212 | |||
213 | { |
||
214 | if (arg2 eqtype 0) |
||
215 | if (arg2) = 1 |
||
216 | inc arg1 |
||
217 | else |
||
218 | add arg1,arg2 |
||
219 | end if |
||
220 | else |
||
221 | add arg1,arg2 |
||
222 | end if |
||
223 | } |
||
224 | |||
225 | |||
226 | { |
||
227 | if (arg2 eqtype 0) |
||
228 | if (arg2) = 1 |
||
229 | dec arg1 |
||
230 | else |
||
231 | sub arg1,arg2 |
||
232 | end if |
||
233 | else |
||
234 | sub arg1,arg2 |
||
235 | end if |
||
236 | } |
||
237 | |||
238 | |||
239 | { |
||
240 | if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) |
||
241 | if (arg2) = 0 |
||
242 | xor arg1,arg1 |
||
243 | else if (arg2) = 1 |
||
244 | xor arg1,arg1 |
||
245 | inc arg1 |
||
246 | else if (arg2) = -1 |
||
247 | or arg1,-1 |
||
248 | else if (arg2) > -128 & (arg2) < 128 |
||
249 | push arg2 |
||
250 | pop arg1 |
||
251 | else |
||
252 | mov arg1,arg2 |
||
253 | end if |
||
254 | else |
||
255 | mov arg1,arg2 |
||
256 | end if |
||
257 | } |
||
258 | |||
259 | |||
260 | |||
261 | { |
||
262 | virtual at 0 |
||
263 | name name |
||
264 | sizeof.#name = $ - name |
||
265 | end virtual |
||
266 | } |
||
267 | |||
268 | |||
269 | struc process_information |
||
270 | { |
||
271 | .cpu_usage dd ? ; +0 |
||
272 | .window_stack_position dw ? ; +4 |
||
273 | .window_stack_value dw ? ; +6 |
||
274 | .not_used1 dw ? ; +8 |
||
275 | .process_name rb 12 ; +10 |
||
276 | .memory_start dd ? ; +22 |
||
277 | .used_memory dd ? ; +26 |
||
278 | .PID dd ? ; +30 |
||
279 | .x_start dd ? ; +34 |
||
280 | .y_start dd ? ; +38 |
||
281 | .x_size dd ? ; +42 |
||
282 | .y_size dd ? ; +46 |
||
283 | .slot_state dw ? ; +50 |
||
284 | dw ? ; +52 - reserved |
||
285 | .client_left dd ? ; +54 |
||
286 | .client_top dd ? ; +58 |
||
287 | .client_width dd ? ; +62 |
||
288 | .client_height dd ? ; +66 |
||
289 | .wnd_state db ? ; +70 |
||
290 | rb (1024-71) |
||
291 | } |
||
292 | struct process_information |
||
293 | |||
294 | |||
295 | { |
||
296 | .frame dd ? |
||
297 | .grab dd ? |
||
298 | .work_3d_dark dd ? |
||
6196 | leency | 299 | .work_3d_light dd ? |
300 | .grab_text dd ? |
||
587 | Ghost | 301 | .work dd ? |
302 | .work_button dd ? |
||
303 | .work_button_text dd ? |
||
304 | .work_text dd ? |
||
305 | .work_graph dd ? |
||
306 | } |
||
307 | struct system_colors |
||
308 | |||
309 | |||
310 | |||
311 | |||
312 | |||
313 | EV_IDLE = 0 |
||
314 | EV_TIMER = 0 |
||
315 | EV_REDRAW = 1 |
||
316 | EV_KEY = 2 |
||
317 | EV_BUTTON = 3 |
||
318 | EV_EXIT = 4 |
||
319 | EV_BACKGROUND = 5 |
||
320 | EV_MOUSE = 6 |
||
321 | EV_IPC = 7 |
||
322 | EV_STACK = 8 |
||
323 | |||
324 | |||
325 | EVM_REDRAW = 1b |
||
326 | EVM_KEY = 10b |
||
327 | EVM_BUTTON = 100b |
||
328 | EVM_EXIT = 1000b |
||
329 | EVM_BACKGROUND = 10000b |
||
330 | EVM_MOUSE = 100000b |
||
331 | EVM_IPC = 1000000b |
||
332 | EVM_STACK = 10000000b> |
||
333 |