An instruction, specifying a function F (most-significant 10 bits), two index registers Ba and Bm (7 bits each) and an address N (least-significant 24 bits).
Functions are written as a binary digit followed by 3 octal digits. Instructions starting with a 0 are the basic order code of the machine. Functions starting with a 1 indicate that the instruction is an extracode. Extracodes to the programmer look like basic machine instructions but they are effectively calling a routine of basic instructions to execute the task. So a function like sin or cosine is an extracode in Atlas.
Here are two instructions:
121 1 3 27 1714 0 0 36
The first is a basic instruction (actually 0121) that sets index register 1 to the value of index register 3 plus 27. The second is an extracode (1714) that divides the accumulator by the contents of store address 36.
The Atlas Basic Language Manual gives full details of all the Atlas instructions. Here we will just give a flavour of what is available.
Index registers on Atlas were called B-lines or B-Registers and there were 128 of these, a colossal number compared with the 3 index registers on the IBM 709 and the 7 index registers on the IBM 7090. The Ba field indicated the B-register being used in the instruction while the Bm field indicated another B-Register being used to modify the address field. If B3 has the value 7, the 121 instruction above would set B1 to 27 plus the contents of B3, that is 34.
Here are a few of the index register instructions (most have the address modified by the contents of Bm):
So here is a short Atlas program in addresses 0 to 4.
0 121 3 0 5 1 121 6 0 0 2 124 6 3 0 3 122 3 0 1 4 215 127 3 2 5 1117 0 0 0
The first instruction sets B3 to 5 and the second sets B6 to zero. The third adds 0 modified by B3 (that is 0+5=5) to B6. the fourth instruction subtracts 1 from B3 (now equal to 4) while the fifth sets B127 to 2 if B3 is nonzero.
Some B-Registers have special meanings. B0 always contains zero and B127 is the program counter. So this instruction causes a jump to instruction 2. The instructions 2 to 4 are obeyed over and over adding the new value of B3 to B6 until B3 reaches zero. Thus the final value of B6 is 5+4+3+2+1=15.
Finally the extracode in address 5 is obeyed when the test fails. The 1117 extracode stops the program.
Extracodes cause the program execution to stop and the extracode to start. On Atlas, B126 is the program counter for extracodes. So the effect of the 1117 instruction is to set B126 to the location where the extracode is stored and start executing it. The instructions obeyed are very similar to the basic instructions except that the program counter is B126. When the extracode is complete, the main program resumes normally using the value of B127 stepped on by one. So the Program Counter B127 does not need to be stored while the extracode is being obeyed. This saves two instructions on each extracode invocation and saves two store locations.
Extracodes are contained in the Atlas Fixed Store which is quite difficult to change so the extracodes were defined very early on and only minor changes were made to them during the life of Atlas.