Home

under_construction.gif


IBM PC family - More than 640 KB of conventional memory


Introduction

Conventional memory is defined at here.

On a PC-class or XT-class computer, the normal way to get more than 640 KB of RAM, is to use expanded memory.

However, if you have either an MDA or CGA video card in use, plus you have a RAM card that can place RAM to start at address 640 KB (A0000), then it is possible to have more than 640 KB of conventional memory.

Note:  On this web page, treat Hercules Graphics Card and Hercules Text Card as being the same as MDA.



IBM 5150:  704 KB of conventional memory

This is possible if the fitted video card is MDA or CGA.  Per the IBM 5150 memory map shown at here, with an MDA or CGA card fitted, the 64 KB sized memory area of 640 KB (A0000) to 704 KB (B0000) is empty.

Prerequisite: The IBM 5150 motherboard is fitted with the 10/27/82 dated BIOS.
   
Prerequisite: All 4 banks of motherboard RAM are populated.  This is an IBM 5150 rule: all motherboard RAM banks must be populated before RAM cards are added.
   
Background: For the 10/27/82 dated motherboard BIOS, some undocumented (by IBM) settings for switch block SW2 on the motherboard:
672 KB: 1=off, 2=off, 3=on, 4=on, 5=off
704 KB: 1=on, 2=on, 3=off, 4=on, 5=off
736 KB: 1=off, 2=on, 3=off, 4=on, 5=off


Step 1 Ensure that the fitted video card is either MDA or CGA.
Step 2 Configure one or more RAM cards so that RAM is in the address range of: end of RAM on motherboard, to address 704 KB (B0000).  See notes 1,3,4, and 5
Step 3 On the motherboard, set the switch block SW2 settings to the 704 KB setting: 1=on, 2=on, 3=off, 4=on, 5=off
Step 4 Power on the IBM 5150.
Step 5 Optional: Use either the 'Verification via Cassette BASIC' or 'Verification via DEBUG.COM' sections below, to confirm that the figure of 704 KB is stored in the BIOS Data Area (BDA).




IBM 5150:  736 KB of conventional memory

This is possible if the fitted video card is CGA.  Per the IBM 5150 memory map shown at here, with a CGA card fitted, the 96 KB sized memory area of 640 KB (A0000) to 736 KB (B8000) is empty.

Prerequisite: The IBM 5150 motherboard is fitted with the 10/27/82 dated BIOS.
   
Prerequisite: All 4 banks of motherboard RAM are populated.  This is an IBM 5150 rule: all motherboard RAM banks must be populated before RAM cards are added.
   
Background: For the 10/27/82 dated motherboard BIOS, some undocumented (by IBM) settings for switch block SW2 on the motherboard:
672 KB: 1=off, 2=off, 3=on, 4=on, 5=off
704 KB: 1=on, 2=on, 3=off, 4=on, 5=off
736 KB: 1=off, 2=on, 3=off, 4=on, 5=off


Step 1 Ensure that the fitted video card is CGA.
Step 2 Configure one or more RAM cards so that RAM is in the address range of: end of RAM on motherboard, to address 736 KB (B8000).  See notes 2,3,4, and 6.
Step 3 On the motherboard, set the switch block SW2 settings to the 736 KB setting: 1=off, 2=on, 3=off, 4=on, 5=off
Step 4 Power on the IBM 5150.
Step 5 Optional: Use either the 'Verification via Cassette BASIC' or 'Verification via DEBUG.COM' sections below, to confirm that the figure of 736 KB is stored in the BIOS Data Area (BDA).




IBM 5155 and IBM 5160:  704 KB of conventional memory

This is possible if the fitted video card is MDA or CGA.  Per the IBM 5160 memory map shown at here, with an MDA or CGA card fitted, the 64 KB sized memory area of 640 KB (A0000) to 704 KB (B0000) is empty.

In sizing conventional memory, the IBM motherboard BIOS in the 5155/5160 operates differently to that of the 5150.  That 5155/5160 BIOS simply 'takes a look', but per step 17 at here, limits its search to 640 KB.  The DOS program named 704K.COM gets around this 640 KB limit of the IBM 5160's motherboard BIOS.  704K.COM modifies the 'conventional memory fitted' figure in the BIOS Data Area (BDA), and writes data to the 640 KB to 704 KB area (to set/reset the parity bits, if any).

Warning: 704K.COM may be incompatible with some versions of DOS.  See post #22 at here.


Step 1 Ensure that the fitted video card is either MDA or CGA.
Step 2 Do whatever is required to have RAM in the address range of: end of RAM on motherboard, to address 704 KB (B0000 hex).  See notes 1,3,4, and 5
Step 3 Power on the IBM 5155/5160.
Step 4 Get 704K.COM from here.  In that download file, is documentation file, 704.DOC, a text file.  Put 704K.COM on the 5155/5160's hard drive, and then, per the documentation, make a reference to 704K.COM early in the AUTOEXEC.BAT file on the hard drive.
Step 5 Restart the IBM 5155/5160.
Step 6 Optional: Use either the 'Verification via Cassette BASIC' or 'Verification via DEBUG.COM' sections below, to confirm that the figure of 704 KB is stored in the BIOS Data Area (BDA).



Verification via Cassette BASIC

Here, we will use Cassette BASIC to see what conventional memory amount is stored in the BIOS Data Area (BDA).  That amount is what DOS will believe is fitted.

Step 1 Do what you have to do to get into Cassette BASIC.  If you are booting to Cassette BASIC, be patient - it will take a while.
Step 2 Ignore the 'bytes free' figure displayed.  That has nothing to do with what we are doing.
Step 3 In Cassette BASIC, enter the following two lines (in the order shown):
   def seg = &h40
   print peek(&h14)*256 + peek(&h13)
Step 4 Note the figure that Cassette BASIC displays as a result of entering those lines, e.g. 704, e.g. 736



Verification via DEBUG.COM

Here, we will use DEBUG.COM to see what conventional memory amount is stored in the BIOS Data Area (BDA).  That amount is what DOS will believe is fitted.

Step 1 Boot to DOS.  Be patient - it will take a while.
Step 2 Execute DEBUG.COM
Step 3 At DEBUG's dash prompt, enter the following line:
   d 40:13
Step 4 Look at the first line displayed.

If that line starts with '0040:0010   00 01', that equates to 256 KB  (0100 hex = 256 binary).
If that line starts with '0040:0010   00 02', that equates to 512 KB  (0200 hex = 512 binary).
If that line starts with '0040:0010   80 02', that equates to 640 KB  (0280 hex = 640 binary).
If that line starts with '0040:0010   C0 02', that equates to 704 KB  (02C0 hex = 704 binary).
If that line starts with '0040:0010   E0 02', that equates to 736 KB  (02E0 hex = 736 binary).





Note 1 Technically, the final address is one byte short of 704 KB (B0000 hex), i.e. address AFFFF hex.
   
Note 2 Technically, the final address is one byte short of 736 KB (B8000 hex), i.e. B7FFF hex.
   
Note 3 It does not matter whether the RAM placed past 640 KB is dynamic or static.
   
Note 4 • Not all RAM cards can place conventional memory past the 640 KB address.
• You can do this with more than one RAM card.
   
Note 5 Examples of RAM cards that can place 64 KB of RAM from address 640 KB (A0000 hex) to address 704 KB (B0000 hex), are:
• The 'Monotech MicroRAM' card, shown at here.
• The 'Lo-tech 1MB RAM Board', shown at here.
   
Note 6 For 736 KB, note that the example RAM cards listed in note #5 are unsuitable.