Posted: Tue May 27, 2008 7:46 am
Well you got at least one thing wrong: Unreal mode is still 16 bit, and code is therefore also limited to 16-bit based addresses. Hence all code goes below the 1M and must still be 16-bit.
The Place to Start for Operating System Developers
http://f.osdev.org/
Apologies for that. That was my mistake early on in the thread (I did mention that real mode et al is not my area of expertise... )Combuster wrote:Well you got at least one thing wrong: Unreal mode is still 16 bit, and code is therefore also limited to 16-bit based addresses. Hence all code goes below the 1M and must still be 16-bit.
GCC can only produce binaries that use a flat address space, but if you set your segments to 0 and use unreal mode that shouldn't be a problem. I'm not sure though whether GCC can output real mode code.indiocolifa wrote:Also I wonder if GCC can generate suitable executables for non-protected mode 32-bit binaries.
I understood that, I interpret it's related to program execution still pointed by CS:IP and not CS:EIP. So kernel cannot be loaded at > 1MB. Mmm, maybe I can put all data above 1MB, e.g a file system cache, and leave code in the lower 640KBs.Combuster wrote:Well you got at least one thing wrong: Unreal mode is still 16 bit, and code is therefore also limited to 16-bit based addresses. Hence all code goes below the 1M and must still be 16-bit.