admin管理员组文章数量:1023867
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
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
本文标签: assemblyCPU jumping in garbage after interruptStack Overflow
版权声明:本文标题:assembly - CPU jumping in garbage after interrupt - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745592504a2157973.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论