How do you know if a 16-bit DOS application uses EMS?

28 views
Skip to first unread message

DOS Guy

unread,
Nov 22, 2012, 9:06:19 AM11/22/12
to
Microsoft has issued some updates recently (KB2724197) that prohibit the
use of EMS memory for 16-bit applications in Windows XP SP3.

I was wondering if there's a way to know if any given 16-bit app uses
EMS.

What are the distinguishing characteristics of such apps? Lots of
memory use?

Jim Leonard

unread,
Nov 23, 2012, 6:11:35 PM11/23/12
to
On Nov 22, 8:03 am, DOS Guy <D...@Guy.com> wrote:
> Microsoft has issued some updates recently (KB2724197) that prohibit the
> use of EMS memory for 16-bit applications in Windows XP SP3.
>
> I was wondering if there's a way to know if any given 16-bit app uses
> EMS.

The only way I can think of is to disassemble it and look. A shortcut
would be to search for any int 67h (EMS) calls, so searching the
binary for the hexidecimal sequence "CD 67" might help. (For example,
if CD 67 is definitely not found, the program definitely doesn't use
EMS.)

Robert AH Prins

unread,
Nov 23, 2012, 9:52:19 PM11/23/12
to
Unless it uses self-modifying code...

Robert
--
Robert AH Prins
robert(a)prino(d)org

Marcus Houlden

unread,
Nov 23, 2012, 11:16:56 PM11/23/12
to
On Thu, 22 Nov 2012 09:06:19 -0500, DOS Guy <D...@Guy.com>
wrote the following to comp.os.msdos.misc:
You can install DOS quite nicely on Virtual PC under XP with whatever XMS or
EMS config you want:
http://www.microsoft.com/windows/virtual-pc/support/virtual-pc-2007.aspx

From a DOS point of view it is a completely self-contained machine and when
I played with it I had to boot it from a physical floppy disk (once I found
one that still works) and run FDISK to install a file system on the virtual
hard disk image.

DOSBox (http://www.dosbox.com/) works pretty well with some of my old games.
(makes a mental note to try Doom on an HTPC connected to a 40" TV)



mh.
--
http://www.nukesoft.co.uk
http://personal.nukesoft.co.uk

From address is a blackhole. Reply-to address is valid.

Rod Pemberton

unread,
Nov 24, 2012, 4:07:12 AM11/24/12
to
"DOS Guy" <D...@Guy.com> wrote in message news:50AE315B...@Guy.com...
> Microsoft has issued some updates recently (KB2724197) that prohibit
> the use of EMS memory for 16-bit applications in Windows XP SP3.
>

There is a thread on the issue here:
http://www.bttr-software.de/forum/forum.php

It's not all that informative, IMO.

This link to EMS Magic was posted in a response by Rugxulo:
http://www.emsmagic.com/

> I was wondering if there's a way to know if any given
> 16-bit app uses EMS.
>

Do you mean uses *only* EMS?

Personally, I'd be a bit surprised if you find an EMS-only application
anymore. For RM MS-DOS, I haven't had an EMS provider installed for many
years ... It's likely that any EMS applications that are still in use, are
still in use because they can also use XMS, DPMI, or VCPI instead of EMS.

Will MS-DOS warn that no EMS is available if starting an
EMS-only application? Anyone know? Or, is it the application that
warns if it needs EMS and can't get any?

I'd think that you'd want an EMS host that can be directed to emit
diagnostic messages ... or a TSR that detects EMS calls and displays
messages.

> What are the distinguishing characteristics of such apps?
> Lots of memory use?

Most likely they were written for the 286 ... I doubt that helps any.

Japheth's Jemm readme says it includes his EMSSTAT.
http://www.japheth.de/Jemm.html

I doubt that helps much either. It can be used to tell you if EMS is
available. I.e., REM out your EMS provider in config.sys or autoexec.bat.
Re-boot. Use EMSSTAT to tell you that no EMS is available. Then, execute
or run your application. If it truly is EMS-only, then hopefully either the
application or DOS will warn that there is no EMS.


Rod Pemberton



Ross Ridge

unread,
Nov 24, 2012, 3:30:28 PM11/24/12
to
Jim Leonard <moby...@gmail.com> wrote:
>The only way I can think of is to disassemble it and look. A shortcut
>would be to search for any int 67h (EMS) calls, so searching the
>binary for the hexidecimal sequence "CD 67" might help. (For example,
>if CD 67 is definitely not found, the program definitely doesn't use
>EMS.)

Programs that use EMS are supposed to search for the string "EMMXXXX0"
before calling INT 67h, so that maybe more reliable search term. I do
remember at least one application that called INT 67h without checking for
that string, and crashed as result if an EMS driver hadn't been installed.

As for what applications require EMS (asked elsewhere in this thread),
a fair number of MS-DOS games would either not run without it or not be
fully functional (eg. no sound).

Ross Ridge

--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rri...@csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //

Adam Wysocki

unread,
Nov 26, 2012, 4:10:15 AM11/26/12
to
In comp.os.msdos.programmer Jim Leonard <moby...@gmail.com> wrote:

> (For example, if CD 67 is definitely not found, the program definitely
> doesn't use EMS.)

It can use pushf and a far call instead.

AW

Ivan Shmakov

unread,
Nov 26, 2012, 11:06:12 PM11/26/12
to
>>>>> Marcus Houlden <sp...@nukesoft.co.uk> writes:

[Replacing news:*.programmer with news:alt.games.doom,
news:alt.games.doom.ii in Followup-To:.]

[...]

> DOSBox (http://www.dosbox.com/) works pretty well with some of my old
> games. (makes a mental note to try Doom on an HTPC connected to a
> 40" TV)

Given that the Doom engine was ported to every other system (and
every other graphical resolution) out there, including ports
utilizing OpenGL, etc., I doubt that running it under DOSBox is
entirely reasonable.

--
FSF associate member #7257

Jim Leonard

unread,
Nov 29, 2012, 3:04:53 PM11/29/12
to
On Nov 26, 3:10 am, g...@somewhere.invalid (Adam Wysocki) wrote:
> In comp.os.msdos.programmer Jim Leonard <mobyga...@gmail.com> wrote:
>
> > (For example, if CD 67 is definitely not found, the program definitely
> > doesn't use EMS.)
>
> It can use pushf and a far call instead.

Only if it is trying to hide that it uses EMS, and I can't imagine a
programmer intentionally doing that.

Searching for CDh 67h will find nearly all use cases (and some false
positives).

Richard Bonner

unread,
Dec 19, 2012, 7:37:15 AM12/19/12
to
Rod Pemberton (do_no...@notemailnotz.cnm) wrote:

> "DOS Guy" <D...@Guy.com> wrote in message news:50AE315B...@Guy.com...
> > Microsoft has issued some updates recently (KB2724197) that prohibit
> > the use of EMS memory for 16-bit applications in Windows XP SP3.
> > I was wondering if there's a way to know if any given
> > 16-bit app uses EMS.

*** When you try to run it, a message will likely appear stating that
the program may not run properly. What might then happen is that it will
use the hard disc as "memory", but that typically means a slowly running
program. )-:


> Will MS-DOS warn that no EMS is available if starting an
> EMS-only application? Anyone know? Or, is it the application that
> warns if it needs EMS and can't get any?

*** Both may happen depending on the sophistication of the program. If
it's an older one, it may be set up to use lower memory and/or the hard
disc if no EMS is available.


> > What are the distinguishing characteristics of such apps?
> > Lots of memory use?

> Most likely they were written for the 286 ... I doubt that helps any.
>

> Rod Pemberton

*** Actually, many DOS apps used EMS well into the 1990s and beyond.
However, these also typically could use XMS as well. As an extreme
example, ANSIPLUS can load drivers into EMS and my version (4.06) has a
date of 2007.
--
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
Reply all
Reply to author
Forward
0 new messages