I have finally got my unREAL mode support routines for DOS to the quite stable state. The kelvar example, which works in this mode, has been updated on my website (also buggy keyboard controller support has been fixed, hope it works OK everywhere now), if anyone runs real mode DOS and want to try running that - please let me know how does it work and what processor you've got.
I have also made a special fasm version for DOS that runs in this mode (look in the attachment). On newer processors it doesn't matter, but on the older ones (especially 386s) this version should be noticeably faster. unREAL is much more tricky that FRM, so I don't give guarantees it'll run correctly on every system, please test it.
BTW, how many of you still do some DOS assembly programming (maybe I should make a poll)?
Posted on 2002-12-13 15:01:13 by Tomasz Grysztar

I still code in and for DOS a lot.. perhaps even more than in Winbloze.
Posted on 2002-12-13 16:01:41 by Maverick
Hi Privalov.

I have a question:

What is the difference between "unReal mode" and "Flat real mode"?

Regards.
Posted on 2002-12-14 05:56:56 by JohnFound
The unREAL mode executes 32-bit code, so you get rid of all those awful 66h and 67h prefixes you have when using FRM - which only allows you to access addresses above the 64K limit, but the code still has to be 16-bit.
The main trouble when switching into 32-bit code in real mode are the BIOS/DOS interrupts, because their code is still 16-bit and therefore your code would crash after the first "sti". I was trying different solutions to solve this problem, one (used in unREAL 0.9, old kelvar version were based on it) was to replace all interrupt handlers with the "universal" handlers that were able to detect whether current mode is 32-bit or 16-bit, switch into 16-bit mode if needed, and execute the original handler. But it was causing another problems, because some of the interrupt vectors are expected by BIOS/DOS to be pointers into some data, not the routines. The current solution (unREAL 1.0) no longer uses "universal" handlers, but is based on IDT moving (well, I'm still not sure whether it works on every IA32 processor).
Posted on 2002-12-14 07:52:28 by Tomasz Grysztar
Hello Privalov.

I am interesting about Unreal Mode,but the only informations that i have
about this is in Turbo Pascal and TASM.
Can you send an simple example,in FASM ?
I want to know how can i declare in fasm a struct of Global Descriptor Table(GDT),
how to load the GDT entry 0 (null segment) and entry 1 (segment 0,limit 4GB).

Thanks,Manos.
Posted on 2002-12-15 14:06:07 by Anonymous
Just look through my unREAL routines source in the "unreal.inc" file (you can get it from the fasm package attached above, or in the kelvar example on my website).
Posted on 2002-12-15 16:07:14 by Tomasz Grysztar