Code: Select all
mov eax, offset1_0
mov ebx, _isr0
mov edx, 32
.isr_setup:
mov [eax], bx
add eax, offset2_0 - offset1_0
mov ecx, ebx
shr ecx, 16
mov [eax], cx
add eax, offset1_1 - offset2_0
add ebx, _isr1 - _isr0
dec edx
jnz .isr_setup
mov eax, offset1_32
mov ebx, _irq0
mov edx, 16
.irq_setup:
mov [eax], bx
add eax, offset2_32 - offset1_32
mov ecx, ebx
shr ecx, 16
mov [eax], cx
add eax, offset1_32 - offset2_31
add ebx, _irq1 - _irq0
dec edx
jnz .irq_setup
lidt [idt_pointer]
But when I test it I get this in my IDT:
Code: Select all
Interrupt Descriptor Table (base=0x000000000010061e, limit=383)
IDT[0x00]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x01]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x02]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x03]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x04]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x05]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x06]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x07]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x08]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x09]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0a]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0b]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0c]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0d]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0e]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x0f]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x10]=32-Bit Interrupt Gate target=0x002a:0x00000000, DPL=0
IDT[0x11]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x12]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x13]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x14]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x15]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x16]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x17]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x18]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x19]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1a]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1b]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1c]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1d]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1e]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x1f]=32-Bit Interrupt Gate target=0x0008:0x00000000, DPL=0
IDT[0x20]=32-Bit Interrupt Gate target=0x0008:0x00100203, DPL=0
IDT[0x21]=32-Bit Interrupt Gate target=0x0008:0x0010020a, DPL=0
IDT[0x22]=32-Bit Interrupt Gate target=0x0008:0x00100211, DPL=0
IDT[0x23]=32-Bit Interrupt Gate target=0x0008:0x00100218, DPL=0
IDT[0x24]=32-Bit Interrupt Gate target=0x0008:0x0010021f, DPL=0
IDT[0x25]=32-Bit Interrupt Gate target=0x0008:0x00100226, DPL=0
IDT[0x26]=32-Bit Interrupt Gate target=0x0008:0x0010022d, DPL=0
IDT[0x27]=32-Bit Interrupt Gate target=0x0008:0x00100234, DPL=0
IDT[0x28]=32-Bit Interrupt Gate target=0x0008:0x0010023b, DPL=0
IDT[0x29]=32-Bit Interrupt Gate target=0x0008:0x00100242, DPL=0
IDT[0x2a]=32-Bit Interrupt Gate target=0x0008:0x00100249, DPL=0
IDT[0x2b]=32-Bit Interrupt Gate target=0x0008:0x00100250, DPL=0
IDT[0x2c]=32-Bit Interrupt Gate target=0x0008:0x00100257, DPL=0
IDT[0x2d]=32-Bit Interrupt Gate target=0x0008:0x0010025e, DPL=0
IDT[0x2e]=32-Bit Interrupt Gate target=0x0008:0x00100265, DPL=0
IDT[0x2f]=32-Bit Interrupt Gate target=0x0008:0x0010026c, DPL=0
Any body know what I'm doing wrong?
Thanks in advance,
Jules
P.S. sorry for the incoherent post...
edit: removed accidental add on at the end...