Re: I need help figuring out how to link my program/os
Posted: Fri Jun 02, 2023 6:18 pm
Neither of those are correctly aligned. (Correctly aligning your stack probably won't fix the problem, but it won't hurt.)SomeGuyWithAKeyboard wrote:The bootloader sets the stack at 0x2FFFF for now. It seems like setting the stack at 0x1FFFF makes it successfully boot up a little more often when done on real hardware instead of crashing before it finishes starting up.
How much data are you dynamically allocating, anyway? That's an unusually large stack for a kernel.
Are you switching between real mode and protected mode? Have you enabled the A20 line? Do you have exception handlers?SomeGuyWithAKeyboard wrote:On my 486 motherboard it freezes, on anything more advanced than that, it causes a reboot.
Your cross-compiler shouldn't provide any files named io.h. Are you sure you're using the right kind of cross-compiler?SomeGuyWithAKeyboard wrote:the cross compiler's io.h
I'll be back later to take a better look at this.SomeGuyWithAKeyboard wrote:Here is a link to my project on github: https://github.com/Xeraster/SimpleProtectedModeOS