Subversion Repositories Kolibri OS

Rev

Rev 3955 | Rev 5420 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3955 Rev 4968
Line 172... Line 172...
172
;------------------------------------------------------------------------------
172
;------------------------------------------------------------------------------
173
align 4
173
align 4
174
button:
174
button:
175
; get button id
175
; get button id
176
        mcall   17
176
        mcall   17
-
 
177
        mov     bl, al ; save mouse button to bl
177
        shr     eax,8
178
        shr     eax,8
178
;id in [10,50] corresponds to terminate buttons.
179
;id in [10,50] corresponds to terminate buttons.
179
        cmp     eax,10
180
        cmp     eax,10
180
        jb      noterm
181
        jb      noterm
Line 186... Line 187...
186
;calculate process slot
187
;calculate process slot
187
        mov     ecx,[tasklist+4*eax]
188
        mov     ecx,[tasklist+4*eax]
188
;ignore empty buttons
189
;ignore empty buttons
189
        test    ecx,ecx
190
        test    ecx,ecx
190
        jle     still_end
191
        jle     still_end
-
 
192
        test    bl, bl ; check mouse button
-
 
193
        jz     .terminate
-
 
194
        mov    eax, ecx
-
 
195
        mov    edi, tinfo.params_buf
-
 
196
;; number in eax
-
 
197
;; buffer in edi
-
 
198
; int2str:
-
 
199
        push   0
-
 
200
        mov    ecx, 10
-
 
201
.push:     
-
 
202
        xor    edx, edx
-
 
203
        div    ecx
-
 
204
        add    edx, 48
-
 
205
        push   edx
-
 
206
        test   eax, eax 
-
 
207
        jnz     .push
-
 
208
.pop:     
-
 
209
        pop    eax
-
 
210
        stosb
-
 
211
        test   eax, eax
-
 
212
        jnz    .pop
-
 
213
; launch tinfo app        
-
 
214
        mov     ebx, tinfo
-
 
215
        mov     eax, 70
-
 
216
        int     64
-
 
217
        jmp     show_process_info_1
-
 
218
.terminate:        
191
;terminate application
219
;terminate application
192
        mcall   18,2
220
        mcall   18,2
193
        jmp     show_process_info_1
221
        jmp     show_process_info_1
194
;--------------------------------------
222
;--------------------------------------
195
align 4
223
align 4
Line 733... Line 761...
733
tbte_2:
761
tbte_2:
734
check_text      db '@ on/off',0
762
check_text      db '@ on/off',0
735
title   db 'Process manager - Ctrl/Alt/Del',0
763
title   db 'Process manager - Ctrl/Alt/Del',0
Line 736... Line 764...
736
 
764
 
737
end if
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
738
;------------------------------------------------------------------------------
781
; ---------------------------------------------------------------------------- ;
739
align 4
782
align 4
740
file_start:
783
file_start:
741
        dd 7
784
        dd 7
742
        dd 0
785
        dd 0