Subversion Repositories Kolibri OS

Rev

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