Dec 082017
 
Extend DOS memory past 640K, IF you have a EEMS or true EMS 4.0 Board.
File ADDRAM10.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Extend DOS memory past 640K, IF you have a EEMS or true EMS 4.0 Board.
File Name File Size Zip Size Zip Type
ADDRAM.ASM 15443 3437 deflated
ADDRAM.COM 1605 899 deflated
ADDRAM.DOC 20991 6343 deflated
EMSDATA.EXE 13164 7812 deflated
SUBRAM.ASM 7482 1968 deflated
SUBRAM.COM 676 515 deflated

Download File ADDRAM10.ZIP Here

Contents of the ADDRAM.DOC file























ADDRAM 1.0
Copyright (c) 1989 by Marty Del Vecchio


Adds memory to DOS using EMS 4.0 memory.


Based on the program EEMRAM
written by Chris Dunford








Table of Contents




I. What You Should Have 1

II. What the Program Does 1

III. What You Need 2

IV. How to Do It 3

V. Message Reported by Programs 4

A) ADDRAM 4
B) SUBRAM 5
C) EMSDATA 6

VI. Notices/Disclaimer 7

VII. Questions 7







I. What You Should Have


ADDRAM consists of six files:

1) ADDRAM.COM Program that uses EMS 4.0 memory to
extend DOS beyond 640K.
2) ADDRAM.ASM Assembly source for above.
3) SUBRAM.COM Program that undoes ADDRAM--it returns
DOS to 640K
4) SUBRAM.ASM Assembly source for above.
5) EMSDATA.EXE Program that gives information about the
EMS installed in your system.
6) ADDRAM.DOC This file--documentation.



II. What the Program Does

ADDRAM can increase the size of your DOS memory. DOS is
restricted to an arbitrary limit of 640K of memory. This is split up
into 10 segments (0 to 9) of 64K each, from address 0000 to 9FFF hex.
DOS can only handle one large contiguous memory block, and ordinarily
this block is 640K large.

This limit is arbitrary because of the placement of video buffers
immediately after the reserved DOS space. The EGA/VGA graphics buffer
is located at A000. The monochrome text buffer is at B000, and the
CGA/EGA/VGA text buffer is at B800. Thus, if you are using a mono
card, then there is 64K of address space available right at the end of
DOS that should be added to DOS.

However, the DOS limit is widely known as 640K, and there are very
few memory cards designed to put memory at these locations for use by
DOS. However, expanded memory cards that conform to the EEMS (Enhanced
Expanded Memory Specification) standard from AST have the ability to
map memory at virtually any location in the PC's address space. Chris
Dunford wrote a program called EEMRAM (EEMRAM11.ARC) that mapped EEMS
memory at the unused video buffers and added it to DOS.

When EMS 4.0 was introduced, it was a combination of "normal" EMS
3.2 (the type of memory provided by the Intel Above Board, for example)
and "enhanced" EMS (AST's memory cards). Part of the EMS 4.0 spec says
that cards may be able to map memory at different locations in the PC
address space, just like EEMS cards. This program is designed for EMS
4.0 cards that can do this.

However, it must be noted that this capability is an OPTION in the
EMS 4.0 spec. Thus, there are expanded memory cards that are
advertised as "EMS 4.0" cards. However, because they cannot map memory
wherever it is needed, they are insufficient for the purposes of this
program. For this program, you need a "true" EMS 4.0 card. For more

Page 1






particulars, see below.




















































Page 2






III. What You Need

ADDRAM is designed to extend DOS beyond 640K whenever possible,
using EMS 4.0 memory. It does this by addressing EMS memory into
unused video buffer memory. ADDRAM can only increase DOS' memory size
under certain conditions:

1) You must already have exactly 640K of DOS memory installed.
No more, no less.

2) The machine MUST have an EMS 4.0 memory card that can map
expanded memory into the A000 and B000 segments, where video
memory is located. The vast majority of EMS cards available
cannot do this, because they were designed prior to the
release of the EMS 4.0 specification. This program requires
functions found in EEMS cards, and NEWLY-DESIGNED EMS 4.0
cards. Many EMS cards are sold today as "EMS 4.0" capable
that cannot perform all of the EMS 4.0 functions needed for
this particular purpose.

The following paragraphs represent my personal experience in
working with memory cards, and their fitness for a particular
purpose. This should not be interpreted as a general view of
the cards discussed--this is only a discussion of their
suitability for use by ADDRAM.

All of the AST Rampage products (Rampage 286, Rampage 286
Plus, etc.) have the required capability, since they are true
EEMS/EMS 4.0 cards. However, you need to get the EMS 4.0
driver from AST for these products--ADDRAM does not work with
a plain EEMS driver. If you only have the old EEMS driver,
use EEMRAM11.ARC by Chris Dunford.

The Intel Above Board products (Above Board, Above Board
Plus) do not have the capability needed by ADDRAM. The Above
Board is an old-style EMS card, and the new Above Board Plus
is prohibited from addressing memory in the A000 and B000
segments to prevent conflicts with video memory. Thus, they
cannot be used by ADDRAM to add memory to DOS.

The Charge Card from All Computers, Inc. can be used. Use
the device driver "ALLEMM4.SYS" included on the ALL disks.

QEMM from Quarterdeck and 386 to the Max from Qualitas can
also be used, but they can automatically add memory to DOS if
requested. This program should be unnecessary if you have
either of these products or a similar product.

The program EMSDATA.EXE, included here, can help you
determine if your EMS card can be used.

3) There must be unused memory starting at segment A000. If you

Page 3






have an EGA or VGA system, you cannot add memory to DOS
unless you use the All Charge Card. This is because EGA/VGA
cards use the A000 segment for high resolution graphics video
buffers, and thus the EMS card cannot address memory there.

If you have the Charge Card, and you do not use your EGA/VGA
in graphics mode, but only in text mode, you can overcome
this restriction by adding "i=A000-AFFF" to the command line.
This takes away the graphics buffer and gives it to DOS, and
thus any program that tries to use EGA/VGA graphics will
crash your system. It is up to you to decide if you want to
make this tradeoff. However, beware that some EGA cards use
the A000 segment even when not in graphics mode. You will
have to experiment with your particular card to see if this
space can be used. Such results cannot be guaranteed.

If you have a standard monochrome or Hercules monochrome
video card, then you can add 64K to DOS, for a total of 704K.
If you have a CGA system, you can add 96K to DOS, for a total
of 736K.



IV. How to Do It

First, you have to ensure that your card can map memory into the
A000 and B000 segments. Run the program EMSDATA.EXE to see if your EMS
card can currently do this. Some EMS software drivers (the driver you
load in CONFIG.SYS) must be explicitly told on their command lines that
they can use this memory for mapping.

For example, if you have a monochrome system and an AST Rampage
286, you have to add the following to your 'DEVICE = REMM.SYS' command
line: "/i=A000-AFFF". This tells the EMS driver that it is OK to
address memory into this region. If you have a CGA, you must specify
"/i=A000-B7FF". Run the program EMSDATA.EXE to determine if your EMS
driver can map memory into these locations--the last paragraph it
prints out deals with this matter.

Once you have ensured that the EMS card can map memory into the
video buffer space, you must run the program ADDRAM.COM. ADDRAM.COM is
the program that actually maps memory into the video buffer space and
tells DOS that it is there.

To run this program, just type 'ADDRAM' at the DOS prompt. It
will automatically add as much memory as possible, up to 96K, to DOS.
It will report on its success or failure. If you want to limit the
amount of memory added to DOS for some reason, you can do so by
specifying the maximum number of EMS pages (16K each) on the command
line. For example, to add only 32K of memory to DOS, you would type
'ADDRAM /2' on the command line.


Page 4






V. Messages Reported by Programs


A) ADDRAM

Here is a list of the messages reported by ADDRAM:

"Expanded Memory Manager not found--no EMS installed."

This message indicates that no expanded memory was found in your
system. If you have an EMS card in your machine, be sure to add
the device driver statement in your CONFIG.SYS file. See the
instructions that come with your EMS card to do this.

"Expanded Memory Manager reports an error."

This message indicates that the EMS software is in a state of
error. This may be a software or hardware error--run EMSDATA.EXE
to determine the cause. Because of this error, ADDRAM cannot add
memory to DOS.

"This program requires version 4.0 expanded memory."

As discussed above, the EMS driver must be version 4.0 or above.

"This program requires exactly 640K of installed DOS memory."

As discussed above, this program cannot be used if your machine
has more than 640K or less than 640K of DOS memory installed. If
you have more, then you don't need this program. If you have
less, then you should use your EMS card to backfill DOS to 640K.
To do this, see your EMS card's instruction manual.

"This program's memory allocation block is not the last
in DOS' chain. Cannot change memory of not at end."

This message indicates that the memory block allocated to ADDRAM
is not at the END of DOS. You might get this message if you try
to run ADDRAM from inside of another program, such as the DOS
shell of Lotus 1-2-3. If you get this message, exit the program
you are currently in and try again.

"Expanded Memory Manager cannot map memory at segment A000."

As discussed above, your EMS card must be able to map memory at
segment A000 in order for it to be added to DOS. This is because
DOS can only work with one large contiguous block of memory.

"Not enough expanded memory available."

If there is not enough expanded memory free, you will get this
error. If you are adding 64K to DOS, then you naturally need to

Page 5






have 64K of expanded memory available. Run the program
EMSDATA.EXE to determine the amount of free expanded memory.

"Error while mapping expanded memory at A000."

This message indicates that the EMS driver reported an error while
memory was being mapped at A000. This may be a hardware or a
software error--in any case, no memory can be added to DOS.

"Error assigning name to expanded memory handle."

Under EMS version prior to 4.0, a chunk of EMS memory was only
known by a number (known as a handle). With EMS 4.0, a program
can identify its chunk of memory with an 8-character name. ADDRAM
assigns the name "ADDRAM00" to its memory. This is so that SUBRAM
can later find it and deallocate it. This message indicates that
an error occurred wile assigning this name to the EMS memory. In
this case, no memory can be added to DOS.

"ADDRAM's name already in use by another handle."

This message indicates that another program has used the name
"ADDRAM00" for its EMS memory. In this unlikely case, no memory
can be added to DOS.

"XX KB memory successfully added to DOS."

This message indicates success. "XX" will be a number, either 16,
32, 48, 64, 80, or 96. This specifies the amount of memory added
to DOS. To verify that this is the case, run DOS' 'CHKDSK'
program. At the end it will report the amount of DOS memory.


B) SUBRAM

SUBRAM can be used to un-do the effects of ADDRAM. It will
restore DOS to 640K and release the expanded memory used. Here are the
messages returned by SUBRAM:

"Only 640KB DOS memory--no memory has been added by ADDRAM."

This message indicates that DOS is currently at 640K, and thus
ADDRAM has not been run successfully.

"Expanded Memory Manager not found--no EMS installed."

This message indicates that no EMS memory is installed in the
system, and thus ADDRAM was not run successfully.

"No memory has been added by ADDRAM."

This message indicates that, although EMS memory is present,

Page 6






ADDRAM has not been run successfully to add memory to DOS.

"This program's memory allocation block is not the last
in DOS's chain. Cannot change memory if not at end."

This message indicates that the memory block allocated to SUBRAM
is not at the END of DOS. You might get this message if you try
to run SUBRAM from inside of another program, such as the DOS
shell of Lotus 1-2-3. If you get this message, exit the program
you are currently in and try again.

"Error deallocating EMS memory."

This message indicates that an error occurred while SUBRAM was
freeing the EMS memory added by ADDRAM. This indicates a
malfunction in the EMS driver.

"DOS memory reset to 640KB, EMS memory freed."

This message indicates success--DOS was restored to 640KB, and the
EMS memory added by ADDRAM was freed for use by other programs.


C) EMSDATA

EMSDATA.EXE is designed to tell you about your current EMS
configuration. Just type 'EMSDATA' at the DOS command prompt. The
program's output is generally longer than one screen--you can pause it
by hitting Ctrl-S (the Ctrl key and the S key at the same time). You
can resume the program by hitting any other key.

This program will tell you numerous things about your EMS,
including the software version number, its current state, the EMS page
frame segment address (where application programs address EMS memory),
the total amount of EMS memory and amount of free EMS memory.

EMSDATA will also give a list of the allocated handles (blocks of
EMS memory in use by programs), the pages and bytes allocated to each,
and if the EMS is version 4.0 or higher, the name assigned to each
handle. It is rare for a program to assign a name to a handle, but
ADDRAM assigns the name 'ADDRAM00' to its handle.

EMSDATA will also give technical information about your EMS
hardware, include the raw page size (16KB is the standard EMS page
size, but some implementations have smaller sizes), total number of raw
pages, and number of free raw pages.

EMSDATA will report the number of "additional register sets."
This refers to the number of mappings the EMS hardware can keep track
of in addition to the current mappings. Multitasking programs such as
Desqview use alternate register sets for quick switching of tasks.
This is one way to tell if you have a true EMS 4.0/EEMS system. If

Page 7






this number is 0, then you most likely do not. If this number is
greater than 1, then you most likely do.

The context save area size refers to the amount of memory a
program must use to save the current page mapping context. Resident
programs that use EMS memory (such as Sidekick Plus, and RAM disks and
disk caches that uses EMS) must save the current context before using
their EMS memory. The smaller this area is, the faster they can
operate.

The number of DMA channels available on an EMS board can affect
its performance in copying memory from expanded to conventional memory.

The next paragraph printed by EMSDATA discusses whether or not
your EMS card has been used to backfill DOS to 640K. If it has, then
programs like Desqview can use this page size to multitask programs in.
If not, then Desqview cannot easily run multiple programs in expanded
memory in this manner.

The next paragraph (and chart) discuss the exact memory locations
at which your EMS card can and cannot address memory. The final
paragraph discusses whether or not your EMS card is currently capable
of mapping memory at segment A000, and thus whether it can potentially
be used by ADDRAM. Again, these values may be changed, depending on
your EMS card, by adding parameters to the device driver statement in
your CONFIG.SYS file. See your card's manual for more details.



VI. Notices/Disclaimer

This program is released to the public domain for free use by
anybody. However, it cannot be sold at any price.

The author, Marty Del Vecchio, hereby disclaims any warranties,
express or implied. This program is not guaranteed to work at all.
Its author cannot be responsible for any loss or any damage of any kind
resulting in its use. Use at your own risk.

All of the brand names used are trademarks and/or copyrights of
the appropriate companies.



VII. Questions

If you have any questions or bug reports, you can contact me at
home at (508) 820-1544. Or you can find me at the Channel 1 BBS system
in Boston. The number there is (617) 354-8873. Leave a message in the
main conference for 'MARTY DEL VECCHIO'--note the space!



Page 8




 December 8, 2017  Add comments

Leave a Reply