I am trying to make an IDT, but when i trigger an interrupt it goes to a location i don't know. I am in 32-bit protected mode using and i am using QEMU.
I have created only one entry for the moment, the entry #0 (Divide Error) and i am trying to trigger it with int 0x0
main.s
_start:
lidt [idt_descriptor]
sti
int 0x0
hlt
Interrupt Descriptor Table
idt_descriptor:
dw idt_end - idt_start - 1
dd idt_start
idt_start:
dw isr_0
dw 1 ; The code segment is 1
db 0
db 10001111b
dw 0
idt_end:
Interrupt Service Routine for Interrupt #0
isr_0:
mov eax, string
call kprint
iret
string: db "Inside ISR", 0
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745592505a4634918.html
评论列表(0条)