Updated start address for the DEQKC 11/70 test

This commit is contained in:
Jeff 2016-11-14 10:44:24 -08:00 committed by Jeff Parsons
commit ba0ca49854
21 changed files with 3895 additions and 3163 deletions

View file

@ -55,7 +55,6 @@ var DumpAPI = require("../../shared/lib/dumpapi");
*/
function FileDump(sFormat, fComments, fDecimal, offDump, nWidthDump, sServerRoot)
{
this.addrLoad = null;
this.fDebug = false;
this.sFormat = (sFormat || DumpAPI.FORMAT.JSON);
this.fJSONNative = (this.sFormat == DumpAPI.FORMAT.JSON && !fComments);
@ -68,6 +67,8 @@ function FileDump(sFormat, fComments, fDecimal, offDump, nWidthDump, sServerRoot
this.fLocal = !sServerRoot;
this.sServerRoot = sServerRoot || process.cwd();
this.buf = null;
this.addrLoad = null;
this.addrExec = null;
/*
* TODO: Decide what to do with this usage info; we can't use it as a default, because setting this.json
* causes outputFile() to ignore this.buf indiscriminately (ie, it breaks non-JSON output modes).
@ -99,7 +100,8 @@ FileDump.asBadExts = [
* Usage
* ---
* filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|octal|bytes|words|rom)]
* [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]
* [--comments] [--decimal] [--offset={number}] [--width={number}] [--load={number}] [--exec={number}]
* [--output={path}] [--overwrite]
*
* Arguments
* ---
@ -173,6 +175,10 @@ FileDump.CLI = function()
for (sMergeFile in argv['merge']) asMergeFiles.push(sMergeFile);
}
}
file.addrLoad = str.parseInt(argv['load']);
file.addrExec = str.parseInt(argv['exec']);
var cMergesPending = asMergeFiles.length;
var iStart = 0, nSkip = cMergesPending;
file.loadFile(sFile, iStart++, nSkip, function(err) {
@ -482,15 +488,15 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
nWidthDump = nWidthDump || this.nWidthDump;
var sDump = "";
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
* in parseListing() is both the load and exec address.
*/
var sAddr = str.toHexWord(this.addrLoad) + (nBase == 8? "/*" + str.toOct(this.addrLoad, 6) + "*/" : "");
sDump += this.dumpLine(2, '"load":' + sAddr + ',"exec":' + sAddr + ',');
var addrs = {'load': this.addrLoad, 'exec': this.addrExec};
for (var prop in addrs) {
var addr = addrs[prop];
if (addr != null) {
sDump += this.dumpLine(2, '"' + prop + '":' + str.toHexWord(addr) + (nBase == 8? "/*" + str.toOct(addr, 6) + "*/" : "") + ',');
}
}
sDump += this.dumpLine(2, (sKey? '"' + sKey + '":' : "") + this.sJSONWhitespace + chOpen);
var sLine = "";

View file

@ -1508,11 +1508,11 @@ PDP11.opRTI = function(opCode)
this.trapReturn();
/*
* Unlike RTT, RTI permits an immediate trace, which we resolve by propagating PSW.TF to OPFLAG.TRAP_TF
* (which, as written, requires that both flags have the same bit value; see defines.js).
* (which, as written below, requires that both flags have the same bit value; see defines.js).
*
* NOTE: This trace behavior is NEW for machines that have both RTI and RTT. Early models didn't have RTT; ie,
* the old RTI instruction behaved exactly like the new RTT instruction. This is why the 11/20 jump table below
* for RTI calls opRTT() instead of opRTI().
* NOTE: This RTI trace behavior is NEW for machines that have both RTI and RTT. Early models didn't have RTT,
* so the old RTI behaved exactly like the new RTT. Which is why the 11/20 jump table below calls opRTT() instead
* of opRTI() for RTI.
*/
this.opFlags |= (this.regPSW & PDP11.PSW.TF);
this.nStepCycles -= (10 + 3);
@ -1533,7 +1533,7 @@ PDP11.opRTS = function(opCode)
var src = this.popWord();
var reg = opCode & PDP11.OPREG.MASK;
/*
* When the popular "RTS PC" form is used, we might as well eliminate the useless setting of PC
* When the popular "RTS PC" form is used, we might as well eliminate the useless setting of PC...
*/
if (reg == PDP11.REG.PC) {
this.setPC(src);

View file

@ -666,7 +666,7 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr)
*
* Conversely, if TIE is being cleared, remove the request; this satisfies a test in MAINDEC TEST 15,
* which appears to clear, set, and clear the Transmitter Interrupt Enable (TIE) bit in rapid succession,
* with the expectation that NO interrupt will be generated. However, this fix also required a
* with the expectation that NO interrupt will be generated. However, this fix also requires a
* complementary change in setTrigger(), to request hardware interrupts with INTQ_DELAY rather than INTQ.
*/
if (this.xcsr & PDP11.DL11.XCSR.READY) {
@ -676,9 +676,6 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr)
this.cpu.removeTrigger(this.triggerTransmitInterrupt);
}
}
if ((this.xcsr & PDP11.DL11.XCSR.READY) && (data & PDP11.DL11.XCSR.TIE)) {
this.cpu.setTrigger(this.triggerTransmitInterrupt);
}
this.xcsr = (this.xcsr & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK);
};