Hey Guys,

Please help me. I have been trying to code this from the past 2 years.

I wish to code the Flat real mode by switching to Protected mode and then switch back to the real mode. I want to do this on a P4 1.8GHz Machine with a Intel 845GVSR mother board. I also wish to do this without using the DOS memory managers(Himem.sys or others).

The code made by me halt the machine. Please provide me some alternative to do this. Please I am desparate. Please let me know the code either in C or in Nasm.

you can't use flat memory model in real mode because segmentation is different. You can use a dos extender, such as Pharlap, that switches back and forth between real and protected mode, but your flat memory model program runs in protected mode, not real mode. The dos extender switches to real mode in order to service real mode interrupts, such as incoming data on serial ports and network cards.

10 years ago there were several brands of dos extenders, but I don't know if any of them exist today.

I am actually making an Operating system. That is why DOs extender is of no use to me.

Please advice me accordingly.

Thank you very much for your the links and suggestion but I have already been through that webpage and it is not working.

Try this link it includes asembly code on how to swap into flat real mode (aka. unreal mode)

http://www.assembly.happycodings.com/code54.html

I have not tried it out myself but i will be eventuly. Same as you i am writing an operating system. The Curent name of it is Pelos.
I am going to use this code cause my current plan is that programs are loded into memory.

perlpower
PELOSĀ©
Poke Execute Lowlevel Operating System

Re: 32 BIt Flat Real mode
Jan 27th 2006, 09:48 AM

Let sleeping threads lie.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.