20,7 → 20,8 |
mov esi, sys_int |
mov ecx, 0x40 |
mov eax, (10001110b shl 24) + os_code |
@@: movsw ;low word of code-entry |
@@: |
movsw ;low word of code-entry |
stosd ;interrupt gate type : os_code selector |
movsw ;high word of code-entry |
loop @b |
138,13 → 139,15 |
cmp bl,14 ; #PF |
jne @f |
call page_fault_handler ; SEE: core/memory.inc |
@@: mov esi, [current_slot] |
@@: |
mov esi, [current_slot] |
btr [esi+APPDATA.except_mask], ebx |
jnc @f |
mov eax,[esi+APPDATA.exc_handler] |
test eax, eax |
jnz IRetToUserHook |
@@: cli |
@@: |
cli |
mov eax, [esi+APPDATA.debugger_slot] |
test eax, eax |
jnz .debug |
165,10 → 168,12 |
mov dr6, edx |
mov edx, dr7 |
mov cl, not 8 |
.l1: shl dl,2 |
.l1: |
shl dl, 2 |
jc @f |
and bl, cl |
@@: sar cl,1 |
@@: |
sar cl, 1 |
jc .l1 |
mov cl, 3 ; debug_message code=debug_exception |
.notify: |
213,8 → 218,10 |
jb .l0 |
cmp bl, 0x0e |
jbe .l1 |
.l0: mov bl, 0x09 |
.l1: mov eax,[msg_fault_sel+ebx*4 - 0x08*4] |
.l0: |
mov bl, 0x09 |
.l1: |
mov eax, [msg_fault_sel+ebx*4 - 0x08*4] |
DEBUGF 1, "K : %s\n", eax |
mov eax, [reg_cs3+4] |
mov edi, msg_sel_app |
223,7 → 230,8 |
je @f |
mov edi, msg_sel_ker |
mov ebx, [reg_esp0+4] |
@@: DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4] |
@@: |
DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4] |
DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [reg_edx+4], [reg_esi+4], [reg_edi+4] |
DEBUGF 1, "K : EBP : %x EIP : %x ESP : %x\n", [reg_ebp+4], [reg_eip+4], ebx |
DEBUGF 1, "K : Flags : %x CS : %x (%s)\n", [reg_eflags+4], eax, edi |