Home
IBM 5170  -  Performing SETUP Using BASIC Code


Requirements

* A 'modern' Internet-connected computer.


Assumptions

* The 5170 is presently displaying either a 161, 162 or 163 error.


Notes

* 'Base memory' is an early IBM term for what later became known as 'conventional memory'.
* 'Expansion memory' (do not confuse with 'expanded' memory) is an early IBM term for what later became known as 'extended memory'.


STEP 1: Replace the Battery

The probability is extremely high that the 5170 has lost its configuration/setup because the internal backup battery is dead.

If the error is 161, you can be very sure that that is the case.  Note that simply replacing the battery with new won't remove the 161 error - the error won't disappear until you go complete all 8 steps of this procedure.
I've seen some 5170 motherboards that do not detect dead batteries.  They instead go on to display a 162 error.  And so do not assume that lack of a 161 error means that the battery is okay.

Measure the battery voltage if you can.  If you do not have the capability to measure the battery voltage, assume that the battery is dead.

For battery details, click here


STEP 2: Put the 5170 into BASIC

2.1 [5170]  Power on the 5170.  You'll see some errors - we expect that.
2.2 [5170]  You will be prompted to press the F1 key.  Do so.  That will take the 5170 into BASIC.


STEP 3: Determine BIOS revision in 5170

At this point, BASIC is running on your 5170.

3.1     [5170]  Type in the following BASIC code.

   10 def seg = &hf000
   20 for i = 0 to 7
   30 print chr$(peek(&hfff5 + i));
   40 next
   run

3.2     [5170]  Note the date that is displayed.  We'll use that date in a later step.


STEP 4: Determine Base RAM amount in 5170

At this point, BASIC is running on your 5170.

4.1     [5170]  Type in the following BASIC code.

   def seg = &h40
   print peek(20)*256 + peek(19)

4.2     [5170]  Note the figure that is displayed.  We'll use that figure in a later step.


STEP 5: Determine Expansion RAM amount in 5170

At this point, BASIC is running on your 5170.

5.1     [5170]  Type in the following BASIC code.

   out 112,48
   low = inp(113)
   out 112,49
   high = inp(113)
   print high*256 + low

5.2     [5170]  Note the figure that is displayed.  We'll use that figure in a later step.


STEP 6: Determine the IBM Hard Drive Type Number

Click here for information on how to determine the IBM hard drive type number.


STEP 7: Generate BASIC code

On your 'modern' Windows based computer, you will now run a special program that will generate BASIC code for the next step.

7.1 Download GSETUP_BASIC.ZIP then unzip its contents (GSETUP_BASIC.EXE).
7.2 On your 'modern' Windows based computer, run the unzipped GSETUP_BASIC.EXE
7.3 [GSETUP_BASIC]  In the 'BIOS' box, select the BIOS revision date that was determined at step 3.
7.4 [GSETUP_BASIC]  In the 'Base memory' box, select the amount of base memory that was determined at step 4.
7.5 [GSETUP_BASIC]  In the 'Expansion memory' box, select the amount of expansion memory that was determined at step 5.
7.6 [GSETUP_BASIC]  In the 'Drive A:' box, select the type of floppy drive that drive A: is.
7.7 [GSETUP_BASIC]  In the 'Drive B:' box, select the type of floppy drive that drive B: is (use 'None' setting if no B:).
7.8 [GSETUP_BASIC]  In the 'Drive C: type' box, select the number that was determined at step 6.
7.9 [GSETUP_BASIC]  In the 'Drive D: type' box, select 'None' (assumption: there is no D: drive).
7.10 [GSETUP_BASIC]  In the 'Display type' box, select the display type.
7.11 [GSETUP_BASIC]  In the 'Coprocessor' box, select the correct option.  The coprocessor is an optional 80287 chip fitted into socket U76 (near the keyboard socket).
7.12 [GSETUP_BASIC]  Click on the 'Generate' button.  BASIC code will appear (in green) in the box below the 'Generate' button.
7.13 [GSETUP_BASIC]  Block (highlight) the BASIC code then use a CTRL-C key combination in order to copy the code.
7.14 Paste the code into Notepad (or similar) then from within Notepad, print the BASIC code.


STEP 8: Enter BASIC code on 5170

At this point, BASIC is still running on your 5170.

8.1 [5170]  Being very careful, type in the BASIC code that was produced in step 7, noting that lines starting with "REM" can be omitted (they are remarks/comments).
8.2 [5170]  Power off the 5170.
8.3 [5170]  Wait 10 seconds.
8.4 [5170]  Power the 5170 back on.