Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; irq.s
- ; The IRQ and ISR code must be setup in Assembly before it can be used in C
- ; because the C compiler doesn't understand that the registers and stack are
- ; required to be preserved between the asm statements and it will corrupt the stack.
- global kb_isr
- global idt_load
- ; Keyboard ISR handler
- extern kb_isr_handler
- ; idt_load is defined in irq.s and loads the IDT.
- idt_load:
- mov edx, [esp + 4]
- lidt [edx]
- sti
- ret
- kb_isr:
- pushad
- cld
- call kb_isr_handler
- popad
- iretd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement