Appendices to Volume I.

Interim version

In appendix A only the paper tape and card sections are finished. The other parts of Appendix A are very incomplete.

A hash character hs been used for some symbols that are special to Leo. This will be remedied eventually.

Appendix B is thought to be complete. This is a very important part of the manual.

Appendices C, D and F are not yet present. They can be seen in the PDF file from the scanner.

Appendix E is now included (thought to be complete), as this too is a very important part of the manual.

Appendix A APPENDIX A : CHARACTER CODES This appendix describes the representation of characters in 'alpha form' (see section 3) in the store of the computer, on the various external media, and in transit. Although the differences between some of the representations are very slight, they have been included separately for the sake of completeness. Page 1 of 8 Appendix A A.1 Character Code for 7-hole Paper Tape Characters are punched on 7-hole paper tape as follows; :<--- sprocket holes | 0 0 0 0 : 0 0 0 | | : | Role No. | 7 6 5 4 : 3 2 1 | 'P' signifies parity bit, and is | : | used to ensure that each row | : | contains an odd number of holes. Significance | 2 1 P 8 : 4 2 1 | This is checked on input to the | : | computer. |<--->| |<-------->| Control| | Basic | | Duet| | Quartet | | | | | '0' in either the control duet or the basic quartet is represented by no hole in that part of the tape. The values of the control duet and basic quartet for each character are given in the following table: Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp 1 2 3 4 5 6 7 8 9 10 11 + : . £ | | | Control 1 | - A B C D E F G H I = * ' ? LE □ | | | Duet 2 | & J K L M N O P Q R → % > < ½ \ | | NE | 3 | 0 / S T U V W X Y Z ( ) , or; BE ∆ | |_________________________________________________| NE = Number End } These two characters are only significant } if information is held in LE = Line End } variable field form BE = Block End ER = Erase. This character is ignore on input (although it can be punched on output). Blank tape is also ignored on input. SP = Space Page 2 of 8 Appendix A A.2 Character Code for Punched Cards Characters are punched on cards as follows: 1 2 3 78 79 80_ _ _ _ _ | / / \ ▲ | \ \ ▓ 10 1 \ | | / / | Control | \ \ ▓ 11 2 | Duet | / / | | | \ \ ▓ 0 3 | ▼ | / / -----------------------|--------- | \ \ ▓ 1 1 | ▲ | / / | | | \ \ ▓ 2 2 | | | / / | | | \ \ ▓ 3 3 | | | / / | | | \ \ ▓ 4 4 | | | / / | Basic | \ \ ▓ 5 5 | Quartet | / / | | | \ \ ▓ 6 6 | | | / / | | | \ \ ▓ 7 7 | | | / / | | | \ \ ▓ 8 8 | | | / / | | | \ \ ▓ 9 9 | | |_________/ /________________________________| _ _ ▼ _ ▲ ▲ ▲ ▲ Most Row Significance Least Significant No. Significant Column Column '0' in either the control duet or basic quartet is represented by no hole in that part of the card. A basic quartet value greater than 9 is represented by punching holes in both the '8' row and the (value minus 8) row, e.g. to represent basic quartet 12, holes are punched in the '8' and '4' rows. Note: Punching in the '9' and '3' rows will give a quartet value of 11, not 12, as the patterns generated by the individual holes are mixed (or'ed) not added. 8 = 1000 4 = 0100 ---- 1100 = 12 but 9 = 1001 3 = 0011 ---- 1011 = 11 Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp 1 2 3 4 5 6 7 8 9 10 11 + : . £ | | 10 | Control 1 |or - A B C D E F G H I = * ' ? LE □ | | 11 | Duet 2 |or & J K L M N O P Q R → % > < ½ \ | | NE | 3 | 0 / S T U V W X Y Z ( ) , or; BE ∆ | |__________________________________________________| NE = Number End Significant only if information is held in variable field form LE = Line End BE = Block End This character does not stop the reading process A negative number in fixed field form is denoted by punching a hole in the top row in the left-hand column of the group of columns allocated to that number in addition to any other holes punched in that column. (Note. If a column is expected to contain a hole in the 10, 11 or 0 row, an extra column must be allocated for the sign). Negative numbers in variable field form are followed by a '-' sign in a separate column. Page 4 of 8 Appendix A A.3 Character Code for Magnetic Tape Information is held on eight tracks on the magnetic tape, each row representing one character. These tracks contain the basic quartet, the control duet, a row parity bit, and a 'clock' track to denote the presence or absence of a character. The values a? the control, duet and basic quartet for each character are given in the following table: Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp 1 2 3 4 5 6 7 8 9 10 11 + : . £ | | | Control 1 | - A B C D E F G H I = * ' ? LE □ | | | Duet 2 | & J K L M N O P Q R → % > < ½ AM | | | 3 | 0 / S T U V W X Y Z ( ) , NE BE ∆ | |_________________________________________________| NE = Number End LE = Line End BE = Block End AM = Alignment Mark Note that this character code is designed to agree with the character codes on other media. However, since information on magnetic tape is not read by eye or used for anything other than input to the computer, any character may be used. The only characters which must have the above representation are BE and AM, which must be recognised by the assembler. Page 5 of 8 Appendix A A.4 Character Code for Anelex Printer Characters as defined by the table below are converted by the special Anelex assembler to a matrix which is copied to the printer. If the General Purpose Output assembler or standard Anelex assembler is being used the matrix must be formed in the store before output, e.g. by using the 29/0/1 action. Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp 1 2 3 4 5 6 7 8 9 10 11 + : . £ | | | Control 1 | - A B C D E F G H I = * ' ? ≡ □ | | | Duet 2 | & J K L M N O P Q R → % > < ½ \ | | | 3 | 0 / S T U V W X Y Z ( ) , ; Ш ∆ | |_________________________________________________| All the above characters can be printed under computer control if the printer is being used in conjunction with the General Purpose Output assembler or standard Anelex assembler. If the special Anelex printer assembler is being used: the following characters have special meanings and cannot be printed under computer control. ≡ = Line End Ш = Block End Appendix A A.5 Character Code for IBM Typewriter The values of the control duet and basic quartet for each character are given in the following table Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp 1 2 3 4 5 6 7 8 9 10 11 + : . £ | | | Control 1 | - A B C D E F G H I = * ' ? LE □ | | | Duet 2 | & J K L M N O P Q R → % > < ½ RS | | | 3 | 0 / S T U V W X Y Z ( ) , NE BE ∆ | |_________________________________________________| Sp = Space NE = Tabulate (Number End) LE = Carriage return and Line Feed (Line End) BE = Throw to next form (Block End). This only occurs if a formaliner is fitted, whereupon paper will be fed until a hole is detected in the control tape of the formaliner. BE does not cause carriage return, this must be produced by a LE prior to BE. RS = Ribbon Shift to Red. The ribbon will return to black on the next LE or BE character or if the initial reset key is operated on the assembler or control desk. Appendix A A.6 Character Codes in the Store Alpha characters in the store are held as a control quartet and basic quartet according to the table below. The conversion of control-duet to quartet is done automatically on input. On output the value of bit 3 of the control quartet is ignored. Basic Quartet 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ___________________________________________________ 0 | Sp | 1 | - | 2 | & | Control 3 | 0 | Quartet 4 | 1 2 3 4 5 6 7 8 9 10 11 + : . £ | 5 | A B C D E F G H I = * ' ? ≡ □ | 6 | J K L M N O P Q R → % > < ½ \ | 7 | / S T U V W X Y Z ( ) , ; Ш ∆ | |_________________________________________________| □ = 'Doubtful Block' mark \ = Alignment Mark Ш = Block End ≡ = Line End ; = Number End ∆ = Erase
Appendix B APPENDIX B : CONCISE INSTRUCTION CODE This appendix lists LEO III Computer Code Actions. The detailed description of each action will be found in the MAIN TEXT. ACTION 0 : REGISTER FACILITIES REFERENCE TO A d m MAIN TEXT 0/0/0 HALT 17.4 0/0/1 as 0/0/3 6.7.5 0/d/2 REPLACE (B) by (N) 6.7.1 0/0/3 SET RADIX COPY (N) to C 6.7.5 0/1/0 COPY REGISTERS (A), (B), (C) to N', N+2', N + 4' 17.1.6 0/1/1 REPLACE REGISTERS (A), (B), (C) by (N'), (N+2'), 17.1.6 (N+4') 0/1/3 as 0/1/1 17.1.6
Error in the manual, above references should be 17.1.8 (links are good).

ACTION 1 : ARITHMETIC ON LITERALS ETC
 A d m

 1/d/0 TABLE LOOK UP From N to find L where (L) >= (A)           16.6.2
       place L in B.  Arithmetic in binary

 1/0/1 PREPARE FOR DIGIT COLLATION    Set 15 quartets            6.7.4
       in B for each bit of N

 1/0/2 ROUND OFF Add 1 to (A) if Q10 of B >= N and               6.7.3
       clear B.

 1/0/3 INTERCHANGE AREA ADDRESSES                                16.1.2

 1/1/1 ADD N to (A)                                              6.7.2

 1/1/2 SUBTRACT N from (A)                                       6.7.2

 1/1/3 SELECT N into A                                           6.7.2


Appendix B ACTIONS 2 - 6 : ARITHMETIC ON LITERALS ETC REFERENCE TO A d m MAIN TEXT 2 d m TRANSFER (A) to N 6.7.1 3 d m COPY (A) to N 6.7.1 4 d m ADD (N) to (A) 6.7.1 5 d m SUBTRACT (N) from (A) 6.7.1 6 d m SELECT (N) into A 6.7.1 7 d m AUGMENT (N) by (A) 6.7.1 8 0 0 MERGE CONSTANT LENGTH 16.6.3 8 1 0 MERGE VARIABLE LENGTH 16.6.3 9 d m MULTIPLY UNIFORM RADIX. (A)x(N) set in AB 6.7.1 10 d m MULTIPLY AND ADD (N)x(B) added to (A) 6.7.1 11 d m MULTIPLY AND SUBTRACT (N)x(B) from (A) 6.7.1 12 d m CONVERT (N) to radix (C) and place in A 6.7.5 13 d m DIVIDE UNIFORM RADIX (AB) by (N) 6.7.1 Quotient in A remainder in B 14 d m REPLACE BITS of (N) found in (B) with corresponding 6.7.4 bits of (A) 15 d m COLLATE (N) with (B) and add to (A) 6.7.4 16 1 0 COMPARE STRINGS at (N) with (A) (LEO 326 only) 16.6.3 17 0 m SELECT (W) into A if N is even, otherwise select 7.1.8 (N+1'). No change is made to S and C form. 17 1 m COPY CO to N' if N is even, otherwise copy to 7.1.8 N+1'. No change is made to S and M form. ACTION 18 : SHIFT OR SCALE A d m 18 0 0 LOGICAL SHIFT (A) 6.7.3 18 0 1 ARITHMETIC SHIFT (A) 6.7.3 18 0 2 SCALE NUMERATOR FOR DIVIDE 6.7.3
Appendix B REFERENCE TO A d m MAIN TEXT 18 0 3 BINARY SHIFT (A) 6.7.3 18 1 0 LOGICAL SHIFT (AB) 6.7.3 18 1 1 ARITHMETIC SHIFT (AB) 6.7.3 18 1 2 SCALE DENOMINATOR FOR DIVIDE 6.7.3 18 1 3 BINARY SHIFT (AB) 6.7.5 ACTION 19 : TEST ROUTE N1 ENGAGED and if not: A d m 19 0 0 OUTPUT one block to route N1 16.1.3 19 0 1 (Timer) RESET to zero 16.1.3 (Other) INPUT one block from route N1 19.0 2 RUN BACK to last mark on route N1 16.1.3 19 0 3 RUN ON to next mark on route N1 16.1.3 19 1 0 STEP BACK one block on route N1 MT only 16.1.3 19 1 1 REWIND ROUTE N1 16.1.3 19 1 2 UNLOAD route N1 16.1.3 19 1 3 (MT) INPUT first word of block only 16.1.3 (Other) SET ROUTE Mi to MANUAL ACTIONS 20 - 22 : FLOATING POINT ARITHMETIC A d m 20 0 m ADD (N) to (A*) 7.1.7 20 1 m SUBTRACT (N)' from (A*) 7.1.7 21 0 m TRANSFER (A*) to N 7.1.7 21 1 m COPY (A*) to N 7.1.7 22 0 m MULTIPLY (A*) by (N) 7.1.7 22 1 m DIVIDE (A") by (N) 7.1.7 ACTIONS 23 - 27 : MODIFICATION AND SEQUENCE CHANGE. ETC. REFERENCE TO A d m MAIN TEXT 23 0 0 STEP AND TEST INDIRECT MODIFICATION REGISTER 8.4 23 0 1 Spare 23 0 2 ENTER MASTER PROGRAMME 17.1.5 23 0 3 SELECT TAG OF N into A 17.2.5 23 1 m SET TAG OF N 17.2.5 24 0 0 MODIFY DIVISION NUMBER AND ADDRESS of next 8.4 instruction within division, searching for a positive modifier 24 0 1 MODIFY DIVISION NUMBER AND ADDRESS of next 8.4 instruction within division by (N) 24 0 2 SELECT N into A, N is prefixed by current 8.5 division number 24 0 3 MODIFY NEXT INSTRUCTION ADDRESS by (N) 8.4 suppressing current division 24 1 0 CHANGE SEQUENCE to N 8.1 24 1 1 SET MODIFICATION GROUP 8.3 24 1 2 MODIFY NEXT INSTRUCTION ADDRESS, suppressing 8.4 current division and searching for a positive modifier 24 1 3 STORE INDICATORS 17.3 25 0 m STEP ON AND TEST MODIFICATION REGISTER M 8.3 25 1 0 SET INDICATORS 17.3 25 1 1 CLEAR INDICATORS 17.3 25 1 2 INTERROGATE INDICATORS 17.3 25 1 3 CONDITIONAL HALT 17.3 26 0 0 ENTER SUBROUTINE 8.2 26 0 1 LEAVE SUBROUTINE 8.2 26 0 2 ENTER PRIORITY CONTROL 17.1.4
Appendix B REFERENCE TO A d m MAIN TEXT 26 0 3 LEAVE MASTER PROGRAMME 17.1.5 26 1 0 TEST ROUTE N1 16.1.1 26 1 m SET MODIFICATION REGISTER M 8.3 27 0 m TEST (A) and SEQUENCE CHANGE 8.1 27 1 m TEST (AB) and SEQUENCE CHANGE 8.1 m = 0 Test zero m = 1 Test non-zero m = 2 Test positive or zero m = 3 Test negative ACTIONS 28 - 29 : COPY/CLEAR UNPACK PACK A d m 28 0 0 BULK COPY short numeric to short numeric 16.5.2 28 0 1 BULK COPY short numeric to alpha 16.5.2 28 1 0 BULK COPY alpha to short numeric 16.5.2 28 1 1 BULK COPY alpha to alpha 16.5.2 28 0 0 BULK CLEAR short locations from N 16.5.2 28 1 1 BULK CLEAR long locations from N 16.5.2 28 0 2 UNPACK FIXED FIELD DATA 16.2.2 28 0 3 UNPACK VARIABLE FIELD DATA 16.2.2 28 1 2 EDIT 16.3.2 28 1 3 CONDENSE 16.3.2 29 0 0 EDIT FOR HOLLERITH OUTPUT 16.4.2 29 0 1 EDIT FOR ANELEX OUTPUT 16.4.2 29 0 3 EXPAND (LEO 326 only) 16.2.2 ACTIONS 30 - 31 : DOUBLE LENGTH ARITHMETIC A d m 30 0 m TRANSFER (AB) to N+2', N' 7.2 30 1 m COPY (AB) to N+2', N' 7.2 31 0 m ADD (N+2'), (N') to (AB) 7.2 31 1 m SUBTRACT (N+2'), (N') From (AB) 7.2
Appendix E APPENDIX E : USE OF STORE COMPARTMENTS IN DIVISION 0 Certain compartments in division 0 of the store have special uses and their use for other purposes should be avoided by programmes. A full list is given below. Compartments shown as being used by certain actions are working locations used within the actions. Their contents will not necessarily be preserved when these actions are used. Compartment Use 0 Actions 18, 29 1 Actions 8, 19, 20, 21, 22, 28, 29 2 Current value | | | mod. reg. 1 | 3 End value | | | 4 | | | mod. reg. 2 | mod. group 0 5 | | | 6 | | | mod. reg. 3 | 7 | | 8 Link set up on Interruption | | Interruption 9 Set up by Master Programme at | 26/0/1/0/2 | 10 | | | mod. reg. 1 | 11 | | | 12 | | | mod. reg. 2 | mod. group 1 13 | | | 14 | | | mod. reg. 3 | 15 | | 16 Link set up on lockout | | Lockout 17 Set up as sequence change to | lockout routine |
Appendix E Compartment Use 18 | | | mod. reg. 1 | 19 | | | 20 | | | mod. reg. 2 | mod. group 2 21 | | | 22 | | | mod. reg. 3 | 23 | | 24 Link set up on overflow | | 25 Set up as sequence change to overflow | Overflow routine | 26 | | | mod. reg. 1 | 27 | | | 28 | | | mod. reg. 2 | mod. group 3 29 | | | 30 | | | mod. reg. 3 | 31 | | 32 | | Actions 8, 28, 29 33 | 34 | | 35 | : | Actions 9, 22 : | 63 | | 64 | Transit area start location for | route 0 | | 65 Transit area start location for | : route 1 | also containing in : | Q5 key of programme : | using this route 126 Transit area start location for | route 62 | | 127 Transit area start location | route 63 | Appendix E Compartment Use 128 | | 129 | | Floating point accumulator (A*) 130 | | 131 | 132 | | Actions 20, 21, 22 133 | 134 | | 135 | | Action 22 136 | | 137 | 138 | | 139 | : | No fixed use (used by Master Programme) : | 152 | | 153 | 154 | | Paper tape assembler; next word to be output 155 | 156 24-hour clock; time copied every seconds 157 Millisecond timer; value copied every millisecond 158 | | Action 9 159 |