Subversion Repositories Kolibri OS

Rev

Rev 9163 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9163 Rev 9167
Line 7... Line 7...
7
public EXPORTS
7
public EXPORTS
Line 8... Line 8...
8
 
8
 
9
section '.flat' code readable align 16
9
section '.flat' code readable align 16
10
include 'font.inc'
10
include 'font.inc'
-
 
11
include 'conscrl.inc'
Line 11... Line 12...
11
include 'conscrl.inc'
12
include '../../../struct.inc'
12
 
-
 
13
struc process_info
13
 
14
{
14
struct process_info
15
  .cpu_usage              dd ?  ; +0
15
  cpu_usage              dd ?  ; +0
16
  .window_stack_position  dw ?  ; +4
16
  window_stack_position  dw ?  ; +4
17
  .window_stack_value     dw ?  ; +6
17
  window_stack_value     dw ?  ; +6
18
                          dw ?  ; +8
18
                         dw ?  ; +8
19
  .process_name           rb 12 ; +10
19
  process_name           rb 12 ; +10
20
  .memory_start           dd ?  ; +22
20
  memory_start           dd ?  ; +22
21
  .used_memory            dd ?  ; +26
21
  used_memory            dd ?  ; +26
22
  .PID                    dd ?  ; +30
22
  PID                    dd ?  ; +30
23
  .box.x                  dd ?  ; +34
23
  box.x                  dd ?  ; +34
24
  .box.y                  dd ?  ; +38
24
  box.y                  dd ?  ; +38
25
  .box.width              dd ?  ; +42
25
  box.width              dd ?  ; +42
26
  .box.height             dd ?  ; +46
26
  box.height             dd ?  ; +46
27
  .slot_state             dw ?  ; +50
27
  slot_state             dw ?  ; +50
28
                          dw ?  ; +52
28
                         dw ?  ; +52
29
  .client_box.x           dd ?  ; +54
29
  client_box.x           dd ?  ; +54
30
  .client_box.y           dd ?  ; +58
30
  client_box.y           dd ?  ; +58
31
  .client_box.width       dd ?  ; +62
31
  client_box.width       dd ?  ; +62
32
  .client_box.height      dd ?  ; +66
32
  client_box.height      dd ?  ; +66
33
  .wnd_state              db ?  ; +70
33
  wnd_state              db ?  ; +70
Line 34... Line 34...
34
  rb (1024-71)
34
  rb (1024-71)
35
}
35
ends
36
 
36
 
37
OP_EXIT         = 1
37
OP_EXIT         = 1
Line 149... Line 149...
149
        xor     eax, eax
149
        xor     eax, eax
150
        rep     stosb
150
        rep     stosb
151
        pop     edi
151
        pop     edi
152
        and     byte [con_flags+1], not 2
152
        and     byte [con_flags+1], not 2
Line -... Line 153...
-
 
153
 
-
 
154
; Get parent TID
-
 
155
        mov     eax, 68  ; SF_SYS_MISC
-
 
156
        mov     ebx, 12  ; SSF_MEM_ALLOC
-
 
157
        mov     ecx, sizeof.process_info
-
 
158
        int     0x40
-
 
159
 
-
 
160
        mov     ebx, eax
-
 
161
        mov     eax, 9   ; SF_THREAD_INFO
-
 
162
        mov     ecx, -1
-
 
163
        int     0x40
-
 
164
 
-
 
165
        mov     eax, [ebx+process_info.PID]
-
 
166
        mov     [con.parent_tid], eax
-
 
167
 
-
 
168
        mov     eax, 68  ; SF_SYS_MISC
-
 
169
        mov     ecx, ebx
-
 
170
        mov     ebx, 13  ; SSF_MEM_FREE
-
 
171
        int     0x40
153
 
172
 
154
; create console thread
173
; Create console thread
155
        push    51
174
        push    51
156
        pop     eax
175
        pop     eax
157
        xor     ebx, ebx
176
        xor     ebx, ebx
158
        inc     ebx
177
        inc     ebx
Line 2620... Line 2639...
2620
        cmp     al, 4
2639
        cmp     al, 4
2621
        jz      con.ipc
2640
        jz      con.ipc
2622
        jmp     con.mouse
2641
        jmp     con.mouse
2623
con.button:
2642
con.button:
2624
; we have only one button, close
2643
; we have only one button, close
2625
        mov     eax, 18
2644
        mov     eax, 18 ; SF_SYSTEM
2626
        mov     ebx, 18
2645
        mov     ebx, 18 ; SSF_TERMINATE_THREAD_ID
2627
        mov     ecx,[process_info_buffer+30]
2646
        mov     ecx, [con.parent_tid]
2628
        dec     ecx
-
 
2629
        int     0x40 ; kill parent process
2647
        int     0x40    ; (kill the parent thread)
Line 2630... Line 2648...
2630
 
2648
 
2631
con.thread_exit:
2649
con.thread_exit:
2632
        or      byte [con_flags+1], 2
2650
        or      byte [con_flags+1], 2
2633
        and     [con.console_tid], 0
2651
        and     [con.console_tid], 0
Line 3442... Line 3460...
3442
con.bUpPressed_saved        db ?
3460
con.bUpPressed_saved        db ?
3443
con.bDownPressed_saved      db ?
3461
con.bDownPressed_saved      db ?
3444
con.bScrollingUp_saved      db ?
3462
con.bScrollingUp_saved      db ?
3445
con.bScrollingDown_saved    db ?
3463
con.bScrollingDown_saved    db ?
Line -... Line 3464...
-
 
3464
 
3446
 
3465
con.parent_tid              dd ?
3447
con.input_buffer            rw 128
3466
con.input_buffer            rw 128
Line 3448... Line 3467...
3448
con.input_buffer_end = $
3467
con.input_buffer_end = $