CSIRAC - The First Australian Digital Computer - Architecture

Some basic statistics, see further down for more details:

Registers:

Instruction format:


The bits in a word are numbered P1..P20, with P1 being least significant. The 20-bit word is divided up as follows:
   P20 P19 P18 P17 P16 P15 P14 P13 P12 P11 | P10 P9 P8 P7 P6 | P5 P4 P3 P2 P1
      Memory address of numeric value (n)    Source function  Destination function
  
During execution, the Source function is evaluated, resulting in a 20-bit value, referred to as the Source. Then the Destination function is evaluated which takes the Source value and performs some action with it. Most of the functions do not require the address or numeric value which can therefore be left as zeros, but may be used for other purposes if required. If both source and destination require an operand, the they must use the same value. For example, it is not possible to read from one store address and write to a different store address. However, it is possible to copy from a store address to the corresponding backing store address, which is useful.

When describing an instruction it is customary to divide up the address part into two 5-bit numbers, so the whole word could be described by four 5-bit numbers. In this sense the machine operates in base-32, which is not a format I had come across prior to this. While I can work easily with hexadecimal or octal, base-32 takes a bit of getting used to. To simply programming the Source function and Destination function are normally written as one or two-letter mnemonics.

Source Functions:

As there are five bits available, there are 32 distinct Source functions.
numericmnemonicvalue assigned to Source
0Mcontent of store at address n
1IContent of I register (data from selected tape reader), advance reader.
2NASettings of the NA switches
3NBSettings of the NB switches
4AContent of the A register
5SASign bit of A register (P20)
6HAContent of A divided by 2 (Half A)
7TAContent of A multiplied by two (Twice A)
8LALeast significant bit of A (P1)
9CAContent of A, then clear A.
10ZAif A is zero, then 0 else P1
11BContent of B
12Rif most significant bit of B is 1, P1, otherwise 0.
13RBContent of B shifted right one bit, P20=0
14CContent of C register
15SCSign bit of C register
16RCContent of C shifted right one bit, P20=0
17DContent of D[n]
18SDSign bit of D[n]
19RDContent of D[n] shifted right one bit, P20=0
20ZZero (0)
21HLContent of H register in bits P1..P10, remainder 0
22HUContent of H register in bits P11..P20, remainder 0
23SContent of S register
24PEP11 (bit eleven)
25PLP1 (bit 1)
26KUpper half of K register (n), P1..P10=0
27MADrum store[n]
28MBDrum store[n+1024]
29MCDrum store[n+2048]
30MDDrum store[n+3072]
31PSP20 (sign bit)

Destination functions:

numericmnemonicaction
0MStore[n+3072] = Source
1QNo effect
2OTPrint bits 1..5 on the teleprinter
3OPPunch bits 1..5 on 5-hole punch, or 1..12 on 12-hole punch
4Aset A=Source
5PAset A=A + Source
6SAset A=A - Source
7CAset A=A ∧ Source
8DAset A=A ∨ Source
9NAset A=A ≢ Source
10PTransmit Source to the loudspeaker
11Bset B=Source
12XBSet B=Source, then set A,B = B * C (double length result) B[P1]=0
13LLeft shift A,B by n/2 places (1..7 places)
14Cset C=Source
15PCset C=C + Source
16SCset C=C - Source
17Dset D[n] = Source
18PDset D[n] += Source
19SDset D[n] -= Source
20ZNo effect
21HLset H = Source[P1..P10]
22HUset H = Source[P11.P20]
23Sset S = Source
24PSset S += Source
25CSif Source[P1..P11] or Source[P15..20] is non-zero, add P11 to S, if both are non-zero add 2*P11 to S
26PKset K=Source, this will add to the next instruction!
27MAset Drum store[n] = Source
28MBset Drum store[n+1024] = Source
29MCset Drum store[n+2048] = Source
30MDset Drum store[n+3072] = Source
31Tif Source not zero, stop the machine.

Paper Tape input:

I have never encountered 12-hole paper tape before looking at CSIRAC. 5-hole was common in the early days, and was largely superceded by 8-hole tape. 12-hole seems to have links with punched card technology, and is notated in a similar manner, bits are numbered 1 to 10, the X and Y. The photo of CSIRAC on the
home page shows a 12-hole reader in the foreground. A roll of tape for the punch can just be seen at the far left.

When read in the twelve bits are split, bits 1 to 10 are place in the corresponding bits of the Source, while X and Y are assigned to P19 and P20. This facilitates testing for these as P20 is easily tested and doubling the source will bring P19 to P20 for a further test.

I believe that the 12-hole tape was prepared using a customised keyboard which enabled the mnemonics to be easily entered, but tape preparation did need some skill and accuracy!

As things evolved, the Interprogram language was devised and this was geared towards using 5-hole tape for the programs. This could be more easily prepared by the average user. Friden flexwriters were used, which at that time used 5-hole tape, and only catered for upper case letters, digits and some punctuation.

Tape and Printer Codes:

CodeBinaryGatesTeleprinterFlexowriter
SrcDestLetterFigureLetterFigure
0 00000M M A 0 blank
1 00001I Q B 1 Q1
2 00010NAOTC 2 W2
3 00011NBOPD 3 C*
4 00100A A E 4 R4
5 00101SAPAF 5 K(
6 00110HASAG 6 L)
7 00111TACAH 7 U7
8 01000LADAI 8 I8
9 01001CANAJ 9 D#
1001010ZAP K + V=
1101011B B L - A-
1201100R XBM . F&
1301101RBL N ) M.
1401110C C O ( Gtab
1501111SCPCP i N,
1610000RCSCQ j P0
1710001D D R k Jstop*
1810010SDPDS BC H£
1910011RDSDT φ E3
2010100Z Z U Ψ B'
2110101HLHLV ΘT5
2210110HUHUW ΩY6
2310111S S X ΓS/
2411000PEPSY π Xx
2511001PLCSZ ΣO9
2611010K PKΛΞ Z+
2711011MAMAfigs* figs
2811100MBMBlets* space
2911101MCMClf* cr
3011110MDMDcr lets
3111111PST space lf**
* Note that a space is also given with these codes
** This code has no effect on Flexowriter printing, so may be used to erase when punching.

Printed and Punched outputs:

CSIRAC had an online printer. This was a Creed teleprinter, which used a 5-bit code, similar to that used on paper tape input, but with a different coding. The printer was a relatively slow device and was intended for short messages to inform operators of any actions needed. users were discouraged from using it to output program results. The main output was via 5-hole paper tape punch. The output was then taken off to be printed later on a Flexowriter, hence punched output would normally employ the Friden tape code as for tape input. A 12-hole punch was also available, but I would expect this only to be used for duplicating library tapes and the like.

The Control Panel:

The main operator control of the machine was via the Control Panel or Switch Panel:

The panel went through various revisions over time, the above photo is a recent one of the panel at the Victoria Museum. In the photo the row of Yellow switches is the NA switches, while below it is the row of NB switches and then the IS switches. The corresponding panel on the Java Emulator has a few minor differences, but the essential functions are there.

Display Tubes

In order that the operator can get some feedback as to what is happening in the machine, there are six cathode ray tube monitors. The leftmost can be seen in the above photo and displays the content of the A register. The others display, respectively, the content of the B register, then a 16-row display of the D registers, 16 words of the store(M), the content of the C register, and finally the H register. In addition to these the racks behind the console, which make up the machine proper, contain rows of neon lamps, which display a variety of bits of information, including the S register, the I register, the K register, and the 64 decoded function bits. The data in the store can be selected using a row of six switches near top left on the panel, which provide the high-order six bits of the store address displayed on the Mdisplay.

Operation of the Machine:

For normal operation, the procedure is basically in two parts, loading a program, and executing that program. Depending on the program, the latter part is usually just a case of pressing the Start button, seen on the bottom row towards the right. The program loading procedure is a bit more complicated. The machine has no inbuilt operating system, it needs to be gently persuaded to load a tape. It is just about possible to load a program manually, by setting up an order on the NA switches which will read the input device and store that into memory. If the tape reader is loaded with a piece of blank tape, then the I register will return zeros, and setting up a word on the Input register (red switches) this will be ORed into that and by setting the NAK switch and pressing Start that instruction will be copied into store at the specified address. By tediously updating the NA register for each address and the IS register for each word, you can load some code or data into store.

A much better scheme is to load a 12-hole tape containing a bootstrap code at the start, you can arrange for this to be loaded into store in a simpler manner. The procedure is first to select the 12-hole tape reader, set the instruction:

          0   0   I   M
  
onto the NA switches (just setting bit 6 is sufficient, in the photo above, that switch has a red stripe on it to make it easy to spot!), then set the NA&StoK (or NASK) switch, ensure the Start/Stop switch is in the Start position then press the Start button. The first section will be read in from tape. What is happening is that the NA register is read into the K register and the content of the S register is ORed into it. This means that each time the order is executed it will address successive locations. The data from the tape will be placed in successive store locations, starting at 0.

The next step is to stop the machine when it reaches the end of the initial trigger code. This is marked by a fairly length run of blank rows. At this point, the NASK switch would be reset, and the Clear S button pressed so that when the Start button is pressed, the machine will be executing the trigger code. A further section of code will be read in, comprising what amounts to a relocating loader, and this would be followed by the actual user program.

When the program has been loaded, the machine will either halt, or can be triggered into running the users program immediately.

Depending on how the program has been designed it may be possible for the user program to perform a series of runs, or it may simply halt, and another program will need to be loaded.

Bill Purvis, April 2021