return to main page

1401, the Dark Side
addressing above 999

Sections:

1401 praises
Dark Side - torture
Background to the problem
IBM's Solutions
Band-Aids and Kludges to increase the 1401 memory addressing range
Index Registers another afterthought?


We have been singing the praises of the 1401 system:

  • World class printer, (1403)
  • Great tapes (729)
  • Great card reader/punch (1402)
  • Great transistion machine
    from unit record equipment
    to modern computing
  • Great service
  • Most popular computer in its era, over 20,000 sold/leased
  • ... and so on ...


But there was a Dark Side -

addressing above 999 was torture - yes, torture, real torture

Ron Williams proposed this little
- 1401 memory addressing quiz
Answering this question is a major pain
- even for 1401 assembly language programmers
- and this example is not even using an index register!!
Even the meaning of the question is uncertain to the uninitiated !!


Background to the problem
Remember that core memory was very expensive, about a buck a bit -

and a buck bought a lot more in 1958!! Gasoline was about $0.35/gallon and senior engineers were getting $6/hour.
The above greatly affected the design of computers, especially computers for the mass commercial market.

So, the 1401 was architected to use three (decimal) digits of addressing memory.

For example, an address of "312" would access the character in memory location 312.
OK - simple, no problem.

And if you want to get a character four characters higher in memory than 312,

you can add the three digit number 004 to the address to get another address 316
Isn't that nice :-)) This works just fine up to the resulting address of 999
and 392 of them are taken up by card read, card punch, printer areas :-((
then you are out of numbers - OK?
Fine - worked well for very simple operations, such as replacing very popular 407 accounting machine

BUT it turned out that program capabilities were very limited by such a small memory.

Lets not get into the large effort & problems to overlay parts of programs with other parts.

IBM was pressured (found opportunity) to sell most 1401s with 4,000 characters of memory, (instead of 1,400 characters)

and finally 16,000 characters of memory.
These are not addressable with three character memory using digits 0 through 9 :-((


There are two usual solutions to the above problem

and IBM chose both -
  1. Design and sell a machine with greatly increased address space.
    Which IBM did, the IBM 1410 - with 5 decimal digits of memory addressing
    - Unfortunately, they increased memory speed by only 60 percent
    which made fetching the increased length of the instructions relatively slow.
    IBM fixed the address problem, but left the customer with a relatively slow machine :-((
    The 1410 was not a popular machine -
    We will not discuss the 1410 further in this document.

  2. Band-Aid and Kludge to increase the 1401 memory addressing range.
    Which IBM also did - and the rest of this document describes the result.
IBM learned the memory address problem/solution well !! The next major generation, the IBM 360 series (dated 1964, and which persists to this day) used 24 bit addressing, enough to address 16.7 megabytes :-))


Band-Aids and Kludges to increase the 1401 memory addressing range

Hang on to your hat - this is tough!!
Here is the part of the 1401 Operator's Panel illustrating the character configuration in memory.
Each decimal digit in memory has two extra bits, "A" and "B", called zone bits. Normally if one or more zone bits are set, the character is not numeric, but alphetical - 26 letters A through Z, and 5 special characters.
How ever, if these character positions are used in a program to access memory, the zone bits cause accessing of different zones of memory.

From page 18 in IBM document A24-1403-5 (April 1962), available from BitSavers is this figure of how the first (left) character position must be set up to reach zones in the address range 000 through 3,999.
An example is address characters K34, which translates to memory address 2234.
Note the strange character to get you into the zone 1000 through 1099 - how do you print that?
Ron tells me that you need to key punch a 0,2,8 into a column to get the proper bits into memory.
- we will see what prints on the 1403, with our chain :-|
so, going sequentially up through memory, starting at K23, (2223) we get

K23 2,223
K24 2,224
K25 2,225
... ...
L00 2,300
L01 2,301
L02 2,302
... ...
R00 2,900
R01 2,901
R02 2,902
... ...
?00 3,000
?01 3,001
?02 3,002
... ...
A00 3,100
A01 3,101
A02 3,102
A little wierd, but we can fake it ;-))

BUT this worthy manual does not detail how one addresses the address range 4,000 through 15,999. I suspect IBM did not want to discourage customers from struggling further - but Ron Williams' challenge (above) evidently requires further study to handle the H in the units (right) column - and we press on into the wilderness.

Using the above logic, if the A-bit is set in the units character, we will select the address range 4,000 through 7,999. Set into tabular form, we get:

No zone bits 000 to 3,999
A-bit 4,000 to 7,999
B-bit 8,000 to 11,999
A-B-bit 12,000 to 15,999
OK so far? - just say yes 'cause I'm going to crash on anyway :-|

Lets examine Ron's value of K2H which seems to be 12,000 + 2200 + 20 + 8 = 14,228

We can check that by adding the Ron Williams value of 123 to 14,228 and getting 14,351
We seem to be on the right track - so lets do this in detail:
from the A-B zone bits in the H (units digit) 12,000
from the A-B zone bits in the K (hundreds digit) 2,000
from the 2 in the decimal bits in the K (hundreds digit) 200
from the 2 in the tens digit 20
from the decimal bits in the units digit 8
summing all the above, we get 14,228
Now lets count addresses sequentially, using the address "K2H" from above
K2H 14,228
K2I 14,229
K3? 14,230
K3A 14,231
K3B 14,232
Folks, this ain't pretty, it isn't even bad, it is Torture


Index Registers another afterthought?

The Index Register concept was first used by the British Manchester Mark I computer, in 1949. (The Brits called it a "B-Box")

This was apparently before everyone patented everything - what a missed fortune for someone!!
Machines without indexing must use the program to change addresses in the program to step through data in memory.
This is costly in processor time and is awkward and error prone to program.
Many early computers - including the LGP-30, ... did not use indexing.
By around 1960, selling a computer without index registers was tough.
An option for the 1401 was indexing, using three specific memory areas as "registers"
- our 1401 has these and most other special features, such as hardware divide :-))

Now, how do you select which (if any) index register to use for this instruction? From BitSavers (6 megabytes) A24-3071-2 "Special Feature instructions" page 1-1 we get information.

Following the zone bit ideas from the above section, you select which of three index registers the address is to be added to by setting one or more zone bits of the second address digit. Indexing turns the second address digit from a numeric to an alpha or special character in the same fashion as in memory addressing.
No zone bits no indexing
A-bit index using 087-089
B-bit index using 092-094
A-B-bit index using 097-099

- the "register" is actually three memory locations which must be fetched,
- one at a time -
It takes the 1401 an additional 34.5 microseconds to utilize an index "register" :-((


The result is that "KKK" is a legal memory address, selecting the second index "register"

This has taken a long time, I am too exhausted to give the decimal equivalent!!

I rest my case.

Thank you for listening

I sure hope the above is correct

Ed Thelen


LaFarr Stuart - lafarr at zyvra dot org - has made corrections and clarifications to the above. He also wishes to add:
In all fairness, even the simple card assembler SPS handled the addressing, so it never seemed a big problem except when you were debugging looking at a memory dump. However with only 4K characters a full memory dump was almost always used for debugging. Even then a SPS assembly listing at hand took away much of the address arithmetic. (I never worked on a real machine with index registers.) Address modification was rare in most business applications where you read a card, identify it and do a trivial amount of arithmetic, then read the next card..

Not having index registers may actually simplified looking at a dump because you would run till you suspected the error; then take a dump and by then the address modification had been done.

LaFarr

Ron Williams made more corrections :-|

And says this is *NOT* a challenge as he gave the answer to the question.


created May 17, 2007
updated through May 25, 2007
return to main page