[comp.sys.ibm.pc] need help setting memory size on PC compatible

dukelow@cod.NOSC.MIL (Robert A. Dukelow) (04/11/89)

A friend has an old IBM-PC compatible for which the system board switches
only allow setting up to 512K. He would like to put 640K on an expansion
board - but we don't know how to tell DOS that the extra memory is there.
I assume there is some relatively general way to do this since I have heard
of some method to tell DOS to use the memory normally occupied by the
monochrome display adapter (above 640K). Any pointers would be welcome.
Thanks in advance.
				Bob Dukelow
				dukelow@nosc.mil

c37189h@saha.HUT.FI (Haba) (04/11/89)

In article <1478@cod.NOSC.MIL> dukelow@cod.NOSC.MIL (Robert A. Dukelow) writes:
>A friend has an old IBM-PC compatible for which the system board switches
>only allow setting up to 512K. He would like to put 640K on an expansion
>board - but we don't know how to tell DOS that the extra memory is there.
>I assume there is some relatively general way to do this since I have heard
>of some method to tell DOS to use the memory normally occupied by the
>monochrome display adapter (above 640K). Any pointers would be welcome.

You have a word located at 40:13 (hex) in the BIOS data block which tells DOS
how much memory you've got (in kBytes). This variable is set by bios boot 
routine and dos as well as some other operating systems rely on it! So
if you change that variable to 640 DOS will believe it (If you haven't
got ega/vga graphics adaptor you could use segment A000h for system as
well) ! Bear in mind that you have parity check with the memory and
you'll have to set the extra memory (segments 8000h & 9000h in your
case, I guess) eg. to zeros so you'll avoid parity errors.  :-)

The best way to install such program is (naturally) to include it in
your boot sector (you might have a couple of bytes free space there).
The variable indicating the size of your memory must be set (to 640 in
your case) before loading DOS! (DOS is set up counting on that variable,
it is no good if you change it afterwards!)  ;-)

The other possibility is to set the variable at 40:13 hex in DOS and then
reboot system (for example by  INT 19h) which if of course extremely
slow for you'll boot two times !  ;-(

I think you'll get started with that information. In case you fall into
some problems with that ask for more info (by news or by mail)

Yours,
       Harri Suomalainen      mail: c37189h@saha.hut.fi