How to set address of the interrupt handler
Posted: Mon Aug 18, 2003 11:00 pm
I'm writing a protected mode os. I've jumped into the protected mode. I have planned to write the interrupts now. I have written an interrupt handler and i'm struck with how to assign the address of the handler in the IDT, since, the offset0_15 and offset16_31 are to be assigned seperately. I have given the coding.
idt:
offset0_15 dw ?
selector0_15 dw 08h
zero_byte db 0
iflags db 8eh
offset16_31 dw ? ; how to assign
idt_end:
Consider this as an interrupt handler.
demo_int:
mov ax, 10h
mov ds, ax
mov ss, ax
mov esp, 090000h
mov byte [0xb8000], 'A'
mov byte [0xb8001], 1Bh
iretd
And another question is what is the second word selector0_15 called ? Please help me out of this two problems.
Thank you.
idt:
offset0_15 dw ?
selector0_15 dw 08h
zero_byte db 0
iflags db 8eh
offset16_31 dw ? ; how to assign
idt_end:
Consider this as an interrupt handler.
demo_int:
mov ax, 10h
mov ds, ax
mov ss, ax
mov esp, 090000h
mov byte [0xb8000], 'A'
mov byte [0xb8001], 1Bh
iretd
And another question is what is the second word selector0_15 called ? Please help me out of this two problems.
Thank you.