Posted: Wed Mar 07, 2007 2:37 pm
Assuming everything is OK, it could be that the compiler used renders wrong addresses and writes to any location other than the intended one.
First, I wasn't able to read the contents of the floppy once I removed it and put it in again. Maybe there's something wrong with the floppy MBR.
Other thing that I did was to remove the code from kernel that executes LGDT and kept interrupts enabled. I loaded it alternatively without GRUB by jumping directly into 8:101030
It gave me a message like:
At least it responded to interrupts and printed a message. If i had loaded the GDT it had directly restarted without messages.
I also have attached an image of the original sample disk. The only thing I did was to copy your original KERNEL.EXE and add a boot entry that says "MSVC Kernel". Everything else from that image is unchanged.
But it will give you a message like:
That's why I assume that the compiler used rendered wrong code for building the GDT and probably other parts, because by not loading it, at least it gives a "Division By Zero" message which tells us that it indeed responded to interrupts.
First, I wasn't able to read the contents of the floppy once I removed it and put it in again. Maybe there's something wrong with the floppy MBR.
Other thing that I did was to remove the code from kernel that executes LGDT and kept interrupts enabled. I loaded it alternatively without GRUB by jumping directly into 8:101030
It gave me a message like:
Code: Select all
Whoops! System Halted!
Division By Zero
At least it responded to interrupts and printed a message. If i had loaded the GDT it had directly restarted without messages.
I also have attached an image of the original sample disk. The only thing I did was to copy your original KERNEL.EXE and add a boot entry that says "MSVC Kernel". Everything else from that image is unchanged.
But it will give you a message like:
Code: Select all
Whoops! System Halted!
General Protection Fault
That's why I assume that the compiler used rendered wrong code for building the GDT and probably other parts, because by not loading it, at least it gives a "Division By Zero" message which tells us that it indeed responded to interrupts.