[comp.sys.ibm.pc] Extended memory on AT ?

dan@rna.UUCP (Dan Ts'o) (05/30/87)

	I would imagine this question has been covered before - Sorry.

	We have an application that requires fast access to 4Mb on a PC/AT.
What is the best way to do this (from a C program). I have heard that the
Intel Above Board Memory Spec is a bank switching scheme whose details are
kept secret but it apparently is possible to figure out. Is this information
available somewhere, or at least a subroutine library that can grab large
chunks (60kb) fast by bank switching ?

	Any other ideas ? I think ramdisks and DMA'ing memory back and forth
would both be too slow. I believe we need either direct access or bank
switching. I guess we could always use protected mode access. Yuck (Does
any C compiler or subroutine library support this ? We use Microsoft C)

	Thanks.
				Cheers,
				Dan Ts'o
				Dept. Neurobiology	212-570-7671
				Rockefeller Univ.	...cmcl2!rna!dan
				1230 York Ave.		rna!dan@nyu.arpa
				NY, NY 10021

davido@gordon.UUCP (David Ornstein) (05/30/87)

In article <630@rna.UUCP> dan@rna.UUCP (Dan Ts'o) writes:
>
>	I would imagine this question has been covered before - Sorry.
>
>	We have an application that requires fast access to 4Mb on a PC/AT.
>What is the best way to do this (from a C program). I have heard that the
>Intel Above Board Memory Spec is a bank switching scheme whose details are
>kept secret but it apparently is possible to figure out. Is this information
>available somewhere, or at least a subroutine library that can grab large
>chunks (60kb) fast by bank switching ?
>

The Lotus-INtel-Microsoft extended memory spec (LIMEMS) is a public
system that allows swicthing 64K (it might be 128, I don't remember)
chunks of memory in and out of a window in the board's address space.

There are two kinds of extension memory for the PC: extended and expanded.
Expanded memory is the type that uses the bank-switching mechanism you
have heard about.  Extended memory is simply more memory added to the 
system's normal address space.  MSDOS can't utilize extended memory, while
many of the larger applications s/w packages (e.g 123) can access expanded
memory.

Most expansion memory cards for the pc allow you to configure the on-board
memory as all one or some of both types.  I know this is true of the intel
Above Boards...

-- 
-----------------------------------------------------------------------------
David Ornstein		"Never join a religion that has a water slide."

Internet:	davido@gordon
UUCP:		{mit-eddie|seismo}!mirror!gordon!davido
	     or {harvard|ames|decvax|husc6}!necntc!davido
US Snail:	Access Technology, 6 Pleasant St, Natck MA 01760
-----------------------------------------------------------------------------

dmt@mtunb.UUCP (06/02/87)

In article <630@rna.UUCP> dan@rna.UUCP (Dan Ts'o) writes:
>
>	We have an application that requires fast access to 4Mb on a PC/AT.
>What is the best way to do this (from a C program). I have heard that the
>Intel Above Board Memory Spec is a bank switching scheme whose details are
>kept secret but it apparently is possible to figure out. Is this information
>available somewhere, or at least a subroutine library that can grab large
>chunks (60kb) fast by bank switching ?

Think of the Expanded Memory Spec (EMS) as yet another BIOS interrupt.
That is, it is a collection of functions you can get at by setting some
registers and issuing an INT instruction.  These functions are NOT secret;
they're well published, and should do everything you need for bank switching
(each "bank" is 16K).

What IS NOT well published is the details of the hardware of the board.
Let's continue the BIOS analogy.  If you have a not-quite-clone with a
good matched BIOS:
   -	As long as you use programs that access hardware through
	the BIOS calls, you're golden.
   -	If your programs have inadequate PERFORMANCE because of the BIOS
	overhead, and you want to go straight to the hardware, you're
	in trouble.  Either the programs won't work on your machine
	(pre-existing programs), or they won't be portable to other
	machines (the programs you write).
This carries over into your problem.  If you can't find out the hardware
details of the SPECIFIC EMS board you're using (and they're not all the
same at the hardware level), you've GOT TO use the EMS driver supplied
with the board and live with its overhead.  (Think of the driver as a
loadable BIOS.)

Hope this helps.

+---------------------------------------------------------------+
|    Dave Tutelman						|
|    Physical - AT&T  -  Lincroft, NJ				|
|    Logical -  ...ihnp4!mtuxo!mtunb!dmt			|
|    Audible -  (201) 576 2442					|
+---------------------------------------------------------------+