Subversion Repositories Kolibri OS

Rev

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

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