Added getTrapStatus() so that the Debugger can display trap information whenever a trap has just occurred, updated FileDump to store 'load' and 'exec' properties in MACRO-11 listing dumps (so that the individual machine files don't have to specify hard-coded 'load' and 'exec' values themselves), and added a new SerialPort parameter (upperCase) that can be used to force all received data to upper-case

This commit is contained in:
Jeff Parsons 2016-10-21 21:07:26 -07:00 • committed by Jeff Parsons
commit 5808778351
24 changed files with 269 additions and 182 deletions

View file

@ -1162,6 +1162,13 @@ CPUStatePDP11.prototype.trap = function(vector, reason)
this.opFlags &= ~PDP11.OPFLAG.TRAP_MASK; // lose interest in traps after an abort
this.trapPSW = -1; // reset flag that we have a trap within a trap
/*
* These next properties are purely for bookkeeping purposes; see getTrapStatus()
*/
this.opFlags |= PDP11.OPFLAG.TRAP;
this.trapVector = vector;
this.trapReason = reason;
if (reason != PDP11.REASON.INTERRUPT) throw vector;
};
@ -1192,6 +1199,17 @@ CPUStatePDP11.prototype.trapReturn = function()
this.opFlags &= ~PDP11.OPFLAG.TRAP_TF;
};
/**
* getTrapStatus()
*
* @this {CPUStatePDP11}
* @return {number}
*/
CPUStatePDP11.prototype.getTrapStatus = function()
{
return (this.opFlags & PDP11.OPFLAG.TRAP)? (this.trapVector | this.trapReason << 8) : 0;
};
/**
* mapUnibus(unibusAddress)
*