Page 1 of 1

unreal mode

Posted: Fri Nov 01, 2002 2:49 am
by neowert
Is there a way to get code above 1 megabyte in unreal mode? Because it uses the IP register, it cant exceed 1 meg. is there a way to read above that?

Re:unreal mode

Posted: Fri Nov 01, 2002 6:37 am
by Tim
No.

Think about it: unreal mode is real mode but with the data descriptors extended to 4GB. The processor enters protected mode when you reload CS with CR0.PE set; therefore, if you want 4GB of code, you have to use full protected mode.

Re:unreal mode

Posted: Fri Nov 01, 2002 8:20 am
by Paul
What is the reason why PC architecture is so screwy? Is it because they still want to support really old software?? Why do we even need real mode anymore? It would be nice if the computer ran only in protected mode and all devices that came out from now on were made for 32-bit protected mode so you could access their interrupts (instead of writing your own.)

I started ti write my OS in unreal mode but quickly decided I better use full protected mode. In unreal mode, you have to swap code in and out of the first megabyte in order to use more than what is in the first megabyte. Not only that, but..... multitasking?

Re:unreal mode

Posted: Fri Nov 01, 2002 11:41 am
by Tim
Paul wrote:What is the reason why PC architecture is so screwy? Is it because they still want to support really old software??
Basically, yes.
Why do we even need real mode anymore? It would be nice if the computer ran only in protected mode
So ignore the BIOS, get a boot loader which puts you in 32-bit protected mode, and ignore real mode.
and all devices that came out from now on were made for 32-bit protected mode so you could access their interrupts (instead of writing your own.)
Not sure what you mean here -- how do you make hardware for 32-bit protected mode? For example, a lot of PCI devices don't even need to run on a PC, let alone in real mode. Maybe you're suggesting that all hardware should come with generic drivers.
I started ti write my OS in unreal mode but quickly decided I better use full protected mode. In unreal mode, you have to swap code in and out of the first megabyte in order to use more than what is in the first megabyte. Not only that, but..... multitasking?
Yep, unreal mode is definitely not worth the effort. Protected mode is the best way to go.

Re:unreal mode

Posted: Fri Nov 01, 2002 12:46 pm
by .bdjames
Unreal mode allows you to load the kernel, ...
above 1 mb using the bios, even 16mb