MODEL 1: preamble.mcMay 18, 1981 1:29 PM%1%May 18, 1981 1:29 PMFix getRandom to use a new random number generatorFebruary 5, 1981 1:20 PMAdapt to current d1lang.mcSeptember 19, 1979 10:42 AMTry undoing zeroHold fix -- found a different bug that probably accounts for the behavior.September 18, 1979 5:55 PMTry to make zeroHold more reliable: apparently 3 in a row is not enough.June 17, 1979 5:11 PMChange holdValueLoc to accommodate ifu entry pointsApril 17, 1979 10:45 PMAdd sim.holdMask, sim.taskMask, sim.holdShift, sim.taskShift.January 25, 1979 11:05 AMChange simTaskLevel to 12B.January 18, 1979 5:10 PMAdd currentTaskNum.%TITLE[PREAMBLE];%NAMING CONVENTIONS:LABELS BEGIN W/ THE OPERATION BEING TESTED:Aplus1cntFcnaluLT0lsh => Left shiftrsh => Right shiftlcy => Left Cyclercy => Right CycleRegister Read/write tests are suffixed with RW:cntRWshcRWLOOP LABELS ARE SUFFIXED AS INNER (IL) AND OUTER(OL) LOOPS (L).cntFcnIL* INNER LOOPcntFcnOL* OUTER LOOPcntFcnXITIL* LABEL FOR EXITING INNERLOOPcntFcnXITOL* LABEL FOR EXITINGOUTER LOOPAplus1L* ONLY LOOP%RMREGION[DEFAULTREGION];rv[r0,0];rv[r1,1];rv[rm1,177777];rv[r01,52525];rv[r10,125252];rv[rhigh1,100000];rv[rscr,0];rv[rscr2,0];rv[rscr3,0];rv[rscr4,0];rv[stackPAddr, 0];rv[stackPTopBits, 0];rv[klink, 0];rv[hack0,0];rv[hack1, 0];rv[hack2,0];rvrel[rmx0, 0];rvrel[rmx1, 1];rvrel[rmx2, 2];rvrel[rmx3, 3];rvrel[rmx4, 4];rvrel[rmx5, 5];rvrel[rmx6, 6];rvrel[rmx7, 7];rvrel[rmx10, 10];* Constants from FF Hfp X.2B N bq `_2]\ZYZWUHTyR3QqO=NiLKaIHY FEQ BI@+#?A#=#<8:9076(3 /#1#0-?#+3#*3#( ;' #%| ;# #"s3 cpqpq+pqpqpq+pq[pqpq+pqpqp q+pqSpq+pqpq+pqCpqpq+pqpqpq+pq D^( MODEL 1: preamble.mcMay 18, 1981 1:29 PM%2nsp[PNB0,100000];nsp[PNB1,40000];nsp[PNB2,20000];nsp[PNB3,10000];nsp[PNB4,4000];nsp[PNB5,2000];nsp[PNB6,1000];nsp[PNB7,400];nsp[PNB8,200];nsp[PNB9,100];nsp[PNB10,40];nsp[PNB11,20];nsp[PNB12,10];nsp[PNB13,4];nsp[PNB14,2];nsp[PNB15,1];mc[B0,100000];mc[B1,40000];mc[B2,20000];mc[B3,10000];mc[B4,4000];mc[B5,2000];mc[B6,1000];mc[B7,400];mc[B8,200];mc[B9,100];mc[B10,40];mc[B11,20];mc[B12,10];mc[B13,4];mc[B14,2];mc[B15,1];mc[NB0,PNB0];mc[NB1,PNB1];mc[NB2,PNB2];mc[NB3,PNB3];mc[NB4,PNB4];mc[NB5,PNB5];mc[NB6,PNB6];mc[NB7,PNB7];mc[NB8,PNB8];mc[NB9,PNB9];mc[NB10,PNB10];mc[NB11,PNB11];mc[NB12,PNB12];mc[NB13,PNB13];mc[NB14,PNB14];mc[NB15,PNB15];mc[CM1,177777];mc[C77400,77400]; mc[C377,377];mc[CM2,-2];mc[getIMmask, 377];* isolate IM data after getIm[]!m[noop, BRANCH[.+1]];m[skip, BRANCH[.+2]];m[error, ILC[(BRANCH[ERR])]];m[skiperr, ILC[(BRANCH[.+2])] ILC[(BRANCH[ERR])]];m[skpif, BRGO@[TS@] JMP@[.+2,#1,#2] ];m[skpUnless, BRGO@[TS@] DBL@[.+1,.+2,#1,#2] ];m[loopChk, BRGO@[TS@] DBL@[#1,.+1,#2,#3] ];m[loopUntil, BRGO@[TS@] DBL@[.+1,#2,#1,#3]];* if #1 then goto .+1 else goto #2m[loopWhile, BRGO@[TS@] DBL@[#2,.+1,#1,#3]];* if #1 then goto #2 else goto .+1 Hfp X.2B N bqpq`pqpq+pq_pqpq+pq]pqpq+pq\pqpq+pqZpqpq+pqWpqUpqpq+pqTypqpqpqRpqpqpqQqpqpqpqOpqpqpqLpqKapqpq+pqIpqpq+pqHYpqpq+pqFpqpq+pqEQpqpq+pqBIpqpqpqpq@pq=pq<8pq:pq90pq)7pq6(pq#4pq"3 pqC1pqC /6Y8:: MODEL 1: preamble.mcMay 18, 1981 1:29 PM%3* May 18, 1981 1:36 PMrmRegion[rm2ForKernelRtn];knowRbase[rm2ForKernelRtn];rv[chkSimulatingRtn, 0];rv[fixSimRtn, 0];rv[chkRunSimRtn, 0];rv[currentTaskNum, 0];rmRegion[randomRM];knowRbase[randomRM];rv[rndm0, 134134];rv[rndm1, 054206];rv[rndm2, 036711];rv[rndm3, 103625];rv[rndm4, 117253];rv[rndm5,154737];rv[rndm6, 041344];rv[rndm7, 006712];* rm below not used for simple random number generator.rv[randV,0];* current value from random number generatorrv[randX,0];* current index into random number jump tablerv[oldRandV,0];* saved valuerv[oldRandX,0];* saved valueknowRbase[defaultRegion];mp[flags.conditionalP, 200];* bit that indicates conditional simulatingmp[flags.conditionOKp, 100];* bit that indicates conditional simulating is okset[holdValueLoc, 3400];mc[holdValueLocC, holdValueLoc];mc[flags.taskSim, b15];* NOTE: The "flags" manipulation codemc[flags.holdSim, b14];* works only so long as there are no moremc[flags.simulating, flags.taskSim, flags.holdSim];set[simTaskLevel, 12]; mc[simTaskLevelC, simTaskLevel];mc[sim.holdMask, 377]; set[sim.holdShift, 0];mc[sim.taskMask, 177400]; set[sim.taskShift, 10];m[lh, byt0[ and[rshift[#1,10], 377] ] byt1[ and[#1, 377]]];* assemble data for left half of IMm[rh, byt2[ and[rshift[#1,10], 377] ] byt3[ and[#1, 377]]];* assemble data for right half of IMm[zeroHold, ilc[(#1 _ A0)]ilc[(hold&tasksim _ #1)]ilc[(hold&tasksim _ #1)]ilc[(hold&tasksim _ #1)]]; Hfp X.2B N bq_]ZpqYpqWpqUp qTyROpq #pq Nipq #pq Lpq #pqKapq #pq I7HYpq,Fpq-EQpq#Cpq#@=pq++<8pq+190pq#7pq#%6(pq#)4pq p q3 pq pq0pqpq.pqp q+pq4*#(pq4' $#pq"s k ;=K MODEL 1: preamble.mcMay 18, 1981 1:29 PM%4* December 11, 1978 3:20 PM%subroutine entry/exit macros%m[saveReturn, ilc[(t _ link)]top level[]ilc[(#1 _ t)]];m[saveReturnAndT, ilc[(#2 _ t)]ilc[(t _ link)]top level[]ilc[(#1 _ t)]];m[returnUsing, subroutine[]ilc[(RBASE _ rbase[#1])]ilc[(link _ #1)]ilc[(return, RBASE _ rbase[defaultRegion])]];m[returnAndBranch, subroutine[]ilc[(RBASE_rbase[#1])]ilc[(link_#1)]ilc[(RBASE_rbase[defaultRegion])]ilc[(return, PD_#2)]];m[pushReturn, subroutine[]ilc[(stkp+1)]top level[]ilc[(stack _ link)]];* notice that this macro doesn't clobber T !!!m[pushReturnAndT, subroutine[]ilc[(stkp+1)]ilc[(stack&+1 _ link)]top level[]ilc[(stack_t)]];m[returnP, subroutine[]ilc[(link_(stack&-1))]ilc[(return)]];m[pReturnP,ilc[(stkp-1)]subroutine[]ilc[(link_(stack&-1))]ilc[(return)]];m[returnPAndBranch, subroutine[]ilc[(link_(stack&-1))]ilc[(return, PD_#1)]];m[pReturnPAndBranch, subroutine[]ilc[(stkp-1)]ilc[(link_(stack&-1))]ilc[(return, PD_#1)]];*m[getRandom, ilc[(RBASE _ rbase[randX])]*ilc[(randX _ (randX)+1, Bdispatch _ randX)] Hfp X.2B N bq` _] \p qZ YWTyp qRQq ONiKap q IHYF+EQCpq BI@ ?A!=<8:p q907 6(4.3 pq10. - +*pq(' %|#p"sq kcpq[SpqKCpq 3 + +^ MODEL 1: preamble.mcMay 18, 1981 1:29 PM%5*ilc[(call[random], RBASE _ rbase[rndm0])]*ilc[(RBASE _ rbase[defaultRegion])]*];* Returns random number in T, leaves RBASE= defaultRegionm[getRandom, ilc[(RBASE_ rbase[rndm0])]ilc[(call[random])]ilc[(RBASE_ rbase[defaultRegion])]];knowRbase[defaultRegion]; Hfp X.2B N bq )` #_ :]pq\Z"YU . T26 @ postamble.mcJuly 11, 1984 3:13 PM %1TITLE[POSTAMBLE];TOP LEVEL;%July 11, 1984Fix assembly problem in notifytask - bigDBispatch was inside a subroutineMay 18, 1981 1:37 PMFix random number generator to use a better algorithm. Modify restart code, and the various subroutinesassociated with random numbers. Add setRandV, cycleRandV.February 1, 1980 6:24 PMFix goto[preBegin], described below, into goto[restartDiagnostic]. Postamble already defines and usespreBegin.February 1, 1980 11:52 AMFix restart to goto[preBegin]. This allows each diagnostic to perform whatever initialization it wants.September 19, 1979 9:18 PMFix another editing bug in chkSimulating, used the wrong bit to check for flags.conditionOK -- just did itwrong.September 19, 1979 9:08 PMFix bug in chkSimulating wherein an edit lost a carriage return and a statment became part of a comment.Unfortunately, automatic line breaks made the statement look as if it were still there rather than making it look likepart of the comment line.September 19, 1979 4:23 PMFix placement errors associated with bumming locations from makeholdvalue and from checksimulating.September 19, 1979 3:48 PMBum locations to fit postamble with current os/microD: reallyDone, checkFlags global, make checkFlagscallers exploit FF, eliminate noCirculate label, make others shorter..September 19, 1979 10:41 AMchange callers of getIM*, putIM* to use FF field when calling them.September 19, 1979 10:18 AMCreate zeroHoldTRscr which loops to zero hold-- called by routines that invoke resetHold when the holdsimulator may be functioning. Make getIM*, putIM* routines global.September 16, 1979 1:27 PMBum code to fix storage full problem that occurs because OS 16/6 is bigger than OS 15/5: remove kernelspecific patch locations (patch*).August 1, 1979 3:28 PMAdd scopeTrigger.June 17, 1979 4:48 PMMove IM data locations around to accommodate Ifu entry pointsApril 26, 1979 11:03 AMMake justReturn global.April 19, 1979 5:03 PMRemove calls to incTask/HoldFreq from enable/disableConditionalTask.April 18, 1979 3:24 PMRemove DisplayOff from postamble.April 18, 1979 11:11 AMRename chkTaskSim, chkHoldSim, simControl to incTaskFreq, incHoldFreq, makeHoldValue; clean upsetHold.April 17, 1979 10:51 PMSimControl now masks holdFreq and taskFreq & shifts them w/ constants defined in Postamble.April 11, 1979 3:49 PMAdd breakpoint to "done", and fix, again, a bug associated with task simulation. Set defaultFlagsP (whenpostamble defines it) to force taskSim and holdSim. -fp.+ XN bq` ^ \wZIYoWhVg:TVRfQNO=MhKJ#jHFE hCvB?>mc<\:f9TF7B5C32)f0C.,f*"('i%X#=! ?.D!^f[UiM3 C] postamble.mcJuly 11, 1984 3:13 PM %2March 7, 1979 11:42 PMSet RBASE to defaultRegion upon entry to postamble. thnx to Roger.February 16, 1979 2:54 PMModify routines that read IM to invert the value returned in link if b1 from that value =1 (this implies thewhole value was inverted).January 25, 1979 10:41 AMChange taskCirculate code to accommodate taskSim wakeups for task 10D, 12BJanuary 18, 1979 5:13 PMModify checkTaskNum to use the RM value, currentTaskNum, and modify taskCircInc to keep the copy incurrentTaskNum.January 15, 1979 1:25 PMadd justReturn, a subroutine that just returnsJanuary 9, 1979 12:07 PMbreakpoint on xorTaskSimXit to avoid midas bug%%*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++TABLE of CONTENTS, by order of Occurencedonelocation where diagnostics go when they are finished --gives control to postamble codethe increments iterations, implements hold and task simulation and task circulation.reallyDoneLocation where postamble inits 2 rm locations then performs "GoTo BEGIN"restartReinit diagnostic state, then restart the diagnostic.incTaskFreqIncrement the task frequency counterincHoldFreqIncrement the hold frequency countermakeHoldValueCounstruct the "Hold&TaskSim" value from holdFreq and taskFreq, given that each isenabled in FlagschkRunSimulatorsCause Hold or Task sim to happen, if requiredchkSimulatingReturn ALU#0 if some sort of simulating occuringtaskCirculateImplement task circulationincIterationsIncrement iterations counter (>16 bits)resetHoldReset Hold&TaskSim to its previous value.setHoldSet hold&task sim, notifying task simulator to do it.simInitEntry point for initialization in task simulator codetestTaskSimSubroutine that tests task simulatorfixSimRun Hold&TaskSim given current holdFreq and taskFreqreadByte3Return byte 3 of an IM locationgetIMRHReturn right half of an IM locationgetIMLHReturn left half of an IM locationputIMRHWrite Right half of an IM locationputIMLHWrite Left half aof an IM locationcheckFlagsReturn Alu result & t based on entry mask & current flagscheckTaskNumReturn "currentTaskNum" # expectedTaskNumnotifyTaskAwaken take in TtopLvlPostRtnCode that returns through mainPostRtnscopeTriggerGlobal subroutine that performs TIOA_0,TIOA_177777justReturnglobal subroutine that returns onlyrandomreturn random numbers, used w/ getRand[] macro.saveRandStateSave random number generator's staterestoreRandStateRestore old state to random number generatorgetRandVPart of random number linkagexorFlagsXor Flags w/ txorTaskCirctoggle flags.taskCircxorHoldSimtoggle flags.holdSimxorTaskSimtoggle flags.taskSimdisableConditionalTaskdisable conditional taskingenableConditionalTaskenable conditional tasking -fp.+ XN bq`B^]l[YoWpq6VgTpq1p qS_QNOp qNFL.K> H2Gb E p(BqVA.T?p qH>&pq5