DebuggerDefs.mesa
Copyright © 1987 by Xerox Corporation. All rights reserved.
Edward Fiala April 29, 1987 3:37:19 pm PDT.
This interface has definitions for the storage locations of the table used by GenDebugger to save and restore the state of the Dragon IFU and EU. In addition, it has the withSoftCard BOOLEAN which controls assembly of code which cannot run on the Softcard.
DIRECTORY
DragOpsCross USING [bytesPerWord, EUAuxRegs, EUConstants, EUStackSize, IFUStackSize, Word];
DebuggerDefs: CEDAR DEFINITIONS = {
Word: TYPE = DragOpsCross.Word;
bytesPerWord: CARDINAL = DragOpsCross.bytesPerWord;
IFUStackSize: NAT = DragOpsCross.IFUStackSize;
EUStackSize: NAT = DragOpsCross.EUStackSize;
EUAuxRegs: NAT = DragOpsCross.EUAuxRegs;
EUConstants: NAT = DragOpsCross.EUConstants;
withSoftCard should be TRUE to debug with the Softcard, FALSE to debug with Lizard. When withSoftcard = TRUE, a lengthy sequence in GenDebugger is assembled for the purposes of initializing the Softcard map; real storage addresses are limited to the 1 megabyte area supported by the Softcard; and high-order storage address bits are ignored, truncating references into a 1 megabyte area [4,000,000B..10,000,000B); also, the CST instruction is disallowed. When withSoftCard = FALSE, instructions for initializing all the registers are assembled to placate Lizard.
withSoftCard: BOOLEAN = TRUE;
massiveTesting should be TRUE to assemble sequences that execute very large instruction counts or loop; this switch should be FALSE for testing with LIZARD, TRUE for testing on the Softcard.
massiveTesting: BOOLEAN = TRUE;
For the Softcard, define word addresses [1,002,400B..1,004,000B) for debugger temporary storage (see definitions below), [1004000B..1006000B) for debugger program, and 1010000B for user's code.
debugBase: LONG CARDINAL = 1002400B;
Base address for debugger's code
debuggerBasePC: LONG CARDINAL = 1004000B * bytesPerWord;
Base address for user's code
userBasePC: LONG CARDINAL = 1010000B * bytesPerWord;
--debuggerLoopCount: CARDINAL = 0;
debuggerProceed: CARDINAL = 1; --0 when Dragon running, 1 at debugger's wait loop
debuggerOpcode: CARDINAL = 2; --Trap opcode causing debugger entry or other code as follows:
debugEntryEUFault: CARDINAL = 55h;
debugEntryIFUFault: CARDINAL = 0aah;
debuggerAlphaBeta: CARDINAL = 3; --Alpha-Beta of halting opcode
debuggerS: CARDINAL = 4; --S at onset of halting opcode
debuggerFrame: CARDINAL = 5; --No. frames in use, including that created by entry Xop
debuggerCarry: CARDINAL = 6;
euRegBase + 126 holds [S] at the onset of the Halt; euRegBase + 125 holds [S-1]; etc.; the values in euRegBase + 127, euRegBase + 0, and euRegBase + 1 are smashed by the debugger before saving. Although euRegBase + 127 will be restored into [S+1], it is not saved. euRegBase + [128..160) hold the other EU registers.
euRegBase: CARDINAL = 7;
debuggerSLimit: CARDINAL = euRegBase + 160;
ifuRegBase + 2n holds ifuStatus & ifuRegBase + 2n + 1 holds PC for frame n, where n= 0 is the oldest frame, n = 1 second oldest, etc.
ifuRegBase: CARDINAL = debuggerSLimit + 1;
}.