Subversion Repositories Kolibri OS

Rev

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

Rev 134 Rev 485
Line 21... Line 21...
21
 
21
 
22
; Get my PID in dec format 4 bytes
22
; Get my PID in dec format 4 bytes
23
;    mov eax,9
23
;    mov eax,9
24
;    mov ebx,prcinfo
24
;    mov ebx,prcinfo
25
;    mov ecx,-1
25
;    mov ecx,-1
26
;    int 0x40
26
;    mcall
27
    mov eax,[parentPID]
27
    mov eax,[parentPID]
28
; convert eax bin to param dec
28
; convert eax bin to param dec
29
;    mov eax,dword [prcinfo+30]  ;offset of myPID
29
;    mov eax,dword [prcinfo+30]  ;offset of myPID
30
    mov edi,param+4-1            ;offset to 4 bytes
30
    mov edi,param+4-1            ;offset to 4 bytes
Line 55... Line 55...
55
; define IPC memory
55
; define IPC memory
56
    mov eax,60
56
    mov eax,60
57
    mov ebx,1        ; define IPC
57
    mov ebx,1        ; define IPC
58
    mov ecx,path     ; offset of area
58
    mov ecx,path     ; offset of area
59
    mov edx,1024+16  ; size
59
    mov edx,1024+16  ; size
60
    int 0x40
60
    mcall
Line 61... Line 61...
61
 
61
 
62
; change wanted events list 7-bit IPC event
62
; change wanted events list 7-bit IPC event
63
    mov eax,40
63
    mov eax,40
64
    mov ebx,01000111b
64
    mov ebx,01000111b
Line 65... Line 65...
65
    int 0x40
65
    mcall
66
 
66
 
67
;
67
;
Line 68... Line 68...
68
; STEP 3 run SYSTEM XTREE with parameters
68
; STEP 3 run SYSTEM XTREE with parameters
69
;
69
;
70
 
70
 
Line 71... Line 71...
71
    mov eax,70
71
    mov eax,70
Line 72... Line 72...
72
    mov ebx,run_fileinfo
72
    mov ebx,run_fileinfo
73
    int 0x40
73
    mcall
74
 
74
 
75
    call redproc
75
    call redproc
76
 
76
 
77
    mov [get_loops],0
77
    mov [get_loops],0
78
getmesloop:
78
getmesloop:
79
    mov eax,23
79
    mov eax,23
80
    mov ebx,50     ;0.5 sec
80
    mov ebx,50     ;0.5 sec
81
    int 0x40
81
    mcall
Line 90... Line 90...
90
 
90
 
91
; Get number of procces
91
; Get number of procces
92
    mov ebx,prcinfo
92
    mov ebx,prcinfo
93
    mov ecx,-1
93
    mov ecx,-1
94
    mov eax,9
94
    mov eax,9
95
    int 0x40
95
    mcall
Line 96... Line 96...
96
    mov ebp,eax
96
    mov ebp,eax
97
 
97
 
98
loox:
98
loox:
99
    mov eax,9
99
    mov eax,9
100
    mov ebx,prcinfo
100
    mov ebx,prcinfo
101
    mov ecx,ebp
101
    mov ecx,ebp
102
    int 0x40
102
    mcall
103
    mov eax,[DLGPID]
103
    mov eax,[DLGPID]
104
    cmp [prcinfo+30],eax    ;IF Dialog find
104
    cmp [prcinfo+30],eax    ;IF Dialog find
105
    je  dlg_is_work          ;jmp to dlg_is_work
105
    je  dlg_is_work          ;jmp to dlg_is_work
Line 122... Line 122...
122
mred:
122
mred:
123
    call redproc
123
    call redproc
124
    jmp  getmesloop
124
    jmp  getmesloop
125
mkey:
125
mkey:
126
    mov  eax,2
126
    mov  eax,2
127
    int  0x40                   ; read (eax=2)
127
    mcall                   ; read (eax=2)
128
    jmp  getmesloop
128
    jmp  getmesloop
129
mbutton:
129
mbutton:
130
    mov  eax,17                 ; get id
130
    mov  eax,17                 ; get id
131
    int  0x40
131
    mcall
132
    cmp  ah,1                   ; button id=1 ?
132
    cmp  ah,1                   ; button id=1 ?
133
    jne  getmesloop
133
    jne  getmesloop
134
    mov  eax,-1                 ; close this program
134
    or  eax,-1                 ; close this program
135
    int  0x40
135
    mcall
136
mgetmes:
136
mgetmes:
Line 137... Line 137...
137
 
137
 
138
; If dlg_pid_get then second message get jmp to still
138
; If dlg_pid_get then second message get jmp to still
139
    cmp  [dlg_pid_get],dword 1
139
    cmp  [dlg_pid_get],dword 1