Subversion Repositories Kolibri OS

Rev

Rev 3927 | Rev 3952 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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