ER[DGRL]; *RANDOM NO. TEST OF RM AND LM %TO ASSEMBLE: @MI@ DGRL TO RUN: MIDAS DGRL START;G % TARGET[ILC]; *ORIGINAL VALUES FOR RANDOM NO. GENERATOR SV[X0,7654321]; SV[X1,76543210]; SV[X2,765432100]; SV[X3,7654321000]; SV[X4,76543210000]; SV[X5,765432100000]; SV[X6,654321000007]; SV[X7,543210000076]; SM[SY10,10]; SM[SLC,20]; SVN[RAN]; SVN[RRAN]; SVN[YRAN]; SVN[COUNT]; IM[ILC,20]; MCYCLE: BRKP[1], COUNT←Q, GOTO[LOOP]; START: ARM←NULL, INHINT, DGOTO[LOOP]; IRET, INHINT, COUNT←NULL, CALL[INIRAN]; PQCOMP: P#Q; RETURN[ALU=0]; BRKP[1], RETURN; *INITIALIZE RANDOM NO. GENERATOR INIRAN: Y←7S; Q←SY; RAN←Q, RETURN; *RETURN RANDOM NO. IN Q (USES Y WHICH MUST NOT BE CLOBBERED), CLOBBERS P RGEN: P←RAN, GOTO[.+2,Y>=0]; Y←7S; Q←SY; Q←P+Q; SY←Q; RAN←Q, DECY, RETURN; *SAVE RANDOM NO. GENERATOR STATE IN SM FOR RESTORATION LATER RMARK: YRAN←Y; Y←7S; Q←RAN; RRAN←Q; Q←SY; SY10←Q, DECY; GOTO[.-2,Y>=0]; RETURN, Y←YRAN; *RESTORE RANDOM NO. GENERATOR STATE RREST: Q←RRAN; RAN←Q; Y←7S; Q←SY10; SY←Q, DECY; GOTO[.-2,Y>=0]; Y←YRAN, RETURN; *FIRST LOOP--ADDRESSING FROM X, LM WRITTEN/READ FIRST LOOP: X←37S, CALL[RMARK]; *SAVE INITIAL RANDOM NO. GEN. STATE CALL[RGEN]; *GET NEXT RANDOM NO. IN Q LX←Q, CALL[RGEN]; RX←Q, DECX; GOTO[.-3,X>=0]; CALL[RREST], X←37S; LOOP1: CALL[RGEN]; P←LX, CALL[PQCOMP]; CALL[RGEN]; P←RX, DECX, CALL[PQCOMP]; GOTO[LOOP1,X>=0]; *SECOND LOOP--ADDRESSING FROM X, RM WRITTEN/READ FIRST X←37S, CALL[RMARK]; CALL[RGEN]; RX←Q, CALL[RGEN]; LX←Q, DECX; GOTO[.-3,X>=0]; CALL[RREST], X←37S; LOOP2: CALL[RGEN]; P←RX, CALL[PQCOMP]; CALL[RGEN]; P←LX, DECX, CALL[PQCOMP]; GOTO[LOOP2,X>=0]; *THIRD LOOP--ADDRESSING FROM AC, LM WRITTEN/READ FIRST (FIRST 16 ONLY) X←17S, CALL[RMARK]; AC←X; CALL[RGEN]; LAC←Q, DECX, CALL[RGEN]; RAC←Q, DECAC, GOTO[.-2,X>=0]; X←17S, CALL[RREST]; AC←X; LOOP3: CALL[RGEN]; P←LAC, CALL[PQCOMP]; DECX, CALL[RGEN]; P←RAC, DECAC, CALL[PQCOMP]; GOTO[LOOP3,X>=0]; *FOURTH LOOP--ADDRESSING FROM AC, RM WRITTEN/READ FIRST (FIRST 16 ONLY) X←17S, CALL[RMARK]; AC←X; CALL[RGEN]; RAC←Q, DECX, CALL[RGEN]; LAC←Q, DECAC, GOTO[.-2,X>=0]; X←17S, CALL[RREST]; AC←X; LOOP4: CALL[RGEN]; P←RAC, CALL[PQCOMP]; DECX, CALL[RGEN]; P←LAC, DECAC, CALL[PQCOMP]; GOTO[LOOP4,X>=0]; P←COUNT; Q←P+1, GOTO[MCYCLE]; *LOOPS TO BEAT ON FAILURES WHICH OCCUR ABOVE UNDER APPROXIMATELY EQUAL *INSTRUCTION SEQUENCES BEATRX1: INCX, DGOTO[.]; *START HERE AFTER READ FAILURE AT LOOP1+3 P←RX, DECX, CALL[PQCOMP]; BEATLX1: INCX, DGOTO[.]; *START HERE AFTER READ FAILURE AT LOOP2+3 P←LX, DECX, CALL[PQCOMP]; BEATRA1: INCAC, DGOTO[.]; *START HERE AFTER READ FAILURE AT LOOP3+3 P←RAC, DECAC, CALL[PQCOMP]; BEATLA1: INCAC, DGOTO[.]; *START HERE AFTER READ FAILURE AT LOOP4+3 P←LAC, DECAC, CALL[PQCOMP]; BEATRX2: P←RX, CALL[PQCOMP]; *START HERE AFTER READ FAILURE AT LOOP2+1 GOTO[.-1]; BEATLX2: P←LX, CALL[PQCOMP]; *START HERE AFTER READ FAILURE AT LOOP1+1 GOTO[.-1]; BEATRA2: P←RAC, CALL[PQCOMP]; *START HERE AFTER READ FAILURE AT LOOP4+1 GOTO[.-1]; BEATLA2: P←LAC, CALL[PQCOMP]; *START HERE AFTER READ FAILURE AT LOOP3+1 GOTO[.-1];