Fixed a couple of PDP-10 opcode emulation bugs (AOBJN, AOBJP, and CMP), and rounded out the set of DEC's basic instruction diagnostics

This commit is contained in:
Jeff 2017-03-27 11:44:42 -07:00 committed by Jeff Parsons
commit 2a8c2a74d2
21 changed files with 29570 additions and 84 deletions

View file

@ -2160,7 +2160,7 @@ PDP10.opBLT = function(op, acc)
*/
PDP10.opAOBJP = function(op, acc)
{
var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_MASK;
var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_LIMIT;
this.writeWord(acc, dst);
if (dst < PDP10.INT_LIMIT) this.setPC(this.regEA);
};
@ -2184,7 +2184,7 @@ PDP10.opAOBJP = function(op, acc)
*/
PDP10.opAOBJN = function(op, acc)
{
var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_MASK;
var dst = (this.readWord(acc) + 0o000001000001) % PDP10.WORD_LIMIT;
this.writeWord(acc, dst);
if (dst >= PDP10.INT_LIMIT) this.setPC(this.regEA);
};
@ -6500,7 +6500,7 @@ PDP10.CLR = function(dst, src)
*/
PDP10.CMP = function(dst, src)
{
return (dst < PDP10.INT_LIMIT? dst : dst - PDP10.WORD_LIMIT) - (src < PDP10.INT_LIMIT? src : src - PDP10.INT_LIMIT);
return (dst < PDP10.INT_LIMIT? dst : dst - PDP10.WORD_LIMIT) - (src < PDP10.INT_LIMIT? src : src - PDP10.WORD_LIMIT);
};
/**

View file

@ -172,7 +172,6 @@ class DebuggerPDP10 extends Debugger {
this.nStep = 0;
this.sCmdTracePrev = null;
this.sCmdDumpPrev = null;
this.fIgnoreNextCheckFault = false; // TODO: Does this serve any purpose on a PDP-11?
this.nSuppressBreaks = 0;
this.cInstructions = this.cInstructionsStart = 0;
this.nCycles = this.nCyclesStart = this.msStart = 0;
@ -2607,7 +2606,7 @@ class DebuggerPDP10 extends Debugger {
}
var sOptions = asArgs[0].substr(1);
var match = sOpcode.match(/^(['"]?)(.*\.mac)\1$/i);
var match = sOpcode.match(/^(['"]?)(.*\.mac|.*\.html)\1$/i);
if (match) {
var dbg = this;
if (this.macro10) {
@ -3327,9 +3326,6 @@ class DebuggerPDP10 extends Debugger {
*/
doRun(sCmd, sAddr, sOptions, fQuiet)
{
if (sCmd == "gt") {
this.fIgnoreNextCheckFault = true;
}
if (sAddr !== undefined) {
var dbgAddr = this.parseAddr(sAddr);
if (!dbgAddr) return;

View file

@ -348,7 +348,7 @@ class Macro10 {
* If the "preprocess" option is set, then just return the plain text we retrieved.
*/
if (this.sOptions.indexOf('p') >= 0) {
this.println(this.asLines.join());
this.println(this.asLines.join(""));
return 0;
}
@ -577,6 +577,7 @@ class Macro10 {
this.addMacro(sOperator, sRemainder);
break;
case Macro10.PSEUDO_OP.LALL: // TODO
case Macro10.PSEUDO_OP.PAGE: // TODO
case Macro10.PSEUDO_OP.SUBTTL: // TODO
case Macro10.PSEUDO_OP.TITLE: // TODO
@ -1417,6 +1418,7 @@ Macro10.PSEUDO_OP = {
IFN: "IFN",
IRP: "IRP",
IRPC: "IRPC",
LALL: "LALL",
LITERAL: "LITERAL", // this is a pseudo-pseudo-op, used for internal purposes
PAGE: "PAGE",
REPEAT: "REPEAT",