351,27 → 351,6 |
; a protected-mode interrupt handler (typically the general-protection |
; exception handler, which in turn calls the virtual 8086-mode monitor). |
|
v86_debug_exc: |
pushad |
xor eax, eax |
mov dr6, eax |
mov bl, 1 |
jmp v86_exc_c |
|
v86_page_fault: |
add esp, 4 |
pushad |
mov bl, 14 |
jmp v86_exc_c |
|
v86_except_16: |
pushad |
mov bl, 16 |
jmp v86_exc_c |
v86_except_19: |
pushad |
mov bl, 19 |
|
iglobal |
v86_exc_str1 db 'V86 : unexpected exception ',0 |
v86_exc_str2 db ' at ',0 |
387,11 → 366,12 |
endg |
|
v86_exc_c: |
mov ax, app_data |
mov ds, ax |
mov es, ax |
; Did we all that we have wanted to do? |
mov eax, [esp+v86_regs.size+10h+18h] |
cmp bl,1 |
jne @f |
xor eax, eax |
mov dr6, eax |
@@: mov eax, [esp+v86_regs.size+10h+18h] |
cmp word [esp+v86_regs.eip], ax |
jnz @f |
shr eax, 16 |
945,12 → 925,11 |
mov cx, [eax*4+2] |
mov word [esi-v86_regs.size+v86_regs.cs], cx |
and byte [esi-v86_regs.size+v86_regs.eflags+1], not 3 |
push ebx |
call update_counters |
pop ebx |
sub ebx, SLOT_BASE |
shr ebx, 8 |
mov esi, [CURRENT_TASK] |
lea edi, [ebx + 0x100000000 - SLOT_BASE] |
shr edi, 3 |
add edi, TASK_DATA |
call find_next_task.found |
call do_change_task |
popad |
iretd |