Page 2 of 2
Re:Getting into Protected Mode from GRUB
Posted: Sun Feb 06, 2005 12:07 am
by Crazed123
I checked the FPC website. It says that I've got everything needed for a custom RTL.
Re:Getting into Protected Mode from GRUB
Posted: Mon Feb 07, 2005 5:00 am
by Pype.Clicker
might it just be that your .BSS section is not filled with zeroes by the loader ? such strange things occur in that case.
Re:Getting into Protected Mode from GRUB
Posted: Mon Feb 07, 2005 3:03 pm
by Crazed123
OK, here's something. After the code goes through the initialization of units that is inserted by the compiler, it for some reason goes straight into the finalization included by the compiler, skipping my actual OS code completely. Thus, SYSTEM_FINALIZE calls FPC_FINALIZE, which for some reason calls SYSTEM_VARIANT_CLEAR passing nil as the only parameter on eax. It then moves the nil into edx and does a call edx, resulting in a jump to address 0 and the lock prefix crap.
By the way, how do I make it zero out my stack in the .bss section?