Code: Select all
;interrupt 0
dw 0x0000
dw 0x10
dw <memory location of isr0>
dw 0x20EDIT: Or even better, is there a way to do it in c?
Code: Select all
;interrupt 0
dw 0x0000
dw 0x10
dw <memory location of isr0>
dw 0x20Code: Select all
; initialize interrupt 0 descriptor
mov eax, isr0 ; without the brackets, this moves the address into eax
mov [int0_descriptor], ax ; save lower half of offset value
shr eax, 16
mov [int0_descriptor + 6], ax ; save upper half of offset value
<additional code>
isr0:
<code>
iret
<more code and data>
;interrupt 0
int0_descriptor:
dw 0x0000 ; lower half of offset
dw 0x0001 ; segment selector
db 0x00 ; dword count
db 0x0E ; P/DPL/DT/type
dw 0x0000 ; upper half of offset