Subversion Repositories Kolibri OS

Rev

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

Rev 427 Rev 430
Line 178... Line 178...
178
	xor   eax, eax
178
	xor   eax, eax
179
        cmp   ebx, esi
179
        cmp   ebx, esi
180
        sete  al
180
        sete  al
181
ret
181
ret
Line 182... Line -...
182
 
-
 
183
; in: ebx = TSS selector index
-
 
184
;
182
 
185
; param
183
; param
186
;  ebx = incoming task
184
;  ebx = incoming task
Line 187... Line 185...
187
;  esi = outcomig task
185
;  esi = outcomig task
Line 195... Line 193...
195
        add esi, SLOT_BASE
193
        add esi, SLOT_BASE
Line 196... Line 194...
196
 
194
 
197
        mov [esi+APPDATA.saved_esp], esp
195
        mov [esi+APPDATA.saved_esp], esp
Line -... Line 196...
-
 
196
        mov esp, [ebx+APPDATA.saved_esp]
-
 
197
 
-
 
198
; set thread io map
-
 
199
 
-
 
200
        mov ecx, [ebx+APPDATA.io_map]
-
 
201
        mov edx, [ebx+APPDATA.io_map+4]
-
 
202
        mov dword [page_tabs+((tss._io_map_0 and -4096) shr 10)], ecx
198
        mov esp, [ebx+APPDATA.saved_esp]
203
        mov dword [page_tabs+((tss._io_map_1 and -4096) shr 10)], edx
199
 
204
 
200
        mov eax, [ebx+APPDATA.dir_table]
-
 
201
        mov cr3, eax
205
        mov eax, [ebx+APPDATA.dir_table]
202
 
206
        mov cr3, eax
203
        mov ebx, [ebx+APPDATA.pl0_stack]
207
        mov ebx, [ebx+APPDATA.pl0_stack]
204
        add ebx, RING0_STACK_SIZE
208
        add ebx, RING0_STACK_SIZE
205
        mov [tss_data+TSS._esp0], ebx
209
        mov [tss._esp0], ebx
206
        mov ecx, cr0
210
        mov ecx, cr0
207
        or ecx, CR0_TS   ;set task switch flag
211
        or ecx, CR0_TS   ;set task switch flag