I Can't Get Interrupts Working: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
Added an issue that I was stuck with. I totally overlooked the long jump part which costed me a bit of time.
Line 40: Line 40:
outb(0xa1,0xff);
outb(0xa1,0xff);
enable(); // asm("sti");
enable(); // asm("sti");
</source>

=== I'm receiving a General Protection Fault interrupt immediately after returning from my first interrupt ===

After initializing the gdt with the lgdt command, make sure that you are performing a long jump. For example:

<source lang="asm">
init_gdt:
lgdt [gdt_table]
jmp 0x08:longjmp_after_gdt
longjmp_after_gdt:
; Do something like repoint segment registers next
</source>
</source>