Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
in my opinion that all should work, but bochs seems to look different at things ..
would be nice if someone can have a look at the following code. It always ends with int 13. I can't see any errors, compiles fine and runs until i press a key.
i don't see 'irq00' anywhere. chances are that there's a bug in your handler which raises the General Protection Failure as soon as an interrupt arise.
If i can suggest, binary bits for PIC setting are not that much readable
also, for non-hardwired 8259 implementations, the ICW4 should not be "1" but 9 on the slave and 0xd on the master (though that might not be relevant for this problem).
hm, i've changed it, but its the same error as before.
init_the_pic is a function from another os of me, it worked fine when used there. The new function is:
You're telling the processor your IDT table is only 256 bytes long -- that's only enough for your first 32 vectors, vector 0 - vector 0x1F. As soon as you get an interrupt that needs vector 0x20, this will crash.
This is not directly related, but another oddity in your code:
Is there some reason you're only allocating space for vectors 0 through 0xFE? You'd need to declare the array as having 256 members if you want to handle all possible interrupts, including INT 0xFF.
Heh, yeah, big freaking errors in your logic are easy to spot. It's that one little slightly off value or misplaced comma that leaves you beating your head against the monitor for days...