I have become stumped on the IDT/ISR implementation. All source code is available here:
http://code.google.com/p/scorchos/sourc ... es/lantern
I have gone through the code within idt.bi and isr.bi eliminating all syntax errors (I discovered a rogue 'ret' statement in some inline assembly which was causing my test virtual machine to reset constantly for instance!).
Within the ISR I have broken down the ASM source for the ISRs you see in the bkerndev tutorial into FreeBASIC subroutines containing inline assembly followed by a call to a subroutine named 'isr_common_stub()' (containing yet more inline ASM). Could this potentially be the issue? (I am swotting up a bit on my ASM knowledge just in case!). Other than that I can't see what is wrong with the IDT/ISR code - I have an implementation for the structure of a stack frame and both an IDT entry and IDT pointer. The IDT loads successfully into 'lidt'.
The reason I know my IDT implementation doesn't work is because I have tried using:
Code: Select all
Dim i As Integer = 1
i = 1/0 'This should cause a div/0 error and trigger the relevant interrupt!
If anyone has a few moments spare to take a look at this code I would very much appreciate that. I will post any further developments here to try and eliminate further issues.