Code: Select all
isr_h:
pusha ; push edi,esi,ebp,esp,ebx,edx,ecx,eax
mov ax, ds ; Lower 16-bits of eax = ds.
push eax
mov ax, 0x10 ;kernel data segment descriptor
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
call isr_handler
pop eax ;original data segment descriptor
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
popa
add esp, 8
sti
iret
Code: Select all
gdt_set_2:
mov eax,[esp+4]
lgdt [eax]
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
jmp 0x08:.flush
.flush:
ret
Code: Select all
00044166318e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x08)
00044166318e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x0d)
00044166318e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x08)
00044166318e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
00097560109e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x20)
00097779809e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x20)
one last thing, in bochs how to know that contents of stack. i have a doubt that i might have some stack problem or so because i felt that the values i gave for gdt descriptors was proper.