最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

assembly - CPU jumping in garbage after interrupt - Stack Overflow

programmeradmin3浏览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
发布评论

评论列表(0)

  1. 暂无评论