Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Merge branch 'next-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpar committed Oct 6, 2016
2 parents 7fa8928 + 83e5020 commit 6e6afd5
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 366 deletions.
2 changes: 1 addition & 1 deletion devices/pdp11/machine/1170/machine.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdp11/1.30.0/machine.xsl"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.0/machine.xsl"?>
<machine id="test1170" class="pdp11" border="1" pos="center" background="#FAEBD7">
<name pos="center">PDP-11/70 Test Machine</name>
<computer id="computer" busWidth="22"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/pdp11/machine/1170/test/machine.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdp11/1.30.0/machine.xsl"?>
<?xml-stylesheet type="text/xsl" href="/versions/pdpjs/1.30.0/machine.xsl"?>
<machine id="test1170" class="pdp11" border="1" pos="center" background="#FAEBD7">
<name pos="center">PDP-11/70 Test Machine</name>
<computer id="computer" busWidth="22"/>
Expand Down
4 changes: 2 additions & 2 deletions modules/pdp11/lib/computer.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function ComputerPDP11(parmsComputer, parmsMachine, fSuspended) {
}
}

this.println(PDP11.APPNAME + " v" + (XMLVERSION || PDP11.APPVERSION) + "\n" + COPYRIGHT + "\n" + LICENSE);
this.println(PDP11.APPNAME + " v" + PDP11.APPVERSION + "\n" + COPYRIGHT + "\n" + LICENSE);

this.println("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis <[email protected]>");

Expand Down Expand Up @@ -1458,7 +1458,7 @@ ComputerPDP11.init = function()
/*
* In non-COMPILED builds, embedMachine() may have set XMLVERSION.
*/
if (!COMPILED && PDP11.XMLVERSION) PDP11.APPVERSION = PDP11.XMLVERSION;
if (!COMPILED && XMLVERSION) PDP11.APPVERSION = XMLVERSION;

var aeMachines = Component.getElementsByClass(document, PDP11.APPCLASS + "-machine");

Expand Down
34 changes: 25 additions & 9 deletions modules/pdp11/lib/cpustate.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ CPUStatePDP11.prototype.resetRegs = function()
this.mmuMask = [ // mask to control I&D access for each mode
0x7, 0x7, 0x7, 0x7
];
/**
* @type {Array.<InterruptEvent>}
*/
/** @type {Array.<InterruptEvent>} */
this.interruptQueue = [];
this.opFlags |= PDP11.OPFLAG.INTQ;
this.initMemoryAccess();
Expand Down Expand Up @@ -617,12 +615,30 @@ CPUStatePDP11.prototype.interrupt = function(delay, priority, vector, callback)
}
delay -= this.interruptQueue[i].delay;
}
this.interruptQueue.splice(i + 1, 0, {
"delay": delay,
"priority": (priority << 5) & 0xe0,
"vector": vector,
"callback": callback
});
/*
* NOTE regarding a Google Closure Compiler "bug": if an InterruptEvent is inserted into the
* interruptQueue with the named properties below, they will never be seen by the rest of the
* code, because the compiler renames all other property references EXCEPT these.
*
* this.interruptQueue.splice(i + 1, 0, {
* "delay": delay,
* "priority": (priority << 5) & 0xe0,
* "vector": vector,
* "callback": callback
* });
*
* Perhaps if the inlined object had been explicitly @typed, that wouldn't have happened, but
* I'm playing it safe now: I've taken the object out-of-line, removed the quoted property names,
* and explicitly typed it. The compiler re-inlines the object with correctly renamed properties.
*/
/** @type {InterruptEvent} */
var interruptEvent = {
delay: delay,
priority: (priority << 5) & 0xe0,
vector: vector,
callback: callback
};
this.interruptQueue.splice(i + 1, 0, interruptEvent);
}
this.opFlags |= PDP11.OPFLAG.INTQ;
};
Expand Down
Loading

0 comments on commit 6e6afd5

Please sign in to comment.