Rev 3955 | Rev 5420 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3955 | Rev 4968 | ||
---|---|---|---|
1 | ; |
1 | ; |
2 | ; CPU -process Manager |
2 | ; CPU -process Manager |
3 | ; |
3 | ; |
4 | ;------------------------------------------------------------------------------ |
4 | ;------------------------------------------------------------------------------ |
5 | ; version: 1.80 |
5 | ; version: 1.80 |
6 | ; last update: 07/04/2012 |
6 | ; last update: 07/04/2012 |
7 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
7 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
8 | ; changes: Complete elimination of flicker. |
8 | ; changes: Complete elimination of flicker. |
9 | ; Using f.0 C = 1 - don't fill working area on window draw. |
9 | ; Using f.0 C = 1 - don't fill working area on window draw. |
10 | ; Increasing the size of buttons and a bright color. |
10 | ; Increasing the size of buttons and a bright color. |
11 | ; Processing "window is rolled up" and "window is minimized" |
11 | ; Processing "window is rolled up" and "window is minimized" |
12 | ;------------------------------------------------------------------------------ |
12 | ;------------------------------------------------------------------------------ |
13 | ; version: 1.70 |
13 | ; version: 1.70 |
14 | ; last update: 04/04/2012 |
14 | ; last update: 04/04/2012 |
15 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
15 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
16 | ; changes: Code refactoring and optimization. |
16 | ; changes: Code refactoring and optimization. |
17 | ; Added russian language support. |
17 | ; Added russian language support. |
18 | ; Fix - processes information showing not been updated during |
18 | ; Fix - processes information showing not been updated during |
19 | ; the processing of mouse events. |
19 | ; the processing of mouse events. |
20 | ;------------------------------------------------------------------------------ |
20 | ;------------------------------------------------------------------------------ |
21 | ; Many fix's and changes created by: |
21 | ; Many fix's and changes created by: |
22 | ; Diamond, Heavyiron, SPraid, |
22 | ; Diamond, Heavyiron, SPraid, |
23 | ; Leency, IgorA, kaitz |
23 | ; Leency, IgorA, kaitz |
24 | ;--------------------------------------------------------------------- |
24 | ;--------------------------------------------------------------------- |
25 | ; integrated with load_lib.obj by |
25 | ; integrated with load_lib.obj by |
26 | ;--------------------------------------------------------------------- |
26 | ;--------------------------------------------------------------------- |
27 | ; additions by M.Lisovin lisovin@26.ru |
27 | ; additions by M.Lisovin lisovin@26.ru |
28 | ;--------------------------------------------------------------------- |
28 | ;--------------------------------------------------------------------- |
29 | ; original author - VTurjanmaa |
29 | ; original author - VTurjanmaa |
30 | ;------------------------------------------------------------------------------ |
30 | ;------------------------------------------------------------------------------ |
31 | format binary as "" |
31 | format binary as "" |
32 | 32 | ||
33 | use32 |
33 | use32 |
34 | org 0x0 |
34 | org 0x0 |
35 | db 'MENUET01' ; 8 byte id |
35 | db 'MENUET01' ; 8 byte id |
36 | dd 0x01 ; header version |
36 | dd 0x01 ; header version |
37 | dd START ; start of code |
37 | dd START ; start of code |
38 | dd IM_END ; size of image |
38 | dd IM_END ; size of image |
39 | dd U_END ; memory for app |
39 | dd U_END ; memory for app |
40 | dd stack_area ; esp |
40 | dd stack_area ; esp |
41 | dd 0x0 ; boot parameters |
41 | dd 0x0 ; boot parameters |
42 | dd 0x0 ; path |
42 | dd 0x0 ; path |
43 | ;------------------------------------------------------------------------------ |
43 | ;------------------------------------------------------------------------------ |
44 | include 'lang.inc' |
44 | include 'lang.inc' |
45 | include '../../../macros.inc' |
45 | include '../../../macros.inc' |
46 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
46 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
47 | include '../../../develop/libraries/box_lib/load_lib.mac' |
47 | include '../../../develop/libraries/box_lib/load_lib.mac' |
48 | ;------------------------------------------------------------------------------ |
48 | ;------------------------------------------------------------------------------ |
49 | display_processes=24 ;32 ; number of processes to show |
49 | display_processes=24 ;32 ; number of processes to show |
50 | window_x_size=524 |
50 | window_x_size=524 |
51 | window_y_size=430 |
51 | window_y_size=430 |
52 | ;------------------------------------------------------------------------------ |
52 | ;------------------------------------------------------------------------------ |
53 | @use_library ;use load lib macros |
53 | @use_library ;use load lib macros |
54 | ;------------------------------------------------------------------------------ |
54 | ;------------------------------------------------------------------------------ |
55 | START: ; start of execution |
55 | START: ; start of execution |
56 | mcall 68,11 |
56 | mcall 68,11 |
57 | sys_load_library library_name, cur_dir_path, library_path, system_path, \ |
57 | sys_load_library library_name, cur_dir_path, library_path, system_path, \ |
58 | err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i |
58 | err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i |
59 | inc eax |
59 | inc eax |
60 | jz close |
60 | jz close |
61 | ;------------------------------------------------------------------------------ |
61 | ;------------------------------------------------------------------------------ |
62 | mcall 40,0x80000027 ;set event |
62 | mcall 40,0x80000027 ;set event |
63 | ;------------------------------------------------------------------------------ |
63 | ;------------------------------------------------------------------------------ |
64 | ;set window size and position for 0 function |
64 | ;set window size and position for 0 function |
65 | ;to [winxpos] and [winypos] variables |
65 | ;to [winxpos] and [winypos] variables |
66 | ;get screen size |
66 | ;get screen size |
67 | mcall 14 |
67 | mcall 14 |
68 | mov ebx,eax |
68 | mov ebx,eax |
69 | ;calculate (x_screen-window_x_size)/2 |
69 | ;calculate (x_screen-window_x_size)/2 |
70 | shr ebx,16+1 |
70 | shr ebx,16+1 |
71 | sub ebx,window_x_size/2 |
71 | sub ebx,window_x_size/2 |
72 | shl ebx,16 |
72 | shl ebx,16 |
73 | mov bx,window_x_size |
73 | mov bx,window_x_size |
74 | ;winxpos=xcoord*65536+xsize |
74 | ;winxpos=xcoord*65536+xsize |
75 | mov [winxpos],ebx |
75 | mov [winxpos],ebx |
76 | ;calculate (y_screen-window_y_size)/2 |
76 | ;calculate (y_screen-window_y_size)/2 |
77 | and eax,0xffff |
77 | and eax,0xffff |
78 | shr eax,1 |
78 | shr eax,1 |
79 | sub eax,window_y_size/2 |
79 | sub eax,window_y_size/2 |
80 | shl eax,16 |
80 | shl eax,16 |
81 | mov ax,window_y_size |
81 | mov ax,window_y_size |
82 | ;winypos=ycoord*65536+ysize |
82 | ;winypos=ycoord*65536+ysize |
83 | mov [winypos],eax |
83 | mov [winypos],eax |
84 | ;------------------------------------------------------------------------------ |
84 | ;------------------------------------------------------------------------------ |
85 | init_checkboxes2 check1,check1_end |
85 | init_checkboxes2 check1,check1_end |
86 | mcall 48,3,sc,40 |
86 | mcall 48,3,sc,40 |
87 | edit_boxes_set_sys_color edit1,edit1_end,sc ;set color |
87 | edit_boxes_set_sys_color edit1,edit1_end,sc ;set color |
88 | check_boxes_set_sys_color2 check1,check1_end,sc ;set color |
88 | check_boxes_set_sys_color2 check1,check1_end,sc ;set color |
89 | ;------------------------------------------------------------------------------ |
89 | ;------------------------------------------------------------------------------ |
90 | align 4 |
90 | align 4 |
91 | ;main loop when process name isn't edited. |
91 | ;main loop when process name isn't edited. |
92 | red: |
92 | red: |
93 | call draw_window ; redraw all window |
93 | call draw_window ; redraw all window |
94 | ;------------------------------------------------------------------------------ |
94 | ;------------------------------------------------------------------------------ |
95 | align 4 |
95 | align 4 |
96 | still: |
96 | still: |
97 | mcall 23,100 ; wait here for event 1 sec. |
97 | mcall 23,100 ; wait here for event 1 sec. |
98 | 98 | ||
99 | test eax,eax |
99 | test eax,eax |
100 | jz still_end |
100 | jz still_end |
101 | 101 | ||
102 | dec eax ; redraw request ? |
102 | dec eax ; redraw request ? |
103 | jz red |
103 | jz red |
104 | 104 | ||
105 | dec eax ; key in buffer ? |
105 | dec eax ; key in buffer ? |
106 | jz key |
106 | jz key |
107 | 107 | ||
108 | dec eax ; button in buffer ? |
108 | dec eax ; button in buffer ? |
109 | jz button |
109 | jz button |
110 | 110 | ||
111 | push dword edit1 |
111 | push dword edit1 |
112 | call [edit_box_mouse] |
112 | call [edit_box_mouse] |
113 | 113 | ||
114 | push dword[check1.flags] |
114 | push dword[check1.flags] |
115 | 115 | ||
116 | push dword check1 |
116 | push dword check1 |
117 | call [check_box_mouse] |
117 | call [check_box_mouse] |
118 | 118 | ||
119 | pop eax |
119 | pop eax |
120 | 120 | ||
121 | cmp eax, dword[check1.flags] |
121 | cmp eax, dword[check1.flags] |
122 | jz still_end |
122 | jz still_end |
123 | 123 | ||
124 | push dword check1 |
124 | push dword check1 |
125 | call [check_box_draw] |
125 | call [check_box_draw] |
126 | ;-------------------------------------- |
126 | ;-------------------------------------- |
127 | align 4 |
127 | align 4 |
128 | show_process_info_1: |
128 | show_process_info_1: |
129 | mcall 26,9 |
129 | mcall 26,9 |
130 | add eax,100 |
130 | add eax,100 |
131 | mov [time_counter],eax |
131 | mov [time_counter],eax |
132 | 132 | ||
133 | call show_process_info ; draw new state of processes |
133 | call show_process_info ; draw new state of processes |
134 | jmp still |
134 | jmp still |
135 | ;------------------------------------------------------------------------------ |
135 | ;------------------------------------------------------------------------------ |
136 | align 4 |
136 | align 4 |
137 | still_end: |
137 | still_end: |
138 | mcall 26,9 |
138 | mcall 26,9 |
139 | cmp [time_counter],eax |
139 | cmp [time_counter],eax |
140 | ja still |
140 | ja still |
141 | 141 | ||
142 | add eax,100 |
142 | add eax,100 |
143 | mov [time_counter],eax |
143 | mov [time_counter],eax |
144 | 144 | ||
145 | call show_process_info ; draw new state of processes |
145 | call show_process_info ; draw new state of processes |
146 | jmp still |
146 | jmp still |
147 | ;------------------------------------------------------------------------------ |
147 | ;------------------------------------------------------------------------------ |
148 | align 4 |
148 | align 4 |
149 | key: ; key |
149 | key: ; key |
150 | mcall 2 |
150 | mcall 2 |
151 | 151 | ||
152 | cmp ah,184 ; PageUp |
152 | cmp ah,184 ; PageUp |
153 | jz pgdn |
153 | jz pgdn |
154 | 154 | ||
155 | cmp ah,183 |
155 | cmp ah,183 |
156 | jz pgup ; PageDown |
156 | jz pgup ; PageDown |
157 | 157 | ||
158 | cmp ah,27 |
158 | cmp ah,27 |
159 | jz close ; Esc |
159 | jz close ; Esc |
160 | 160 | ||
161 | push dword edit1 |
161 | push dword edit1 |
162 | call [edit_box_key] |
162 | call [edit_box_key] |
163 | ; Check ENTER with ed_focus edit_box |
163 | ; Check ENTER with ed_focus edit_box |
164 | lea edi,[edit1] |
164 | lea edi,[edit1] |
165 | test word ed_flags,ed_focus |
165 | test word ed_flags,ed_focus |
166 | jz still_end |
166 | jz still_end |
167 | 167 | ||
168 | sub ah,13 ; ENTER? |
168 | sub ah,13 ; ENTER? |
169 | jz program_start ; RUN a program |
169 | jz program_start ; RUN a program |
170 | 170 | ||
171 | jmp still |
171 | jmp still |
172 | ;------------------------------------------------------------------------------ |
172 | ;------------------------------------------------------------------------------ |
173 | align 4 |
173 | align 4 |
174 | button: |
174 | button: |
175 | ; get button id |
175 | ; get button id |
176 | mcall 17 |
176 | mcall 17 |
- | 177 | mov bl, al ; save mouse button to bl |
|
177 | shr eax,8 |
178 | shr eax,8 |
178 | ;id in [10,50] corresponds to terminate buttons. |
179 | ;id in [10,50] corresponds to terminate buttons. |
179 | cmp eax,10 |
180 | cmp eax,10 |
180 | jb noterm |
181 | jb noterm |
181 | 182 | ||
182 | cmp eax,50 |
183 | cmp eax,50 |
183 | jg noterm |
184 | jg noterm |
184 | ;calculate button index |
185 | ;calculate button index |
185 | sub eax,11 |
186 | sub eax,11 |
186 | ;calculate process slot |
187 | ;calculate process slot |
187 | mov ecx,[tasklist+4*eax] |
188 | mov ecx,[tasklist+4*eax] |
188 | ;ignore empty buttons |
189 | ;ignore empty buttons |
189 | test ecx,ecx |
190 | test ecx,ecx |
190 | jle still_end |
191 | jle still_end |
- | 192 | test bl, bl ; check mouse button |
|
- | 193 | jz .terminate |
|
- | 194 | mov eax, ecx |
|
- | 195 | mov edi, tinfo.params_buf |
|
- | 196 | ;; number in eax |
|
- | 197 | ;; buffer in edi |
|
- | 198 | ; int2str: |
|
- | 199 | push 0 |
|
- | 200 | mov ecx, 10 |
|
- | 201 | .push: |
|
- | 202 | xor edx, edx |
|
- | 203 | div ecx |
|
- | 204 | add edx, 48 |
|
- | 205 | push edx |
|
- | 206 | test eax, eax |
|
- | 207 | jnz .push |
|
- | 208 | .pop: |
|
- | 209 | pop eax |
|
- | 210 | stosb |
|
- | 211 | test eax, eax |
|
- | 212 | jnz .pop |
|
- | 213 | ; launch tinfo app |
|
- | 214 | mov ebx, tinfo |
|
- | 215 | mov eax, 70 |
|
- | 216 | int 64 |
|
- | 217 | jmp show_process_info_1 |
|
- | 218 | .terminate: |
|
191 | ;terminate application |
219 | ;terminate application |
192 | mcall 18,2 |
220 | mcall 18,2 |
193 | jmp show_process_info_1 |
221 | jmp show_process_info_1 |
194 | ;-------------------------------------- |
222 | ;-------------------------------------- |
195 | align 4 |
223 | align 4 |
196 | noterm: |
224 | noterm: |
197 | ;special buttons |
225 | ;special buttons |
198 | dec eax |
226 | dec eax |
199 | jz close |
227 | jz close |
200 | 228 | ||
201 | sub eax,50 |
229 | sub eax,50 |
202 | jz pgdn ;51 |
230 | jz pgdn ;51 |
203 | 231 | ||
204 | dec eax |
232 | dec eax |
205 | jz pgup ;52 |
233 | jz pgup ;52 |
206 | 234 | ||
207 | dec eax |
235 | dec eax |
208 | jz program_start ;53 |
236 | jz program_start ;53 |
209 | 237 | ||
210 | dec eax |
238 | dec eax |
211 | jz reboot ;54 |
239 | jz reboot ;54 |
212 | 240 | ||
213 | jmp still_end |
241 | jmp still_end |
214 | ;buttons handlers |
242 | ;buttons handlers |
215 | ;------------------------------------------------------------------------------ |
243 | ;------------------------------------------------------------------------------ |
216 | align 4 |
244 | align 4 |
217 | pgdn: |
245 | pgdn: |
218 | sub [list_start],display_processes |
246 | sub [list_start],display_processes |
219 | jge show_process_info_1 |
247 | jge show_process_info_1 |
220 | mov [list_start],0 |
248 | mov [list_start],0 |
221 | jmp show_process_info_1 |
249 | jmp show_process_info_1 |
222 | ;------------------------------------------------------------------------------ |
250 | ;------------------------------------------------------------------------------ |
223 | align 4 |
251 | align 4 |
224 | pgup: |
252 | pgup: |
225 | mov eax,[list_add] ;maximal displayed process slot |
253 | mov eax,[list_add] ;maximal displayed process slot |
226 | mov [list_start],eax |
254 | mov [list_start],eax |
227 | jmp show_process_info_1 |
255 | jmp show_process_info_1 |
228 | ;------------------------------------------------------------------------------ |
256 | ;------------------------------------------------------------------------------ |
229 | align 4 |
257 | align 4 |
230 | program_start: |
258 | program_start: |
231 | mcall 70,file_start |
259 | mcall 70,file_start |
232 | jmp show_process_info_1 |
260 | jmp show_process_info_1 |
233 | ;------------------------------------------------------------------------------ |
261 | ;------------------------------------------------------------------------------ |
234 | align 4 |
262 | align 4 |
235 | reboot: |
263 | reboot: |
236 | mcall 70,sys_reboot |
264 | mcall 70,sys_reboot |
237 | ;close program if we going to reboot |
265 | ;close program if we going to reboot |
238 | ;------------------------------------------------------------------------------ |
266 | ;------------------------------------------------------------------------------ |
239 | align 4 |
267 | align 4 |
240 | close: |
268 | close: |
241 | or eax,-1 ; close this program |
269 | or eax,-1 ; close this program |
242 | mcall |
270 | mcall |
243 | ;------------------------------------------------------------------------------ |
271 | ;------------------------------------------------------------------------------ |
244 | align 4 |
272 | align 4 |
245 | draw_empty_slot: |
273 | draw_empty_slot: |
246 | cmp [draw_window_flag],1 |
274 | cmp [draw_window_flag],1 |
247 | je @f |
275 | je @f |
248 | mov ecx,[curposy] |
276 | mov ecx,[curposy] |
249 | shl ecx,16 |
277 | shl ecx,16 |
250 | mov cx,10 ; button height |
278 | mov cx,10 ; button height |
251 | push ecx |
279 | push ecx |
252 | add ecx,3 shl 16 |
280 | add ecx,3 shl 16 |
253 | mcall 13,<11,95>,,[btn_bacground_color] |
281 | mcall 13,<11,95>,,[btn_bacground_color] |
254 | pop ecx |
282 | pop ecx |
255 | 283 | ||
256 | mcall 13,<111,393>,,[bar_bacground_color] |
284 | mcall 13,<111,393>,,[bar_bacground_color] |
257 | ;-------------------------------------- |
285 | ;-------------------------------------- |
258 | align 4 |
286 | align 4 |
259 | @@: |
287 | @@: |
260 | ret |
288 | ret |
261 | ;------------------------------------------------------------------------------ |
289 | ;------------------------------------------------------------------------------ |
262 | align 4 |
290 | align 4 |
263 | draw_next_process: |
291 | draw_next_process: |
264 | ;input: |
292 | ;input: |
265 | ; edi - current slot |
293 | ; edi - current slot |
266 | ; [curposy] - y position |
294 | ; [curposy] - y position |
267 | ;output: |
295 | ;output: |
268 | ; edi - next slot (or -1 if no next slot) |
296 | ; edi - next slot (or -1 if no next slot) |
269 | ;registers corrupted! |
297 | ;registers corrupted! |
270 | ;delete old button |
298 | ;delete old button |
271 | cmp [draw_window_flag],0 |
299 | cmp [draw_window_flag],0 |
272 | je @f |
300 | je @f |
273 | mov edx,[index] |
301 | mov edx,[index] |
274 | add edx,(1 shl 31)+11 |
302 | add edx,(1 shl 31)+11 |
275 | mcall 8 |
303 | mcall 8 |
276 | ;-------------------------------------- |
304 | ;-------------------------------------- |
277 | align 4 |
305 | align 4 |
278 | @@: |
306 | @@: |
279 | ;create terminate process button |
307 | ;create terminate process button |
280 | mov ecx,[curposy] |
308 | mov ecx,[curposy] |
281 | shl ecx,16 |
309 | shl ecx,16 |
282 | mov cx,13 ; button height |
310 | mov cx,13 ; button height |
283 | mov edx,[index] |
311 | mov edx,[index] |
284 | add edx,11 |
312 | add edx,11 |
285 | mov esi,0xccddee ; 0xaabbcc |
313 | mov esi,0xccddee ; 0xaabbcc |
286 | ;contrast |
314 | ;contrast |
287 | test dword [index],1 |
315 | test dword [index],1 |
288 | jz .change_color_button |
316 | jz .change_color_button |
289 | mov esi,0xaabbcc ; 0x8899aa |
317 | mov esi,0xaabbcc ; 0x8899aa |
290 | ;-------------------------------------- |
318 | ;-------------------------------------- |
291 | align 4 |
319 | align 4 |
292 | .change_color_button: |
320 | .change_color_button: |
293 | cmp [draw_window_flag],0 |
321 | cmp [draw_window_flag],0 |
294 | je @f |
322 | je @f |
295 | mcall 8,<10,99> |
323 | mcall 8,<10,99> |
296 | ;-------------------------------------- |
324 | ;-------------------------------------- |
297 | align 4 |
325 | align 4 |
298 | @@: |
326 | @@: |
299 | mov [btn_bacground_color],esi |
327 | mov [btn_bacground_color],esi |
300 | ;draw background for proccess information |
328 | ;draw background for proccess information |
301 | ; ecx was already set |
329 | ; ecx was already set |
302 | mov edx,0xddffdd ; 0x88ff88 |
330 | mov edx,0xddffdd ; 0x88ff88 |
303 | ;contrast |
331 | ;contrast |
304 | test dword [index],1 |
332 | test dword [index],1 |
305 | jz .change_color_info |
333 | jz .change_color_info |
306 | mov edx,0xffffff ; 0xddffdd |
334 | mov edx,0xffffff ; 0xddffdd |
307 | ;-------------------------------------- |
335 | ;-------------------------------------- |
308 | align 4 |
336 | align 4 |
309 | .change_color_info: |
337 | .change_color_info: |
310 | inc cx |
338 | inc cx |
311 | cmp [draw_window_flag],0 |
339 | cmp [draw_window_flag],0 |
312 | je @f |
340 | je @f |
313 | mcall 13,<110,395> |
341 | mcall 13,<110,395> |
314 | ;-------------------------------------- |
342 | ;-------------------------------------- |
315 | align 4 |
343 | align 4 |
316 | @@: |
344 | @@: |
317 | mov [bar_bacground_color],edx |
345 | mov [bar_bacground_color],edx |
318 | ;nothing else should be done |
346 | ;nothing else should be done |
319 | ;if there is no process for this button |
347 | ;if there is no process for this button |
320 | cmp edi,-1 |
348 | cmp edi,-1 |
321 | jne .return_1 |
349 | jne .return_1 |
322 | 350 | ||
323 | call draw_empty_slot |
351 | call draw_empty_slot |
324 | or edi,-1 |
352 | or edi,-1 |
325 | jmp .ret |
353 | jmp .ret |
326 | ;-------------------------------------- |
354 | ;-------------------------------------- |
327 | align 4 |
355 | align 4 |
328 | .return_1: |
356 | .return_1: |
329 | ;find process |
357 | ;find process |
330 | inc edi |
358 | inc edi |
331 | ;more comfortable register for next loop |
359 | ;more comfortable register for next loop |
332 | mov ecx,edi |
360 | mov ecx,edi |
333 | ;precacluate pointer to process buffer |
361 | ;precacluate pointer to process buffer |
334 | mov ebx,process_info_buffer |
362 | mov ebx,process_info_buffer |
335 | ;-------------------------------------- |
363 | ;-------------------------------------- |
336 | align 4 |
364 | align 4 |
337 | .find_loop: |
365 | .find_loop: |
338 | cmp ecx,256 |
366 | cmp ecx,256 |
339 | jge .no_processes |
367 | jge .no_processes |
340 | ;load process information in buffer |
368 | ;load process information in buffer |
341 | mcall 9 |
369 | mcall 9 |
342 | ;if current slot greater than maximal slot, |
370 | ;if current slot greater than maximal slot, |
343 | ;there is no more proccesses. |
371 | ;there is no more proccesses. |
344 | cmp ecx,eax |
372 | cmp ecx,eax |
345 | jg .no_processes |
373 | jg .no_processes |
346 | ;if slot state is equal to 9, it is empty. |
374 | ;if slot state is equal to 9, it is empty. |
347 | cmp [process_info_buffer+process_information.slot_state],9 |
375 | cmp [process_info_buffer+process_information.slot_state],9 |
348 | jnz .process_found |
376 | jnz .process_found |
349 | 377 | ||
350 | inc ecx |
378 | inc ecx |
351 | jmp .find_loop |
379 | jmp .find_loop |
352 | ;-------------------------------------- |
380 | ;-------------------------------------- |
353 | align 4 |
381 | align 4 |
354 | .no_processes: |
382 | .no_processes: |
355 | call draw_empty_slot |
383 | call draw_empty_slot |
356 | or edi,-1 |
384 | or edi,-1 |
357 | ret |
385 | ret |
358 | ;-------------------------------------- |
386 | ;-------------------------------------- |
359 | align 4 |
387 | align 4 |
360 | .process_found: |
388 | .process_found: |
361 | ;check on/off check box |
389 | ;check on/off check box |
362 | push edi |
390 | push edi |
363 | lea edi,[check1] |
391 | lea edi,[check1] |
364 | test dword ch_flags,ch_flag_en |
392 | test dword ch_flags,ch_flag_en |
365 | pop edi |
393 | pop edi |
366 | jnz .no_filter |
394 | jnz .no_filter |
367 | 395 | ||
368 | cmp dword [process_info_buffer+10],'ICON' |
396 | cmp dword [process_info_buffer+10],'ICON' |
369 | jnz @f |
397 | jnz @f |
370 | cmp dword [process_info_buffer+10+4],0 |
398 | cmp dword [process_info_buffer+10+4],0 |
371 | jz .return_1 |
399 | jz .return_1 |
372 | @@: |
400 | @@: |
373 | cmp dword [process_info_buffer+10],'IDLE' |
401 | cmp dword [process_info_buffer+10],'IDLE' |
374 | jnz @f |
402 | jnz @f |
375 | cmp dword [process_info_buffer+10+4],0 |
403 | cmp dword [process_info_buffer+10+4],0 |
376 | jz .return_1 |
404 | jz .return_1 |
377 | @@: |
405 | @@: |
378 | cmp word [process_info_buffer+10],'OS' |
406 | cmp word [process_info_buffer+10],'OS' |
379 | jnz @f |
407 | jnz @f |
380 | cmp dword [process_info_buffer+10+2],0 |
408 | cmp dword [process_info_buffer+10+2],0 |
381 | jz .return_1 |
409 | jz .return_1 |
382 | @@: |
410 | @@: |
383 | cmp byte [process_info_buffer+10],'@' |
411 | cmp byte [process_info_buffer+10],'@' |
384 | jz .return_1 |
412 | jz .return_1 |
385 | ;-------------------------------------- |
413 | ;-------------------------------------- |
386 | align 4 |
414 | align 4 |
387 | .no_filter: |
415 | .no_filter: |
388 | mov edi,ecx |
416 | mov edi,ecx |
389 | mov [list_add],ecx |
417 | mov [list_add],ecx |
390 | ;get processor cpeed |
418 | ;get processor cpeed |
391 | ;for percent calculating |
419 | ;for percent calculating |
392 | mcall 18,5 |
420 | mcall 18,5 |
393 | xor edx,edx |
421 | xor edx,edx |
394 | mov ebx,100 |
422 | mov ebx,100 |
395 | div ebx |
423 | div ebx |
396 | ;eax = number of operation for 1% now |
424 | ;eax = number of operation for 1% now |
397 | ;calculate process cpu usage percent |
425 | ;calculate process cpu usage percent |
398 | mov ebx,eax |
426 | mov ebx,eax |
399 | mov eax,[process_info_buffer+process_information.cpu_usage] |
427 | mov eax,[process_info_buffer+process_information.cpu_usage] |
400 | ; cdq |
428 | ; cdq |
401 | xor edx,edx ; for CPU more 2 GHz - mike.dld |
429 | xor edx,edx ; for CPU more 2 GHz - mike.dld |
402 | div ebx |
430 | div ebx |
403 | mov [cpu_percent],eax |
431 | mov [cpu_percent],eax |
404 | ;set text color to display process information |
432 | ;set text color to display process information |
405 | ;([tcolor] variable) |
433 | ;([tcolor] variable) |
406 | ;0% : black |
434 | ;0% : black |
407 | ;1-80% : green |
435 | ;1-80% : green |
408 | ;81-100% : red |
436 | ;81-100% : red |
409 | test eax,eax |
437 | test eax,eax |
410 | jnz .no_black |
438 | jnz .no_black |
411 | 439 | ||
412 | mov [tcolor],eax |
440 | mov [tcolor],eax |
413 | jmp .color_set |
441 | jmp .color_set |
414 | ;-------------------------------------- |
442 | ;-------------------------------------- |
415 | align 4 |
443 | align 4 |
416 | .no_black: |
444 | .no_black: |
417 | cmp eax,80 |
445 | cmp eax,80 |
418 | ja .no_green |
446 | ja .no_green |
419 | 447 | ||
420 | mov dword [tcolor],0x107a30 |
448 | mov dword [tcolor],0x107a30 |
421 | jmp .color_set |
449 | jmp .color_set |
422 | ;-------------------------------------- |
450 | ;-------------------------------------- |
423 | align 4 |
451 | align 4 |
424 | .no_green: |
452 | .no_green: |
425 | mov dword [tcolor],0xac0000 |
453 | mov dword [tcolor],0xac0000 |
426 | ;-------------------------------------- |
454 | ;-------------------------------------- |
427 | align 4 |
455 | align 4 |
428 | .color_set: |
456 | .color_set: |
429 | ;show slot number |
457 | ;show slot number |
430 | ;ecx haven't changed since .process_found |
458 | ;ecx haven't changed since .process_found |
431 | push edi |
459 | push edi |
432 | mov edx,[curposy] |
460 | mov edx,[curposy] |
433 | add edx,15*65536+3 |
461 | add edx,15*65536+3 |
434 | mov esi,[tcolor] |
462 | mov esi,[tcolor] |
435 | and esi,0xffffff |
463 | and esi,0xffffff |
436 | or esi,0x40000000 |
464 | or esi,0x40000000 |
437 | mcall 47,<2,256>,,,,[btn_bacground_color] |
465 | mcall 47,<2,256>,,,,[btn_bacground_color] |
438 | ;show process name |
466 | ;show process name |
439 | mov ebx,[curposy] |
467 | mov ebx,[curposy] |
440 | add ebx,40*65536+3 |
468 | add ebx,40*65536+3 |
441 | mov ecx,[tcolor] |
469 | mov ecx,[tcolor] |
442 | and ecx,0xffffff |
470 | and ecx,0xffffff |
443 | or ecx,0x40000000 |
471 | or ecx,0x40000000 |
444 | mcall 4,,,process_info_buffer.process_name,11,[btn_bacground_color] |
472 | mcall 4,,,process_info_buffer.process_name,11,[btn_bacground_color] |
445 | ;show pid |
473 | ;show pid |
446 | mov edx,[curposy] |
474 | mov edx,[curposy] |
447 | add edx,125*65536+3 |
475 | add edx,125*65536+3 |
448 | mov esi,[tcolor] |
476 | mov esi,[tcolor] |
449 | and esi,0xffffff |
477 | and esi,0xffffff |
450 | or esi,0x40000000 |
478 | or esi,0x40000000 |
451 | mcall 47,<8,256>,[process_info_buffer.PID],,,[bar_bacground_color] |
479 | mcall 47,<8,256>,[process_info_buffer.PID],,,[bar_bacground_color] |
452 | ;show cpu usage |
480 | ;show cpu usage |
453 | add edx,60*65536 |
481 | add edx,60*65536 |
454 | mcall ,,[process_info_buffer.cpu_usage] |
482 | mcall ,,[process_info_buffer.cpu_usage] |
455 | ;show cpu percent |
483 | ;show cpu percent |
456 | add edx,60*65536 |
484 | add edx,60*65536 |
457 | mcall ,<3,0>,[cpu_percent] |
485 | mcall ,<3,0>,[cpu_percent] |
458 | ;show memory start - obsolete |
486 | ;show memory start - obsolete |
459 | add edx,30*65536 |
487 | add edx,30*65536 |
460 | mcall ,<8,256>,[process_info_buffer.memory_start] |
488 | mcall ,<8,256>,[process_info_buffer.memory_start] |
461 | ;show memory usage |
489 | ;show memory usage |
462 | mov ecx,[process_info_buffer.used_memory] |
490 | mov ecx,[process_info_buffer.used_memory] |
463 | inc ecx |
491 | inc ecx |
464 | add edx,60*65536 |
492 | add edx,60*65536 |
465 | mcall |
493 | mcall |
466 | ;show window stack and value |
494 | ;show window stack and value |
467 | add edx,60*65536 |
495 | add edx,60*65536 |
468 | mcall ,,dword [process_info_buffer.window_stack_position] |
496 | mcall ,,dword [process_info_buffer.window_stack_position] |
469 | ;show window xy size |
497 | ;show window xy size |
470 | mov ecx,[process_info_buffer.box.left] |
498 | mov ecx,[process_info_buffer.box.left] |
471 | shl ecx,16 |
499 | shl ecx,16 |
472 | add ecx,[process_info_buffer.box.top] |
500 | add ecx,[process_info_buffer.box.top] |
473 | add edx,60*65536 |
501 | add edx,60*65536 |
474 | mcall |
502 | mcall |
475 | pop edi |
503 | pop edi |
476 | ;-------------------------------------- |
504 | ;-------------------------------------- |
477 | align 4 |
505 | align 4 |
478 | .ret: |
506 | .ret: |
479 | ;build index->slot map for terminating processes. |
507 | ;build index->slot map for terminating processes. |
480 | mov eax,[index] |
508 | mov eax,[index] |
481 | mov [tasklist+4*eax],edi |
509 | mov [tasklist+4*eax],edi |
482 | ret |
510 | ret |
483 | ;------------------------------------------------------------------------------ |
511 | ;------------------------------------------------------------------------------ |
484 | align 4 |
512 | align 4 |
485 | f11: |
513 | f11: |
486 | ;full update |
514 | ;full update |
487 | push edi |
515 | push edi |
488 | call draw_window |
516 | call draw_window |
489 | pop edi |
517 | pop edi |
490 | ;------------------------------------------------------------------------------ |
518 | ;------------------------------------------------------------------------------ |
491 | ; ********************************************* |
519 | ; ********************************************* |
492 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
520 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
493 | ; ********************************************* |
521 | ; ********************************************* |
494 | align 4 |
522 | align 4 |
495 | draw_window: |
523 | draw_window: |
496 | mcall 12, 1 |
524 | mcall 12, 1 |
497 | ; DRAW WINDOW |
525 | ; DRAW WINDOW |
498 | xor eax,eax ; function 0 : define and draw window |
526 | xor eax,eax ; function 0 : define and draw window |
499 | xor esi,esi |
527 | xor esi,esi |
500 | mcall ,[winxpos],[winypos],0x74ffffff,,title ;0x34ddffdd |
528 | mcall ,[winxpos],[winypos],0x74ffffff,,title ;0x34ddffdd |
501 | 529 | ||
502 | mcall 9,process_info_buffer,-1 |
530 | mcall 9,process_info_buffer,-1 |
503 | 531 | ||
504 | mov eax,[ebx+70] |
532 | mov eax,[ebx+70] |
505 | mov [window_status],eax |
533 | mov [window_status],eax |
506 | test [window_status],100b ; window is rolled up |
534 | test [window_status],100b ; window is rolled up |
507 | jnz .exit |
535 | jnz .exit |
508 | 536 | ||
509 | test [window_status],10b ; window is minimized to panel |
537 | test [window_status],10b ; window is minimized to panel |
510 | jnz .exit |
538 | jnz .exit |
511 | 539 | ||
512 | mov eax,[ebx+62] |
540 | mov eax,[ebx+62] |
513 | inc eax |
541 | inc eax |
514 | mov [client_area_x_size],eax |
542 | mov [client_area_x_size],eax |
515 | mov eax,[ebx+66] |
543 | mov eax,[ebx+66] |
516 | inc eax |
544 | inc eax |
517 | mov [client_area_y_size],eax |
545 | mov [client_area_y_size],eax |
518 | 546 | ||
519 | mov ebx,[client_area_x_size] |
547 | mov ebx,[client_area_x_size] |
520 | mcall 13,,<0,20>,0xffffff |
548 | mcall 13,,<0,20>,0xffffff |
521 | ; function 4 : write text to window |
549 | ; function 4 : write text to window |
522 | xor ecx,ecx |
550 | xor ecx,ecx |
523 | mcall 4,<17,8>,,text,text_len |
551 | mcall 4,<17,8>,,text,text_len |
524 | 552 | ||
525 | mcall 13,<0,10>,<20,336>,0xffffff |
553 | mcall 13,<0,10>,<20,336>,0xffffff |
526 | 554 | ||
527 | mov ebx,[client_area_x_size] |
555 | mov ebx,[client_area_x_size] |
528 | sub ebx,10+100+395 |
556 | sub ebx,10+100+395 |
529 | add ebx,(10+100+395) shl 16 |
557 | add ebx,(10+100+395) shl 16 |
530 | mcall |
558 | mcall |
531 | 559 | ||
532 | mcall 26,9 |
560 | mcall 26,9 |
533 | add eax,100 |
561 | add eax,100 |
534 | mov [time_counter],eax |
562 | mov [time_counter],eax |
535 | 563 | ||
536 | mov [draw_window_flag],1 |
564 | mov [draw_window_flag],1 |
537 | call show_process_info |
565 | call show_process_info |
538 | mov [draw_window_flag],0 |
566 | mov [draw_window_flag],0 |
539 | 567 | ||
540 | mov ebx,[client_area_x_size] |
568 | mov ebx,[client_area_x_size] |
541 | mov ecx,[client_area_y_size] |
569 | mov ecx,[client_area_y_size] |
542 | sub ecx,20+336 |
570 | sub ecx,20+336 |
543 | add ecx,(20+336) shl 16 |
571 | add ecx,(20+336) shl 16 |
544 | mcall 13,,,0xffffff |
572 | mcall 13,,,0xffffff |
545 | 573 | ||
546 | push dword edit1 |
574 | push dword edit1 |
547 | call [edit_box_draw] |
575 | call [edit_box_draw] |
548 | 576 | ||
549 | push dword check1 |
577 | push dword check1 |
550 | call [check_box_draw] |
578 | call [check_box_draw] |
551 | 579 | ||
552 | ; previous page button |
580 | ; previous page button |
553 | mcall 8,<25,96>,<361,14>,51,0xccddee ;0xaabbcc |
581 | mcall 8,<25,96>,<361,14>,51,0xccddee ;0xaabbcc |
554 | ; next page button 52 |
582 | ; next page button 52 |
555 | inc edx |
583 | inc edx |
556 | mcall ,<125,96> |
584 | mcall ,<125,96> |
557 | ; ">" (text enter) button |
585 | ; ">" (text enter) button |
558 | add ecx,20 shl 16 |
586 | add ecx,20 shl 16 |
559 | ; run button 53 |
587 | ; run button 53 |
560 | inc edx |
588 | inc edx |
561 | mcall ,<456,50> |
589 | mcall ,<456,50> |
562 | ; reboot button |
590 | ; reboot button |
563 | sub ebx,120*65536 |
591 | sub ebx,120*65536 |
564 | add ebx,60 |
592 | add ebx,60 |
565 | sub ecx,20 shl 16 |
593 | sub ecx,20 shl 16 |
566 | inc edx |
594 | inc edx |
567 | mcall |
595 | mcall |
568 | ;"PREV PAGE", "NEXT PAGE" and "REBOOT" labels |
596 | ;"PREV PAGE", "NEXT PAGE" and "REBOOT" labels |
569 | xor ecx,ecx |
597 | xor ecx,ecx |
570 | mcall 4,<45,365>,,tbts,tbte-tbts |
598 | mcall 4,<45,365>,,tbts,tbte-tbts |
571 | ;"RUN" labels |
599 | ;"RUN" labels |
572 | mcall ,<464,385>,,tbts_3,tbte_2-tbts_3 |
600 | mcall ,<464,385>,,tbts_3,tbte_2-tbts_3 |
573 | ;print application name in text box |
601 | ;print application name in text box |
574 | ;-------------------------------------- |
602 | ;-------------------------------------- |
575 | align 4 |
603 | align 4 |
576 | .exit: |
604 | .exit: |
577 | mcall 12, 2 |
605 | mcall 12, 2 |
578 | ret |
606 | ret |
579 | ;------------------------------------------------------------------------------ |
607 | ;------------------------------------------------------------------------------ |
580 | align 4 |
608 | align 4 |
581 | show_process_info: |
609 | show_process_info: |
582 | test [window_status],100b ; window is rolled up |
610 | test [window_status],100b ; window is rolled up |
583 | jnz .exit |
611 | jnz .exit |
584 | 612 | ||
585 | test [window_status],10b ; window is minimized to panel |
613 | test [window_status],10b ; window is minimized to panel |
586 | jnz .exit |
614 | jnz .exit |
587 | 615 | ||
588 | mov ecx,display_processes |
616 | mov ecx,display_processes |
589 | mov edi,tasklist |
617 | mov edi,tasklist |
590 | xor eax,eax |
618 | xor eax,eax |
591 | cld |
619 | cld |
592 | rep stosd |
620 | rep stosd |
593 | 621 | ||
594 | mov edi,[list_start] |
622 | mov edi,[list_start] |
595 | mov [list_add],edi |
623 | mov [list_add],edi |
596 | mov dword [index],0 |
624 | mov dword [index],0 |
597 | mov dword [curposy],20 |
625 | mov dword [curposy],20 |
598 | ;-------------------------------------- |
626 | ;-------------------------------------- |
599 | align 4 |
627 | align 4 |
600 | .loop_draw: |
628 | .loop_draw: |
601 | call draw_next_process |
629 | call draw_next_process |
602 | inc dword [index] |
630 | inc dword [index] |
603 | add dword [curposy],14 |
631 | add dword [curposy],14 |
604 | cmp [index],display_processes |
632 | cmp [index],display_processes |
605 | jl .loop_draw |
633 | jl .loop_draw |
606 | ;-------------------------------------- |
634 | ;-------------------------------------- |
607 | align 4 |
635 | align 4 |
608 | .exit: |
636 | .exit: |
609 | ret |
637 | ret |
610 | ;------------------------------------------------------------------------------ |
638 | ;------------------------------------------------------------------------------ |
611 | ; DATA AREA |
639 | ; DATA AREA |
612 | ;------------------------------------------------------------------------------ |
640 | ;------------------------------------------------------------------------------ |
613 | system_path db '/sys/lib/' |
641 | system_path db '/sys/lib/' |
614 | library_name db 'box_lib.obj',0 |
642 | library_name db 'box_lib.obj',0 |
615 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
643 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
616 | 644 | ||
617 | err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0 |
645 | err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0 |
618 | head_f_i: |
646 | head_f_i: |
619 | head_f_l db 'System error',0 |
647 | head_f_l db 'System error',0 |
620 | err_message_import db 'Error on load import library box_lib.obj',0 |
648 | err_message_import db 'Error on load import library box_lib.obj',0 |
621 | ;------------------------------------------------------------------------------ |
649 | ;------------------------------------------------------------------------------ |
622 | align 4 |
650 | align 4 |
623 | myimport: |
651 | myimport: |
624 | edit_box_draw dd aEdit_box_draw |
652 | edit_box_draw dd aEdit_box_draw |
625 | edit_box_key dd aEdit_box_key |
653 | edit_box_key dd aEdit_box_key |
626 | edit_box_mouse dd aEdit_box_mouse |
654 | edit_box_mouse dd aEdit_box_mouse |
627 | ;version_ed dd aVersion_ed |
655 | ;version_ed dd aVersion_ed |
628 | 656 | ||
629 | init_checkbox dd aInit_checkbox |
657 | init_checkbox dd aInit_checkbox |
630 | check_box_draw dd aCheck_box_draw |
658 | check_box_draw dd aCheck_box_draw |
631 | check_box_mouse dd aCheck_box_mouse |
659 | check_box_mouse dd aCheck_box_mouse |
632 | ;version_ch dd aVersion_ch |
660 | ;version_ch dd aVersion_ch |
633 | 661 | ||
634 | ;option_box_draw dd aOption_box_draw |
662 | ;option_box_draw dd aOption_box_draw |
635 | ;option_box_mouse dd aOption_box_mouse |
663 | ;option_box_mouse dd aOption_box_mouse |
636 | ;version_op dd aVersion_op |
664 | ;version_op dd aVersion_op |
637 | 665 | ||
638 | dd 0 |
666 | dd 0 |
639 | dd 0 |
667 | dd 0 |
640 | 668 | ||
641 | aEdit_box_draw db 'edit_box',0 |
669 | aEdit_box_draw db 'edit_box',0 |
642 | aEdit_box_key db 'edit_box_key',0 |
670 | aEdit_box_key db 'edit_box_key',0 |
643 | aEdit_box_mouse db 'edit_box_mouse',0 |
671 | aEdit_box_mouse db 'edit_box_mouse',0 |
644 | ;aVersion_ed db 'version_ed',0 |
672 | ;aVersion_ed db 'version_ed',0 |
645 | 673 | ||
646 | aInit_checkbox db 'init_checkbox2',0 |
674 | aInit_checkbox db 'init_checkbox2',0 |
647 | aCheck_box_draw db 'check_box_draw2',0 |
675 | aCheck_box_draw db 'check_box_draw2',0 |
648 | aCheck_box_mouse db 'check_box_mouse2',0 |
676 | aCheck_box_mouse db 'check_box_mouse2',0 |
649 | ;aVersion_ch db 'version_ch',0 |
677 | ;aVersion_ch db 'version_ch',0 |
650 | 678 | ||
651 | ;aOption_box_draw db 'option_box_draw',0 |
679 | ;aOption_box_draw db 'option_box_draw',0 |
652 | ;aOption_box_mouse db 'option_box_mouse',0 |
680 | ;aOption_box_mouse db 'option_box_mouse',0 |
653 | ;aVersion_op db 'version_op',0 |
681 | ;aVersion_op db 'version_op',0 |
654 | ;------------------------------------------------------------------------------ |
682 | ;------------------------------------------------------------------------------ |
655 | align 4 |
683 | align 4 |
656 | check1 check_box2 (10 shl 16)+11,(383 shl 16)+11,6, 0x80AABBCC,0,0,check_text, ch_flag_bottom ;ch_flag_en |
684 | check1 check_box2 (10 shl 16)+11,(383 shl 16)+11,6, 0x80AABBCC,0,0,check_text, ch_flag_bottom ;ch_flag_en |
657 | check1_end: |
685 | check1_end: |
658 | edit1 edit_box 350,95,381,0xffffff,0x6f9480,0,0xAABBCC,0,start_application_c,\ |
686 | edit1 edit_box 350,95,381,0xffffff,0x6f9480,0,0xAABBCC,0,start_application_c,\ |
659 | start_application,mouse_dd,ed_focus,start_application_e,start_application_e |
687 | start_application,mouse_dd,ed_focus,start_application_e,start_application_e |
660 | edit1_end: |
688 | edit1_end: |
661 | list_start dd 0 |
689 | list_start dd 0 |
662 | ;------------------------------------------------------------------------------ |
690 | ;------------------------------------------------------------------------------ |
663 | align 4 |
691 | align 4 |
664 | sys_reboot: |
692 | sys_reboot: |
665 | dd 7 |
693 | dd 7 |
666 | dd 0 |
694 | dd 0 |
667 | dd 0 |
695 | dd 0 |
668 | dd 0 |
696 | dd 0 |
669 | dd 0 |
697 | dd 0 |
670 | db '/sys/end',0 |
698 | db '/sys/end',0 |
671 | ;------------------------------------------------------------------------------ |
699 | ;------------------------------------------------------------------------------ |
672 | if lang eq de |
700 | if lang eq de |
673 | text: |
701 | text: |
674 | db 'NAME/BEENDEN PID CPU-LAST % ' |
702 | db 'NAME/BEENDEN PID CPU-LAST % ' |
675 | db 'SPEICHER START/NUTZUNG W-STACK W-POS' |
703 | db 'SPEICHER START/NUTZUNG W-STACK W-POS' |
676 | text_len = $-text |
704 | text_len = $-text |
677 | 705 | ||
678 | tbts: db 'SEITE ZURUECK SEITE VOR REBOOT SYSTEM' |
706 | tbts: db 'SEITE ZURUECK SEITE VOR REBOOT SYSTEM' |
679 | tbte: |
707 | tbte: |
680 | tbts_3 db 'START' |
708 | tbts_3 db 'START' |
681 | tbte_2: |
709 | tbte_2: |
682 | check_text db '@ on/off',0 |
710 | check_text db '@ on/off',0 |
683 | title db 'Prozesse - Ctrl/Alt/Del',0 |
711 | title db 'Prozesse - Ctrl/Alt/Del',0 |
684 | ;-------------------------------------- |
712 | ;-------------------------------------- |
685 | else if lang eq et |
713 | else if lang eq et |
686 | text: |
714 | text: |
687 | db 'NIMI/LÕPETA PID CPU-KASUTUS % ' |
715 | db 'NIMI/LÕPETA PID CPU-KASUTUS % ' |
688 | db 'MÄLU ALGUS/KASUTUS W-PUHVER W-SUURUS' |
716 | db 'MÄLU ALGUS/KASUTUS W-PUHVER W-SUURUS' |
689 | text_len = $-text |
717 | text_len = $-text |
690 | 718 | ||
691 | tbts: db 'EELMINE LEHT JÄRGMINE LEHT REBOODI SÜSTEEM' |
719 | tbts: db 'EELMINE LEHT JÄRGMINE LEHT REBOODI SÜSTEEM' |
692 | tbte: |
720 | tbte: |
693 | tbts_3 db 'START' |
721 | tbts_3 db 'START' |
694 | tbte_2: |
722 | tbte_2: |
695 | check_text db '@ sees/väl.',0 |
723 | check_text db '@ sees/väl.',0 |
696 | title db 'Protsessid - Ctrl/Alt/Del' |
724 | title db 'Protsessid - Ctrl/Alt/Del' |
697 | ;-------------------------------------- |
725 | ;-------------------------------------- |
698 | else if lang eq ru |
726 | else if lang eq ru |
699 | text: |
727 | text: |
700 | db '/ PID CPU- % ' |
728 | db '/ PID CPU- % ' |
701 | db ' / W-STACK W-POS' |
729 | db ' / W-STACK W-POS' |
702 | text_len = $-text |
730 | text_len = $-text |
703 | 731 | ||
704 | tbts: db ' . . ' |
732 | tbts: db ' . . ' |
705 | tbte: |
733 | tbte: |
706 | tbts_3 db '' |
734 | tbts_3 db '' |
707 | tbte_2: |
735 | tbte_2: |
708 | check_text db '@ ¢ª«/¢ëª«',0 |
736 | check_text db '@ ¢ª«/¢ëª«',0 |
709 | title db '¨á¯¥âç¥à ¯à®æ¥áᮢ - Ctrl/Alt/Del',0 |
737 | title db '¨á¯¥âç¥à ¯à®æ¥áᮢ - Ctrl/Alt/Del',0 |
710 | ;-------------------------------------- |
738 | ;-------------------------------------- |
711 | else if lang eq it |
739 | else if lang eq it |
712 | text: |
740 | text: |
713 | db 'NOME-PROGRAMMA PID USO CPU % ' |
741 | db 'NOME-PROGRAMMA PID USO CPU % ' |
714 | db 'MEMORY START/USAGE W-STACK W-POS' |
742 | db 'MEMORY START/USAGE W-STACK W-POS' |
715 | text_len = $-text |
743 | text_len = $-text |
716 | 744 | ||
717 | tbts: db 'INDIETRO AVANTI RIAVVIA SISTEMA' |
745 | tbts: db 'INDIETRO AVANTI RIAVVIA SISTEMA' |
718 | tbte: |
746 | tbte: |
719 | tbts_3 db 'START' |
747 | tbts_3 db 'START' |
720 | tbte_2: |
748 | tbte_2: |
721 | check_text db '@ on/off',0 |
749 | check_text db '@ on/off',0 |
722 | title db 'Gestore processi - Ctrl/Alt/Del',0 |
750 | title db 'Gestore processi - Ctrl/Alt/Del',0 |
723 | ;-------------------------------------- |
751 | ;-------------------------------------- |
724 | else |
752 | else |
725 | text: |
753 | text: |
726 | db 'NAME/TERMINATE PID CPU-USAGE % ' |
754 | db 'NAME/TERMINATE PID CPU-USAGE % ' |
727 | db 'MEMORY START/USAGE W-STACK W-POS' |
755 | db 'MEMORY START/USAGE W-STACK W-POS' |
728 | text_len = $-text |
756 | text_len = $-text |
729 | 757 | ||
730 | tbts: db 'PREV PAGE NEXT PAGE REBOOT SYSTEM' |
758 | tbts: db 'PREV PAGE NEXT PAGE REBOOT SYSTEM' |
731 | tbte: |
759 | tbte: |
732 | tbts_3 db ' RUN' |
760 | tbts_3 db ' RUN' |
733 | tbte_2: |
761 | tbte_2: |
734 | check_text db '@ on/off',0 |
762 | check_text db '@ on/off',0 |
735 | title db 'Process manager - Ctrl/Alt/Del',0 |
763 | title db 'Process manager - Ctrl/Alt/Del',0 |
736 | 764 | ||
737 | end if |
765 | end if |
738 | ;------------------------------------------------------------------------------ |
766 | ; ---------------------------------------------------------------------------- ; |
- | 767 | align 4 |
|
- | 768 | tinfo: |
|
- | 769 | dd 7 |
|
- | 770 | dd 0 |
|
- | 771 | .params dd .params_buf |
|
- | 772 | dd 0 |
|
- | 773 | dd 0 |
|
- | 774 | db 0 |
|
- | 775 | .file_path dd sz_tinfo_file_path |
|
- | 776 | align 4 |
|
- | 777 | .params_buf: |
|
- | 778 | times 11 db 0 ; at now 4 bytes will be enough, but may be in the future not |
|
- | 779 | align 4 |
|
- | 780 | sz_tinfo_file_path db "/sys/tinfo",0 |
|
- | 781 | ; ---------------------------------------------------------------------------- ; |
|
739 | align 4 |
782 | align 4 |
740 | file_start: |
783 | file_start: |
741 | dd 7 |
784 | dd 7 |
742 | dd 0 |
785 | dd 0 |
743 | dd 0 |
786 | dd 0 |
744 | dd 0 |
787 | dd 0 |
745 | dd 0 |
788 | dd 0 |
746 | start_application: db '/sys/LAUNCHER',0 |
789 | start_application: db '/sys/LAUNCHER',0 |
747 | start_application_e=$-start_application-1 |
790 | start_application_e=$-start_application-1 |
748 | ; times 60 db 0 |
791 | ; times 60 db 0 |
749 | rb 60 |
792 | rb 60 |
750 | start_application_c=$-start_application-1 |
793 | start_application_c=$-start_application-1 |
751 | ;------------------------------------------------------------------------------ |
794 | ;------------------------------------------------------------------------------ |
752 | IM_END: |
795 | IM_END: |
753 | ;------------------------------------------------------------------------------ |
796 | ;------------------------------------------------------------------------------ |
754 | align 4 |
797 | align 4 |
755 | sc system_colors |
798 | sc system_colors |
756 | winxpos rd 1 |
799 | winxpos rd 1 |
757 | winypos rd 1 |
800 | winypos rd 1 |
758 | mouse_dd rd 1 |
801 | mouse_dd rd 1 |
759 | cpu_percent rd 1 |
802 | cpu_percent rd 1 |
760 | tcolor rd 1 |
803 | tcolor rd 1 |
761 | list_add rd 1 |
804 | list_add rd 1 |
762 | curposy rd 1 |
805 | curposy rd 1 |
763 | index rd 1 |
806 | index rd 1 |
764 | tasklist rd display_processes |
807 | tasklist rd display_processes |
765 | time_counter rd 1 |
808 | time_counter rd 1 |
766 | 809 | ||
767 | window_status rd 1 |
810 | window_status rd 1 |
768 | client_area_x_size rd 1 |
811 | client_area_x_size rd 1 |
769 | client_area_y_size rd 1 |
812 | client_area_y_size rd 1 |
770 | bar_bacground_color rd 1 |
813 | bar_bacground_color rd 1 |
771 | btn_bacground_color rd 1 |
814 | btn_bacground_color rd 1 |
772 | draw_window_flag rd 1 |
815 | draw_window_flag rd 1 |
773 | ;------------------------------------------------------------------------------ |
816 | ;------------------------------------------------------------------------------ |
774 | align 4 |
817 | align 4 |
775 | library_path: |
818 | library_path: |
776 | process_info_buffer process_information |
819 | process_info_buffer process_information |
777 | ;------------------------------------------------------------------------------ |
820 | ;------------------------------------------------------------------------------ |
778 | align 4 |
821 | align 4 |
779 | cur_dir_path: |
822 | cur_dir_path: |
780 | rb 1024 |
823 | rb 1024 |
781 | ;------------------------------------------------------------------------------ |
824 | ;------------------------------------------------------------------------------ |
782 | align 4 |
825 | align 4 |
783 | rb 1024 |
826 | rb 1024 |
784 | stack_area: |
827 | stack_area: |
785 | ;------------------------------------------------------------------------------ |
828 | ;------------------------------------------------------------------------------ |
786 | U_END: |
829 | U_END: |
787 | ;------------------------------------------------------------------------------464,385>45,365>456,50>125,96>361,14>25,96>20,336>0,10>17,8>0,20>8,256>3,0>8,256>2,256>110,395>10,99>111,393>11,95> |
830 | ;------------------------------------------------------------------------------464,385>45,365>456,50>125,96>361,14>25,96>20,336>0,10>17,8>0,20>8,256>3,0>8,256>2,256>110,395>10,99>111,393>11,95> |