DIRECTORY Basics USING [BITXOR, BITAND], DragOpsCross USING [XopBase, TrapBase, TrapWidthBytes, bytesPerWord, TrapIndex, Word, ProcessorRegister], --XopBase, TrapBase, TrapWidthBytes, Inst, wordsPerPage, bytesPerWord, charsPerWord, bitsPerByte, bitsPerCharacter, bitsPerWord, logWordsPerPage, logBitsPerByte, logBitsPerChar, logBytesPerWord, logCharsPerWord, logBitsPerWord, logBytesPerPage, PageCount, PageNumber, maxPagesInVM, SixBitIndex, FiveBitIndex, Word, TwoWords, FourBitIndex, Half, ThreeBitIndex, FourHalves, TwoHalves, Byte, ZerosByte, OnesByte, EightBytes, FourBytes, ByteIndex, BytesPerWord, TwoBytes, Comparison, ByteAddress, WordAddress, FieldDescriptor, TrapWidthWords, KernalLimit, TrapIndex, StackUnderflowTrap, IFUPageFaultTrap, ResetTrap, IFUStackOverflowTrap, EUStackOverflowTrap, RescheduleTrap, ALUCondOver, ALUCondBC, ALUCondIL, ALUCondDO, EUPageFault, EUWriteFault, AUFault, euStack, euJunk, euMAR, euField, euConstant, euAux, euBogus, euLast, ifuXBus, ifuStatus, ifuSLimit, ifuYoungestL, ifuYoungestPC, ifuEldestL, ifuEldestPC, ifuBogus, ifuL, ifuS, ifuPC, ifuLast, IFUStatusRec, IFUStackIndex, IFUStackSize, IFUOverflow, EUStackIndex, EUStackSize, EULocalIndex, EULocals, EUAuxIndex, EUAuxRegs, EUConstIndex, EUConstants, IOLocation, ioRescheduleRequest, ioResetRequest DragOpsCrossUtils USING [CardToWord, CardToByte], --BytePCToWordAddress, WordAddressToBytePC, IOOperandToCard, CardToIOOperand, FieldDescriptorToCard, CardToFieldDescriptor, StatusToWord, WordToStatus, BytesToWord, BytesToHalf, WordToBytes, HalfToBytes, HalvesToWord, WordToHalves, HighHalf, LowHalf, LeftHalf, RightHalf, SwapHalves, WordToInt, IntToWord, WordToCard, HalfToCard, ByteToCard, CardToWord, CardToHalf, CardToByte, DragAnd, DragOr, DragXor, DragNot, VanillaAdd, VanillaSub, AddDelta, HalfNot, HalfAnd, HalfOr, HalfXor, HalfShift, DoubleWordShiftLeft, SingleWordShiftLeft, SingleWordShiftRight, TrapIndexToBytePC, XopToBytePC HandCoding, --Has opcode and register defs. HandCodingPseudos, --GenLabel, GenLabelHere, SetLabel, Halt, Pause, MakeLabelGlobal, UseLabel8B, UseLabel16, UseLabel32, ProcedureEntry, ProcedureExit, EnableTraps, IndexedJump, SetupField, ExtractField, ShiftLeft, LoadProcessorReg, StoreProcessorReg, DisableTraps, CauseReschedule, CauseReset, GetSPLimit, SetSPLimit, GetL, SetL, GetYoungestPC, GetYoungestL, GetEldestPC, GetEldestL, SetYoungestPC, SetYoungestL, SetEldestPC, SetEldestL HandCodingSupport; --Area, GetCurrentArea, ReserveData, SetOutputPC, GetProc, PutProc, ProcList, NewArea, GenWithArea, Gen1WithArea, ForceOut, GetOutputPC, WordAlign, OutputByte, OutputOneByte, OutputAlphaBeta, OutputAlphaBetaGammaDelta, OutputWord GenXopLS: CEDAR PROGRAM IMPORTS Basics, DragOpsCrossUtils, HandCoding, HandCodingPseudos, HandCodingSupport = BEGIN OPEN DragOpsCrossUtils, HandCoding, HandCodingPseudos, HandCodingSupport; XopBase: LONG CARDINAL = DragOpsCross.XopBase; TrapWidthBytes: NAT = DragOpsCross.TrapWidthBytes; bytesPerWord: CARDINAL = DragOpsCross.bytesPerWord; ProcessorRegister: TYPE = DragOpsCross.ProcessorRegister; ifuYoungestL: CARDINAL = LOOPHOLE[ProcessorRegister.ifuYoungestL, CARDINAL]; All: PROC = { FillXop: PROC [inst: CARDINAL, dest: Label] = { SetOutputPC[inst * DragOpsCross.TrapWidthBytes + DragOpsCross.XopBase * DragOpsCross.bytesPerWord]; drJDB[UseLabel16[dest]]; }; FillTrap: PROC [tx: DragOpsCross.TrapIndex, dest: Label] = { SetOutputPC[LOOPHOLE[tx, CARDINAL] * DragOpsCross.TrapWidthBytes + DragOpsCross.TrapBase * DragOpsCross.bytesPerWord]; drJDB[UseLabel16[dest]]; }; area: Area = GetCurrentArea[]; savePC: LONG CARDINAL; start: Label = GenLabel[]; dummy: Label = GenLabel[]; initL: Label = GenLabel[]; enterXopTest: Label = GenLabel[]; enterALTest: Label = GenLabel[]; enterASTest: Label = GenLabel[]; enterDISTest: Label = GenLabel[]; enterASLTest: Label = GenLabel[]; enterALSTest: Label = GenLabel[]; GenXop: PROC [] ~ { Xop5Trap: Label = GenLabel[]; abgdPushed: Label = GenLabel[]; GenXop1Trap: PROC [I: CARDINAL] ~ { notBeingTested: Label = GenLabel[]; SetOutputPC[(I * TrapWidthBytes) + (XopBase * bytesPerWord)]; drLIB[I]; drRJNEB[popSrc, aux13, UseLabel8B[notBeingTested]]; drLIDB[12345B]; --Return value indicating trap routine was executed drRETN[]; --Return without changing S SetLabel[notBeingTested]; Pause[]; --Unexpected occurrence of Xop trap for opcode I }; GenXop1Test: PROC [I: CARDINAL] ~ { xop1OK: Label = GenLabel[]; drLIB[I]; drRAND[c: aux13, a: topSrc, b: popSrc]; --aux13 _ xop opcode OutputByte[area, CardToByte[I]]; drLIDB[12345B]; drRJEBJ[popSrc, belowSrcPop, UseLabel8B[xop1OK]]; Pause[]; SetLabel[xop1OK]; }; GenXop2Trap: PROC [I: CARDINAL] ~ { problem: Label = GenLabel[]; SetOutputPC[(I * TrapWidthBytes) + (XopBase * bytesPerWord)]; drLIB[I]; drRJNEB[popSrc, aux13, UseLabel8B[problem]]; --Being tested? drLIB[Basics.BITXOR[I, 377B]]; drRJNEB[popSrc, belowSrcPop, UseLabel8B[problem]]; --Alpha pushed? drLIDB[23456B]; --Return value indicating trap routine was executed drRETN[]; --Return without changing S SetLabel[problem]; Pause[]; --Unexpected occurrence of Xop trap for opcode I }; GenXop2Test: PROC [I: CARDINAL] ~ { xop2OK: Label = GenLabel[]; drLIB[I]; drRAND[c: aux13, a: topSrc, b: popSrc]; --aux13 _ xop opcode OutputAlphaBeta[area, (I * 400B) + Basics.BITXOR[I, 377B]]; drLIDB[23456B]; drRJEBJ[popSrc, belowSrcPop, UseLabel8B[xop2OK]]; Pause[]; SetLabel[xop2OK]; }; GenXop3Trap: PROC [I: CARDINAL] ~ { problem: Label = GenLabel[]; SetOutputPC[(I * TrapWidthBytes) + (XopBase * bytesPerWord)]; drLIB[I]; drRJNEB[popSrc, aux13, UseLabel8B[problem]]; --Trap expected? drLIDB[177400B + I]; drRJNEB[popSrc, belowSrcPop, UseLabel8B[problem]]; --AlphaBeta pushed? drLIDB[34567B]; --Return value indicating trap routine was executed drRETN[]; --Return without changing S SetLabel[problem]; Pause[]; --Unexpected occurrence of Xop trap for opcode I }; GenXop3Test: PROC [I: CARDINAL] ~ { xop3OK: Label = GenLabel[]; drLIB[I]; drRAND[c: aux13, a: topSrc, b: popSrc]; --aux13 _ xop opcode OutputByte[area, CardToByte[I]]; --Should take Xop trap OutputAlphaBeta[area, 177400B + I]; drLIDB[34567B]; drRJEBJ[popSrc, belowSrcPop, UseLabel8B[xop3OK]]; Pause[]; SetLabel[xop3OK]; }; GenXop5Trap: PROC [I: CARDINAL] ~ { notBeingTested: Label = GenLabel[]; SetOutputPC[(I * TrapWidthBytes) + (XopBase * bytesPerWord)]; drLIB[I]; drRJNEB[popSrc, aux13, UseLabel8B[notBeingTested]]; drLIQB[CardToWord[37777777400B + LONG[I]]]; drJDB[UseLabel16[Xop5Trap]]; SetLabel[notBeingTested]; Pause[]; --Unexpected occurrence of Xop trap for opcode I }; GenXop5Test: PROC [I: CARDINAL] ~ { xop5OK: Label = GenLabel[]; drLIB[I]; drRAND[c: aux13, a: topSrc, b: popSrc]; --aux13 _ xop opcode OutputByte[area, CardToByte[I]]; OutputWord[area, CardToWord[37777777400B + LONG[I]]]; --Should take Xop trap drLIDB[45670B]; drRJEBJ[popSrc, belowSrcPop, UseLabel8B[xop5OK]]; Pause[]; SetLabel[xop5OK]; }; SetLabel[Xop5Trap]; --Did Xop push AlphaBetaGammaDelta correctly? drRJEBJ[popSrc, belowSrcPop, UseLabel8B[abgdPushed]]; Pause[]; --Xop did not push AlphaBetaGammaDelta correctly. SetLabel[abgdPushed]; drLIDB[45670B]; drRETN[]; --Return without changing S savePC _ GetOutputPC[area]; FOR I: CARDINAL IN [1..17B] DO GenXop1Trap[I]; ENDLOOP; --length = 1 Xops FOR I: CARDINAL IN [30B..37B] DO GenXop1Trap[I]; ENDLOOP; --length = 1 Xops FOR I: CARDINAL IN [40B..60B] DO GenXop5Trap[I]; ENDLOOP; --length = 5 Xops FOR I: CARDINAL IN [63B..65B] DO GenXop5Trap[I]; ENDLOOP; --length = 5 Xops FOR I: CARDINAL IN [70B..77B] DO GenXop5Trap[I]; ENDLOOP; --length = 5 Xops GenXop1Trap[112B]; --112B length = 1 Xop FOR I: CARDINAL IN [117B..123B] DO GenXop1Trap[I]; ENDLOOP; --length = 1 Xops GenXop1Trap[125B]; --125B length = 1 Xop FOR I: CARDINAL IN [130B..137B] DO GenXop1Trap[I]; ENDLOOP; --length = 1 Xops GenXop2Trap[215B]; --215B length = 2 Xop GenXop2Trap[223B]; --223B length = 2 Xop FOR I: CARDINAL IN [234B..236B] DO GenXop2Trap[I]; ENDLOOP; --length = 2 Xops GenXop3Trap[311B]; --311B length = 3 Xop (undefined behavior) GenXop3Trap[313B]; --313B length = 3 Xop (undefined behavior) GenXop3Trap[323B]; --323B length = 3 Xop GenXop3Trap[337B]; --337B length = 3 Xop (undefined behavior) GenXop3Trap[340B]; --340B length = 3 Xop (undefined behavior) GenXop3Trap[344B]; --344B length = 3 Xop (undefined behavior) GenXop3Trap[350B]; --350B length = 3 Xop (undefined behavior) GenXop3Trap[354B]; --354B length = 3 Xop (undefined behavior) FOR I: CARDINAL IN [364B..367B] DO GenXop3Trap[I]; ENDLOOP; --length = 3 Xops FOR I: CARDINAL IN [374B..376B] DO GenXop3Trap[I]; ENDLOOP; --length = 3 Xops SetOutputPC[savePC]; SetLabel[enterXopTest]; FOR I: CARDINAL IN [1..17B] DO GenXop1Test[I]; ENDLOOP; --length = 1 Xops FOR I: CARDINAL IN [30B..37B] DO GenXop1Test[I]; ENDLOOP; --length = 1 Xops FOR I: CARDINAL IN [40B..60B] DO GenXop5Test[I]; ENDLOOP; --length = 5 Xops FOR I: CARDINAL IN [63B..65B] DO GenXop5Test[I]; ENDLOOP; --length = 5 Xops FOR I: CARDINAL IN [70B..77B] DO GenXop5Test[I]; ENDLOOP; --length = 5 Xops GenXop1Test[112B]; --112B length = 1 Xop FOR I: CARDINAL IN [117B..123B] DO GenXop1Test[I]; ENDLOOP; --length = 1 Xops GenXop1Test[125B]; --125B length = 1 Xop FOR I: CARDINAL IN [130B..137B] DO GenXop1Test[I]; ENDLOOP; --length = 1 Xops GenXop2Test[215B]; --215B length = 2 Xop GenXop2Test[223B]; --223B length = 2 Xop FOR I: CARDINAL IN [234B..236B] DO GenXop2Test[I]; ENDLOOP; --length = 2 Xops GenXop3Test[323B]; --323B length = 3 Xop FOR I: CARDINAL IN [364B..367B] DO GenXop3Test[I]; ENDLOOP; --length = 3 Xops FOR I: CARDINAL IN [374B..376B] DO GenXop3Test[I]; ENDLOOP; --length = 3 Xops }; GenAL: PROC [] ~ { TestAL: PROC [originalL, alpha: CARDINAL] ~ { pushL: Label = GenLabel[]; lOK: Label = GenLabel[]; alExit: Label = GenLabel[]; newL: CARDINAL = Basics.BITAND[originalL + alpha, 177B]; drAL[alpha]; drLFC[UseLabel16[pushL]]; drJDB[UseLabel16[alExit]]; SetLabel[pushL]; drLIP[ifuYoungestL]; drJEBBJ[newL, UseLabel8B[lOK]]; Pause[]; --L was wrong SetLabel[lOK]; drRETN[]; SetLabel[alExit]; }; SetLabel[enterALTest]; TestAL[1, 127]; --L _ 0 TestAL[0, 1]; --L _ 1 TestAL[1, 2]; --L _ 3 TestAL[3, 4]; --L _ 7 TestAL[7, 8]; --L _ 15 TestAL[15, 16]; --L _ 31 TestAL[31, 32]; --L _ 63 TestAL[63, 64]; --L _ 127 TestAL[127, 128]; --L _ 127 TestAL[127, 0]; --L _ 127 TestAL[127, 64]; --L _ 63 TestAL[63, 32]; --L _ 95 TestAL[95, 16]; --L _ 111 TestAL[111, 8]; --L _ 119 TestAL[119, 4]; --L _ 123 TestAL[123, 2]; --L _ 125 TestAL[125, 1]; --L _ 126 drAL[3]; --L _ 1 }; GenALS: PROC [] ~ { TestALS: PROC [originalS, alpha: CARDINAL] ~ { pushL: Label = GenLabel[]; lOK: Label = GenLabel[]; alsExit: Label = GenLabel[]; newL: CARDINAL _ Basics.BITAND[originalS + alpha, 177B]; drALS[alpha]; --L _ newL drLFC[UseLabel16[pushL]]; --push L (= S) on the IFU stack for checking drJDB[UseLabel16[alsExit]]; SetLabel[pushL]; drLIP[ifuYoungestL]; drJEBBJ[newL, UseLabel8B[lOK]]; Pause[]; --L was wrong, so S was wrong. SetLabel[lOK]; drRETN[]; SetLabel[alsExit]; }; SetLabel[enterALSTest]; TestALS[0, 1]; --[L, S] _ [1, 0] TestALS[0, 2]; --[L, S] _ [2, 0] TestALS[0, 4]; --[L, S] _ [4, 0] TestALS[0, 8]; --[L, S] _ [8, 0] TestALS[0, 16]; --[L, S] _ [16, 0] TestALS[0, 32]; --[L, S] _ [32, 0] TestALS[0, 64]; --[L, S] _ [64, 0] TestALS[0, 128]; --[L, S] _ [0, 0] drAS[127]; --[L, S] _ [0, 127] TestALS[127, 0]; --[L, S] _ [127, 127] TestALS[127, 128]; --[L, S] _ [127, 127] TestALS[127, 64]; --[L, S] _ [63, 127] TestALS[127, 32]; --[L, S] _ [31, 127] TestALS[127, 16]; --[L, S] _ [15, 127] TestALS[127, 8]; --[L, S] _ [7, 127] TestALS[127, 4]; --[L, S] _ [3, 127] TestALS[127, 2]; --[L, S] _ [1, 127] TestALS[127, 1]; --[L, S] _ [0, 127] drAS[1]; --[L, S] _ [0, 0] drALS[1]; --[L, S] _ [1, 0] restores original value }; GenAS: PROC [] ~ { TestAS: PROC [originalS, alpha: CARDINAL] ~ { pushL: Label = GenLabel[]; sOK: Label = GenLabel[]; asExit: Label = GenLabel[]; newS: CARDINAL = Basics.BITAND[originalS + alpha, 177B]; drAS[alpha]; drALS[0]; --L _ S drLFC[UseLabel16[pushL]]; drJDB[UseLabel16[asExit]]; SetLabel[pushL]; drLIP[ifuYoungestL]; drJEBBJ[newS, UseLabel8B[sOK]]; Pause[]; --L was wrong, so S was wrong. SetLabel[sOK]; drRETN[]; SetLabel[asExit]; }; SetLabel[enterASTest]; TestAS[0, 1]; --[L, S] _ [1, 1] TestAS[1, 2]; --[L, S] _ [3, 3] TestAS[3, 4]; --[L, S] _ [7, 7] TestAS[7, 8]; --[L, S] _ [15, 15] TestAS[15, 16]; --[L, S] _ [31, 31] TestAS[31, 32]; --[L, S] _ [63, 63] TestAS[63, 64]; --[L, S] _ [127, 127] TestAS[127, 128]; --[L, S] _ [127, 127] TestAS[127, 0]; --[L, S] _ [127, 127] TestAS[127, 64]; --[L, S] _ [63, 63] TestAS[63, 32]; --[L, S] _ [95, 95] TestAS[95, 16]; --[L, S] _ [111, 111] TestAS[111, 8]; --[L, S] _ [119, 119] TestAS[119, 4]; --[L, S] _ [123, 123] TestAS[123, 2]; --[L, S] _ [125, 125] TestAS[125, 1]; --[L, S] _ [126, 126] drAS[2]; --[L, S] _ [126, 0] drALS[1]; --[L, S] _ [1, 0] restores original value }; GenDIS: PROC [] ~ { TestDIS: PROC [originalS: CARDINAL] RETURNS [newS: CARDINAL] ~ { pushL: Label = GenLabel[]; sOK: Label = GenLabel[]; disExit: Label = GenLabel[]; newS _ Basics.BITAND[originalS - 1, 177B]; drDIS[]; drALS[0]; --L _ S drLFC[UseLabel16[pushL]]; drJDB[UseLabel16[disExit]]; SetLabel[pushL]; drLIP[ifuYoungestL]; drJEBBJ[newS, UseLabel8B[sOK]]; Pause[]; --L was wrong, so S was wrong. SetLabel[sOK]; drRETN[]; SetLabel[disExit]; }; SetLabel[enterDISTest]; { curS: CARDINAL _ 0; FOR I: CARDINAL IN [0..128) DO curS _ TestDIS[curS]; ENDLOOP; drALS[1]; --[L, S] _ [1, 0]. }; }; GenASL: PROC [] ~ { TestASL: PROC [originalL, alpha: CARDINAL] ~ { pushL: Label = GenLabel[]; sOK: Label = GenLabel[]; aslExit: Label = GenLabel[]; newS: CARDINAL _ Basics.BITAND[originalL + alpha, 177B]; drASL[alpha]; --S _ newS drALS[0]; --L _ S + 0 drLFC[UseLabel16[pushL]]; --push L (= S) on the IFU stack for checking drJDB[UseLabel16[aslExit]]; SetLabel[pushL]; drLIP[ifuYoungestL]; drJEBBJ[newS, UseLabel8B[sOK]]; Pause[]; --L was wrong, so S was wrong. SetLabel[sOK]; drRETN[]; SetLabel[aslExit]; }; SetLabel[enterASLTest]; TestASL[1, 127]; --[L, S] _ [0, 0] TestASL[0, 1]; --[L, S] _ [1, 1] TestASL[1, 2]; --[L, S] _ [3, 3] TestASL[3, 4]; --[L, S] _ [7, 7] TestASL[7, 8]; --[L, S] _ [15, 15] TestASL[15, 16]; --[L, S] _ [31, 31] TestASL[31, 32]; --[L, S] _ [63, 63] TestASL[63, 64]; --[L, S] _ [127, 127] TestASL[127, 0]; --[L, S] _ [127, 127] TestASL[127, 64]; --[L, S] _ [63, 63] TestASL[63, 32]; --[L, S] _ [95, 95] TestASL[95, 16]; --[L, S] _ [111, 111] TestASL[111, 8]; --[L, S] _ [119, 119] TestASL[119, 4]; --[L, S] _ [123, 123] TestASL[123, 2]; --[L, S] _ [125, 125] TestASL[125, 1]; --[L, S] _ [126, 126] drAS[2]; --[L, S] _ [126, 0] drALS[1]; --[L, S] _ [1, 0] restores original value }; WordAlign[area]; SetLabel[dummy]; Pause[]; Pause[]; Pause[]; Pause[]; Pause[]; Halt[123B]; savePC _ GetOutputPC[area]; FillTrap[ResetTrap, start]; FillXop[0, dummy]; FillXop[377B, dummy]; SetOutputPC[savePC]; ProcedureEntry[initL, 0]; drLIB[1]; SetYoungestL[]; -- L _ 1 on return --drLIB[128-16-1]; --SetSPLimit[]; ProcedureExit[0]; WordAlign[area]; SetLabel[start]; --Simulator execution begins here on a Reset. drLFC[UseLabel16[initL]]; --We use this method to initialize L to 1 drASL[255]; --and S to 0. drJDB[UseLabel16[enterXopTest]]; GenXop[]; GenAL[]; GenALS[]; GenAS[]; GenDIS[]; GenASL[]; Halt[177777B]; --Terminate here at the end of the program }; END. ΐGenXopLS.mesa Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Edward Fiala February 7, 1986 5:36:17 pm PST McCreight, January 13, 1986 1:32:24 pm PST This diagnostic tests all Xops, AL, AS, DIS, ASL, and ALS; RETN is also tested a little. When correctly executed it terminates with a HALT[177777B] on instruction 2162 at PC = 4022330B, cycle 4646. Xops trap at opcode*TrapWidthBytes + xopBase*bytesPerWord = 4,000,000B + 20B * opcode. A trap's location is TrapIndex*TrapWidthBytes + TrapBase*bytesPerWord = 4,002,000B + 20B * TrapIndex. TrapIndex definitions are in DragOpsCross. Generate a trap entry and stubs for all Xop's except 0 and 377B which will do Pause[] if the Xop is executed other than in the context of the test for it and which will remove the Alpha, AlphaBeta, or AlphaBetaGammaDelta argument from the stack if the xop is executed in the context of the test. Push the number of the opcode being tested (or 0 if none); this is kept in aux13. Compare the opcode number for this trap entry point with the opcode number of the Xop now being tested in aux 13. Compare the opcode number for this trap entry point with the opcode number of the Xop now being tested in aux 13. Compare the opcode number for this trap entry point with the opcode number of the Xop now being tested in aux13. Generate stubs for Xop trap procedures which don't fit in 16 locations. Generate a trap entry sequence for every Xop except 0 (Pause) and 377B (Halt). Generate a test for every Xop except 0 (Pause) and 377B (Halt). Note that 311B, 313B, 337B, 340B, 344B, 350B, and 354B are undefined, but not XOP's. Test AL (L _ L + Alpha mod 128). If the test completes successfully, L is restored to its original value. The current values of L cannot be read; this can only be done indirectly by calling a procedure, which saves L in ifuYoungestL, readable by LIP. Initially, L = 1 and S = 0 here. Test ALS (L _ S+Alpha mod 128). If the test completes successfully, [L, S] is restored to [1, 0]. AS is assumed to work. Current values of L or S cannot be read; this can only be done indirectly by calling a procedure, which saves L in ifuYoungestL, readable by LIP. Initially, [L, S] = [1, 0] here. Do every bit with no carry generation. Now cause carry generation in each bit; (but AS has not yet been tested and might fail). Test AS (S _ S + Alpha mod 128); ALS 0 is assumed to work. If the test completes successfully, L and S are restored to their original values. Current values of L or S cannot be read; this can only be done indirectly by calling a procedure, which saves L in ifuYoungestL, readable by LIP. Initially, [L, S] = [1, 0] here. Test DIS (S _ S - 1 mod 128). If the test completes successfully, L and S are restored to their original values. Current values of L or S cannot be read; this can only be done indirectly by calling a procedure, which saves L in ifuYoungestL, readable by LIP. Initially, [L, S] = [1, 0] here. 128 iterations restores original value of S. Test ASL (S _ L+Alpha mod 128; stack overflow not checked). If the test completes successfully, [L, S] is restored to [1, 0]. Current values of L or S cannot be read; this can only be done indirectly by calling a procedure, which saves L in ifuYoungestL, readable by LIP. Initially, [L, S] = [1, 0] here. Do carry in low-order bit and propagate all the way across. Do every bit with no carry generation. Now cause carry generation in each bit. Opcodes 0 and 377B are intercepted by the simulator, but make them trap to dummy here anway. spLimit is set with room for 17 overflow words (just in case). A stack overflow trap occurs when S is in [spLimit..spLimit + 16). Since this diagnostic program never enables the trap, it is unnecessary to execute the code here. Κζ–81.25 in leftMargin 1.25 in rightMargin 6.0 in lineLength˜codešœ ™ Kšœ Οmœ7™BK™,K™*K™K™Ζ—K˜šΟk ˜ Kšœžœžœžœ˜Kšœ žœXΟcύ˜η KšœžœŸΛ˜ύKšœ Ÿ˜+KšœŸ’˜΅KšœŸε˜ψK˜—šœ žœž˜KšžœL˜SKšœžœžœE˜QK˜K–20 sp tabStopsšœ žœžœ˜.K–20 sp tabStopsšœžœ˜2K–20 sp tabStopsšœžœ˜3K–20 sp tabStops˜K–20 sp tabStopsšœžœ"˜9K–20 sp tabStopsšœžœžœ!žœ˜LK–20 sp tabStops˜K˜šΟnœžœ˜ K˜KšœV™Vš œžœžœ˜/Kšœc˜cKšœ˜K˜K˜—Kšœ‘™‘š œžœ.˜Kšœ˜Kšœ4Ÿ˜GKšœŸ3˜CKšœ Ÿ˜%Kšœ˜Kšœ Ÿ0˜9K˜—K˜š  œžœžœ˜#K˜K˜ Kšœ(Ÿ˜KšœŸ)˜DKšœ Ÿ ˜K˜ K˜K˜ Jšœ˜Jšœ ˜ Jšœ˜Jšœ ˜ Jšœ ˜ J˜JšœŸ*˜9˜K˜——Kšžœ˜—K˜—…—<YΈ