%
Page Numbers: Yes First Page: 1
Heading:
MODEL 1: preamble.mcMay 18, 1981 1:29 PM%
%
May 18, 1981 1:29 PM
Fix getRandom to use a new random number generator
February 5, 1981 1:20 PM
Adapt to current d1lang.mc
September 19, 1979 10:42 AM
Try undoing zeroHold fix -- found a different bug that probably accounts for the behavior.
September 18, 1979 5:55 PM
Try to make zeroHold more reliable: apparently 3 in a row is not enough.
June 17, 1979 5:11 PM
Change holdValueLoc to accommodate ifu entry points
April 17, 1979 10:45 PM
Add sim.holdMask, sim.taskMask, sim.holdShift, sim.taskShift.
January 25, 1979 11:05 AM
Change simTaskLevel to 12B.
January 18, 1979 5:10 PM
Add currentTaskNum.
%
TITLE[PREAMBLE];
%
NAMING CONVENTIONS:
LABELS BEGIN W/ THE OPERATION BEING TESTED:
Aplus1
cntFcn
aluLT0
lsh => Left shift
rsh => Right shift
lcy => Left Cycle
rcy => Right Cycle
Register Read/write tests are suffixed with RW:
cntRW
shcRW
LOOP LABELS ARE SUFFIXED AS INNER (IL) AND OUTER(OL) LOOPS (L).
cntFcnIL* INNER LOOP
cntFcnOL* OUTER LOOP
cntFcnXITIL* LABEL FOR EXITING INNER LOOP
cntFcnXITOL* LABEL FOR EXITING OUTER LOOP
Aplus1L* 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
nsp[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 #2
m[loopWhile, BRGO@[TS@] DBL@[#2,.+1,#1,#3]];* if #1 then goto #2 else goto .+1
* May 18, 1981 1:36 PM
rmRegion[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 generator
rv[randX,0];* current index into random number jump table
rv[oldRandV,0];* saved value
rv[oldRandX,0];* saved value
knowRbase[defaultRegion];
mp[flags.conditionalP, 200];* bit that indicates conditional simulating
mp[flags.conditionOKp, 100];* bit that indicates conditional simulating is ok
set[holdValueLoc, 3400];mc[holdValueLocC, holdValueLoc];
mc[flags.taskSim, b15];* NOTE: The "flags" manipulation code
mc[flags.holdSim, b14];* works only so long as there are no more
mc[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 IM
m[rh, byt2[ and[rshift[#1,10], 377] ] byt3[ and[#1, 377]]
];* assemble data for right half of IM
m[zeroHold, ilc[(#1 ← A0)]
ilc[(hold&tasksim ← #1)]
ilc[(hold&tasksim ← #1)]
ilc[(hold&tasksim ← #1)]
];
* 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)]
*ilc[(call[random], RBASE ← rbase[rndm0])]
*ilc[(RBASE ← rbase[defaultRegion])]
*];* Returns random number in T, leaves RBASE= defaultRegion
m[getRandom, ilc[(RBASE← rbase[rndm0])]
ilc[(call[random])]
ilc[(RBASE← rbase[defaultRegion])]
];
knowRbase[defaultRegion];