Unreal mode!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
KieranFoot

Unreal mode!

Post by KieranFoot »

Would anyone recomend using unreal mode.
As iunderstand it its real mode but with all the 32bit limits.
Am I right? So you can use real mode programming with 32bit values??? :o
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Unreal mode!

Post by Pype.Clicker »

unreal mode is recommended in the two following cases :
1. you're trying to extend a legacy 16-bits DOS program so that it can deal with larger datas and neither vm86, nor xms is suitable for your needs
2. you're trying to load something that will run in 32 bits mode and which is larger than 640Kb (so you cannot load it in conventionnal memory) and you don't want to bother with a disk driver called from pmode yet, and you do not wish to switch between real and protected mode for copying chunks from the conventionnal memory buffer to the high memory areas ...

basically, unreal mode consist of breaking the '64Kb' limit of real mode segments, but still keeping 16 bits instruction and segment*16+offset address formation.
ASHLEY4

Re:Unreal mode!

Post by ASHLEY4 »

As i understand it you can use up to 4gb for data in unreal mode,but the code must fit in 64k.
Is that right ? .
ASHLEY4.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Unreal mode!

Post by Pype.Clicker »

not exactly. The rules for the code are the same as in real mode. So you can actually have up to 640Kb of it provided that you have far call/returns ... but that usually gives programmer headaches ...
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Unreal mode!

Post by bubach »

not with asm.. :-)
then it?s quite hard to fill up 640 kb
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply