[comp.sys.ibm.pc.misc] Extended memory

kap@eng.cam.ac.uk (Kevin A.Price) (12/05/90)

Hi netlanders,

does anyone know of a solution to the following problem....

We have a 286 PC/AT with 640k conventional memory and 384k
extended memory which is located at address 1 Megabyte.

Our networking software takes up about 110k of conventional.
Also, other TSRs and device drivers use about 120k. What
we would like to do is to increase the amount of 'useable'
DOS memory. Is it possible to load some of the TSRs and
device drivers in the extended memory a la LastByte? We
do NOT have the C&T chipset though!

Any ideas will be gratefully received.

Thanks in advance.

Kev
e-mail kap@eng.cam.ac.uk

rcollins@altos86.Altos.COM (Robert Collins) (12/07/90)

In article <18373@rasp.eng.cam.ac.uk> kap@eng.cam.ac.uk (Kevin A.Price) writes:
>We have a 286 PC/AT with 640k conventional memory and 384k
>extended memory which is located at address 1 Megabyte.
>
>we would like to do is to increase the amount of 'useable'
>DOS memory. Is it possible to load some of the TSRs and
>device drivers in the extended memory a la LastByte? We

Sure, there is.  Memory @ FFFF:0010 starts @ 1M.  To access this memory from
real mode, you need to enable A20 on the CPU address bus.  Then put your
TSR's @ FFFF:0010+.  Leave A20 always enabled.  If you run any benchmark
programs, or other software that uses extended memory, then this could
fail.  Also, you'll need to adjust a location in CMOS for the 'current' size
of extended memory.
-- 
"Worship the Lord your God, and serve him only."  Mat. 4:10
Robert Collins                 UUCP:  ...!sun!altos86!rcollins
HOME:  (408) 225-8002
WORK:  (408) 432-6200 x4356

raymond@math.berkeley.edu (Raymond Chen) (12/07/90)

In article <4467@altos86.Altos.COM>, rcollins@altos86 (Robert Collins) writes:
> [on using the memory from FFFF:0010 to FFFF:FFFF, known as the HMA]
>Leave A20 always enabled.  

This is dangerous.  Some software (typically, copy protection schemes)
rely on A20 wraparound to work properly.  The recommended solution is
to leave a stub in low memory.  The stub enables the A20, calls the
TSR, then disables the A20 when the TSR returns.

I strongly suggest using the XMS function calls (in HIMEM.SYS) to
negotiate access to the HMA.  That way, other programs will know that
you are using the HMA and won't stomp all over you.

Disclaimer:  I speak with no authority.  Proceed at your own risk.

amichiel@rodan.acs.syr.edu (Allen J Michielsen) (12/07/90)

In article <18373@rasp.eng.cam.ac.uk> kap@eng.cam.ac.uk (Kevin A.Price) writes:
>We have a 286 PC/AT with 640k conventional memory and 384k
>extended memory which is located at address 1 Megabyte.
>
>Our networking software takes up about 110k of conventional.
>Also, other TSRs and device drivers use about 120k. What
>we would like to do is to increase the amount of 'useable'
>DOS memory. Is it possible to load some of the TSRs and
>device drivers in the extended memory a la LastByte? We
>do NOT have the C&T chipset though!

   Have you thought about Quarterdeck's QRAM software ?
Comes free with a bunch of stuff, else runs like $ 60 or so...
al


-- 
Al. Michielsen, Mechanical & Aerospace Engineering, Syracuse University
 InterNet: amichiel@rodan.acs.syr.edu  amichiel@sunrise.acs.syr.edu
 Bitnet: AMICHIEL@SUNRISE 

rcollins@altos86.Altos.COM (Robert Collins) (12/08/90)

In article <1990Dec6.222421.15840@agate.berkeley.edu> raymond@math.berkeley.edu (Raymond Chen) writes:
>In article <4467@altos86.Altos.COM>, rcollins@altos86 (Robert Collins) writes:
>> [on using the memory from FFFF:0010 to FFFF:FFFF, known as the HMA]
>>Leave A20 always enabled.  
>
>This is dangerous. 

As a matter of fact, many modern BIOS implementations do exactly that...
leave A20 always on.  They do this for benchmarking purposes.

Granted some old software was so poorly designed that they use memory
wrapping, but we BIOS engineers shouldn't be constrained by such poor
designs.  Sure, if we are interested in compatibility, we should do what
we have always done, but the fact remains, 3 of the top 5 BIOS's on the
market now always leave A20 on.

-- 
"Worship the Lord your God, and serve him only."  Mat. 4:10
Robert Collins                 UUCP:  ...!sun!altos86!rcollins
HOME:  (408) 225-8002
WORK:  (408) 432-6200 x4356

tmurphy%peruvian.utah.edu@cs.utah.edu (Thomas Murphy) (04/06/91)

In article <1991Apr5.211351.4335@bnlux1.bnl.gov> kushmer@bnlux1.bnl.gov (christopher kushmerick) writes:
>My IBM AT has a few Mb of extended ram. It is recognized by the 
>virtual disk driver.
>
>Given this, does it necessarily follow that this ram will be recognized
>by an ems driver, and therefore usefull for such things as ems overlays 
>in turbo pascal etcetera?
>
>Thanks,
>
>-- 
>Chris Kushmerick                               


No it doesn't.  In most AT's you have 1 meg installed of which the
part above 640 can be used as extended but not ems.  You may get
around this with a NEAT set computer but I am not sure....memory
though above the 1 meg barrier can be used as expanded or extended.

murph

liberato@dri.com (Jimmy Liberato) (04/11/91)

tmurphy%peruvian.utah.edu@cs.utah.edu (Thomas Murphy) writes:

>In article <1991Apr5.211351.4335@bnlux1.bnl.gov> kushmer@bnlux1.bnl.gov (christopher kushmerick) writes:
>>My IBM AT has a few Mb of extended ram...
>>Given this, does it necessarily follow that this ram will be recognized
>>by an ems driver, and therefore usefull for such things as ems overlays 
>>in turbo pascal etcetera?

>No it doesn't.  In most AT's you have 1 meg installed of which the
>part above 640 can be used as extended but not ems.  You may get
>around this with a NEAT set computer but I am not sure....memory
>though above the 1 meg barrier can be used as expanded or extended.

When you watch the memory count on an IBM AT with more than 640K installed, 
notice that the count APPEARS contiguous from 0 to maximum.  Logically,
however, it is more accurate to visualize the count stopping at 640K and
then JUMPING to 1024K to continue with the rest (the rest being extended 
memory).  There is no ram, in the conventional sense, in the A000-FFFF 
(640K-1024K) area.  IBM ATs and their conventional clones are very poor
at memory management.  Attempts to use the extra memory in any kind of 
real mode environment are awkward at best.  Using the extended memory
as a ram disk or as a cache, or using an XMS driver to gain limited access
to the ~64K HMA area above FFFF is about the only practical use you will
find.  The EMS emulators for 286 class machines are both slow (do to the
limitations of the 286 CPU when switching into protected mode to access
the extended memory) and memory intensive (the 64K EMS page frame is put
in conventional memory).  They are only useful if no other alternative 
exists.  That is, a particular program absolutely requires EMS to run and
you don't care how slow it is.  If EMS is required, the more practical
alternative is to have a dedicated hardware expanded memory board which
will but its page frame in upper memory above 640K.  This very problem
is why it is usually worth the extra cost to get at least a 386SX based 
machine.  Then, with the correct software (386 class XMS and EMS memory 
managers like QEMM and its cousins) you can pretty much do whatever you 
want with all the extended memory you might have.

--
Jimmy Liberato   liberato@dri.com
                 ...uunet!drivax!liberato