Added more PDP-11 paper tape resources
This commit is contained in:
parent
5d5629c27b
commit
89dc2660f1
51 changed files with 11603 additions and 166 deletions
|
|
@ -482,7 +482,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
|
|||
nWidthDump = nWidthDump || this.nWidthDump;
|
||||
|
||||
var sDump = "";
|
||||
if (this.addrLoad) {
|
||||
if (this.addrLoad != null) {
|
||||
/*
|
||||
* TODO: We need command-line overrides (eg, --load and --exec) to allow the user to specify the
|
||||
* correct load (and exec) addresses. For now, we're simply inferring that the first address parsed
|
||||
|
|
|
|||
|
|
@ -1130,8 +1130,8 @@ PDP11.opHALT = function(opCode)
|
|||
* buffer is enabled, but that's more work.
|
||||
*
|
||||
* Because rewinding is not normal CPU behavior, attempting to Run again (or use the Debugger's
|
||||
* "g" command) will cause an immediate HALT again; the work-around is simple: either set the PC to
|
||||
* a new address (eg, "r pc=pc+2") or single-step the HALT instruction ("t").
|
||||
* "g" command) would cause an immediate HALT again -- except that checkInstruction() checks for that
|
||||
* precise condition, so if the CPU starts on a HALT, checkInstruction() will skip over it.
|
||||
*/
|
||||
this.dbg.stopInstruction();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ CPUStatePDP11.prototype.initProcessor = function()
|
|||
this.aTriggers = []; // list of all triggers, active or not (just for debugging)
|
||||
}
|
||||
|
||||
this.flags.complete = this.flags.debugCheck = false;
|
||||
this.flags.complete = false;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -2084,24 +2084,23 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
|
|||
* so stopCPU() would have no effect as far as the Debugger is concerned.
|
||||
*/
|
||||
this.flags.complete = true;
|
||||
this.flags.debugCheck = (DEBUGGER && this.dbg && this.dbg.checksEnabled());
|
||||
|
||||
/*
|
||||
* nDebugCheck is 1 if we want to "check" every instruction with the Debugger, and -1 if we only
|
||||
* want to check the first instruction.
|
||||
* nDebugCheck is 1 if we want the Debugger's checkInstruction() to check every instruction,
|
||||
* -1 if we want it to check just the first instruction, and 0 if there's no need for any checks.
|
||||
*/
|
||||
var nDebugCheck = this.flags.debugCheck? 1 : -1;
|
||||
var nDebugCheck = (DEBUGGER && this.dbg && this.dbg.checksEnabled())? 1 : (this.flags.starting? -1 : 0);
|
||||
|
||||
/*
|
||||
* nDebugState is checked only when nDebugCheck is set, and its sole purpose is to tell the first call
|
||||
* to checkInstruction() that it can skip breakpoint checks, and that will be true ONLY when fStarting is
|
||||
* true OR nMinCycles is zero (the latter means the Debugger is single-stepping).
|
||||
* nDebugState is needed only when nDebugCheck is non-zero; it is -1 if this is a single-step, 0 if
|
||||
* this is the start of a new run, and 1 if this is a continuation of a previous run. It is used by
|
||||
* checkInstruction() to determine if it should skip breakpoint checks and/or HALT instructions (ie,
|
||||
* if nDebugState is <= zero).
|
||||
*/
|
||||
var nDebugState = (!nMinCycles)? -1 : (this.flags.starting? 0 : 1);
|
||||
|
||||
/*
|
||||
* Once we snap fStarting, we clear it, because technically, we've moved beyond "starting" and have
|
||||
* officially "started" now.
|
||||
* We've moved beyond "starting" now and have officially "started".
|
||||
*/
|
||||
this.flags.starting = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1617,16 +1617,19 @@ if (DEBUGGER) {
|
|||
var cpu = this.cpu;
|
||||
|
||||
/*
|
||||
* Purely as a convenience, we're going to skip over a HALT opcode if the machine is just starting,
|
||||
* and pretend that the NEXT instruction is the first to be executed.
|
||||
* Since opHalt() will rewind the PC on a HALT, purely for our debugging benefit, we must compensate
|
||||
* for that here by skipping over the HALT if/when the machine starts up again.
|
||||
*/
|
||||
if (nState == 0) {
|
||||
if (!nState) {
|
||||
opCode = this.cpu.getWordDirect(addr);
|
||||
if (opCode == PDP11.OPCODE.HALT) {
|
||||
addr = this.cpu.advancePC(2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the CPU stopped on a breakpoint, we're not interested in stopping again if the machine is starting.
|
||||
*/
|
||||
if (nState > 0) {
|
||||
if (this.nBreakInstructions) {
|
||||
if (!--this.nBreakInstructions) return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue