Subversion Repositories Kolibri OS

Rev

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