flat assembler
Message board for the users of flat assembler.

flat assembler > DOS > How to use EMS memory or DOS Extenders ?

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
A$M



Joined: 29 Feb 2012
Posts: 94
I want to learn how I can access more than 1 MB of memory using EMS. Can someone teach me? I don't understand about it. Smile
Post 04 Feb 2013, 13:11
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
Do you really want to use hardware EMS on 8086 ??? Confused

In any other case, use XMS (RTFS: see FASM source), or brew a 32-bit DOS app (see FAQ on the top and examples).
Post 04 Feb 2013, 14:12
View user's profile Send private message Reply with quote
A$M



Joined: 29 Feb 2012
Posts: 94
I want the fastest. EMS, XMS, a 32-bit protected mode program or DPMI (like FASM)?
Post 04 Feb 2013, 17:22
View user's profile Send private message Reply with quote
ASM-Man



Joined: 11 Jan 2013
Posts: 65
Uau,entende isso?
Post 04 Feb 2013, 18:31
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 21:44; edited 1 time in total
Post 04 Feb 2013, 19:01
View user's profile Send private message Reply with quote
A$M



Joined: 29 Feb 2012
Posts: 94
Question Question Question What's the better? XMS, EMS, Protected Mode or DPMI?
"Obrigado" Wink
Post 05 Feb 2013, 13:03
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
A$M wrote:
I want the fastest. EMS, XMS, a 32-bit protected mode program or DPMI (like FASM)?

The fastest would be 32bit (or 64bit) ring0 code with manual memory management... but that's only viable if you do bare-metal programming.

IMHO just go for a DOS extender and use it's API - you're unlikely to see much of a speed difference anyway, and the DOS extender can select between ring0+manual, DPMI/VCPI client, whatever Smile

_________________
Image - carpe noctem
Post 05 Feb 2013, 15:48
View user's profile Send private message Visit poster's website Reply with quote
A$M



Joined: 29 Feb 2012
Posts: 94
So, how to use DPMI? (The simplest way)
Post 05 Feb 2013, 18:22
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
A$M wrote:
So, how to use DPMI? (The simplest way)

HX - http://www.japheth.de/ Smile

_________________
Image - carpe noctem
Post 05 Feb 2013, 18:38
View user's profile Send private message Visit poster's website Reply with quote
A$M



Joined: 29 Feb 2012
Posts: 94
Thinking better: how to use EMS or XMS on DOS or Windows?
Post 05 Feb 2013, 19:05
View user's profile Send private message Reply with quote
iz56



Joined: 17 Jun 2011
Posts: 7
Location: rus
Unreal mode is better.
Post 05 Feb 2013, 20:46
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
iz56 wrote:
Unreal mode is better.

Care to substantiate that?

_________________
Image - carpe noctem
Post 05 Feb 2013, 20:48
View user's profile Send private message Visit poster's website Reply with quote
iz56



Joined: 17 Jun 2011
Posts: 7
Location: rus
Easier.
Post 05 Feb 2013, 20:55
View user's profile Send private message Visit poster's website Reply with quote
iz56



Joined: 17 Jun 2011
Posts: 7
Location: rus
see FASM source old version (dos)
Post 05 Feb 2013, 20:56
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
iz56 wrote:
Easier.

Dunno if it's easier - rolling your own is some work, and if you're going to use somebody else's, you might as well use a full-blown extender, unless you have very specific reasons not to (learning project, 4k intro, ...).

Also, unreal/voodoo/big real/etc only works when run from real-mode, right? And only supports running your code from base memory, right? Using a DOS extender, you'll be able to handle a loaded EMS driver (through VCPI), to run under Windows and some other OSes (DPMI), from real mode, etc...

OK, so it's slightly more work calling DOS functions, but decent DOS extenders either translate the most common interrupt calls or offer a lightweight Win32 API translation layer.

But OK, if you're writing SMM code, it's probably not the worst mode to use Smile

Anyway, A$M: what's your goal? Accessing extended memory under DOS in a convenient way, or do something quirky to learn from the process?

_________________
Image - carpe noctem
Post 05 Feb 2013, 21:08
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
I written a true Dos extender, that runs on top of any Dos, that let you use all int 21h in PM giving you full 4 GB memory, it also lets you drop back to normal dos at any time.
Its got a fasm port and both cli and gui
The int 21h are the same as dos other than they use 32bit regs.

Image

Let me know if you want to try it.
Plus its only 55k in size.
Post 05 Feb 2013, 21:10
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
> So, how to use DPMI? (The simplest way)

Again, RTFF

PS: ???

> Thinking better: how to use EMS or XMS on DOS or Windows?

Thinking worse. Don't use EMS or XMS on Windows, learn WinAPI then.

Options:

* Brew your own non-DPMI Ring0 DOS extender (fastest, much work)
* Use an existing DOS extender (simplest, works in DOS)
* Brew a Win32 app working in both DOS (using HX) and Windows
* (bad) Brew a Win64 GUI app using latest API's ... not usable in DOS Sad
Post 06 Feb 2013, 06:47
View user's profile Send private message Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 203
f0dder wrote:
iz56 wrote:
Unreal mode is better.

Care to substantiate that?


Depends what you really need and what are you looking for. First of all some BIOSes and HIMEM.SYS leaves your system in unreal mode so on some configuration it's on by default but you still need to take care of cases when switching 3rd party applications are switching into PM so you need to have 0Dh INT handler to handle this properly. Within the handler you need to read PIC registers for checking if IRQ5 is not a true source of interrupt or you need to remap IRQ.

The biggest drawback of big flat mode / unreal mode are:
- forget about multitasking and especially running under Windows
- many DOS configuration are running in V86 mode due to memory manager

So unless you really need it PM DOS Extender that supports DPMI, VCPI and is DPMI host is the way to go in my opinion. Especially if you plan to use some multitasking environment. HX is a way to go with PharLap TNT extender second.
Post 06 Feb 2013, 07:45
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
> The biggest drawback of big flat mode / unreal mode are:
> - forget about multitasking and especially running under Windows

It's a feature Wink

> many DOS configuration are running in V86 mode due to memory manager

Don't use EMM386.
Post 06 Feb 2013, 07:59
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
DOS386 wrote:
* (bad) Brew a Win64 GUI app using latest API's ... not usable in DOS Sad

Speaking of which, do you know of any x64 DOS extenders? Personally don't see much use for it (and I guess at that complexity level, you're probably better off using some minimal OS kernel instead).

ACP: exactly - and when you need to do that extra work, unreal mode isn't that simple anymore... and still has a somewhat fragile feel to it. Btw, why PharLap as a second? Never used it, back then I thought DOS4G/W was king? And later, we got the free WDOSX extender?

DOS386 wrote:
Don't use EMM386.

Got an alternative for people who run applications that need EMS memory?
Post 06 Feb 2013, 12:48
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.