390 Part 4 The instruction-set processor level: special-function processors
Section 4 Processors based on a programming language
Address |
Location in Figure |
Description |
1161: |
C1: |
The instruction counter U addresses main storage. The addressed byte in main storage is read out into the storage data register R. The instruction counter is updated by adding 1 to register J. A possible carry is saved to be added to 1. |
1117: |
C2: |
The operator has been read out from main storage into R. It is also transferred (through the ALU)to register G. A four-way branch occurs on the two highest bits R0 and R1 of the operator. For the operators 52, 53, and 50 this branch goes to ROS word 1171, whereas other operators cause a branch to 1170, 1172, or 1173, indicated by the three lines not continued. |
1171: |
C3: |
To complete the updating of the instruction counter, the carry from 1161 is added into I. The first byte of the highest entry of the stack is addressed by UV and read out into R. A further four-way branch on the operator is made (G2, G3). For our operators the branch goes to 115D. |
115D: |
C4: |
The high order byte of the highest stack entry has been read out of storage into R. It contains the type of entry in the high digit and if this type was logical then it contains the value true (1) or false (0) in the second digit. This byte is tested by adding X'DO' to it and observing the result, ignoring the carry. S4 is set to 1 when the type was 3 (logical) otherwise to 0. S5 is set to 1 when the low digit of this byte was 0 (value false), S5 is set to 0 when the low digit of this byte was 1 (value true). Another four-way branch occurs on the bits G4 and G5 of the operator. If the operator is 50(or), 51 (cannot occur), 52 (and), or 53(then), then a branch to 11C4 occurs. |
11C4: |
L4: |
The next byte is read from the program string, it is the high byte of the two-byte program address trailing the operator. The instruction counter is updated again by adding a 1 to J, saving a possible carry. Another four-way branch occurs on the bit G6 of the operator and the value of the stack entry. If the operator was and or then (G6 = 1) and the value was false (S5 = 1), then branching to 11CB occurs; if the operator was or (G6 = 0) and the value was true (S5 = 0), then branching to 11C8 occurs. If the operator was or (G6 = 0) and the value was false (S5 = 1), then branching to 11C9 occurs. If the operator was and or then (G6 = 1) and the value was true (S5 = 0), then branching to 11CA occurs. |
11CB: |
G5: |
This word is executed for the operators and and then when the value was false. Here the type test is made. If the type was not logical (S4 = 0), then a branch to 11C1 occurs. If the type was correct, then the microprogram proceeds to fetching the trailing program address (two bytes) to store it as the new instruction counter in IJ. This is done for the and operator (G7 = 0) in this word and the following two words 11C3 and 111E; for the then operator (G7 = 1) it is done in this word and the words 11C3 and 111F. |
11C3, 111E: |
J6, J7: |
The two bytes trailing of the operators and or or are stored as the new instruction counter IJ. |
11C3, 111F: |
J6, L7: |
The two bytes trailing of the operator then are stored as the new instruction counter in IJ. The carry-saving bit S3 is forced to zero. |
11CE, 1144: |
N8, N9: |
The stackpointer is decremented by four (the operator '-' means complement add) which in effect deletes the highest entry from the stack. Observe that when these two words are entered from 111F (then operator with value false) the microprogram will not go through 1145 because we have forced S3 to zero in 111F. The operation is completed, and the microprogram branches back to 1161 to read out the next operator. |
11C8: |
J5: |
This word is executed for the operator or when the value was true. Similarly as in 11CB, the typetest is taken. For types not logical a branch to 11C1 occurs. If the type was correct, then the microprogram proceeds to fetching the trailing program address (two bytes) to store it as the new instruction counter in IJ (words 11C3, 111E). |
11C9: |
N5: |
This word is executed for the operator or when the value was false. A typetest is made. If the type was correct, then the trailing program address is skipped and IJ is updated by 1 twice in 11C4,11C9 (possible carries out of J handled in 11CF or 1145). The stackpointer is decremented by four in 11CE, 1144. |
11CA: |
Q5: |
This word is executed for the operators and and then when the value was true. A typetest is made. If the type was correct then the trailing |