From 483d247491f8835ca541561220a2ad40be4000c0 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Tue, 6 Sep 2016 10:06:08 -0700 Subject: [PATCH] Minor annotation and name changes; the PDP11 emulator "branded" as PDP11js now, since PDP11 is too generic --- docs/pcx86/examples/pcx86-dbg.js | 4 +- docs/pcx86/examples/pcx86.js | 4 +- modules/pdp11/lib/cpustate.js | 64 +++++++++++++--------------- modules/pdp11/lib/defines.js | 21 +++++---- modules/shared/lib/embed.js | 44 +++++++++---------- versions/c1pjs/1.24.2/c1p-dbg.js | 9 ++-- versions/c1pjs/1.24.2/c1p.js | 9 ++-- versions/pc8080/1.24.2/pc8080-dbg.js | 9 ++-- versions/pc8080/1.24.2/pc8080.js | 9 ++-- versions/pcx86/1.24.2/pcx86-dbg.js | 4 +- versions/pcx86/1.24.2/pcx86.js | 4 +- versions/pdp11/1.24.2/pdp11-dbg.js | 31 +++++++------- versions/pdp11/1.24.2/pdp11.js | 60 +++++++++++++------------- 13 files changed, 137 insertions(+), 135 deletions(-) diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 82ed6f356..75db550b2 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -806,8 +806,8 @@ Ma.exit.push(function(){for(var a=pb(document,"pcx86","computer"),b=0;bh.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2")); -h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2"));h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");xa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],l,n=/( [a-z]+=)(['"])(.*?)\2/g;l=n.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);rs(a,b,c)}})}else c(a,null)} function ss(a,b,c,d){function e(a){if(void 0===h){var b=g&&pb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=la(a))}function f(a){e("Error: "+a);k&&(--ds||Ua(!0));k=!1}var g,h,k=!0;ds++;gb[a]={};try{if(g=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=l:q.appendChild(document.createTextNode(l));n.appendChild(q)}c|| diff --git a/docs/pcx86/examples/pcx86.js b/docs/pcx86/examples/pcx86.js index b733c67ff..87b5ac794 100644 --- a/docs/pcx86/examples/pcx86.js +++ b/docs/pcx86/examples/pcx86.js @@ -626,8 +626,8 @@ Ca.exit.push(function(){for(var a=bb(document,"pcx86","computer"),b=0;bh.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2")); -h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(x){h=null,a=x.message}else a="unrecognized XML: "+(255h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2"));h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(x){h=null,a=x.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ra(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Fn(a,b,c)}})}else c(a,null)} function Gn(a,b,c,d){function e(a){if(void 0===h){var b=g&&bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ja(a))}function f(a){e("Error: "+a);k&&(--Cn||Ja(!0));k=!1}var g,h,k=!0;Cn++;Ua[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css";x.styleSheet?x.styleSheet.cssText=m:x.appendChild(document.createTextNode(m));n.appendChild(x)}c|| diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index ced03a0f9..3c50eb110 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -73,28 +73,15 @@ function CPUStatePDP11(parmsCPU) CPUPDP11.call(this, parmsCPU, nCyclesDefault); - /* - * Initialize processor operation to match the requested model - */ - this.initProcessor(); - - /* - * A variety of stepCPU() state variables that don't strictly need to be initialized before the first - * stepCPU() call, but it's good form to do so. - */ - this.resetCycles(); - this.flags.fComplete = this.flags.fDebugCheck = false; - /* * If there are no live registers to display, then updateStatus() can skip a bit.... */ this.cLiveRegs = 0; /* - * This initRegs() call is important to create all the registers, so that if/when we call restore(), - * it will have something to fill in. + * Initialize processor operation to match the requested model */ - this.initRegs(); + this.initProcessor(); } Component.subclass(CPUStatePDP11, CPUPDP11); @@ -113,6 +100,13 @@ Component.subclass(CPUStatePDP11, CPUPDP11); CPUStatePDP11.prototype.initProcessor = function() { this.aOps = PDP11.aOpsPDP1170; + this.initRegs(); + /* + * A variety of stepCPU() state variables that don't strictly need to be initialized before the first + * stepCPU() call, but it's good form to do so. + */ + this.resetCycles(); + this.flags.fComplete = this.flags.fDebugCheck = false; }; /** @@ -269,7 +263,6 @@ CPUStatePDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sVal switch (sBinding) { case "PC": case "PSW": - case "IF": case "SF": case "ZF": case "CF": @@ -298,11 +291,11 @@ CPUStatePDP11.prototype.clearCF = function() * getCF() * * @this {CPUStatePDP11} - * @return {number} 0 or 1 (PDP11.PS.CF) + * @return {number} 0 or 1 (PDP11.PSW.CF) */ CPUStatePDP11.prototype.getCF = function() { - return (this.resultZeroCarry & 0x100)? PDP11.PS.CF : 0; + return (this.resultZeroCarry & 0x100)? PDP11.PSW.CF : 0; }; /** @@ -340,11 +333,11 @@ CPUStatePDP11.prototype.clearZF = function() * getZF() * * @this {CPUStatePDP11} - * @return {number} 0 or PDP11.PS.ZF + * @return {number} 0 or PDP11.PSW.ZF */ CPUStatePDP11.prototype.getZF = function() { - return (this.resultZeroCarry & 0xff)? 0 : PDP11.PS.ZF; + return (this.resultZeroCarry & 0xff)? 0 : PDP11.PSW.ZF; }; /** @@ -371,11 +364,11 @@ CPUStatePDP11.prototype.clearSF = function() * getSF() * * @this {CPUStatePDP11} - * @return {number} 0 or PDP11.PS.SF + * @return {number} 0 or PDP11.PSW.SF */ CPUStatePDP11.prototype.getSF = function() { - // return (this.resultParitySign & 0x80)? PDP11.PS.SF : 0; + // return (this.resultParitySign & 0x80)? PDP11.PSW.SF : 0; return 0; }; @@ -419,7 +412,7 @@ CPUStatePDP11.prototype.setPC = function(addr) */ CPUStatePDP11.prototype.getPSW = function() { - return (this.PSW & ~PDP11.PS.RESULT) | (this.getSF() | this.getZF() | this.getCF()); + return (this.PSW & ~PDP11.PSW.RESULT) | (this.getSF() | this.getZF() | this.getCF()); }; /** @@ -513,11 +506,11 @@ CPUStatePDP11.prototype.updateStatus = function(fForce) { if (this.cLiveRegs) { if (fForce || !this.flags.fRunning || this.flags.fDisplayLiveRegs) { - var regPS = this.getPSW(); - this.updateReg("PSW", regPS, 4); - this.updateReg("SF", (regPS & PDP11.PS.SF)? 1 : 0, 1); - this.updateReg("ZF", (regPS & PDP11.PS.ZF)? 1 : 0, 1); - this.updateReg("CF", (regPS & PDP11.PS.CF)? 1 : 0, 1); + var regPSW = this.getPSW(); + this.updateReg("PSW", regPSW, 4); + this.updateReg("SF", (regPSW & PDP11.PSW.SF)? 1 : 0, 1); + this.updateReg("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); + this.updateReg("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); } } var controlSpeed = this.bindings["speed"]; @@ -535,10 +528,11 @@ CPUStatePDP11.prototype.updateStatus = function(fForce) * If the current state is WAIT (runState === 2) then skip any delay and * go into RUN state. * - * @param delay - * @param priority - * @param vector - * @param callback + * @this {CPUStatePDP11} + * @param {number} delay + * @param {number} priority + * @param {number} vector + * @param {function()} callback */ CPUStatePDP11.prototype.interrupt = function(delay, priority, vector, callback) { @@ -603,14 +597,14 @@ CPUStatePDP11.prototype.writePSW = function(newPSW) for (i = 0; i < 6; i++) { j = this.registerVal[i]; this.registerVal[i] = this.registerAlt[i]; - this.registerAlt[i] = j; // swap to alternate register set + this.registerAlt[i] = j; // swap to alternate register set } } - if ((this.mmuMode = (newPSW >> 14) & 3) !== (j = (this.PSW >> 14) & 3)) { + if ((this.mmuMode = (newPSW >> 14) & 3) !== ((this.PSW >> 14) & 3)) { this.stackPointer[j] = this.registerVal[6]; this.registerVal[6] = this.stackPointer[this.mmuMode]; // swap to new mode SP } - this.priorityReview = 2; // trigger check of priority levels + this.priorityReview = 2; // trigger check of priority levels this.PSW = newPSW; }; diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index f21d9b14e..b8a0c3593 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -39,13 +39,14 @@ var APPCLASS = "pdp11"; // this @define is the default application class (eg, "pcx86", "c1pjs") /** + * APPNAME is used more for display purposes than anything else now. APPCLASS is what matters in terms + * of folder and file names, CSS styles, etc. + * * @define {string} */ -var APPNAME = "PDP11"; // this @define is the default application name (eg, "PCx86", "C1Pjs") +var APPNAME = "PDP11js"; // this @define is the default application name (eg, "PCx86", "C1Pjs") /** - * @define {boolean} - * * WARNING: DEBUGGER needs to accurately reflect whether or not the Debugger component is (or will be) loaded. * In the compiled case, we rely on the Closure Compiler to override DEBUGGER as appropriate. When it's *false*, * nearly all of debugger.js will be conditionally removed by the compiler, reducing it to little more than a @@ -55,16 +56,18 @@ var APPNAME = "PDP11"; // this @define is the default application name * However, when we're in "development mode" and running uncompiled code in debugger-less configurations, * I would like to skip loading debugger.js altogether. When doing that, we must ALSO arrange for an additional file * (nodebugger.js) to be loaded immediately after this file, which *explicitly* overrides DEBUGGER with *false*. + * + * @define {boolean} */ var DEBUGGER = true; // this @define is overridden by the Closure Compiler to remove Debugger-related support /** - * @define {boolean} - * * BYTEARRAYS is a Closure Compiler compile-time option that allocates an Array of numbers for every Memory block, * where each a number represents ONE byte; very wasteful, but potentially slightly faster. * * See the Memory component for details. + * + * @define {boolean} */ var BYTEARRAYS = false; @@ -121,9 +124,9 @@ var PDP11 = { ADDR_INVALID: -1, /* - * Processor Status flag definitions (stored in regPS) + * Processor Status flag definitions (stored in regPSW) */ - PS: { + PSW: { CF: 0x0001, // bit 0: Carry Flag OF: 0x0002, // bit 1: Overflow Flag ZF: 0x0004, // bit 2: Zero Flag @@ -165,10 +168,10 @@ var PDP11 = { }; /* - * PS "arithmetic" flags are NOT stored in the PS register; they are maintained across separate result registers, + * PSW "arithmetic" flags are NOT stored in the PSW register; they are maintained across separate result registers, * hence the RESULT designation. */ -PDP11.PS.RESULT = (PDP11.PS.CF | PDP11.PS.ZF | PDP11.PS.SF); +PDP11.PSW.RESULT = (PDP11.PSW.CF | PDP11.PSW.ZF | PDP11.PSW.SF); if (NODE) { global.APPCLASS = APPCLASS; diff --git a/modules/shared/lib/embed.js b/modules/shared/lib/embed.js index b2727bd0d..388f47b09 100644 --- a/modules/shared/lib/embed.js +++ b/modules/shared/lib/embed.js @@ -35,8 +35,8 @@ if (NODE) { var Component = require("./component"); - var str = require("./strlib"); - var web = require("./weblib"); + var str = require("./strlib"); + var web = require("./weblib"); } /* @@ -55,7 +55,7 @@ var fAsync = true; var cAsyncMachines = 0; /** - * loadXML(sFile, idMachine, sAppClass, sParms, fResolve, display, done) + * loadXML(sFile, idMachine, sAppName, sAppClass, sParms, fResolve, display, done) * * This is the preferred way to load all XML and XSL files. It uses getResource() * to load them as strings, which parseXML() can massage before parsing/transforming them. @@ -80,13 +80,14 @@ var cAsyncMachines = 0; * * @param {string} sXMLFile * @param {string|null|undefined} idMachine + * @param {string|null|undefined} sAppName * @param {string|null|undefined} sAppClass * @param {string|null|undefined} sParms * @param {boolean} fResolve is true to resolve any "ref" attributes * @param {function(string)} display * @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object) */ -function loadXML(sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done) +function loadXML(sXMLFile, idMachine, sAppName, sAppClass, sParms, fResolve, display, done) { var doneLoadXML = function(sURLName, sXML, nErrorCode) { if (nErrorCode) { @@ -94,14 +95,14 @@ function loadXML(sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done done(sXML, null); return; } - parseXML(sXML, sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done); + parseXML(sXML, sXMLFile, idMachine, sAppName, sAppClass, sParms, fResolve, display, done); }; display("Loading " + sXMLFile + "..."); web.getResource(sXMLFile, null, fAsync, doneLoadXML); } /** - * parseXML(sXML, sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done) + * parseXML(sXML, sXMLFile, idMachine, sAppName, sAppClass, sParms, fResolve, display, done) * * Generates an XML document from an XML string. This function also provides a work-around for XSLT's * lack of support for the document() function (at least on some browsers), by replacing every reference @@ -110,13 +111,14 @@ function loadXML(sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done * @param {string} sXML * @param {string|null} sXMLFile * @param {string|null|undefined} idMachine + * @param {string|null|undefined} sAppName * @param {string|null|undefined} sAppClass * @param {string|null|undefined} sParms * @param {boolean} fResolve is true to resolve any "ref" attributes; default is false * @param {function(string)} display * @param {function(string,Object)} done (string contains the unparsed XML string data, and Object contains a parsed XML object) */ -function parseXML(sXML, sXMLFile, idMachine, sAppClass, sParms, fResolve, display, done) +function parseXML(sXML, sXMLFile, idMachine, sAppName, sAppClass, sParms, fResolve, display, done) { var buildXML = function(sXML, sError) { if (sError) { @@ -166,7 +168,6 @@ function parseXML(sXML, sXMLFile, idMachine, sAppClass, sParms, fResolve, displa * I'm trying to switch to a shared components.xsl (at least for all PC-class machines), * but in the interim, that means hacking the XSL file on the fly to reflect the actual class. */ - var sAppName = sAppClass.toUpperCase().replace("X86", "x86").replace("JS", "js"); sXML = sXML.replace(/().*?(<\/xsl:variable>)/, "$1" + sAppName + "$2"); sXML = sXML.replace(/().*?(<\/xsl:variable>)/, "$1" + sAppClass + "$2"); @@ -329,11 +330,12 @@ function resolveXML(sXML, display, done) } /** - * embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms) + * embedMachine(sAppName, sAppClass, sVersion, idMachine, sXMLFile, sXSLFile, sParms) * * This allows to you embed a machine on a web page, by transforming the machine XML into HTML. * - * @param {string} sName is the app name (eg, "PCjs") + * @param {string} sAppName is the app name (eg, "PCx86") + * @param {string} sAppClass is the app class (eg, "pcx86"); also known as the machine class * @param {string} sVersion is the app version (eg, "1.15.7") * @param {string} idMachine * @param {string} sXMLFile @@ -341,7 +343,7 @@ function resolveXML(sXML, display, done) * @param {string} [sParms] * @return {boolean} true if successful, false if error */ -function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms) +function embedMachine(sAppName, sAppClass, sVersion, idMachine, sXMLFile, sXSLFile, sParms) { var eMachine, eWarning, fSuccess = true; @@ -402,7 +404,6 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms) head.appendChild(style); } - var sAppClass = sName.toLowerCase(); // eg, "pcx86" or "c1pjs" if (!sXSLFile) { /* * Now that PCjs is an open-source project, we can make the following test more flexible, @@ -518,13 +519,13 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms) displayError("unable to transform XML: unsupported browser"); } }; - loadXML(sXSLFile, null, sAppClass, null, false, displayMessage, transformXML); + loadXML(sXSLFile, null, sAppName, sAppClass, null, false, displayMessage, transformXML); }; if (sXMLFile.charAt(0) != '<') { - loadXML(sXMLFile, idMachine, sAppClass, sParms, true, displayMessage, processXML); + loadXML(sXMLFile, idMachine, sAppName, sAppClass, sParms, true, displayMessage, processXML); } else { - parseXML(sXMLFile, null, idMachine, sAppClass, sParms, false, displayMessage, processXML); + parseXML(sXMLFile, null, idMachine, sAppName, sAppClass, sParms, false, displayMessage, processXML); } } else { displayError("missing machine element: " + idMachine); @@ -546,7 +547,7 @@ function embedMachine(sName, sVersion, idMachine, sXMLFile, sXSLFile, sParms) function embedC1P(idMachine, sXMLFile, sXSLFile) { if (fAsync) web.enablePageEvents(false); - return embedMachine("C1Pjs", APPVERSION, idMachine, sXMLFile, sXSLFile); + return embedMachine("C1Pjs", "c1pjs", APPVERSION, idMachine, sXMLFile, sXSLFile); } /** @@ -561,7 +562,7 @@ function embedC1P(idMachine, sXMLFile, sXSLFile) function embedPCx86(idMachine, sXMLFile, sXSLFile, sParms) { if (fAsync) web.enablePageEvents(false); - return embedMachine("PCx86", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); + return embedMachine("PCx86", "pcx86", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); } /** @@ -576,7 +577,7 @@ function embedPCx86(idMachine, sXMLFile, sXSLFile, sParms) function embedPC8080(idMachine, sXMLFile, sXSLFile, sParms) { if (fAsync) web.enablePageEvents(false); - return embedMachine("PC8080", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); + return embedMachine("PC8080", "pc8080", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); } /** @@ -591,12 +592,11 @@ function embedPC8080(idMachine, sXMLFile, sXSLFile, sParms) function embedPDP11(idMachine, sXMLFile, sXSLFile, sParms) { if (fAsync) web.enablePageEvents(false); - return embedMachine("PDP11", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); + return embedMachine("PDP11js", "pdp11", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms); } /** - * Prevent the Closure Compiler from renaming functions we want to export, - * by adding them as (named) properties of a global object. + * Prevent the Closure Compiler from renaming functions we want to export, by adding them as global properties. */ if (APPNAME == "C1Pjs") { window['embedC1P'] = embedC1P; @@ -608,7 +608,7 @@ if (APPNAME == "PCx86") { if (APPNAME == "PC8080") { window['embedPC8080'] = embedPC8080; } -if (APPNAME == "PDP11") { +if (APPNAME == "PDP11js") { window['embedPDP11'] = embedPDP11; } diff --git a/versions/c1pjs/1.24.2/c1p-dbg.js b/versions/c1pjs/1.24.2/c1p-dbg.js index 79867f56c..eac18f845 100644 --- a/versions/c1pjs/1.24.2/c1p-dbg.js +++ b/versions/c1pjs/1.24.2/c1p-dbg.js @@ -157,10 +157,11 @@ Z.prototype.start=function(){for(var a in this.Y)if("cpu"!=a)for(var b=0;b");b&&b.ia(!0,a)} x(function(){for(var a=G(document,"c1pjs","computer"),b=0;b');return}}if(void 0===h){u(' definition must appear first in the specification'); break}if(e=ta("debugger",d.id))g["debugger"]=[e],e.ba&&e.ba(h,k,l,g.cpu[0]);k=new Z(d,g);if(l=ta("panel",d.id))if(g.panel=[l],l.hb){e=d.id;d=void 0;g=[];e&&(e=0<(d=e.indexOf("."))?e.substr(0,d+1):"");for(d=0;dk.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(k=window.location.pathname+k);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(k?' url="'+k+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/, -"$1c1pjs$2"));k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(y){k=null,a=y.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");t(e,function(g,h,k){if(k||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(g=d[3])if(k=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(h=h.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);Db(a,b,c)}})}else c(a,null)} +function Cb(a,b,c,d,e,g,h){function k(a,g){if(g)h(g,null);else{if(c){D[c]&&b&&(D[c][b]=a);var k=b;k&&0>k.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(k=window.location.pathname+k);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(k?' url="'+k+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/, +"$1C1Pjs$2"),a=a.replace(/().*?(<\/xsl:variable>)/,"$1c1pjs$2"));k=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(k=new window.ActiveXObject("Microsoft.XMLDOM"),k.async=!1,k.loadXML(a)):k=(new window.DOMParser).parseFromString(a,"text/xml")}catch(y){k=null,a=y.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");t(e,function(g,h,k){if(k||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(g=d[3])if(k=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);k[0]!=l&&(h=h.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,""); +a=a.replace(d[0],h);Db(a,b,c)}})}else c(a,null)} function Eb(a,b,c){function d(a){if(void 0===h){var b=g&&G(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=da(a))}function e(a){d("Error: "+a);k&&(--zb||z(!0));k=!1}var g,h,k=!0;zb++;D[a]={};try{if(g=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var m=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l));m.appendChild(n)}c||(c= "/versions/c1pjs/1.24.2/components.xsl");l=function(h,k){k?Ab(c,null,null,!1,d,function(h,l){if(l)if(D[a]&&c&&(D[a][c]=h),d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--zb||z(!0)):e("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(l),(m=m.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--zb||z(!0)):e("invalid machine element: "+ a):e("transformToFragment failed")):e("unable to transform XML: unsupported browser");else e(h)}):e(h)};"<"!=b.charAt(0)?Ab(b,a,void 0,!0,d,l):Cb(b,null,a,void 0,!1,d,l)}else e("missing machine element: "+a)}catch(y){e(y.message)}return k}window.embedC1P=function(a,b,c){z(!1);return Eb(a,b,c)};window.enableEvents=z;window.sendEvent=ma;})(); diff --git a/versions/c1pjs/1.24.2/c1p.js b/versions/c1pjs/1.24.2/c1p.js index a767eb5ae..a7de00e47 100644 --- a/versions/c1pjs/1.24.2/c1p.js +++ b/versions/c1pjs/1.24.2/c1p.js @@ -118,10 +118,11 @@ Y.prototype.reset=function(a){var b=null,c;for(c in this.M)for(var d=0;d");b&&b.$(!0,a)} y(function(){for(var a=I(document,"c1pjs","computer"),b=0;b');return}}if(void 0===k){t(' definition must appear first in the specification'); break}if(f=F("debugger",d.id))g["debugger"]=[f],f.X&&f.X(k,h,l,g.cpu[0]);h=new Y(d,g);if(l=F("panel",d.id))if(g.panel=[l],l.za){f=d.id;d=void 0;g=[];f&&(f=0<(d=f.indexOf("."))?f.substr(0,d+1):"");for(d=0;dh.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}f||(a=a.replace(/().*?(<\/xsl:variable>)/, -"$1c1pjs$2"));h=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){h=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,function(g,k,h){if(h||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(k=k.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+f);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],k);db(a,b,c)}})}else c(a,null)} +function cb(a,b,c,d,f,g,k){function h(a,g){if(g)k(g,null);else{if(c){E[c]&&b&&(E[c][b]=a);var h=b;h&&0>h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}f||(a=a.replace(/().*?(<\/xsl:variable>)/, +"$1C1Pjs$2"),a=a.replace(/().*?(<\/xsl:variable>)/,"$1c1pjs$2"));h=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){h=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,function(g,k,h){if(h||!k)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(g=d[3])if(h=k.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(g);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(k=k.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+f);return}k=k.replace(/<\?xml[^>]*>[\r\n]*/,""); +a=a.replace(d[0],k);db(a,b,c)}})}else c(a,null)} function fb(a,b,c){function d(a){if(void 0===k){var b=g&&I(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=da(a))}function f(a){d("Error: "+a);h&&(--Z||A(!0));h=!1}var g,k,h=!0;Z++;E[a]={};try{if(g=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var m=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l));m.appendChild(n)}c||(c="/versions/c1pjs/1.24.2/components.xsl"); l=function(h,k){k?bb(c,null,null,!1,d,function(h,l){if(l)if(E[a]&&c&&(E[a][c]=h),d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(g.outerHTML=m,--Z||A(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(l),(m=m.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Z||A(!0)):f("invalid machine element: "+a):f("transformToFragment failed")): f("unable to transform XML: unsupported browser");else f(h)}):f(h)};"<"!=b.charAt(0)?bb(b,a,void 0,!0,d,l):cb(b,null,a,void 0,!1,d,l)}else f("missing machine element: "+a)}catch(u){f(u.message)}return h}window.embedC1P=function(a,b,c){A(!1);return fb(a,b,c)};window.enableEvents=A;window.sendEvent=ha;})(); diff --git a/versions/pc8080/1.24.2/pc8080-dbg.js b/versions/pc8080/1.24.2/pc8080-dbg.js index 0ef41783e..6587e27c6 100644 --- a/versions/pc8080/1.24.2/pc8080-dbg.js +++ b/versions/pc8080/1.24.2/pc8080-dbg.js @@ -236,10 +236,11 @@ Da.exit.push(function(){for(var a=C(document,"pc8080","computer"),b=0;bg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2")); -g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");sa(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=g[0],l,p=/( [a-z]+=)(['"])(.*?)\2/g;l=p.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);g[0]!=k&&(h=h.replace(g[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);zg(a,b,c)}})}else c(a,null)} +function yg(a,b,c,d,e,f,h){function g(a,f){if(f)h(f,null);else{if(c){db(c,b,a);var g=b;g&&0>g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2"));g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){g=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");sa(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=g[0],l,p=/( [a-z]+=)(['"])(.*?)\2/g;l=p.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);g[0]!=k&&(h=h.replace(g[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,""); +a=a.replace(d[0],h);zg(a,b,c)}})}else c(a,null)} function Ag(a,b,c,d){function e(a){if(void 0===g){var b=h&&C(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=ka(a))}function f(a){e("Error: "+a);k&&(--jg||Pa(!0));k=!1}var h,g,k=!0;jg++;cb[a]={};try{if(h=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=l:q.appendChild(document.createTextNode(l));p.appendChild(q)}c|| (c="/versions/pc8080/1.24.2/components.xsl");l=function(d,g){g?xg(c,null,null,!1,e,function(d,k){if(k)if(db(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var l=g.transformNode(k);l?(h.outerHTML=l,--jg||Pa(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(l=new XSLTProcessor,l.importStylesheet(k),(l=l.transformToFragment(g,document))?h.parentNode?(h.parentNode.replaceChild(l,h),--jg||Pa(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f(d)}):f(d)};"<"!=b.charAt(0)?xg(b,a,d,!0,e,l):yg(b,null,a,d,!1,e,l)}else f("missing machine element: "+a)}catch(x){f(x.message)}return k}window.embedPC8080=function(a,b,c,d){Pa(!1);return Ag(a,b,c,d)};window.enableEvents=Pa;window.sendEvent=Qa;})(); diff --git a/versions/pc8080/1.24.2/pc8080.js b/versions/pc8080/1.24.2/pc8080.js index 101f2b61a..1ee150c6d 100644 --- a/versions/pc8080/1.24.2/pc8080.js +++ b/versions/pc8080/1.24.2/pc8080.js @@ -153,10 +153,11 @@ ta.exit.push(function(){for(var a=A(document,"pc8080","computer"),b=0;bg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2")); -g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ma(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=g[0],n,x=/( [a-z]+=)(['"])(.*?)\2/g;n=x.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);g[0]!=l&&(h=h.replace(g[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);pd(a,b,c)}})}else c(a,null)} +function od(a,b,c,d,e,f,h){function g(a,f){if(f)h(f,null);else{if(c){La(c,b,a);var g=b;g&&0>g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2"));g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ma(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=g[0],n,x=/( [a-z]+=)(['"])(.*?)\2/g;n=x.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);g[0]!=l&&(h=h.replace(g[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/,""); +a=a.replace(d[0],h);pd(a,b,c)}})}else c(a,null)} function qd(a,b,c,d){function e(a){if(void 0===g){var b=h&&A(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--md||Ba(!0));l=!1}var h,g,l=!0;md++;Ka[a]={};try{if(h=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var x=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));x.appendChild(t)}c|| (c="/versions/pc8080/1.24.2/components.xsl");n=function(d,g){g?nd(c,null,null,!1,e,function(d,l){if(l)if(La(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var n=g.transformNode(l);n?(h.outerHTML=n,--md||Ba(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(n=new XSLTProcessor,n.importStylesheet(l),(n=n.transformToFragment(g,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--md||Ba(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f(d)}):f(d)};"<"!=b.charAt(0)?nd(b,a,d,!0,e,n):od(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(B){f(B.message)}return l}window.embedPC8080=function(a,b,c,d){Ba(!1);return qd(a,b,c,d)};window.enableEvents=Ba;window.sendEvent=Da;})(); diff --git a/versions/pcx86/1.24.2/pcx86-dbg.js b/versions/pcx86/1.24.2/pcx86-dbg.js index 82ed6f356..75db550b2 100644 --- a/versions/pcx86/1.24.2/pcx86-dbg.js +++ b/versions/pcx86/1.24.2/pcx86-dbg.js @@ -806,8 +806,8 @@ Ma.exit.push(function(){for(var a=pb(document,"pcx86","computer"),b=0;bh.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2")); -h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2"));h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){h=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");xa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],l,n=/( [a-z]+=)(['"])(.*?)\2/g;l=n.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);rs(a,b,c)}})}else c(a,null)} function ss(a,b,c,d){function e(a){if(void 0===h){var b=g&&pb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=la(a))}function f(a){e("Error: "+a);k&&(--ds||Ua(!0));k=!1}var g,h,k=!0;ds++;gb[a]={};try{if(g=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=l:q.appendChild(document.createTextNode(l));n.appendChild(q)}c|| diff --git a/versions/pcx86/1.24.2/pcx86.js b/versions/pcx86/1.24.2/pcx86.js index b733c67ff..87b5ac794 100644 --- a/versions/pcx86/1.24.2/pcx86.js +++ b/versions/pcx86/1.24.2/pcx86.js @@ -626,8 +626,8 @@ Ca.exit.push(function(){for(var a=bb(document,"pcx86","computer"),b=0;bh.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2")); -h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(x){h=null,a=x.message}else a="unrecognized XML: "+(255h.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(h=window.location.pathname+h);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2"));h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(h=new window.ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(a)):h=(new window.DOMParser).parseFromString(a,"text/xml")}catch(x){h=null,a=x.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");ra(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Fn(a,b,c)}})}else c(a,null)} function Gn(a,b,c,d){function e(a){if(void 0===h){var b=g&&bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ja(a))}function f(a){e("Error: "+a);k&&(--Cn||Ja(!0));k=!1}var g,h,k=!0;Cn++;Ua[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css";x.styleSheet?x.styleSheet.cssText=m:x.appendChild(document.createTextNode(m));n.appendChild(x)}c|| diff --git a/versions/pdp11/1.24.2/pdp11-dbg.js b/versions/pdp11/1.24.2/pdp11-dbg.js index 5479e6076..848da1ece 100644 --- a/versions/pdp11/1.24.2/pdp11-dbg.js +++ b/versions/pdp11/1.24.2/pdp11-dbg.js @@ -40,12 +40,12 @@ function lc(a,b,c){var d=!1;if(void 0!==b){.8>a.S/a.Aa?b=1:d=!0;a.Ba=b;b=a.Ma*a. m.Ca=function(a){if(ob(this,!0)){if(!this.A.Z){lc(this);this.D&&this.D.start(this.N,jc(this));this.A.Z=!0;this.A.bb=!0;this.ja&&this.ja.start();var b=this.K.run;b&&(b.textContent="Halt");this.D&&(this.D.ia(!0),a&&this.D.Ta(!0))}this.eb>=this.cb&&nc(this,!0);this.ka=0;this.na=ua();this.T&&(a=this.na-this.T,a>this.ub&&(this.N+=a,this.N>this.na&&(this.N=this.na)));try{do{for(var c=this.A.Fa?1:this.wa,d=this.oa.length-1;0<=d;d--){var e=this.oa[d];0>e[0]||c>e[0]&&(c=e[0])}this.Ka(c);var f=this.U-this.R; a=f;for(var h=this.oa.length-1;0<=h;h--){var g=this.oa[h];0>g[0]||(g[0]-=a,0>=g[0]&&(g[0]=-1,g[1]()))}this.ka+=f;this.O+=f;mc(this,0,!0);ic(this,f);this.da-=f;if(0>=this.da){this.da+=this.wa;15<=++this.vb&&(this.D&&this.D.ia(),this.vb=0);break}}while(this.A.Z)}catch(k){this.ba();F(this);this.D&&this.D.stop(ua(),jc(this));ob(this,!1);rb(this,k.stack||k.message);return}c=setTimeout;d=this.Ib;this.T=ua();e=this.ub;this.ka&&(e=Math.round(e*this.ka/this.wa));e=e-(this.T-this.na);if(f=this.T-this.N)this.S= Math.round(this.O/(10*f))/100,864E5<=f&&(this.V=0,lc(this));if(0>e||this.Se&&(this.N-=e),e=0;this.eb+=this.ka;this.T+=e;c(d,e)}else F(this),this.D&&this.D.stop(ua(),jc(this))};m.Ka=function(){return 0};m.ba=function(a){pb(this,!0);Ac(this);mc(this,this.O);this.O=0;if(this.A.Z){this.A.Z=!1;this.ja&&this.ja.stop();var b=this.K.run;b&&(b.textContent="Run")}this.A.Wa=a};function F(a,b){a.D&&a.D.ia(b)} -function Bc(a){this.rb=+a.model||1170;bc.call(this,a,1E6);ec(this);this.A.Wa=this.A.Eb=!1;this.nb=0;this.w=65536;this.i=this.b=32768;this.j=65535;this.I=15;this.g=[0,0,0,0,0,0,0,0];this.zb=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.memory=[];this.J=[];this.fb=this.wb=0;this.W=2;this.$=255;this.G=0;this.ga=-1;this.tb=this.Na=this.sb=this.C=this.Da=this.M=this.L=0;this.pa=[7,7,7,7];this.Oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}v(Bc,bc);m=Bc.prototype;m.reset=function(){this.A.Z&&this.ba();Cc(this);ec(this);this.A.Ga=!1;this.parent.reset.call(this)}; +function Bc(a){this.rb=+a.model||1170;bc.call(this,a,1E6);this.nb=0;this.w=65536;this.i=this.b=32768;this.j=65535;this.I=15;this.g=[0,0,0,0,0,0,0,0];this.zb=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.memory=[];this.J=[];this.fb=this.wb=0;this.W=2;this.$=255;this.G=0;this.ga=-1;this.tb=this.Na=this.sb=this.C=this.Da=this.M=this.L=0;this.pa=[7,7,7,7];this.Oa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535, +65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];ec(this);this.A.Wa=this.A.Eb=!1}v(Bc,bc);m=Bc.prototype;m.reset=function(){this.A.Z&&this.ba();Cc(this);ec(this);this.A.Ga=!1;this.parent.reset.call(this)}; function Cc(a){a.$=255;a.J=[];a.wb=0;a.L=a.M=a.Da=a.sb=0;a.pa[0]=a.pa[1]=a.pa[3]=7;a.Na=0}m.mb=function(){return 0};m.save=function(){var a=new G(this);H(a,0,[]);H(a,1,[this.qb,this.V,this.Ba]);for(var b=this.H,c=0,d=[],e=0;ec;c++)d=a.g[c],a.g[c]=a.zb[c],a.zb[c]=d;(a.C=b>>14&3)!==(d=a.I>>14&3)&&(a.fa[d]=a.g[6],a.g[6]=a.fa[a.C]);a.W=2;a.I=b} +m.ha=function(a,b,c){var d=!1;switch(b){case "PC":case "PSW":case "SF":case "ZF":case "CF":this.K[b]=c;this.nb++;d=!0;break;default:d=this.parent.ha.call(this,a,b,c)}return d};m.ia=function(a){this.nb&&(a||!this.A.Z||this.A.lb)&&(a=this.I&-14|0|(this.ta&255?0:4)|(this.ta&256?1:0),kc(this,"PSW",a,4),kc(this,"SF",a&8?1:0,1),kc(this,"ZF",a&4?1:0,1),kc(this,"CF",a&1?1:0,1));if(a=this.K.speed)a.textContent=this.A.Z&&this.S?this.S.toFixed(2)+"Mhz":"Stopped"}; +function Dc(a,b){var c,d;a.b=b<<12;a.j=~b&4;a.i=b<<14;a.w=b<<16;if((b^a.I)&2048)for(c=0;6>c;c++)d=a.g[c],a.g[c]=a.zb[c],a.zb[c]=d;(a.C=b>>14&3)!==(a.I>>14&3)&&(a.fa[d]=a.g[6],a.g[6]=a.fa[a.C]);a.W=2;a.I=b} function I(a,b){var c,d,e=0;0>a.ga?(a.I=a.I&63728|a.b>>12&8|a.i>>14&2|a.w>>16&1,a.j&65535||(a.I|=4),a.ga=a.I):a.C||(b=4,e=1);a.L&57344||(a.M=63222);a.C=0;0<=(c=L(a,b|65536))&&0<=(d=L(a,b+2&65535|65536))&&(Dc(a,d&53247|a.ga>>2&12288),e&&(a.g[6]=4),0<=Ec(a,a.ga)&&0<=Ec(a,a.g[7])&&(a.g[7]=c));a.G=0;return a.ga=-1} function Fc(a,b,c){var d,e,f,h=0;if(c&a.sb){d=b>>13&a.pa[a.C];e=a.Oa[a.C][d];f=(a.Oa[a.C][d+16]<<6)+(b&8191)&4194303;if(a.Da&16){if(3932160<=f&&4186112>f){f=f&262143;var g=f>>13&31;31>g?a.Da&32&&(f=a.Kb[g]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}}else f&=262143,253952<=f&&(f|=4186112);if(3932160>f&&(3915776<=f||f&1&&!(c&1)))return I(a,4);switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192:128;break; default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.Oa[a.C][d]=e;if(4194170!==f||a.C)a.Na=a.C,a.tb=d;if(h){if(h&57344)return 0<=a.ga&&(h|=128),a.L&57344||(a.L=a.L|h|a.Na<<5|a.tb<<1),I(a,168);a.L&61440||!(4191360>f||4194239>1]:b} @@ -136,23 +136,24 @@ Pd+1)-Pd-1)/2==Od){Nd=Mb;break}}}jb--}Lb.B=Od;if(sa=Nd)break}if(!sa||null==sa)br "kbd"==x&&(x="keyboard");for(ba in C)if(x==ba){ha=C[ba];ca=!!(a.Y&ha);break}if(!ha){a.u("unknown message category: "+x);break a}}if(ha)if("on"==f[2])a.Y|=ha,ca=!0;else if("off"==f[2]&&(a.Y&=~ha,ca=!1,1073741824==ha)){for(var yc=0;yc\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");this.u("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bee){if(ge(d,this.L)){this.C=new G(this,"1.24.2","failsafe");ge(this.C)&&(me(this,d),a=2,ne(this.C));H(this.C,"timestamp",va());oe(this.C);var e=this.i&&!this.G;if(1==a||ya("Click OK to restore the previous PDP11 machine state, or CANCEL to reset the machine.")){if(c=ke(d)){var f=le(d,"code"),h=le(d,"data");f&&("ok"==f?ge(d,h):("error"==f&&"no machine state"!= -h?(this.ea("Error: "+h),"unable to verify user"==h&&(Ha("user",""),this.j=null)):this.u(f+": "+h),ne(d),ge(d)?(c=ke(d),e=!0):c=!1))}e&&je(this,c?d:null)}else 2==a&&d.clear()}else je(this);delete this.L;delete this.M}e=bb(this.id);for(f=0;fee){if(ge(d,this.L)){this.C=new G(this,"1.24.2","failsafe");ge(this.C)&&(me(this,d),a=2,ne(this.C));H(this.C,"timestamp",va());oe(this.C);var e=this.i&&!this.G;if(1==a||ya("Click OK to restore the previous PDP11js machine state, or CANCEL to reset the machine.")){if(c=ke(d)){var f=le(d,"code"),h=le(d,"data");f&&("ok"==f?ge(d,h):("error"==f&& +"no machine state"!=h?(this.ea("Error: "+h),"unable to verify user"==h&&(Ha("user",""),this.j=null)):this.u(f+": "+h),ne(d),ge(d)?(c=ke(d),e=!0):c=!1))}e&&je(this,c?d:null)}else 2==a&&d.clear()}else je(this);delete this.L;delete this.M}e=bb(this.id);for(f=0;fa[1];a=a[2];this.W=!0;this.A.X=!0;var d=this.K.power;d&&(d.textContent="Shutdown");this.b&&(pe(this,this.b,b,c,a),hc(this.b));this.R&&(me(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function me(a,b){if(ya("There may be a problem with your PDP11 machine.\n\nTo help us diagnose it, click OK to send this PDP11 machine state to http://www.pcjs.org.")){var c=a.j||"",d=b.toString(),e={app:"PDP11",ver:"1.24.2"};e.url=a.V;e.user=c;e.type="bug";e.data=d;xa("http://www.pcjs.org/api/v1/report",e,!0)}} +function me(a,b){if(ya("There may be a problem with your PDP11js machine.\n\nTo help us diagnose it, click OK to send this PDP11js machine state to http://www.pcjs.org.")){var c=a.j||"",d=b.toString(),e={app:"PDP11js",ver:"1.24.2"};e.url=a.V;e.user=c;e.type="bug";e.data=d;xa("http://www.pcjs.org/api/v1/report",e,!0)}} function be(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.24.2"),h=new G(a,"1.24.2","validate"),g=va();H(h,"timestamp",g);H(f,"timestamp",g);H(f,"version","1.24.2");H(f,"url",window?window.location.href:null);H(f,"browser",window?window.navigator.userAgent:"");a.b&&a.b.ra&&(c&&a.b.ba(),d=a.b.ra(b,c),"object"===typeof d&&H(f,a.b.id,d),c&&(a.b.A.X=!1,!1===d&&(e=null)));for(var g=bb(a.id),k=0;kg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2")); -g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){g=null,a=p.message}else a="unrecognized XML: "+(255g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDP11js$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));g=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){g=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");xa(e,null,!0,function(f,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(f=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=g[0],l,n=/( [a-z]+=)(['"])(.*?)\2/g;l=n.exec(f);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);g[0]!=k&&(h=h.replace(g[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],h);He(a,b,c)}})}else c(a,null)} function Ie(a,b,c,d){function e(a){if(void 0===g){var b=h&&y(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=na(a))}function f(a){e("Error: "+a);k&&(--te||Sa(!0));k=!1}var h,g,k=!0;te++;$a[a]={};try{if(h=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.type="text/css";p.styleSheet?p.styleSheet.cssText=l:p.appendChild(document.createTextNode(l));n.appendChild(p)}c|| diff --git a/versions/pdp11/1.24.2/pdp11.js b/versions/pdp11/1.24.2/pdp11.js index 250bc5ac1..d85462dad 100644 --- a/versions/pdp11/1.24.2/pdp11.js +++ b/versions/pdp11/1.24.2/pdp11.js @@ -12,34 +12,34 @@ function y(a,b){b||(b=w);a.prototype=za(b.prototype);a.prototype.constructor=a;a function Ca(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d=this.g?10:20>=this.g?12:24>=this.g?14:15;this.c=1<>2;this.m=this.c-1;this.i=this.j/this.c|0;a=new F;Ja(a,this.B);this.b=Array(this.i);for(b=0;b>>a.f;0e&&(l=e);if(g&&g.size){if(g.type==d){if(f+e<=g.ha)return g.ta+=g.ha-f,g.ha=f,!0;if(f>=g.ha+g.ta){l=g.size-(f-k);l>e&&(l=e);g.ta=f-g.ha+l;f=k+a.c;e-=l;h++;continue}}return La(1,f,e)}f=new F(f,l,a.c,d);Ja(f,a.B,g);a.b[h++]=f;f=k+a.c;e-=l}return 0>=e?(a.status(Math.floor(c/1024)+"Kb "+Ma[d]+" at "+("0x"+n(b,4))),!0):La(2,b,c)} function La(a,b,c){t("Memory block error ("+a+": "+n(b)+","+n(c)+")");return!1}var Na;if(Fa){var Oa=new ArrayBuffer(2);(new DataView(Oa)).setUint16(0,256,!0);Na=256===(new Uint16Array(Oa))[0]}else Na=!1;var Pa=Na; function F(a,b,c,d){this.id=Qa+=2;this.a=null;this.ha=a;this.ta=b;this.size=c||0;this.type=d||Ra;this.o=d==Sa;Ja(this);this.W=this.Za=!1;if(c)if(Fa)this.c=new ArrayBuffer(c),this.f=new DataView(this.c,0,c),this.b=new Uint8Array(this.c,0,c),this.j=new Uint16Array(this.c,0,c>>1),this.a=new Int32Array(this.c,0,c>>2),Ta(this,Pa?Ua:Va);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},G:function(a){return this.a[a>> -2]>>>((a&3)<<3)&255},P:function(a){var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},U:function(a,b){var c=a>>2,d=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2,d=(a&3)<<3;24>d?this.a[c]=this.a[c]&~(65535<>8);this.W=!0},C:function(a,b){return this.D(a,b)},I:function(a,b){return this.N(a,b)},S:function(a,b,c){this.o||this.Xa(a,b,c)},Z:function(a,b,c){this.o|| -this.aa(a,b,c)},v:function(a){return this.b[a]},F:function(a){return this.b[a]},H:function(a){return this.f.getUint16(a,!0)},O:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.j[a>>1]},R:function(a,b){this.b[a]=b;this.W=!0},T:function(a,b){this.b[a]=b;this.W=!0},V:function(a,b){this.f.setUint16(a,b,!0);this.W=!0},ba:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.j[a>>1]=b;this.W=!0}};function Ja(a,b,c){a.B=b;a.g=a.i=0;c&&((a.g=c.g)&&Xa(a,Ya,!1),(a.i=c.i)&&Za(a,Ya,!1))} -function Za(a,b,c){c&&a.i||(a.u=!a.o&&b[2]||a.s);if(c||void 0===c)a.Xa=b[2]||a.s,a.aa=b[3]||a.$}function Xa(a,b,c){c&&a.g||(a.l=b[0]||a.m);if(c||void 0===c)a.D=b[0]||a.m,a.N=b[1]||a.J}function Ta(a,b){b||(b=$a);Xa(a,b,void 0);Za(a,b,void 0)}var $a=[],Wa=[F.prototype.G,F.prototype.P,F.prototype.U,F.prototype.ca],Ya=[F.prototype.C,F.prototype.I,F.prototype.S,F.prototype.Z];if(Fa)var Va=[F.prototype.v,F.prototype.H,F.prototype.R,F.prototype.V],Ua=[F.prototype.F,F.prototype.O,F.prototype.T,F.prototype.ba]; +F.prototype={constructor:F,parent:null,save:function(){var a,b;if(Fa)for(a=Array(this.size>>2),b=0;b>8,c)},G:function(a){return this.a[a>> +2]>>>((a&3)<<3)&255},P:function(a){var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},U:function(a,b){var c=a>>2,d=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2,d=(a&3)<<3;24>d?this.a[c]=this.a[c]&~(65535<>8);this.W=!0},C:function(a,b){return this.D(a,b)},J:function(a,b){return this.N(a,b)},S:function(a,b,c){this.o||this.Xa(a,b,c)},Z:function(a,b,c){this.o|| +this.aa(a,b,c)},v:function(a){return this.b[a]},F:function(a){return this.b[a]},I:function(a){return this.f.getUint16(a,!0)},O:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.j[a>>1]},R:function(a,b){this.b[a]=b;this.W=!0},T:function(a,b){this.b[a]=b;this.W=!0},V:function(a,b){this.f.setUint16(a,b,!0);this.W=!0},ba:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.j[a>>1]=b;this.W=!0}};function Ja(a,b,c){a.B=b;a.g=a.i=0;c&&((a.g=c.g)&&Xa(a,Ya,!1),(a.i=c.i)&&Za(a,Ya,!1))} +function Za(a,b,c){c&&a.i||(a.u=!a.o&&b[2]||a.s);if(c||void 0===c)a.Xa=b[2]||a.s,a.aa=b[3]||a.$}function Xa(a,b,c){c&&a.g||(a.l=b[0]||a.m);if(c||void 0===c)a.D=b[0]||a.m,a.N=b[1]||a.K}function Ta(a,b){b||(b=$a);Xa(a,b,void 0);Za(a,b,void 0)}var $a=[],Wa=[F.prototype.G,F.prototype.P,F.prototype.U,F.prototype.ca],Ya=[F.prototype.C,F.prototype.J,F.prototype.S,F.prototype.Z];if(Fa)var Va=[F.prototype.v,F.prototype.I,F.prototype.R,F.prototype.V],Ua=[F.prototype.F,F.prototype.O,F.prototype.T,F.prototype.ba]; function ab(a,b){w.call(this,"CPU",a,ab);var c=a.multiplier||1;this.Ca=a.cycles||b;this.T=c;this.wa=Math.round(this.Ca/1E4)/100;this.R=this.wa*this.T;this.h.M=!1;this.h.Ka=!1;this.h.Ia=a.autoStart;this.h.Ja=!1;this.h.qa=!1;this.oa=this.S=0;this.pa=a.csStart;this.$=a.csInterval;this.aa=a.csStop;this.la=[];this.bb=this.Fa.bind(this);E(this)}y(ab);var bb=["power","reset"];m=ab.prototype; -m.ga=function(a,b,c,d){this.l=a;this.u=b;this.B=d;for(b=0;ba.H/a.R&&(b=1);a.T=b;var c=a.wa*a.T;if(a.R!=c){a.R=c;var c=a.R.toFixed(2)+"Mhz",d=a.o.setSpeed;d&&(d.textContent=c);a.K("target speed: "+c)}}jb(a,a.F);a.F=0;a.D=q();a.I=0;kb(a)}function mb(a){a.J-=a.G;a.G=0} -m.Fa=function(){if(Da(this,!0)){if(!this.h.M){ib(this);this.l&&this.l.start(this.D,lb(this));this.h.M=!0;this.h.Ka=!0;this.Z&&this.Z.start();var a=this.o.run;a&&(a.textContent="Halt");this.l&&this.l.ea(!0)}this.Da>=this.Ca&&kb(this,!0);this.ca=0;this.na=q();this.I&&(a=this.na-this.I,a>this.Sa&&(this.D+=a,this.D>this.na&&(this.D=this.na)));try{do{for(var b=this.h.qa?1:this.ka,c=this.la.length-1;0<=c;c--){var d=this.la[c];0>d[0]||b>d[0]&&(b=d[0])}this.Wa(b);for(var f=this.J-this.G,a=f,e=this.la.length- -1;0<=e;e--){var h=this.la[e];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ca+=f;this.F+=f;jb(this,0,!0);a=f;if(this.h.qa){var g=!1;this.oa=this.oa+this.La()|0;this.S-=a;0>=this.S&&(this.S+=this.$,g=!0);0<=this.aa&&this.aa<=lb(this)&&(this.$=this.aa=-1,eb(this),G(this),g=!0);g&&this.K(lb(this)+" cycles: checksum="+n(this.oa))}this.ba-=f;if(0>=this.ba){this.ba+=this.ka;15<=++this.Ta&&(this.l&&this.l.ea(),this.Ta=0);break}}while(this.h.M)}catch(k){G(this);fb(this);this.l&&this.l.stop(q(),lb(this)); -Da(this,!1);b=k.stack||k.message;this.h.da=!0;this.A(b);return}b=setTimeout;c=this.bb;this.I=q();d=this.Sa;this.ca&&(d=Math.round(d*this.ca/this.ka));d=d-(this.I-this.na);if(f=this.I-this.D)this.H=Math.round(this.F/(10*f))/100,864E5<=f&&(this.N=0,ib(this));if(0>d||this.Hd&&(this.D-=d),d=0;this.Da+=this.ca;this.I+=d;b(c,d)}else fb(this),this.l&&this.l.stop(q(),lb(this))};m.Wa=function(){return 0}; +c;a=!0;break;case "setSpeed":this.o[b]=c,c.onclick=function(){ib(d,d.T<<1)},c.textContent=this.R.toFixed(2)+"Mhz",a=!0}return a};function jb(a,b,c){a.N+=b;c&&(a.K=a.G=0)}function kb(a,b){var c=1;b&&1a.I/a.R&&(b=1);a.T=b;var c=a.wa*a.T;if(a.R!=c){a.R=c;var c=a.R.toFixed(2)+"Mhz",d=a.o.setSpeed;d&&(d.textContent=c);a.H("target speed: "+c)}}jb(a,a.F);a.F=0;a.D=q();a.J=0;kb(a)}function mb(a){a.K-=a.G;a.G=0} +m.Fa=function(){if(Da(this,!0)){if(!this.h.M){ib(this);this.l&&this.l.start(this.D,lb(this));this.h.M=!0;this.h.Ka=!0;this.Z&&this.Z.start();var a=this.o.run;a&&(a.textContent="Halt");this.l&&this.l.ea(!0)}this.Da>=this.Ca&&kb(this,!0);this.ca=0;this.na=q();this.J&&(a=this.na-this.J,a>this.Sa&&(this.D+=a,this.D>this.na&&(this.D=this.na)));try{do{for(var b=this.h.qa?1:this.ka,c=this.la.length-1;0<=c;c--){var d=this.la[c];0>d[0]||b>d[0]&&(b=d[0])}this.Wa(b);for(var f=this.K-this.G,a=f,e=this.la.length- +1;0<=e;e--){var h=this.la[e];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.ca+=f;this.F+=f;jb(this,0,!0);a=f;if(this.h.qa){var g=!1;this.oa=this.oa+this.La()|0;this.S-=a;0>=this.S&&(this.S+=this.$,g=!0);0<=this.aa&&this.aa<=lb(this)&&(this.$=this.aa=-1,eb(this),G(this),g=!0);g&&this.H(lb(this)+" cycles: checksum="+n(this.oa))}this.ba-=f;if(0>=this.ba){this.ba+=this.ka;15<=++this.Ta&&(this.l&&this.l.ea(),this.Ta=0);break}}while(this.h.M)}catch(k){G(this);fb(this);this.l&&this.l.stop(q(),lb(this)); +Da(this,!1);b=k.stack||k.message;this.h.da=!0;this.A(b);return}b=setTimeout;c=this.bb;this.J=q();d=this.Sa;this.ca&&(d=Math.round(d*this.ca/this.ka));d=d-(this.J-this.na);if(f=this.J-this.D)this.I=Math.round(this.F/(10*f))/100,864E5<=f&&(this.N=0,ib(this));if(0>d||this.Id&&(this.D-=d),d=0;this.Da+=this.ca;this.J+=d;b(c,d)}else fb(this),this.l&&this.l.stop(q(),lb(this))};m.Wa=function(){return 0}; function G(a){a.h.ia&&(a.h.Ba=!0);mb(a);jb(a,a.F);a.F=0;if(a.h.M){a.h.M=!1;a.Z&&a.Z.stop();var b=a.o.run;b&&(b.textContent="Run")}a.h.ra=void 0}function fb(a){a.l&&a.l.ea(void 0)} -function nb(a){this.ab=+a.model||1170;ab.call(this,a,1E6);db(this);this.h.ra=this.h.Ya=!1;this.Ma=0;this.g=65536;this.c=this.b=32768;this.f=65535;this.i=15;this.a=[0,0,0,0,0,0,0,0];this.Va=[0,0,0,0,0,0];this.U=[0,0,0,0];this.memory=[];this.s=[];this.Ea=this.Ua=0;this.O=2;this.P=255;this.m=0;this.V=-1;this.Ra=this.ya=this.Qa=this.j=this.ua=this.C=this.v=0;this.ma=[7,7,7,7];this.Aa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}y(nb,ab);m=nb.prototype;m.reset=function(){this.h.M&&G(this);ob(this);db(this);this.h.da=!1;this.parent.reset.call(this)}; +function nb(a){this.ab=+a.model||1170;ab.call(this,a,1E6);this.Ma=0;this.g=65536;this.c=this.b=32768;this.f=65535;this.i=15;this.a=[0,0,0,0,0,0,0,0];this.Va=[0,0,0,0,0,0];this.U=[0,0,0,0];this.memory=[];this.s=[];this.Ea=this.Ua=0;this.O=2;this.P=255;this.m=0;this.V=-1;this.Ra=this.ya=this.Qa=this.j=this.ua=this.C=this.v=0;this.ma=[7,7,7,7];this.Aa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535, +65535,65535,65535,65535,65535,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.fb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];db(this);this.h.ra=this.h.Ya=!1}y(nb,ab);m=nb.prototype;m.reset=function(){this.h.M&&G(this);ob(this);db(this);this.h.da=!1;this.parent.reset.call(this)}; function ob(a){a.P=255;a.s=[];a.Ua=0;a.v=a.C=a.ua=a.Qa=0;a.ma[0]=a.ma[1]=a.ma[3]=7;a.ya=0}m.La=function(){return 0};m.save=function(){var a=new H(this);I(a,0,[]);I(a,1,[this.Pa,this.N,this.T]);for(var b=this.u,c=0,d=[],f=0;fc;c++)d=a.a[c],a.a[c]=a.Va[c],a.Va[c]=d;(a.j=b>>14&3)!==(d=a.i>>14&3)&&(a.U[d]=a.a[6],a.a[6]=a.U[a.j]);a.O=2;a.i=b} +m.L=function(a,b,c){var d=!1;switch(b){case "PC":case "PSW":case "SF":case "ZF":case "CF":this.o[b]=c;this.Ma++;d=!0;break;default:d=this.parent.L.call(this,a,b,c)}return d};m.ea=function(a){this.Ma&&(a||!this.h.M||this.h.Ja)&&(a=this.i&-14|0|(this.eb&255?0:4)|(this.eb&256?1:0),hb(this,"PSW",a,4),hb(this,"SF",a&8?1:0,1),hb(this,"ZF",a&4?1:0,1),hb(this,"CF",a&1?1:0,1));if(a=this.o.speed)a.textContent=this.h.M&&this.I?this.I.toFixed(2)+"Mhz":"Stopped"}; +function pb(a,b){var c,d;a.b=b<<12;a.f=~b&4;a.c=b<<14;a.g=b<<16;if((b^a.i)&2048)for(c=0;6>c;c++)d=a.a[c],a.a[c]=a.Va[c],a.Va[c]=d;(a.j=b>>14&3)!==(a.i>>14&3)&&(a.U[d]=a.a[6],a.a[6]=a.U[a.j]);a.O=2;a.i=b} function J(a,b){var c,d,f=0;0>a.V?(a.i=a.i&63728|a.b>>12&8|a.c>>14&2|a.g>>16&1,a.f&65535||(a.i|=4),a.V=a.i):a.j||(b=4,f=1);a.v&57344||(a.C=63222);a.j=0;0<=(c=K(a,b|65536))&&0<=(d=K(a,b+2&65535|65536))&&(pb(a,d&53247|a.V>>2&12288),f&&(a.a[6]=4),0<=L(a,a.V)&&0<=L(a,a.a[7])&&(a.a[7]=c));a.m=0;return a.V=-1} function qb(a,b,c){var d,f,e,h=0;if(c&a.Qa){d=b>>13&a.ma[a.j];f=a.Aa[a.j][d];e=(a.Aa[a.j][d+16]<<6)+(b&8191)&4194303;if(a.ua&16){if(3932160<=e&&4186112>e){e=e&262143;var g=e>>13&31;31>g?a.ua&32&&(e=a.fb[g]+(e&8190)&4194302,3932160<=e&&4186112>e&&console.log("panic(898)")):e|=4186112}}else e&=262143,253952<=e&&(e|=4186112);if(3932160>e&&(3915776<=e||e&1&&!(c&1)))return J(a,4);switch(f&7){case 1:h=4096;case 2:f|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:f|=c&4?192:128;break; default:h=32768}32512!==(f&32520)&&(f&8?f&32512&&(b&8128)<(f>>2&8128)&&(h|=16384):(b&8128)>(f>>2&8128)&&(h|=16384));a.Aa[a.j][d]=f;if(4194170!==e||a.j)a.ya=a.j,a.Ra=d;if(h){if(h&57344)return 0<=a.V&&(h|=128),a.v&57344||(a.v=a.v|h|a.ya<<5|a.Ra<<1),J(a,168);a.v&61440||!(4191360>e||4194239>1]:b} @@ -48,7 +48,7 @@ function rb(a){var b=K(a,a.a[6]|65536);0<=b&&(a.a[6]=a.a[6]+2&65535);return b}fu function R(a,b,c){var d,f,e=b&7;switch(b>>3&7){case 0:return J(a,4);case 1:if(6===e&&!a.j&&c&4&&(a.a[6]<=a.P||65534<=a.a[6])){if(a.a[6]<=a.P-32||65534<=a.a[6])return a.a[6]=4,J(a,4);a.m|=4}return 7===e?a.a[e]:a.a[e]|65536;case 2:f=2;d=a.a[e];7!==e&&(d|=65536,6>e&&c&1&&(f=1));break;case 3:f=2;d=a.a[e];7!==e&&(d|=65536);if(0>(d=K(a,d)))return d;d|=65536;break;case 4:f=-2;6>e&&c&1&&(f=-1);d=a.a[e]+f&65535;7!==e&&(d|=65536);break;case 5:f=-2;d=a.a[e]-2&65535;7!==e&&(d|=65536);if(0>(d=K(a,d)))return d; d|=65536;break;case 6:if(0>(d=K(a,a.a[7])))return d;a.a[7]=a.a[7]+2&65535;d=d+a.a[e]&65535;return d|65536;case 7:if(0>(d=K(a,a.a[7])))return d;a.a[7]=a.a[7]+2&65535;d=d+a.a[e]&65535;return 0>(d=K(a,d|65536))?d:d|65536}a.a[e]=a.a[e]+f&65535;a.v&57344||(a.C=a.C<<8|f<<3&248|e);if(6===e&&!a.j&&c&4&&0>=f&&(a.a[6]<=a.P||65534<=a.a[6])){if(a.a[6]<=a.P-32)return a.a[6]=4,J(a,4);a.m|=4}return d}function S(a,b,c){var d;return b&56?(0<=(d=R(a,b,c))&&(d=qb(a,d,c)),d):4194304+(b&7)} function T(a,b){var c;b&56?0<=(c=S(a,b,2))&&(c=M(a,c)):c=a.a[b&7];return c}function U(a,b){var c;b&56?0<=(c=S(a,b,3))&&(c=O(a,c)):c=a.a[b&7]&255;return c}function V(a,b){return((b&128?b|65280:b&255)<<1)+a&65535} -m.Wa=function(a){this.h.ra=!0;this.h.Ya=!1;this.h.Ka=!1;this.J=this.G=a;this.Pa&256?(mb(this),a=!1):a=!0;if(a){do{var b,c,d,f,e;if(this.O)if(1===this.O)this.O=2;else{this.O=0;e=-1;b=this.Ua&224;if(0<(a=this.s.length))for(;0b&&(b=this.s[a].$a,e=a)}b>(this.i&224)&&(0>e?J(this,160):(J(this,this.s[e].gb),this.s.splice(e,1)))}this.v&57344||(this.C= +m.Wa=function(a){this.h.ra=!0;this.h.Ya=!1;this.h.Ka=!1;this.K=this.G=a;this.Pa&256?(mb(this),a=!1):a=!0;if(a){do{var b,c,d,f,e;if(this.O)if(1===this.O)this.O=2;else{this.O=0;e=-1;b=this.Ua&224;if(0<(a=this.s.length))for(;0b&&(b=this.s[a].$a,e=a)}b>(this.i&224)&&(0>e?J(this,160):(J(this,this.s[e].gb),this.s.splice(e,1)))}this.v&57344||(this.C= 0);this.m=this.i&16;if(0<=(a=K(this,this.a[7])))switch(this.a[7]=this.a[7]+2&65535,a&61440){case 4096:0<=(b=T(this,a>>6))&&(a&56?0<=(d=S(this,a,4))&&0<=N(this,d,b)&&(this.b=this.f=b,this.c=0):(this.b=this.f=this.a[a&7]=b,this.c=0));break;case 8192:0<=(b=T(this,a>>6))&&0<=(c=T(this,a))&&(this.b=this.f=this.g=a=b-c,this.c=(b^c)&(b^a));break;case 12288:0<=(b=T(this,a>>6))&&0<=(c=T(this,a))&&(this.b=this.f=b&c,this.c=0);break;case 16384:0<=(b=T(this,a>>6))&&(a&56?0<=(c=M(this,d=S(this,a,6)))&&(a=c&~b, 0<=N(this,d,a)&&(this.b=this.f=a,this.c=0)):(this.b=this.f=a=this.a[a&7]&=~b,this.c=0));break;case 20480:0<=(b=T(this,a>>6))&&(a&56?0<=(c=M(this,d=S(this,a,6)))&&(a=c|b,0<=N(this,d,a)&&(this.b=this.f=a,this.c=0)):(this.b=this.f=a=this.a[a&7]|=b,this.c=0));break;case 24576:0<=(b=T(this,a>>6))&&(a&56?0<=(c=M(this,d=S(this,a,6)))&&(a=b+c,0<=N(this,d,a)&&(this.b=this.f=this.g=a,this.c=(b^a)&(c^a))):(e=a&7,c=this.a[e],this.a[e]=(a=b+c)&65535,this.b=this.f=this.g=a,this.c=(b^a)&(c^a)));break;case 36864:0<= (b=U(this,a>>6))&&(a&56?0<=(d=S(this,a,5))&&0<=P(this,d,b)&&(this.b=this.f=b<<8,this.c=0):(b&128&&(b|=65280),this.b=this.f=this.a[a&7]=b,this.c=0));break;case 40960:0<=(b=U(this,a>>6))&&0<=(c=U(this,a))&&(a=b-c,this.b=this.f=this.g=a<<8,this.c=((b^c)&(b^a))<<8);break;case 45056:0<=(b=U(this,a>>6))&&0<=(c=U(this,a))&&(this.b=this.f=(b&c)<<8,this.c=0);break;case 49152:0<=(b=U(this,a>>6))&&0<=(c=O(this,d=S(this,a,7)))&&(a=c&~b,0<=P(this,d,a)&&(this.b=this.f=a<<8,this.c=0));break;case 53248:0<=(b=U(this, @@ -70,7 +70,7 @@ break;case 35584:0<=(c=O(this,d=S(this,a,7)))&&(a=-c,0<=P(this,d,a)&&(this.g=thi a,0))&&(this.j=this.i>>12&3,0<=(b=K(this,f|65536))&&(this.j=this.i>>14&3,0<=L(this,b)&&(this.b=this.f=b,this.c=0))):(e=a&7,b=6!==e||(this.i>>2&12288)===(this.i&12288)?this.a[e]:this.U[this.i>>12&3],0<=L(this,b)&&(this.b=this.f=b,this.c=0));break;case 36224:0<=(c=rb(this))&&((this.v&57344||(this.C=22),a&56)?0<=(f=R(this,a,0))&&(this.j=this.i>>12&3,0<=(d=qb(this,f|65536,4))&&(this.j=this.i>>14&3,0<=N(this,d,c)&&(this.b=this.f=c,this.c=0))):(e=a&7,6!==e||(this.i>>2&12288)===(this.i&12288)?this.a[e]= c:this.U[this.i>>12&3]=c,this.b=this.f=c,this.c=0));break;default:switch(a&65528){case 128:0<=(b=rb(this))&&(e=a&7,this.a[7]=this.a[e],this.a[e]=b);break;case 152:this.i&49152||(this.i=this.i&63519|(a&7)<<5,this.O=1);break;case 160:case 168:a&1&&(this.g=0);a&2&&(this.c=0);a&4&&(this.f=1);a&8&&(this.b=0);break;case 176:case 184:a&1&&(this.g=65536);a&2&&(this.c=32768);a&4&&(this.f=0);a&8&&(this.b=32768);break;default:switch(a){case 0:49152&this.i?J(this,4):(this.Ea=3,mb(this),console.log("HALT at "+ this.a[7].toString(8)));break;case 1:e=0;if(0<(a=this.s.length))for(;0>8&255,a.b[d++]=h[c]>>16&255,a.b[d++]=h[c]>>24&255;else a.b=f;a.i=f.symbols;if(!a.b.length){t("Empty ROM: "+b);return}if(1==a.b.length){t(a.b[0]);return}}catch(g){a.A("ROM data error: "+g.message);return}else for(b=c.replace(/\n/gm, @@ -79,30 +79,30 @@ function tb(a){if(!Ea(a))if(!a.g)E(a);else if(a.b&&a.u){a.c||(a.c=a.b.length);if f.b.length;)g.push(f.b[k++]),h-=f.c;f=e.u;e=e.c;h=0;for(d>>>=f.f;0\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");this.H("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis ");for(b=0;bX){if(Y(d,this.m)){this.i=new H(this,"1.24.2","failsafe");Y(this.i)&&(Db(this,d),a=2,Eb(this.i));I(this.i,"timestamp",ga());Fb(this.i);var f=this.b&&!this.j;if(1==a||ha("Click OK to restore the previous PDP11 machine state, or CANCEL to reset the machine.")){if(c=Cb(d)){var e=Z(d,"code"),h=Z(d,"data");e&&("ok"==e?Y(d,h):("error"==e&&"no machine state"!= -h?(this.A("Error: "+h),"unable to verify user"==h&&(la("user",""),this.c=null)):this.K(e+": "+h),Eb(d),Y(d)?(c=Cb(d),f=!0):c=!1))}f&&Bb(this,c?d:null)}else 2==a&&d.clear()}else Bb(this);delete this.m;delete this.s}f=A(this.id);for(e=0;eX){if(Y(d,this.m)){this.i=new H(this,"1.24.2","failsafe");Y(this.i)&&(Db(this,d),a=2,Eb(this.i));I(this.i,"timestamp",ga());Fb(this.i);var f=this.b&&!this.j;if(1==a||ha("Click OK to restore the previous PDP11js machine state, or CANCEL to reset the machine.")){if(c=Cb(d)){var e=Z(d,"code"),h=Z(d,"data");e&&("ok"==e?Y(d,h):("error"==e&&"no machine state"!= +h?(this.A("Error: "+h),"unable to verify user"==h&&(la("user",""),this.c=null)):this.H(e+": "+h),Eb(d),Y(d)?(c=Cb(d),f=!0):c=!1))}f&&Bb(this,c?d:null)}else 2==a&&d.clear()}else Bb(this);delete this.m;delete this.s}f=A(this.id);for(e=0;ea[1];a=a[2];this.J=!0;this.h.w=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Gb(this,this.a,b,c,a),gb(this.a));this.D&&(Db(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; -function Db(a,b){if(ha("There may be a problem with your PDP11 machine.\n\nTo help us diagnose it, click OK to send this PDP11 machine state to http://www.pcjs.org.")){var c=a.c||"",d=b.toString(),f={app:"PDP11",ver:"1.24.2"};f.url=a.I;f.user=c;f.type="bug";f.data=d;r("http://www.pcjs.org/api/v1/report",f,!0)}} +m.Ha=function(a){var b=a[0],c=0>a[1];a=a[2];this.K=!0;this.h.w=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Gb(this,this.a,b,c,a),gb(this.a));this.D&&(Db(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; +function Db(a,b){if(ha("There may be a problem with your PDP11js machine.\n\nTo help us diagnose it, click OK to send this PDP11js machine state to http://www.pcjs.org.")){var c=a.c||"",d=b.toString(),f={app:"PDP11js",ver:"1.24.2"};f.url=a.J;f.user=c;f.type="bug";f.data=d;r("http://www.pcjs.org/api/v1/report",f,!0)}} function Hb(a,b,c){var d,f="none";if(a.f)return null;a.f--;var e=new H(a,"1.24.2"),h=new H(a,"1.24.2","validate"),g=ga();I(h,"timestamp",g);I(e,"timestamp",g);I(e,"version","1.24.2");I(e,"url",window?window.location.href:null);I(e,"browser",window?window.navigator.userAgent:"");a.a&&a.a.X&&(c&&G(a.a),d=a.a.X(b,c),"object"===typeof d&&I(e,a.a.id,d),c&&(a.a.h.w=!1,!1===d&&(f=null)));for(var g=A(a.id),k=0;kg.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2")); -g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(z){g=null,a=z.message}else a="unrecognized XML: "+(255g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g);d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(g?' url="'+g+'"':""))}f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDP11js$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(z){g=null,a=z.message}else a="unrecognized XML: "+(255/g.exec(a)){var f=d[2];b("Loading "+f+"...");r(f,null,!0,function(e,h,g){if(g||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+g+")");else{if(e=d[3])if(g=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=g[0],l,Q=/( [a-z]+=)(['"])(.*?)\2/g;l=Q.exec(e);)k=0>k.indexOf(l[1])?k.replace(">",l[0]+">"):k.replace(new RegExp(l[1]+"(['\"])(.*?)\\1"),l[0]);g[0]!=k&&(h=h.replace(g[0],k))}else{c(a,"missing <"+d[1]+"> in "+f);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],h);Ob(a,b,c)}})}else c(a,null)} function Pb(a,b,c,d){function f(a){if(void 0===g){var b=h&&D(h,"machine-warning");g=b&&b[0]||h}g&&(g.innerHTML=fa(a))}function e(a){f("Error: "+a);k&&(--Lb||sa(!0));k=!1}var h,g,k=!0;Lb++;Aa[a]={};try{if(h=document.getElementById(a)){var l;if("object"==typeof resources&&(l=resources.css)){var Q=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=l:z.appendChild(document.createTextNode(l));Q.appendChild(z)}c||