Close

Understanding the computer - Part 2

A project log for Apollo Guidance Computer

A running hardware implementation of the AGC, block II using TTL chips.

wglasfordwglasford 07/07/2022 at 12:180 Comments

Here are additional details you need to understand including the Control Pulse Matrix and the instructions.

The control pulses are the heart of the system. Each instruction has a sequence of control lines that are activated to cause data to flow through the system. Some of the control pulses have a control number in the control number column. These numbers came from the R-700 documentation. Through testing it was discovered there are a few minor errors in the matrix. I found another version that had the correct control pulses. These errors were in the multiply and divide instructions.

The following table is a combination of design and implementation. It lists each control pulse, where it originates and terminates on the hardware diagrams and what function is performed. The hardware diagram names are sub-system followed by module followed by sub-module. The Active State column can have a value of Low or High meaning the control pulse is active low or high, or values of Pulse meaning it is a pulse such as a clock pulse or a value of Bit meaning the value represents a bit value. Most of the control pulses are active low because many of the TTL chip inputs that are controlled are active low. That and many more of the TTL chips are active low logic. The few control pulses that are active high were chosen to be because that resulted in fewer chips required.  Just an FYI, this table formats better on my GitHub wiki page.

Control LineOriginDestinationPurposeCntl #Active State
A2XCTL-CPM-APROC-CRG-AREG, PROC-ALUCopy A1-16 into X1-16 by private line (i.e. not through WL).1Low
B15XCTL-CPM-APROC-ALUSet bit 15 of X to 12Low
BR1CTL-SEQCTL-CPM-ABR1 staten/aLow
BR2CTL-SEQCTL-CPM-ABR2 staten/aLow
CICTL-CPM-APROC-ALUSet carry in bit into CI register. Adds 1 to adder value.3Low
CLXCCTL-CPM-APROC-ALUClear X register if BR1=0. Used in Divide.4Low
CLISQCTL-CPM-CCTL-SEQClear the SNI bitn/aLow
CLK1CTL-CLKAll1 MHz Clockn/aPulse
CLK2CTL-CLKAll1 MHz Clockn/aPulse
CLK3CTL-CLKAll1 MHz Clockn/aPulse
CLK4CTL-CLKAll1 MHz Clockn/aPulse
CLRPCTL-CPM-CMEM-INTClear RpCell registern/aLow
DCDSUBCTL-CPM-CCTL-SEQDecode Sub-sequencen/aLow
DISPCTL-CPM-BDSKY-DSPWrite to Channel 10n/aLow
DVSTCTL-CPM-ACTL-SEQCause Divide staging by complimenting the next higher bit position. Sequence: 0, 1, 3, 7, 6, 4.5Low
DOTP1CTL-SEQCTL-CPM-CDo TP1 commandsn/aLow
DOTP4CTL-SEQCTL-CPM-CDo TP4 commandsn/aLow
DOTP6CTL-SEQCTL-CPM-CDo TP6 commandsn/aLow
DOTP7CTL-SEQCTL-CPM-CDo TP7 commandsn/aLow
DOTP10CTL-SEQCTL-CPM-CDo TP10 commandsn/aLow
DOTP12CTL-SEQCTL-CPM-CDo TP12 commandsn/aLow
EQU3MEM-MBFCTL-CPM-BInstruction address = 3n/aLow
EQU4MEM-MBFCTL-CPM-BInstruction address = 4n/aLow
EQU6MEM-MBFCTL-CPM-BInstruction address = 6n/aLow
EQU17MEM-ADRCTL-SEQInst. address = 17n/aLow
EXAMNXTMEM-ADR_SMEM-ADR-MDEExamine next key pressedn/aLow
EXTCTL-CPM-A, CTL-CPM-BCTL-SEQ-SEQBSet the extend bit.6Low
EXTENDCTL-SEQ-SEQBCTL-CPM-C, CTL-CPM-A, CTL-SEQ>td >n/aBit
F10XCTL-SCLMEM-CTR-CTL100 Hz timeoutn/aLow
F13XCTL-SCLCTL-TPG12.5 Hz timeoutn/aLow
F17XCTL-SCLCTL-TPG0.78125 Hz timeoutn/aLow
FCLKCTL-MONMEM-ADR-MDEClock Moden/aLow
GENRSTCTL-MONAllGeneral Resetn/aLow
G1MEM-MBFPROC-CRG-AREGG reg bit 1 valuen/aBit
G16MEM-MBFPROC-CRG-AREGG reg bit 16 valuen/aBit
G2LSCTL-CPM-APROC-CRG-LREG, MEM-MBF-GMBCopy G16,15-4,1 into L16,12-1 and X157Low
GETBPCTL-TPGMEM-ADR-ATS, MEM-ADR-CTLGet Breakpoint Addressn/aLow
GMZMEM-MBF-GMBCTL-SEQ-SEQAG reg. is all zerosn/aLow
GPMEM-EFMMEM-PARGenerate Parityn/aLow
GTR7MEM-ADR-CTLCTL-CPM-BAddress is > 07n/aLow
GTR1777MEM-ADR-CTLCTL-CPM-B, MEM-EFMAddress is > 01777n/aLow
INDCCTL-CPM-BDSKY-DSPWrite to channel 11n/aLow
INHINTCTL-CPM-BMEM-INTExecute INHINT commandn/aLow
INTRCTL-CPM-CCTL-SEQPerform Interrupt (RUPT)n/aLow
IRQMEM-INTCTL-CPM-CInterrupt requestedn/aLow
ISBPMEM-ADR-CTLCTL-TPG>td >n/aLow
ISRUPTMEM-INTCTL-TPGIs an interrupt pending?n/aLow
KB_STRDSKY-KBDMEM-INTKey Strobe, data is latchedn/aLow
KBD1CTL-CPM-BDSKY-KBDRead Channel 15n/aLow
KRPTCTL-CPM-AMEM-INTReset the current RUPT priority (cell).8Low
L1PROC-CRG-LREGCTL-CPM-BL register bit 1 valuen/aBit
L2PROC-CRG-LREGCTL-CPM-BL register bit 2 valuen/aBit
L15PROC-CRG-LREGPROC-ALUL register bit 15 valuen/aBit
L16CTL-CPM-APROC-CRG-LREGSet bit 16 of L to one.9Low
L2GDCTL-CPM-AMEM-MBF, PROC-CRG-LREGCopy L1-14,16 directly (not through WL) into G2-15,16. Also set G1 bit if MCRO pulse is set.10Low
MANDATAMEM-ADR-MDEMEM-EFM, MEM-MBF-GMB0 = AGC (normal ops), 1 = Manual Datan/aLow
MCROCTL-CPM-BMEM-MBF-MBLPart of the ZIP command.n/aLow
MONEXCTL-CPM-APROC-ALUSet bits 2-16 of X to ones, clear bit 1.11Low
MOUTOnly used by DINC, not implemented.N/ACauses generation of one minus drive pulse.n/aLow
NEACOFCTL-CPM-APROC-ALUPermit end around carry after end of MP3.12Low
NEACONCTL-CPM-APROC-ALUInhibit end around carry until NEACOF.13Low
NISQCTL-CPM-A, CTL-CPM-CCTL-SEQSet SNI bit. Next instruction to be loaded into SQ register. Permits increments and interrupts.14Low
PARALMMEM-PARDSKY-DSP-INDParity Alarmn/aHigh
PIFLCTL-CPM-APROC-ALUPrevents writing into bit 1 of Y reg on a WYD pulse if bit 15 of L reg contains a 1. Used for DV instruction.15Low
PINCCTL-CPM-CCTL-SEQExecute PINC commandn/aLow
PONEXCTL-CPM-APROC-ALUClear X register and set bit 1 of X to 1.16Low
PSTGZCTL-SEQ-SEQACTL-CPM-CPreStage is zero.n/aLow
PTWOXCTL-CPM-APROC-ALUClear X register and set bit 2 of X to 1.17Low
R15CTL-CPM-APROC-ALUOctal 015 to WL's18Low
R1CCTL-CPM-APROC-ALU1’s compliment of octal 1 to write bus (WL's)19Low
R6CTL-CPM-APROC-ALUOctal 6 to WL's20Low
RACTL-CPM-APROC-CRG-AREGRead A1-16 to WL1-16.21Low
RADCTL-CPM-ACTL-CPM-BRead address of next instruction. Appears at TP8 and normally interpreted as RG. If next instruction is INHINT, RELINT or EXTEND, it is interpreted as RZ & ST2 instead.22Low
RBCTL-CPM-A, CTL-CPM-CPROC-ALURead B1-16 to WL1-1623Low
RBBKCTL-CPM-AMEM-ADR-BNKRead BB register onto WL's. FB16 to WL16,15 & FB11-14 to WL11=14 & EB9-11 to WL1-3.27Low
RB1CTL-CPM-APROC-ALUOctal 1 onto WL's24Low
RB1FCTL-CPM-APROC-ALUOctal 1 onto WL's if BR1=1.25Low
RB2CTL-CPM-APROC-ALUOctal 2 onto WL's26Low
RCCTL-CPM-APROC-ALURead C register (B')28Low
RCHCTL-CPM-ACTL-CPM-B, PROC-CRG-RCHN, MEM-ADR-ATSRead contents of channel address in S. Channel bits 1-14 to WL1-14 & bit 16 to WL15,16. Channels 1 & 2 same as RL and RQ29Low
REBCTL-CPM-BMEM-ADR-BNKRead erasable bank regn/aLow
RELINTCTL-CPM-BMEM-INTExecute RELINT command.n/aLow
RFBCTL-CPM-BMEM-ADR-BNKRead fixed bank regn/aLow
RGCTL-CPM-A, CTL-CPM-BMEM-MBFRead G1-16 onto WL1-16.30Low
RLCTL-CPM-APROC-CRG-LREGRead L1-14 to WL1-14 and L16 to WL15,1631Low
RLCCTL-CPM-BPROC-CRG-LREGRead channel bus into L registern/aLow
RL10BBCTL-CPM-APROC-ALURead B1-10 to WL1-10. Replaces c(S) by a 10 bit address.32Low
RPROCTL-CPM-ADSKY-KBDRead the PRO key from DSKY.n/aHigh
RPTCTL-CPM-CMEM-INTLatch Interrupt Vectorn/aLow
RQCTL-CPM-APROC-CRG-QREGRead Q1-16 to WL1-1633Low
RQCCTL-CPM-BPROC-CRG-QREGRead Channel bus into Q registern/aLow
RRPACTL-CPM-AMEM-INTRead address of highest priority interrupt requested.34Low
RSBCTL-CPM-BMEM-ADR-BNKRead Channel 7n/aLow
RSCCTL-CPM-ACTL-CPM-BRead central register defined by address in S reg. Bits 1-16 to WL1-16.35Low
RSCTCTL-CPM-AMEM-CTR-CNTRead address of highest priority counter request.36Low
RSM3CTL-CPM-ACTL-CPM-CSubsequence RSM3 is active. (output to C only, not outside CPM)n/aLow
RSTRTCTL-CPM-A, CTL-CPM-CPROC-ALUOctal 04000 to WL's. Block 2 start address.37Low
RSTSTGCTL-CPM-A, CTL-CPM-CCTL-SEQReset the stage counter to zero.38Low
RUCTL-CPM-APROC-ALURead U1-16 to WL1-1639Low
runPINCMEM-CTR-CNTCTL-CPM-CRun the PINC sub-seq.n/aLow
RUSCTL-CPM-APROC-ALURead U1-14 to WL1-14 & U15 to WL15,1640Low
RZCTL-CPM-A, CTL-CPM-BPROC-CRG-ZREGRead Z1-16 to WL1-1641Low
SBWGCTL-CPM-CMEM-EFM, MEM-MBF-MBLWrite G register to memory shifted.n/aLow
SNICTL-SEQCTL-CPM-C, CTL-TPGSet up for next instruction.n/aLow
STBYCTL-TPGVariousPut AGC in standby by; disable display,n/aLow
ST1CTL-CPM-ACTL-SEQSet Stage 1 flip flop to 1 at next TP12.42Low
ST2CTL-CPM-A, CTL-CPM-BCTL-SEQSet Stage 2 flip flop to 1 at next TP12.43Low
STAGECTL-CPM-ACTL-SEQ, CTL-CPM-C, CTL-SEQExecute next sub-instruction as defined by stage counter.44Low
TL15CTL-CPM-ACTL-SEQCopy L15 into BR1.45Low
TM3RUPTMEM-CTR-CTLMEM-INTInterrupt 3 assertedn/aLow
TM4RUPTMEM-CTR-CTLMEM-INTInterrupt 4 assertedn/aLow
TMZCTL-CPM-ACTL-SEQTest WL1-16 for all ones. Set BR2=1 if true, else BR2=0.46Low
TOVCTL-CPM-ACTL-SEQTest for overflow (WL16,15). Set BR1/BR2 to 00 if no overflow, 01 if positive overflow, 10 if negative overflow.47Low
TPMEM-EFMMEM-PARTest Parityn/aLow
TPZGCTL-CPM-ACTL-SEQTest content of G for +0. If true, set BR2 to 1, else BR2=0.48Low
TRSMCTL-CPM-ACTL-SEQTest for resume address (0017) during NDX0. If exists, set c(ST)=3 to execute RSM3, else set c(ST)=1.49Low
TSGNCTL-CPM-ACTL-SEQTest Sign. Copy WL16 to BR1.50Low
TSGN2CTL-CPM-ACTL-SEQTest Sign 2. Copy WL16 to BR2.51Low
TSGUCTL-CPM-ACTL-SEQTest sign of Sum (U16). Copy U16 into BR1.52Low
U16PROC-ALUPROC-CRG-AREGU reg bit 16 valuen/aBit
U2BBKOnly used by FETCH1, not implemented.N/AAdder bits U16,14-11 to FB and U1-3 to EB1-3. May be inhibited by signal MONWBK.53Low
W20CTL-CPM-BMEM-MBF-MBL, MEM-MBF-SFTPerform CYRn/aLow
W21CTL-CPM-BMEM-MBF-MBL, MEM-MBF-SFTPerform SRn/aLow
W22CTL-CPM-BMEM-MBF-MBL, MEM-MBF-SFTPerform CYLn/aLow
W23CTL-CPM-BMEM-MBF-MBL, MEM-MBF-SFTPerform EDOPn/aLow
WACTL-CPM-APROC-CRG-AREGClear and write WL1-16 into A1-16.54Low
WALSCTL-CPM-APROC-CRG-AREG, PROC-CRG-LREGClear and write into A1-14 from WL3-16. If G1=0, then G16 to A15,16, else U16 to A15,16. Clear and write WL1-2 to L13-14.55Low
WBCTL-CPM-APROC-ALUClear and write from WL1-16 into B1-16.56Low
WBBCTL-CPM-BMEM-ADR-BNKWrite to both banksn/aLow
WCHCTL-CPM-ACTL-CPM-B, PROC-CRG-WCHNClear and write W1-14,16,parity into channel bits 1-14,16,parity. Channel address in S reg. Channels 1 & 2 same as WL & WQ.57Low
WECTL-CPM-CMEM-EFM, MEM-MBF-MBLWrite G register contents into memory based on S address.n/aLow
WEBCTL-CPM-BMEM-ADR-BNKWrite to Erasable Bankn/aLow
WFBCTL-CPM-BMEM-ADR-BNKWrite to Fixed Bankn/aLow
WGCTL-CPM-AMEM-MBF-SFT, CTL-CPM-BClear and write WL1-16 into G1-16 except for addresses 020-023 which causes editing.58Low
WLCTL-CPM-APROC-CRG-LREGClear and write WL1-16 into L1-16.59Low
WLCCTL-CPM-BPROC-CRG-LREGWrite L register to channel busn/aLow
WOVRCTL-CPM-AMEM-CTR-CTLTest WL15,16 for positive overflow. If S contains 0025, increment counter 024. If S contains 026, 027 or 030 then execute RUPT.60Low
WPCTRCTL-CPM-CMEM-CTR-CNTIncrement countern/aLow
WQCTL-CPM-APROC-CRG-QREGClear and write WL1-16 into Q1-16.61Low
WQCCTL-CPM-BPROC-CRG-QREGWrite to Q register to channel busn/aLow
WSCTL-CPM-AMEM-ADR-S, CTL-CPM-CClear and write WL1-12 into preS1-12.62Low
WSBCTL-CPM-BMEM-ADR-BNKWrite to Channel 7n/aLow
WSCCTL-CPM-ACTL-CPM-BClear and write into central register specified by S register63Low
WSTCTL-CPM-CMEM-ADR-SMove preS data to S regn/aLow
WSQCTL-CPM-A, CTL-CPM-CCTL-SEQClear and write WL10-14,16 into SQ10-14,16 and copy extend flop flop into SQ15.64Low
WYCTL-CPM-APROC-ALUClear X, Y & CI. Write WL1-16 into Y1-16.65Low
WY12CTL-CPM-APROC-ALUClear X, Y & CI. Write WL1-12 into Y1-12.66Low
WYDCTL-CPM-APROC-ALUClear X, Y & CI. Write WL1-14 into Y2-15 and WL16 into Y16. Write WL16 into Y1 except 1) when end-around carry is inhibited by NEACON 2) during SHINC sequence or 3) PIFL is active and L15=1.67Low
WZCTL-CPM-A, CTL-CPM-CPROC-CRG-ZREGClear and write WL1-16 into Z1-16.68Low
Z15CTL-CPM-APROC-CRG-ZREGSet bit 15 of Z to 1.69Low
Z16CTL-CPM-APROC-CRG-ZREGSet bit 16 of Z to 1.70Low
ZAPCTL-CPM-ACTL-CPM-AGenerate control pulses RU, G2LS & WALS. Used by MP K instruction.71Low
ZIPCTL-CPM-ACTL-CPM-AGenerate control pulses A2X & L2GD. Also the pulses shown below.72Low

ZIP also implies if L15,2,1 are:

L15L2L1READWRITECARRYREMAINDER
000WY
001RBWY
010RBWYD
011RCWYCIMCRO
100RBWY
101RBWYD
110RCWYCIMCRO
111WYMCRO

The instructions that are executed by the AGC are integral to the understanding of both the hardware and the software. They are described here so as not to clutter the design section. In the following sections, L is the location of the instruction and K is the data address (i.e. the operand) of the instruction. Items in parenthesis preceded by “c” mean the resulting contents of that variable. Items in parenthesis preceded by “b” mean the contents before the operations. The “editing if K is 0020 – 0023” means the bit shifts and rotates occur.

There are both “voluntary” and “involuntary” instructions. The voluntary instructions are the ones that can be coded, compiled and placed in fixed memory to execute. The involuntary instructions are triggered as part of counter interrupts and cannot be coded into a fixed memory program. The only involuntary instruction implemented here is the PINC instruction due to the limited counters implemented.

  1. TC K: Transfer Control

This instruction transfers control to address K after placing the return address into Q. The special cases are K = 3, 4 & 6.

c(Q) ← L + 1
  1. TC 3: RELINT: Allow Interrupts

This instruction allows the resumption of interrupts after the INHINT instruction.

  1. TC 4: INHINT: Inhibit Interrupts

This instruction inhibits interrupts from occurring.

  1. TC 6: EXTEND: Extracode Bit

This instruction sets the extracode bit which sets the high order, bit 16 of the opcode. This is used to double the number of available instructions and is used for less frequently used instructions as it requires this extra instruction to execute the extracode instructions.

  1. CCS K: Count, Compare & Skip

This instruction is a four way branching instruction. The following describes the four branching conditions. The value assigned to K is called the Diminished Absolute Value (DABS) which replaces A with one less than the its previous value. This allows for a looping count down construct.

c(A) ← DABS[(K)] where DABS(x) = |x| - 1 if |x| > 1 or +0 if |x| <= 1
c(K) ← b(K), editing if K is 0020 - 0023
if b(K) > +0 then no skip
if b(K) = +0 then skip to L + 2
if b(K) < -0 then skip to L + 3
if b(K) = -0 then skip to L + 4
  1. DAS K: Double Add to Storage

This instruction adds the contents of K and K + 1 to the A and L registers. If K or K + 1 is 0020 through 0023 then the shifts/rotates occur.

c(K, K + 1) ← b(A, L) + b(K, K + 1)
  1. LXCH K: Exchange L and K

This instruction exchanges L with K. The prime tick indicates overflow correction.

c(L) ← b'(K)
c(K) ← b(L), editing if K is 0020 - 0023
  1. INCR K: Increment

This instruction increments K.

c(K) ← b(K) + 1, editing if K is 0020 - 0023
  1. ADS K: Add to Storage

This instruction adds A to K and the results are both placed into A and K.

c(A) & c(K) ← b(K) + b(A), editing if K is 0020 - 0023
  1. CA K: Clear and Add

This instruction places the value of K into A.

c(A) ← b(K)
c(K) ← b(K), editing if K is 0020 – 0023
  1. CS K: Clear and Subtract

This instruction places the negated value of K into register A.

c(A) ← -b(K)
c(K) ← b(K), editing if K is 0020 - 0023
  1. INDEX K: Index Next Instruction

This instruction modifies the next instruction by adding the operand to the next instruction.

c(K) ← b(K), editing if K is 0020 – 0023
Use [b(K) + c(I + 1)] as next instruction
  1. INDEX 0017: Resume Interrupted Program

This is a special instruction that resumes from an interrupted program. c(0017) contains the next instruction.

c(Z) = c(0015)
  1. DXCH K: Double Exchange

This instruction exchanges the contents of A and L with K and K + 1.

c(A, L) ← b(K, K + 1)
c(K, K + 1) ← b(A, L), editing if K or K + 1 is 0020 - 0023
  1. TS K: Transfer to Storage

This instruction transfers the contents of K to storage.

c(K) ← b(A), editing if K is 0020 - 0023
if (A) has positive overflow, A ← +1, skip to L + 2
if (A) has negative overflow, A ← -1, skip to L + 2
  1. XCH K: Exchange

This instruction exchanges the data in K with the data in register A.

c(A) ← b(K)
c(K) ← b(A), editing if K is 0020 - 0023
  1. MASK K: Mask

This instruction ORs the contents of K with the contents of A.

c(A) ← b(A) || c(K)
  1. READ KC: Read Channel KC

This instruction reads the KC channel into register A.

c(A) ← c(KC)
  1. WRITE KC: Write Channel KC

This instruction writes the contents of register A onto the KC channel.

c(KC) ← c(A)
  1. RAND KC: Read and Mask

This instruction reads the KC channel and ANDs it with the contents of register A.

c(A) ← b(A) & c(KC)
  1. WAND KC: Write and Mask

This instruction writes the contents of register A masked with the contents of KC channel into A and KC.

c(KC) and c(A) ← b(A) & b(KC)
  1. ROR KC: Read and Superimpose

This instruction reads the KC channel and ORes it with the contents of register A.

c(A) ← b(A) || c(KC)
  1. WOR KC: Write and Superimpose

This instruction writes the contents of register A ORed with the contents of KC channel into A and KC.

c(KC) and c(A) ← b(A) || b(KC)
  1. RXOR KC: Read and Invert

This instruction reads the KC channel and XORes it with the contents of register A.

c(A) ← b(A) xor c(KC)
  1. DV K: Divide

This instruction divides the contents of A by the contents of K. The quotient is placed in A and the remainder is places in Q.

c(A) ← b(A, L) / c(K)
c(L) ← remainder
  1. **BZF K: Branch Zero to Fixed ** This instruction branches to instruction in K if the contents of A is zero else it simply executes the next instruction.
If c(A) = 0 then branch to K.
  1. MSU K: Modular Subtract

This instruction performs a 1's compliment subtraction of K from A. A modular subtraction is the difference between two unsigned 2's compliment inputs.

c(A) ← b(A) 0 b(K) where 0 is a modular subtract
c(K) ← b(K), editing if K is 0020 – 0023
  1. QXCH K: Exchange Q and K

This instruction exchanges the contents of the Q register and the contents of K.

c(Q) ← b(K)
c(K) ← b(Q), editing if K is 0020 – 0023
  1. AUG K: Augment

This instruction augments K which means the value is incremented if positive or decremented if negative.

If b(K) >= +0, c(K) ← b(K) + 1, editing if K is 0020 – 0023
If b(K) <= -0, c(K) ← b(K) - 1, editing if K is 0020 – 0023
  1. DIM K: Diminish

This instruction diminishes K which means the value is decremented if positive or incremented if negative.

If b(K) > +0, c(K) ← b(K) - 1, editing if K is 0020 – 0023
if b(K) = 0, c(K) ← b(K), editing if K is 0020 - 0023
If b(K) < -0, c(K) ← b(K) +1, editing if K is 0020 – 0023
  1. DCA K: Double Clear and Add

This instruction moves K and K + 1 to A and L.

c(A, L) ← b(K, K + 1)
c(K) ← b(K), editing if K is 0020 – 0023
c(K + 1) ← b(K + 1), editing if K is 0020 – 0023
  1. DCS K: Double Clear and Subtract

This instruction moves the negated values of K and K + 1 to A and L.

c(A, L) ← -b(K, K + 1)
c(K) ← b(K), editing if K is 0020 – 0023
c(K + 1) ← b(K + 1), editing if K is 0020 – 0023
  1. INDEX K: Index Extracode

This instruction is the same as the non-extracode version except the extracode switch is not reset.

  1. SU K: Subtract

This instruction subtracts the contents of K from A. If an overflow occurs, either +1 or -1 is placed into A depending on the type of overflow.

c(A) ← b(A) – b(K)
c(K) ← b(K), editing if K is 0020 – 0022
  1. BZMF K: Branch Zero or Minus to Fixed

This instruction branches to the instruction at K if register A is zero or negative, otherwise it continues with the next instruction.

if c(A) <= +0, branch to instruction at K,
else execute next instruction
  1. MP K: Multiply

This instruction multiplies the contents of with the contents of K. The results are placed into the A and L registers.

c(A, L) ← b(A) * c(K)
  1. PINC: Positive Increment

This involuntary instruction is used to increment a counter by one.

c(CTR) = b(CTR) + 1

Discussions