ER[DG0]; %TO ASSEMBLE: @MI@ DGBASIC/L DGBASIC/B DG0 DG1 DG2B (USE DG2A INSTEAD OF DG2B ON MAXC1.) TO RUN: MIDAS RDG01 START;G DG0, THE MOST BASIC OF ALL SELF-TESTING MICROPROCESSOR DIAGNOSTICS, TESTS ALMOST EVERYTHING EXCEPT THE MEMORIES, THE CYCLER AND ALU INPUTS TO THE P-REGISTER, AND THOSE FUNCTIONS WHICH DEPEND UPON THE MEMORIES IN SOME WAY. ERRORS RESULT IN A HALT (BREAKPOINT). MANY HALTS OCCUR AT THE "CBRK" INSTRUCTION IN "DBEG0". THESE ARE THE RESULT OF A CALL TO ONE OF THE TEST ROUTINES, "PQCOMP", "AZT", "PEQZ", "QZT", "NQZT", "PZT", OR "NPZT". THE ADDRESS OF THE CALLER IS AT "STK 0" ON THE MIDAS DISPLAY. % INSERT[DBEG.MC]; TARGET[ILC]; BEGIN: GOTO[TCALL], STEMP←ARM←NULL; BREAK; *UNCONDITIONAL GOTO FAILED TCALL1: RETURN; BREAK; *RETURN FAILED TO TAKE AT ALL TCALL2: P←STACK, Q←A0; B←P+1, NPC←B; Q←A1; *GOING TO A RANDOM PLACE AFTER THIS INSTR. *MEANS THAT THE STACK FAILED TO HOLD THE *RETURN ADDRESS FOR THE CALL OR THAT P+1 *FAILED OR THAT NPC← FAILED. BREAK; *NPC← DIDN'T DO ANYTHING TCALL: CALL[.+2]; BREAK; *UNCONDITIONAL CALL FAILED TO JUMP CALL[TCALL2]; BREAK; *CALL OR P+1 FAILED DGOTO[.+2]; GOTO[.+2]; BREAK; *UNCONDITIONAL DGOTO FAILED TO EXECUTE FOLLOWING *INSTRUCTION DGOTO[.+3]; P←P1; BREAK; *UNCONDITIONAL DGOTO FAILED BR0: P←Q←NULL; P#Q; CALL[CBRK,ALU#0], P#Q; *GOTO TOOK WHEN BC ALU#0 WAS FALSE OR *P#Q FAILED OR P←Q←B FAILED ON 0 CALL[CBRK,ALU#0], P#Q; *P←P1 OR Q←Q FAILED ON 0 GOTO[.+2,ALU=0]; BREAK; *P←Q←B, P#Q, ALU#0 OR ALU=0 BC FAILED P←Q←B, B←A1; P#Q; CALL[CBRK,ALU#0], P#Q; *GOTO TOOK WHEN BC ALU#0 WAS FALSE OR P#Q *FAILED OR P←Q←B FAILED ON -1 CALL[CBRK,ALU#0], P#Q; *P←P1 OR Q←Q FAILED GOTO[.+2,ALU=0]; BREAK; *P←Q←B, P#Q, ALU#0 OR ALU=0 BC FAILED ON -1 P←B, Q←B←A0, CALL[PQCOMP]; *Q←ALU, P←B, OR B←ALU FAILED ON 0 P←B, Q←B←A1, CALL[PQCOMP]; *Q←ALU, P←B, OR B←ALU FAILED ON -1 *SO FAR ALL TESTS OF ALU=0 HAVE BEEN TRUE AND ALL TESTS OF ALU#0 FALSE. *WE NOW ASSUME THAT ALU=0 WILL BE TRUE WHEN IT IS SUPPOSED TO BE TRUE *BUT THERE REMAINS DANGER THAT IT WILL BE TRUE WHEN IT IS SUPPOSED TO BE *FALSE. REDUCE THIS DANGER BY CHECKING WITH THE P+1 AND 2P ALU FUNCTIONS *WHICH HAVE NOT BEEN TESTED YET. P←NULL; B←P+1, P←B; ALU0T: P←B, B←2P, CALL[CBRK,ALU=0]; *P+1 FAILED ON P=0 OR ALU=0 FAILED ON 1 REPEAT[42,ILC[(P←B, B←2P, CALL[CBRK,ALU=0])]]; *2P, P+1, OR ALU=0 FAILED *IF [P] #0 THEN ALU=0 FAILED *X>=0 AND X<0 BC TESTS HERE, NOT COMPLETELY TESTED UNTIL LATER XBCT: X←NULL; GOTO[.+2,X>=0]; BREAK; *X>=0 FAILED ON 0 OR X[28] FAILED CALL[CBRK,X<0]; *X<0 FAILED ON 0 OR X[28] FAILED X←A1; GOTO[.+2,X<0]; BREAK; *X<0 FAILED ON 377 OR X[28] FAILED CALL[CBRK,X>=0]; *X>=0 FAILED ON 377 OR X[28] FAILED *Y>=0 AND Y<0 BC TESTS HERE YBCT: Y←NULL; GOTO[.+2,Y>=0]; BREAK; *Y>=0 FAILED ON 0 OR Y[27] FAILED CALL[CBRK,Y<0]; *Y<0 FAILED ON 0 OR Y[27] FAILED Y←A1; GOTO[.+2,Y<0]; BREAK; *Y<0 FAILED ON 777 OR Y[27] FAILED CALL[CBRK,Y>=0]; *Y>=0 FAILED ON 777 OR Y[27] FAILED Y←X; GOTO[.+2,Y>=0]; BREAK; *Y>=0 FAILED ON 377 OR Y STORAGE FAILED CALL[CBRK,Y<0], INCY; *Y<0 FAILED ON 377 GOTO[.+2,Y<0]; BREAK; *Y<0 FAILED ON 400 OR INCY FAILED OR *X STORAGE FAILED OR Y STORAGE FAILED ON 377 CALL[CBRK,Y>=0]; *Y>=0 FAILED ON 400 *TEST INCX AGAINST INCY IXIYT: X←NULL; Y←NULL; IXIYL: P←X; Q←Y, CALL[PQCOMP]; *X←B, Y←B, INCX, OR INCY FAILED INCY, DGOTO[.+3]; INCX, GOTO[IXIYL,Y>=0]; BREAK; *GOTO[Y>=0] OR DGOTO[ALWAYS] FAILED P←X, CALL[PZT]; *INCY FAILED COUNTING 0 TO 400 *TEST INCY AGAINST P+1 Y←P←NULL, GOTO[IYP2]; IYP1: P#Q; GOTO[.+2,ALU=0], P←B, B←P+1, INCY; BREAK; *CARRY1=F2 OR ALUF=37 (P) OR P←P1 FAILED IYP2: GOTO[IYP1,Y>=0], Q←Y; IYP3: P#Q; GOTO[.+2,ALU=0], INCY, P←B, B←P+1; BREAK; *CARRY1=F2 OR ALUF = 37 OR P←P1 FAILED GOTO[IYP3,Y<0], Q←Y; AQ, CALL[AZT]; *INCY FAILED GOING 777 TO 0 *TEST THAT 2P+1 REPEATED 44 TIMES WITH P=0 INITIALLY PRODUCES -1 T2P: Q←A1, P←NULL, DGOTO[.+1]; REPEAT[21,ILC[(P←B, B←2P+1, DGOTO[.+1])]]; P←B, B←2P+1; CALL[PQCOMP]; *2P+1 FAILED (PROBABLY CARRY FAILURE) *TEST 2P AGAINST Q LSH 1 QLSHV2PT: P←Q←NULL; P←B, B←P+1; Q←2P; P←B, B←P+1, CALL[PQCOMP]; *P←2P FAILED P←Q←NULL; P←Q←B, B←P+1; P#Q; QL2P1: GOTO[.+2,ALU=0], AQ; BREAK; *P←2P OR Q LSH 1 FAILED ON SINGLE 1 Q LSH 1, P←B, B←2P, GOTO[.+2,ALU#0]; BREAK; *ALU#0 FAILED P#Q, GOTO[QL2P1, ALU#0]; P←Q←B, B←A1; QL2P2: P#Q, CALL[AZT]; *P←2P OR Q LSH 1 FAILED ON LEADING 1'S P←B, Q LSH 1, B←2P; GOTO[QL2P2,ALU#0]; *STACK IS 12 BITS WIDE, 12 BITS LOADED FROM BUS, LEADING BIT =0 ON CALL *STACK← FIRST PUSHES B[1,13] AND ALSO SETS G=1 IF B[0]=1 BUT LEAVES *G UNCHANGED IF B[0]=0. THEN IT PUSHES B[14,27]. NOTE THAT THE FIRST *PUSH IS OF ONLY 11 BITS WHILE THE 2ND IS OF 12 BITS. ***REMEMBER TO CHECK STACK← FOR ITS AFFECT ON G LATER. TSTACK: REPEAT[6,ILC[(P←STEMP1←STACK←NULL)]]; TST0: REPEAT[14,ILC[(STEMP←Q←STACK)] ILC[(P#Q, POP)] ILC[CALL[CBRK,ALU#0]]]; *STACK← FAILED TST1: Q←A1, CALL[Q14]; *Q←7777 P←B, B←Q, Q←A1; REPEAT[6,ILC[(STEMP1←STACK←Q)]]; Q←P; TST2: REPEAT[6,ILC[STEMP←P←STACK] ILC[(P#Q, POP)] ILC[CALL[CBRK,ALU#0]] ILC[STEMP←P←STACK] ILC[(P←B, B←2P+1, POP)] ILC[P#Q] ILC[CALL[CBRK,ALU#0]]]; TST3: STEMP1←STACK←P←B, B←A1; REPEAT[5,ILC[(STACK←NULL)]]; REPEAT[12,ILC[(STEMP←P←STACK)] ILC[(POP, P)] ILC[GOTO[.+2,ALU=0]] ILC[BRKP[1]]]; STEMP←P←STACK; P#Q, POP; GOTO[.+2,ALU=0], STEMP←P←STACK; BRKP[1]; *STACK NOT PUSHING OR POPPING PROPERLY P←B, B←2P+1, POP; P#Q; GOTO[TNPC,ALU=0]; BREAK; *STACK NOT PUSHING OR POPPING PROPERLY *SUBROUTINE USED BY TNPC BELOW NPCT: P←NPC←B, B←2P; NPCT0: Q←NPC, GOTO[.+1]; P#Q, GOTO[AZT]; *TEST NPC REGISTER TNPC: P←NULL; B←P+1, NPC←P←B, CALL[NPCT0]; *F2=NPC← FAILED OR NPC STORAGE FAILED REPEAT[12,ILC[(CALL[NPCT])]]; *TO HOLD VALUE IN P *TEST ALL BITS OF BA BAT: P←NULL; B←P+1, P←B, DGOTO[1]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 1 P←B, B←2P, DGOTO[2]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 2 P←B, B←2P, DGOTO[4]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 4 P←B, B←2P, DGOTO[10]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 10 P←B, B←2P, DGOTO[20]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 20 P←B, B←2P, DGOTO[40]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 40 P←B, B←2P, DGOTO[100]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 100 P←B, B←2P, DGOTO[200]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 200 P←B, B←2P, DGOTO[400]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 400 P←B, B←2P, DGOTO[1000]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 1000 P←B, B←2P, DGOTO[2000]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *BA FAILED ON 2000 *~ P←B, B←2P, DGOTO[4000]; Q←NPC, GOTO[.+1]; CALL[PQCOMP]; *~ GOTO[QODDT]; *NOW TEST Q ODD AND Q EVEN BC'S QODDT: P←Q←NULL; GOTO[.+2,Q EVEN]; BREAK; *Q EVEN FAILED ON Q=0 CALL[CBRK,Q ODD], Q←P+1; *Q ODD FAILED ON Q=0 Q←Q; *BECAUSE Q IS SLOW SINK WHEN BC=QODD OR QEVEN GOTO[.+2,Q ODD]; BREAK; *Q ODD FAILED ON Q=1 CALL[CBRK,Q EVEN], Q←A1; *Q EVEN FAILED ON Q=1 GOTO[.+2,Q ODD]; BREAK; *Q ODD FAILED ON Q =-1 CALL[CBRK,Q EVEN], Q LSH 1; *Q EVEN FAILED ON Q=-1 GOTO[.+2,Q EVEN]; BREAK; *Q EVEN FAILED ON Q =-2 CALL[CBRK,Q ODD]; *Q ODD FAILED ON Q=-2 *TEST Q LCY 1 (Q LSH 1, F2=RCYQQ) ON PATTERNS OF SINGLE 1'S IN EACH BIT *POSITION QLCYT: P←NULL; P←Q←B, B←P+1; Q LCY 1, GOTO[.+2,ALU>=0], P←B, B←2P; BREAK; *ALU>=0 FAILED CALL[PQCOMP]; *Q LCY 1 FAILED TO PRODUCE VALUE =2P *(F2=RCYQQ) P←B, B←2P, Q LCY 1; GOTO[.-2,ALU>=0]; CALL[PQCOMP]; *Q LCY 1 FAILED TO PRODUCE 2P. RESULT *SHOULD BE 400000 000000 P←NULL; P←B, B←P+1, CALL[PQCOMP], Q LCY 1; *Q LCY 1 FAILED GOING *400000 000000 TO 1 (F2 = RCYQQ) *TEST Q RCY 1 AGAINST Q LCY 1 QRCYT: P←NULL; Q←P+1; Q LCY 1; Q RCY 1, DGOTO[.-1,Q EVEN], P←B, B←Q; Q LCY 1, CALL[PQCOMP]; *Q RCY 1 (POSSIBLY Q LCY 1) FAILED ON SINGLE 1 P←B, B←A1; Q←2P; Q LCY 1; Q RCY 1, P←B, B←Q, DGOTO[.-1,Q ODD]; Q LCY 1, CALL[PQCOMP]; *Q RCY 1 (POSSIBLY Q LCY 1) FAILED ON SINGLE 0 *TEST Q RSH 1 AGAINST Q LSH 1 QRSHT: P←NULL; Q←P+1, CALL[QLCY43]; QRSHL: P←B, B←Q, Q RSH 1; Q LSH 1, CALL[PQCOMP]; *Q RSH 1 FAILED TO YIELD P RCY 1 CALL[QLCY43]; GOTO[QRSHL, Q EVEN]; Q RSH 1, CALL[QZT]; *Q RSH 1 FAILED GOING 1 TO 0 *NOW FINISH THE X<0 AND X>=0 BC TESTS XBCT1: P←NULL; Q←P+1, CALL[QLCY7]; X←Q; GOTO[.+2,X<0]; BREAK; *X<0 BC FAILED ON 200 CALL[CBRK,X>=0]; *X>=0 BC FAILED ON 200 *ALU CHECKOUT ANDT: P←Q←NULL; Q←P AND Q, CALL[AZT]; *AND FAILED ON 0,0 Q←A1; Q←P AND Q, CALL[AZT]; *AND FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P AND Q, CALL[AZT]; *AND FAILED ON P=-1, Q=0 P←Q←B, B←A1; P←B, B←P AND Q; Q←P+1, CALL[AZT]; *AND FAILED ON -1,-1 *NOT P CHECK NOTPC: P←NULL; P←B, B←NOT P; Q←P+1, CALL[AZT]; *NOT P FAILED ON 0 P←B, B←A1, CALL[NPZT]; *NOT P FAILED ON -1 *NOT Q CHECK NOTQC: Q←NULL; P←B, B←NOT Q; Q←P+1, CALL[AZT]; *NOT Q FAILED ON 0 Q←A1, CALL[NQZT]; *NOT Q FAILED ON -1 *NOT P OR NOT Q CHECK NPONQC: P←Q←NULL; P←B, B←NOT P OR NOT Q; Q←P+1, CALL[AZT]; *NOT P OR NOT Q FAILED ON 0,0 P←Q←B, B←A1; Q←NOT P OR NOT Q, CALL[AZT]; *NOT P OR NOT Q FAILED ON -1,-1 P←NULL, Q←A1; B←NOT P OR NOT Q, P←B; Q←P+1, CALL[AZT]; *NOT P OR NOT Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; B←NOT P OR NOT Q, P←B; Q←P+1, CALL[AZT]; *NOT P OR NOT Q FAILED ON P=-1, Q=0 *NOT P OR Q CHECK NPOQC: P←Q←NULL; Q←NOT P OR Q, CALL[NQZT]; *NOT P OR Q FAILED ON 0,0 Q←A1, P←NULL; Q←NOT P OR Q, CALL[NQZT]; *NOT P OR Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←NOT P OR Q, CALL[AZT]; *NOT P OR Q FAILED ON P=-1, Q=0 P←Q←B, B←A1; Q←NOT P OR Q, CALL[NQZT]; *NOT P OR Q FAILED ON -1,-1 *NOT P AND NOT Q CHECK NPANQC: P←Q←NULL; Q←NOT P AND NOT Q, CALL[NQZT]; *NOT P AND NOT Q FAILED ON 0,0 P←Q←B, B←A1; Q←NOT P AND NOT Q, CALL[AZT]; *NOT P AND NOT Q FAILED ON -1,-1 P←NULL, Q←A1; Q←NOT P AND NOT Q, CALL[AZT]; *NOT P AND NOT Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←NOT P AND NOT Q, CALL[AZT]; *NOT P AND NOT Q FAILED ON P=-1,Q=0 *P=Q CHECK P=QC: P←Q←NULL; Q←P=Q, CALL[NQZT]; *P=Q FAILED ON 0,0 P←Q←B, B←A1; Q←P=Q, CALL[NQZT]; *P=Q FAILED ON -1,-1 P←NULL, Q←A1; Q←P=Q, CALL[AZT]; *P=Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P=Q, CALL[AZT]; *P=Q FAILED ON P=-1, Q=0 *P OR NOT Q CHECK PONQC: P←Q←NULL; Q←P OR NOT Q, CALL[NQZT]; *P OR NOT Q FAILED ON 0,0 P←Q←B, B←A1; Q←P OR NOT Q, CALL[NQZT]; *P OR NOT Q FAILED ON -1,-1 P←NULL, Q←A1; Q←P OR NOT Q, CALL[AZT]; *P OR NOT Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P OR NOT Q, CALL[NQZT]; *P OR NOT Q FAILED ON P=-1, Q=0 *NOT P AND Q CHECK NPAQC: P←Q←NULL; Q←NOT P AND Q, CALL[AZT]; *NOT P AND Q FAILED ON 0,0 P←Q←B, B←A1; Q←NOT P AND Q, CALL[AZT]; *NOT P AND Q FAILED ON -1,-1 P←NULL, Q←A1; Q←NOT P AND Q, CALL[NQZT]; *NOT P AND Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←NOT P AND Q, CALL[AZT]; *NOT P AND Q FAILED ON P=-1, Q=0 *AQ TEST AQT: Q←NULL, CALL[QZT]; *AQ=0 FAILED Q←A1; P←B, B←AQ, CALL[NPZT]; *AQ=-1 FAILED *P OR Q TEST POQT: P←Q←NULL; Q←P OR Q, CALL[AZT]; *P OR Q FAILED ON 0,0 P←Q←B, B←A1; Q←P OR Q, CALL[NQZT]; *P OR Q FAILED ON -1,-1 P←NULL, Q←A1; Q←P OR Q, CALL[NQZT]; *P OR Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P OR Q, CALL[NQZT]; *P OR Q FAILED ON P=-1, Q=0 *A0 TEST A0T: Q←A0, CALL[AZT]; *A0 FAILED *P AND NOT Q TEST PANQT: P←Q←NULL; Q←P AND NOT Q, CALL[AZT]; *P AND NOT Q FAILED ON 0,0 P←Q←B, B←A1; Q←P AND NOT Q, CALL[AZT]; *P AND NOT Q FAILED ON -1,-1 P←NULL, Q←A1; Q←P AND NOT Q, CALL[AZT]; *P AND NOT Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P AND NOT Q, CALL[NQZT]; *P AND NOT Q FAILED ON P=-1, Q=0 *P TEST PT: P←NULL, CALL[PZT]; *P (ALUF[17]) FAILED ON 0 P←B, B←A1; Q←P, CALL[NQZT]; *P FAILED ON -1 *P AND Q -1 TEST PAQ-1T: P←Q←NULL; Q←P AND Q -1, CALL[NQZT]; *P AND Q - 1 FAILED ON 0,0 P←Q←B, B←A1; B←P AND Q-1, P←B; P←B, B←P+1; Q←B, B←P+1, CALL[AZT]; *P AND Q - 1 FAILED ON -1,-1 P←NULL, Q←A1; Q←P AND Q-1, CALL[NQZT]; *P AND Q -1 FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P AND Q-1, CALL[NQZT]; *P AND Q -1 FAILED ON P=-1, Q=0 *P AND NOT Q -1 TEST PANQ-1T: P←Q←NULL; Q←P AND NOT Q-1, CALL[NQZT]; *P AND NOT Q-1 FAILED ON 0,0 P←Q←B, B←A1; Q←P AND NOT Q -1, CALL[NQZT]; *P AND NOT Q -1 FAILED ON -1,-1 P←NULL, Q←A1; Q←P AND NOT Q -1, CALL[NQZT]; *P AND NOT Q -1 FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; B←P AND NOT Q-1, P←B; B←P+1, P←B, CALL[NPZT]; *P AND NOT Q - 1 FAILED ON P=-1, Q=0 *P-Q-1 = P + NOT Q TEST P-Q-1T: P←Q←NULL; Q←P-Q-1, CALL[NQZT]; *P-Q-1 FAILED ON 0,0 P←Q←B, B←A1; Q←P-Q-1, CALL[NQZT]; *P-Q-1 FAILED ON -1,-1 P←NULL, Q←A1; Q←P-Q-1, CALL[AZT]; *P-Q-1 FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; P←B, B←P-Q-1; P←B, B←P+1; Q←P+1, CALL[AZT]; *P-Q-1 FAILED ON P=-1, Q=0 **P-Q TEST OMITTED SINCE CARRY1 ALREADY TESTED *P+Q TEST P+QT: P←Q←NULL; Q←P+Q, CALL[AZT]; *P+Q FAILED ON 0,0 P←Q←B, B←A1; P←B, B←P+Q; P←B, B←P+1; Q←P+1, CALL[AZT]; *P+Q FAILED ON -1,-1 P←NULL, Q←A1; Q←P+Q, CALL[NQZT]; *P + Q FAILED ON P=0, Q=-1 P←B, B←A1; Q←NULL; Q←P+Q, CALL[NQZT]; *P+Q FAILED ON P=-1, Q=0 *P-1 TEST P-1T: P←NULL; Q←P-1, CALL[NQZT]; *P-1 FAILED GOING 0 TO -1 P←B, B←A1; P←B, B←P-1; Q←P+1, CALL[NQZT]; *P-1 FAILED GOING -1 TO -2 P←NULL; P←B, B←P+1; Q←P-1, CALL[AZT]; *P-1 FAILED GOING +1 TO 0 **P+Q+1 TEST OMITTED *2P, 2P+1, P+1 ALREADY TESTED *P AND Q +P, P AND NOT Q + P TESTS OMITTED (NOT USED ANYWHERE) *TEST OF BUS BRANCH CONDITIONS TBBC: Q←A1; Q RSH 1; B←Q, P←B; GOTO[.+2,B>=0], B←Q; BREAK; *B>=0 BC FAILED ON TRUE OR B←Q FAILED CALL[CBRK,B<0]; *B<0 BC FAILED ON FALSE OR B←Q FAILED B←Q←P+1; GOTO[.+2,B<0], B←Q; BREAK; *B<0 BC FAILED ON TRUE OR B←ALU FAILED CALL[CBRK,B>=0]; *B>=0 FAILED ON FALSE OR B←Q FAILED *TEST ALU BRANCH CONDITIONS *ALU=0 BC HAS ALREADY BEEN TESTED *ALU#0 BC HAS BEEN TESTED FOR FAILURE WHEN FALSE ALUBC: Q←A1; Q RSH 1; B←AQ, P←B; GOTO[.+2,ALU>=0], AQ; BREAK; *ALU>=0 BC FAILED ON TRUE CALL[CBRK,ALU<0]; *ALU<0 BC FAILED ON FALSE Q←P+1; GOTO[.+2,ALU<0], AQ; BREAK; *ALU<0 BC FAILED ON TRUE CALL[CBRK,ALU>=0]; *ALU>=0 BC FAILED ON FALSE P←NULL; Q←P+1; ALUGLP: GOTO[.+2,ALU>0], AQ; BREAK; *ALU>0 BC FAILED ON TRUE VALUE IN Q CALL[CBRK,ALU<=0], AQ; *ALU<=0 BC FAILED ON FALSE VALUE IN Q GOTO[.+2,ALU#0]; BREAK; *ALU#0 BC FAILED ON TRUE VALUE IN Q Q LSH 1; AQ; GOTO[ALUGLP,ALU>=0], AQ; GOTO[.+2,ALU<=0], AQ; BREAK; *ALU<=0 BC FAILED ON 400000 000000 GOTO[.+2,ALU#0]; BREAK; *ALU#0 BC FAILED ON TRUE VALUE IN Q CALL[CBRK,ALU>0], A0; *ALU>0 BC FAILED ON 400000 000000 GOTO[.+2,ALU<=0], A0; BREAK; *ALU<=0 BC FAILED ON 0 CALL[CBRK,ALU>0]; *ALU>0 BC FAILED ON 0 ALU8T: P←A0; GOTO[.+2,ALU8=0], A0; BREAK; *ALU8=0 FAILED ON 0 CALL[CBRK,ALU8=1],A1; *ALU8=1 FAILED ON 0 GOTO[.+2,ALU8=1], A1; BREAK; *ALU8=1 FAILED ON -1 CALL[CBRK,ALU8=0]; *ALU8=0 FAILED ON -1 Q←P+1, CALL[QLCY33]; AQ; GOTO[.+2,ALU8=1], AQ; BREAK; *ALU8=1 FAILED ON 1000 000000 CALL[CBRK,ALU8=0], Q←NOT Q; *ALU8=0 FAILED ON 1000 000000 GOTO[.+2,ALU8=0], AQ; BREAK; *ALU8=0 FAILED ON 776777 777777 CALL[CBRK,ALU8=1]; *ALU8=1 FAILED ON 776777 777777 *NOW TEST FRZBALUBC FBAT: B←A1; B←A0, FRZBALUBC, P←B; GOTO[.+2,ALU<0], FRZBALUBC, B←P+1, P←B; BREAK; *ALU<0 WASN'T FROZEN BY FRZBALUBC GOTO[.+2,ALU<=0], FRZBALUBC, B←A0; BREAK; *ALU<=0 WASN'T FROZEN BY FRZBALUBC GOTO[.+2,B<0], FRZBALUBC, B←A0; BREAK; *B<0 WASN'T FROZEN BY FRZBALUBC GOTO[.+2,ALU8=1], FRZBALUBC, B←A0; BREAK; *ALU8=1 WASN'T FROZEN BY FRZBALUBC GOTO[.+2,ALU#0], FRZBALUBC, B←A0; BREAK; *ALU#0 WASN'T FROZEN BY FRZBALUBC CALL[CBRK,ALU>=0], FRZBALUBC, B←P+1; *ALU<0 WASN'T FROZEN CALL[CBRK,ALU>0], FRZBALUBC, B←A0; *ALU<=0 WASN'T FROZEN CALL[CBRK,B>=0], FRZBALUBC, B←A0; *B<0 WASN'T FROZEN CALL[CBRK,ALU8=0], FRZBALUBC, B←A0; *ALU8=1 WASN'T FROZEN CALL[CBRK,ALU=0], B←A0; *ALU#0 WASN'T FROZEN B←A1, FRZBALUBC; GOTO[.+2,ALU>=0], FRZBALUBC, B←P; BREAK; *ALU>=0 WASN'T FROZEN GOTO[.+2,B>=0], FRZBALUBC, B←A1; BREAK; *B>=0 WASN'T FROZEN GOTO[.+2,ALU=0], FRZBALUBC, B←A1; BREAK; *ALU=0 WASN'T FROZEN GOTO[.+2,ALU8=0], FRZBALUBC, B←A1; BREAK; *ALU8=0 WASN'T FROZEN CALL[CBRK,ALU<0], FRZBALUBC, B←P; *ALU>=0 WASN'T FROZEN CALL[CBRK,ALU>0], FRZBALUBC, B←A1; *ALU<=0 WASN'T FROZEN CALL[CBRK,ALU#0], FRZBALUBC, B←A1; *ALU=0 WASN'T FROZEN CALL[CBRK,ALU8=1], FRZBALUBC, B←A1; *ALU8=0 WASN'T FROZEN CALL[CBRK,B<0], B←P; *B>=0 WASN'T FROZEN B←A0, FRZBALUBC; GOTO[.+2,ALU>0]; BREAK; *ALU>0 WASN'T FROZEN *NOW TEST LOADING Y FROM BUS. (Y←NULL WAS TESTED EARLIER) YBUST: Y←P←NULL; Q←Y, CALL[PQCOMP]; *Y←0 FAILED P←Y←B, B←P+1; Q←Y, CALL[PQCOMP]; *Y←1 FAILED REPEAT[10,ILC[(P←Y←B, B←2P)] ILC[(Q←Y, CALL[PQCOMP])]]; Q←A1; Q LSH 1, CALL[YBT1]; *Y←776 FAILED Q LSH 1; Q LCY 1, CALL[YBT1]; *Y←775 FAILED Q LSH 1, CALL[QLCY2]; CALL[YBT1]; *Y←773 FAILED Q LSH 1, CALL[QLCY2]; Q LCY 1, CALL[YBT1]; *Y←767 FAILED Q LSH 1, CALL[QLCY3]; Q LCY 1, CALL[YBT1]; *Y←757 FAILED Q LSH 1, CALL[QLCY4]; Q LCY 1, CALL[YBT1]; *Y←737 FAILED Q LSH 1, CALL[QLCY5]; Q LCY 1, CALL[YBT1]; *Y←677 FAILED Q LSH 1, CALL[QLCY6]; Q LCY 1, CALL[YBT1]; *Y←577 FAILED Q LSH 1, CALL[QLCY7]; Q LCY 1, CALL[YBT1]; *Y←377 FAILED GOTO[XBUST]; YBT1: B←Q, Y←P←B, Q←A1, CALL[Q11]; Q←P AND Q, P←Y, CALL[PQCOMP]; * Y FAILED AT [STK 1] Q←A1, RETURN; XBT1: B←Q, X←P←B, Q←A1, CALL[Q10]; Q←P AND Q, P←X, CALL[PQCOMP]; *X FAILED AT [STK 1] Q←A1, RETURN; *NOW TEST OUT LOADING X FROM BUS. (X←NULL TESTED EARLIER) XBUST: X←P←NULL; Q←X, CALL[PQCOMP]; *X←0 FAILED P←X←B, B←P+1; Q←X, CALL[PQCOMP]; *X←1 FAILED REPEAT[7,ILC[(P←X←B, B←2P)] ILC[(Q←X, CALL[PQCOMP])]]; Q←A1; Q LSH 1, CALL[XBT1]; *X←376 FAILED Q LSH 1; Q LCY 1, CALL[XBT1]; *X←375 FAILED Q LSH 1, CALL[QLCY2]; CALL[XBT1]; *X←373 FAILED Q LSH 1, CALL[QLCY2]; Q LCY 1, CALL[XBT1]; *X←367 FAILED Q LSH 1, CALL[QLCY3]; Q LCY 1, CALL[XBT1]; *X←357 FAILED Q LSH 1, CALL[QLCY4]; Q LCY 1, CALL[XBT1]; *X←337 FAILED Q LSH 1, CALL[QLCY5]; Q LCY 1, CALL[XBT1]; *X←277 FAILED Q LSH 1, CALL[QLCY6]; Q LCY 1, CALL[XBT1]; *X←177 FAILED *NOW TEST OUT DECY DECYT: P←Y←NULL, CALL[Q11], Q←A1; DECY, P←B, B←Q; Q←Y, CALL[PQCOMP], DECY; GOTO[.-1,Y<0], P←B, B←P-1; Q←Y, CALL[PQCOMP], DECY; GOTO[.-1,Y>=0], P←B, B←P-1; INCY; Q←Y, CALL[QZT]; *DECY FAILED GOING 0 TO 777 *TEST OF DECX DECXT: P←X←NULL, Q←A1, CALL[Q10]; DECX, P←B, B←Q; Q←X, DECX, CALL[PQCOMP]; *DECX FAILED GOTO[.-1,X<0], P←B, B←P-1; Q←X, DECX, CALL[PQCOMP]; GOTO[.-1,X>=0], P←B, B←P-1; INCX; Q←X, CALL[QZT]; *DECX FAILED GOING 0 TO 377 *TEST OF AC REGISTER ACTEST: P←AC←NULL; Q←AC, CALL[PQCOMP]; *AC←NULL OR B←AC FAILED ON 0 B←P+1, P←B, DGOTO[.+1]; B←2P+1, P←B; AC←2P+1, P←B; Q←AC, CALL[PQCOMP]; *AC←B OR B←AC FAILED ON 17 *DECAC TEST DECACT: DECAC, P←B, B←P-1; Q←AC, CALL[PQCOMP]; *DECAC FAILED ON [P]+1 P←B, B←P-1, DECAC; GOTO[.-2,ALU>=0]; *INCAC TEST INCACT: P←AC, INCAC; *STARTS WITH [AC]=17 DECAC, P; DGOTO[INCACT,ALU>0]; Q←AC, CALL[PQCOMP], DECAC; *INCAC FAILED ON [P] *TEST OF F1 = READALU TRALU: Q←NULL; P←(Q) U (A1); Q←A1, CALL[PQCOMP]; *F1=READALU FAILED P←(Q) U (A0); Q←A1, CALL[PQCOMP]; *F1=READALU FAILED *XTOP BUS SOURCE PUTS X[30,35] ONTO B[0,5] XTOPT: Q←A1, CALL[Q6]; *Q←77 X←Q, CALL[QLCY36]; P←XTOP, CALL[PQCOMP]; *XTOP FAILED ON 77 IN X. WRONG VALUE IN P INCX; Q←XTOP, CALL[QZT]; *XTOP FAILED ON 100 IN X. WRONG VALUE IN Q *YSHIFT← LOADS Y[27] FROM B[18] AND Y[28,35] FROM B[28,35] YSHIFTT: P←NULL; Q←P+1, CALL[QLCY21]; YSHIFT←Q, CALL[Q33]; P←Y, CALL[PQCOMP]; *P SHOULD HAVE 400 IN IT. YSHIFT← FAILED P←NULL; Q←P+1, CALL[QLCY21]; YSHIFT←Q←NOT Q, CALL[Q10]; P←Y, CALL[PQCOMP]; *P SHOULD HAVE 377 IN IT. YSHIFT← FAILED *TEST X AND Y BC'S WHEN LOADED FROM SLOWEST SOURCES WITH PREVIOUS SIGN *REVERSED XBCT2: P←Q←A1, X←NULL; X←P+Q; CALL[CBRK,X>=0], P←Q←A0; *X BC FAILED ON SLOW SOURCE X←P+Q; CALL[CBRK,X<0]; *X BC FAILED ON SLOW SOURCE YBCT2: Y←NULL, P←Q←A1; YSHIFT←P+Q; CALL[CBRK,Y>=0], P←Q←A0; *Y BC FAILED ON SLOW SOURCE Y←P+Q; CALL[CBRK,Y<0]; *Y BC FAILED ON SLOW SOURCE GOTO[MCYCLE]; *END OF DG0. THIS INSTRUCTION OVERWRITTEN *IF MORE DIAGNOSTICS ARE LOADED IM[ILC,ADD[IP[ILC],-1]];