GenRandomBackground.mesa
McCreight, January 14, 1986 9:58:29 am PST
DIRECTORY
DragOpsCross,
DragOpsCrossUtils,
HandCoding,
HandCodingPseudos,
HandCodingSupport;
GenRandomBackground: CEDAR PROGRAM
IMPORTS DragOpsCrossUtils, HandCoding, HandCodingPseudos, HandCodingSupport
= BEGIN OPEN DragOpsCrossUtils, HandCoding, HandCodingPseudos, HandCodingSupport;
All: PROC = {
initStart: Label = GenLabel[];
randomStart: Label = GenLabel[];
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[ResetTrap]];
drLFC[UseLabel16[initStart]];
Halt[0FFFFH]; -- success
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[IFUPageFaultTrap]];
drLIB[DragOpsCross.TrapIndex[IFUPageFaultTrap].ORD];
Halt[0FFFFH]; -- no point in simulating further
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[IFUStackOverflowTrap]];
drLIB[DragOpsCross.TrapIndex[IFUStackOverflowTrap].ORD];
Halt[0FFFFH]; -- no point in simulating further
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[EUStackOverflowTrap]];
drLIB[DragOpsCross.TrapIndex[EUStackOverflowTrap].ORD];
Halt[0FFFFH]; -- no point in simulating further
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[EUPageFault]];
drLIB[DragOpsCross.TrapIndex[EUPageFault].ORD];
Halt[0FFFFH]; -- no point in simulating further
SetOutputPC[DragOpsCrossUtils.TrapIndexToBytePC[EUWriteFault]];
drLIB[DragOpsCross.TrapIndex[EUWriteFault].ORD];
Halt[0FFFFH]; -- no point in simulating further
SetOutputPC[101400H];
SetLabel[initStart];
drLIB[10H];
drDUP[];
drFSDB[0];
drSIP[DragOpsCross.ProcessorRegister[ifuSLimit].ORD];
drLIQB[LOOPHOLE[DragOpsCross.IFUStatusRec[userMode: FALSE, trapsEnabled: TRUE]]];
drSIP[DragOpsCross.ProcessorRegister[ifuStatus].ORD];
drJDB[UseLabel16[randomStart]];
SetOutputPC[102000H];
SetLabel[randomStart];
drRETN[]; -- to be overlaid by random code
};
END.