Page 2 of 2

Posted: Tue May 27, 2008 7:46 am
by Combuster
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.

Posted: Tue May 27, 2008 7:49 am
by JamesM
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.
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... ;) )

Re: Asking further directions

Posted: Tue May 27, 2008 7:49 am
by jal
indiocolifa wrote:Also I wonder if GCC can generate suitable executables for non-protected mode 32-bit binaries.
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.

As for one of your original questions on making a 16 bit real mode OS, there's already one created relatively recently: MikeOS.


JAL

Posted: Tue May 27, 2008 8:38 am
by indiocolifa
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.
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.

Well, research continues...

Posted: Wed May 28, 2008 1:16 pm
by indiocolifa
After some research I think I'll be better with Protected Mode or 64-bit Long mode. Using unreal mode limits my code to 64KB and you can't even play with that limitation because can't touch the segment registers without returning to plain 16-bit RM.

I've ordered the IA32 Manuals, yesterday arrived (wow!) for free ... Thanks Intel!

Looked at the basic architecture and IA32 System Programming, and seems that 64-bit Long Mode is a more polished environment than the 32-bit P/M. Anyone tried 64-bit development?

thanks.