diff --git a/_posts/2017-01-03-pdp-11-tutorials.md b/_posts/2017-01-03-pdp-11-tutorials.md
index b2a5097e5..a8e10ad1a 100644
--- a/_posts/2017-01-03-pdp-11-tutorials.md
+++ b/_posts/2017-01-03-pdp-11-tutorials.md
@@ -16,7 +16,7 @@ machines:
sticky: top
---
-Introducing PDP-11 tutorials. For more information, keep scrolling.
+Introducing PDP-11 tutorials. For more details, keep scrolling, and keep your eye on the VT100 below.
{% include machine.html id="vt100" %}
@@ -26,34 +26,42 @@ like [bitsavers.org](http://bitsavers.org), I suspect most people don't have a l
reading old manuals.
In an effort to remedy that situation, I'm adding some new features to PCjs. The first feature is what I call
-"Sticky Machines", and it's more a website feature than a machine feature. At the top of any PCjs webpage, in the
-*machines* section, a machine can now have a *sticky* property. For now, the only supported value is "top"; e.g.:
+"Sticky Machines", and it's really just a new feature of the PCjs website. At the top of any PCjs webpage, in the
+*machines* section, a machine can now define a *sticky* property. For now, the only supported value is "top"; e.g.:
machines:
- id: vt100
- type: pc8080
- config: /devices/pc8080/machine/vt100/machine.xml
- connection: serialPort->test1170.dl11
- sticky: top
+ type: pc8080
+ config: /devices/pc8080/machine/vt100/machine.xml
+ connection: serialPort->test1170.dl11
+ sticky: top
A sticky machine makes it easier to construct a tutorial page for a single machine, by preventing that machine from
-scrolling off the top of the page; it "sticks" to the top instead. The rest of the page scrolls normally, allowing the
-user to progress at their own pace through the text and/or images of an accompanying tutorial.
+scrolling off the top; it "sticks" to the top instead. The rest of the page scrolls normally, allowing the user to
+progress at their own pace through the text and/or images of an accompanying tutorial.
The second feature is a generalized method for sending commands to components within a machine. For example, if we
-want to send some keyboard commands to machine:
+want to send some serial data to a machine:
{% raw %}
- {% include machine-command.html type='button' label='Try It!' machine='vt100' component='Keyboard' command='sendString' value='Hello World' %}
+ {% include machine-command.html type='button' label='Try It!' machine='vt100' component='SerialPort' command='receiveData' value='Hello World' %}
{% endraw %}
which should translate into a control that looks like:
-
+
-In fact, let's try it now. {% include machine-command.html type='button' label='Try It!' machine='vt100' component='Keyboard' command='sendString' value='Hello World' %}
+In fact, let's try it now. {% include machine-command.html type='button' label='Try It!' machine='vt100' component='SerialPort' command='receiveData' value='Hello World' %}
-Obviously, every component we want to control will need to be updated to export the necessary functions.
+Obviously, every component we want to control will need to be updated to export the necessary "command" functions.
+
+So expect some PDPjs tutorials in the near future, featuring sticky machines and built-in command demos. Some
+commands will be very simple, like the data injection command shown above. Others will perform more sophisticated
+operations, such as loading and booting a particular disk, running a particular application, automatically flipping
+selected Front Panel switches, and so on.
+
+Finally, in case you're wondering why there's another machine below, well, what did you think the VT100 was talking to?
+This PDP-11/70, of course.
{% include machine.html id="test1170" %}
diff --git a/modules/shared/es6/embed.js b/modules/shared/es6/embed.js
index bacf0cd52..3f795f4f4 100644
--- a/modules/shared/es6/embed.js
+++ b/modules/shared/es6/embed.js
@@ -594,6 +594,18 @@ function embedPDP11(idMachine, sXMLFile, sXSLFile, sParms)
return embedMachine("PDPjs", "pdp11", APPVERSION, idMachine, sXMLFile, sXSLFile, sParms);
}
+/**
+ * findMachineComponent(idMachine, sType)
+ *
+ * @param {string} idMachine
+ * @param {string} sType
+ * @return {Component|null}
+ */
+function findMachineComponent(idMachine, sType)
+{
+ return Component.getComponentByType(sType, idMachine + ".machine");
+}
+
/**
* Prevent the Closure Compiler from renaming functions we want to export, by adding them as global properties.
*/
@@ -611,5 +623,7 @@ if (APPNAME == "PDPjs") {
window['embedPDP11'] = embedPDP11;
}
+window['findMachineComponent'] = findMachineComponent;
+
window['enableEvents'] = Web.enablePageEvents;
window['sendEvent'] = Web.sendPageEvent;
diff --git a/modules/shared/lib/sticky.js b/modules/shared/lib/sticky.js
index f70abdfd0..80021615d 100644
--- a/modules/shared/lib/sticky.js
+++ b/modules/shared/lib/sticky.js
@@ -1,5 +1,5 @@
/**
- * @fileoverview Support for "sticky" machines
+ * @fileoverview Support for "sticky" machines and commands that drive them.
* @author Jeff Parsons (@jeffpar)
* @copyright © Jeff Parsons 2012-2017
*
@@ -29,11 +29,19 @@
"use strict";
/**
- * addStickyMachine(idMachine)
+ * addStickyMachine(idMachine, sPosition)
+ *
+ * If a machine is defined with a 'sticky' property, then the page containing that machine should
+ * also contain a call this function. Technically, the 'sticky' property's value should also be passed
+ * via sPosition, but since the only page position we currently support is "top", callers are currently
+ * omitting it, and "top" is simply assumed.
+ *
+ * TODO: Do something intelligent if sPosition is NOT omitted and is NOT "top".
*
* @param {string} idMachine
+ * @param {string} [sPosition] (if omitted, "top" is assumed)
*/
-function addStickyMachine(idMachine)
+function addStickyMachine(idMachine, sPosition)
{
var topMachine = -1;
var prevOnScroll = window.onscroll;
@@ -68,16 +76,42 @@ function addStickyMachine(idMachine)
}
/**
- * commandMachine(idMachine, typeComponent, sCommand, sValue)
+ * commandMachine(idMachine, sType, sCommand, sValue)
+ *
+ * Note that this script is not compiled into any of the machines, since "sticky machines" are feature of the PCjs
+ * website rather than of the machines. And since the machines are compiled, all their code and data is completely
+ * opaque to us, except for those functions explicitly exported by embed.js.
+ *
+ * So now, in addition to the functions for embedding machines on a webpage, embed.js includes a new function:
+ *
+ * findMachineComponent()
+ *
+ * which uses existing Component methods to find the requested component type for a specific machine, and if a
+ * component is found, then its 'exports' table is checked for an entry matching the specified command string, and if
+ * an entry is found, then the corresponding function is called with the specified data.
*
* @param {string} idMachine
- * @param {string} typeComponent
+ * @param {string} sType
* @param {string} sCommand
* @param {string} [sValue]
*/
-function commandMachine(idMachine, typeComponent, sCommand, sValue)
+function commandMachine(idMachine, sType, sCommand, sValue)
{
- console.log("commandMachine('" + idMachine + "','" + typeComponent + "','" + sCommand + "','" + sValue + "')");
+ if (window.findMachineComponent) {
+ var component = window.findMachineComponent(idMachine, sType);
+ if (component) {
+ var exports = component['exports'];
+ if (exports) {
+ var fnCommand = exports[sCommand];
+ if (fnCommand) {
+ //noinspection JSUnresolvedFunction
+ fnCommand.call(component, sValue);
+ return;
+ }
+ }
+ }
+ }
+ console.log("unimplemented: commandMachine('" + idMachine + "','" + typeComponent + "','" + sCommand + "','" + sValue + "')");
}
/**
diff --git a/versions/pc8080/1.32.0/pc8080-dbg.js b/versions/pc8080/1.32.0/pc8080-dbg.js
index df6f73e21..745454c97 100644
--- a/versions/pc8080/1.32.0/pc8080-dbg.js
+++ b/versions/pc8080/1.32.0/pc8080-dbg.js
@@ -57,7 +57,7 @@ function ab(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return
function eb(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0>>a.g].lb(b&a.j,b)}function Fb(a,b){var c=b&
function Jb(a){for(var b=0,c=[],d=0;d>>=f)&l;if(void 0!==g){if(g[0])g[0](b,l,d);a.K&&a.F!=g[1]&&Tb(a.K,b,l)}else a.K&&(za(a.K,a,b,l,d),a.F&&Tb(a.K,b,l));f+=h<<3;b+=h;e-=h}}function Ab(a,b,c){q("Memory block error ("+a+": "+x(b)+","+x(c)+")");return!1}var Bb=1,Db=2,Ub;if(rb){var Vb=new ArrayBuffer(2);(new DataView(Vb)).setUint16(0,256,!0);Ub=256===(new Uint16Array(Vb))[0]}else Ub=!1;var Wb=Ub;
-function z(a,b,c,d){this.id=Xb+=2;this.b=null;this.J=a;this.mb=b;this.size=c||0;this.type=d||Yb;this.u=d==Zb;yb(this);this.Ca=this.gc=!1;if(c)if(rb)this.j=new ArrayBuffer(c),this.w=new DataView(this.j,0,c),this.g=new Uint8Array(this.j,0,c),this.A=new Uint16Array(this.j,0,c>>1),this.b=new Int32Array(this.j,0,c>>2),$b(this,Wb?ac:bc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>>=f)&l;if(void 0!==g){if(g[0])g[0](b,l,d);a.K&&a.F!=g[1]&&Tb(a.K,b,l)}else a.K&&(za(a.K,a,b,l,d),a.F&&Tb(a.K,b,l));f+=h<<3;b+=h;e-=h}}function Ab(a,b,c){q("Memory block error ("+a+": "+x(b)+","+x(c)+")");return!1}var Bb=1,Db=2,Ub;if(qb){var Vb=new ArrayBuffer(2);(new DataView(Vb)).setUint16(0,256,!0);Ub=256===(new Uint16Array(Vb))[0]}else Ub=!1;var Wb=Ub;
+function z(a,b,c,d){this.id=Xb+=2;this.b=null;this.J=a;this.mb=b;this.size=c||0;this.type=d||Yb;this.u=d==Zb;yb(this);this.Ca=this.gc=!1;if(c)if(qb)this.j=new ArrayBuffer(c),this.w=new DataView(this.j,0,c),this.g=new Uint8Array(this.j,0,c),this.A=new Uint16Array(this.j,0,c>>1),this.b=new Int32Array(this.j,0,c>>2),$b(this,Wb?ac:bc);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)};k.Xd=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};k.ae=function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8};k.fe=function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ca=!0};k.Vd=function(a,b){if(this.K&&null!=this.J){var c=this.K;sc(c,this.J+a,1,c.I)&&c.da(!0)}return this.lb(a,b)};k.Zd=function(a,b){if(this.K&&null!=this.J){var c=this.K;sc(c,this.J+a,2,c.I)&&c.da(!0)}return this.Jb(a,b)};
k.de=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;sc(d,this.J+a,1,d.w)&&d.da(!0)}this.u?this.ob(0,b):this.nb(a,b,c)};k.he=function(a,b,c){if(this.K&&null!=this.J){var d=this.K;sc(d,this.J+a,2,d.w)&&d.da(!0)}this.u?this.ob(0,b):this.Ob(a,b,c)};k.Ud=function(a){return this.g[a]};k.Wd=function(a){return this.g[a]};k.Yd=function(a){return this.w.getUint16(a,!0)};k.$d=function(a){return a&1?this.g[a]|this.g[a+1]<<8:this.A[a>>1]};k.ce=function(a,b){this.g[a]=b;this.Ca=!0};
-k.ee=function(a,b){this.g[a]=b;this.Ca=!0};k.ge=function(a,b){this.w.setUint16(a,b,!0);this.Ca=!0};k.ie=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.A[a>>1]=b;this.Ca=!0};var Yb=0,Zb=2,Cb=["NONE","RAM","ROM","VID","H/W"],Xb=0,ec=[],cc=[z.prototype.Xd,z.prototype.fe,z.prototype.ae,z.prototype.je],hc=[z.prototype.Vd,z.prototype.de,z.prototype.Zd,z.prototype.he];if(rb)var bc=[z.prototype.Ud,z.prototype.ce,z.prototype.Yd,z.prototype.ge],ac=[z.prototype.Wd,z.prototype.ee,z.prototype.$d,z.prototype.ie];
+k.ee=function(a,b){this.g[a]=b;this.Ca=!0};k.ge=function(a,b){this.w.setUint16(a,b,!0);this.Ca=!0};k.ie=function(a,b){a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.A[a>>1]=b;this.Ca=!0};var Yb=0,Zb=2,Cb=["NONE","RAM","ROM","VID","H/W"],Xb=0,ec=[],cc=[z.prototype.Xd,z.prototype.fe,z.prototype.ae,z.prototype.je],hc=[z.prototype.Vd,z.prototype.de,z.prototype.Zd,z.prototype.he];if(qb)var bc=[z.prototype.Ud,z.prototype.ce,z.prototype.Yd,z.prototype.ge],ac=[z.prototype.Wd,z.prototype.ee,z.prototype.$d,z.prototype.ie];
function tc(a,b){n.call(this,"CPU",a,0,1);var c=a.multiplier||1;this.Fa=a.cycles||b;this.U=c;this.Sa=Math.round(this.Fa/1E4)/100;this.Z=this.Sa*this.U;this.G.ka=!1;this.G.Mb=!1;this.G.ib=a.autoStart;this.G.ec=!1;this.G.Va=!1;this.ya=this.oa=0;this.za=a.csStart;this.na=a.csInterval;this.sa=a.csStop;this.T=[];this.zb=this.qb.bind(this);sa(this)}ba(tc,n);k=tc.prototype;
k.Ea=function(a,b,c,d){this.S=a;this.H=b;this.K=d;for(b=0;bbd?String.fromCharCode(bd):".";$c--}kc&&(kc+="\n");kc+=ma+" "+ne+(lc?"":" "+sg)}kc&&a.i(kc);a.la=Xc}}}}break;case "e":if("else"==f[0])break;var cd=1,tg=255,ug=a.Ga,vg=a.Sb;"ew"==f[0]&&(cd=2,tg=65535,ug=a.Bb,vg=a.vc);var wg=cd<<1,xg=f[1];if(null==xg)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"),a.i("\tew [a] [...] edit words at address a");
else{var dd=bg(a,xg);if(dd)for(var ed=2;edue;){for(var qb=null,ui=256;65536>oc.J>>>0;){zg.J=a.Bb(oc,2);if(null==oc.J||!ui--)break;for(var vi=a,gd=zg,
-Ag=null,pc=gd.J,Bg=pc,ve=1;6>=ve&&pc;ve++){if(2ue;){for(var rb=null,ui=256;65536>oc.J>>>0;){zg.J=a.Bb(oc,2);if(null==oc.J||!ui--)break;for(var vi=a,gd=zg,
+Ag=null,pc=gd.J,Bg=pc,ve=1;6>=ve&&pc;ve++){if(2/g.exec(a)){var e=
a=a.replace(d[0],g);Hi(a,b,c)}})}else c(a,null)}
function Ii(a,b,c,d){function e(a){if(void 0===h){var b=g&&pa(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=Ia(a))}function f(a){e("Error: "+a);l&&(--Ei||mb(!0));l=!1}var g,h,l=!0;Ei++;ea[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var r=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=p:t.appendChild(document.createTextNode(p));r.appendChild(t)}c||
(c="/versions/pc8080/1.32.0/components.xsl");p=function(d,h){h?Fi(c,null,null,!1,e,function(d,l){l?(da(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||mb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ei||mb(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fi(b,a,d,!0,e,p):Gi(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(A){f(A.message)}return l}window.embedPC8080=function(a,b,c,d){mb(!1);return Ii(a,b,c,d)};window.enableEvents=mb;window.sendEvent=ob;})();
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Fi(b,a,d,!0,e,p):Gi(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(A){f(A.message)}return l}window.embedPC8080=function(a,b,c,d){mb(!1);return Ii(a,b,c,d)};window.findMachineComponent=function(a,b){return la(b,a+".machine")};window.enableEvents=mb;window.sendEvent=ob;})();
diff --git a/versions/pc8080/1.32.0/pc8080.js b/versions/pc8080/1.32.0/pc8080.js
index cee264bcc..5f1f56ec3 100644
--- a/versions/pc8080/1.32.0/pc8080.js
+++ b/versions/pc8080/1.32.0/pc8080.js
@@ -206,4 +206,4 @@ function xe(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
a=a.replace(d[0],g);xe(a,b,c)}})}else c(a,null)}
function ye(a,b,c,d){function e(a){if(void 0===h){var b=g&&y(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ra(a))}function f(a){e("Error: "+a);l&&(--ue||La(!0));l=!1}var g,h,l=!0;ue++;ba[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var v=document.head||document.getElementsByTagName("head")[0],A=document.createElement("style");A.type="text/css";A.styleSheet?A.styleSheet.cssText=n:A.appendChild(document.createTextNode(n));v.appendChild(A)}c||
(c="/versions/pc8080/1.32.0/components.xsl");n=function(d,h){h?ve(c,null,null,!1,e,function(d,l){l?(aa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--ue||La(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--ue||La(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ve(b,a,d,!0,e,n):we(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(K){f(K.message)}return l}window.embedPC8080=function(a,b,c,d){La(!1);return ye(a,b,c,d)};window.enableEvents=La;window.sendEvent=Na;})();
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ve(b,a,d,!0,e,n):we(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(K){f(K.message)}return l}window.embedPC8080=function(a,b,c,d){La(!1);return ye(a,b,c,d)};window.findMachineComponent=function(a,b){return ia(b,a+".machine")};window.enableEvents=La;window.sendEvent=Na;})();
diff --git a/versions/pdpjs/1.32.0/pdp11-dbg.js b/versions/pdpjs/1.32.0/pdp11-dbg.js
index d21964993..fccc54935 100644
--- a/versions/pdpjs/1.32.0/pdp11-dbg.js
+++ b/versions/pdpjs/1.32.0/pdp11-dbg.js
@@ -57,12 +57,12 @@ function bb(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof
f,e))});if(b&&"object"==typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g}
function cb(a,b){var c,d={ca:null,ea:null,wa:null,va:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.wa=g.load;d.va=g.exec;if(e=g.bytes)d.ca=e;else if(e=g.words)for(d.ca=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ca=Array(4*e.length),f=c=0;c>8&255,d.ca[f++]=e[c]>>16&255,d.ca[f++]=e[c]>>24&255;else d.ca=g;d.ea=g.symbols;d.ca.length?1==d.ca.length&&(v(d.ca[0]),d=null):(v("Empty resource: "+a),d=null)}catch(k){v("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca;a++)this.b["S"+a]=[0,0,!1,!1,this.Zd,a];this.F=this.f=this.D=this.J=null;A(this)}p(Sb,q);h=Sb.prototype;h.reset=function(){this.stop()};
@@ -215,7 +215,7 @@ function Vh(a,b,c,d,e,f,g){a.L=b;a.j=c;a.i=d;a.ca=e;a.wa=f;a.va=g;d==Gh?a.I&&wh(
h.Cf=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&hd(this.f,this.H)):(this.b&=-129,this.b|=2048,this.G=0,id(this.f,this.R,1E3/Math.round(this.S/10))));this.b=this.b&-66|a&65};h.re=function(){this.b&=-129;this.b|=2048;return this.G};h.Bf=function(){};var Eh="",Oh="?",Ph="??",Fh=0,Hh=1,Gh=2,Jh="readProgress",Wh="pcjs-progress-bar",Xh={},Mh=(Xh[65384]=[null,null,Ed.prototype.se,Ed.prototype.Cf,"PRS"],Xh[65386]=[null,null,Ed.prototype.re,Ed.prototype.Bf,"PRB"],Xh);
function Yh(a,b,c){q.call(this,"Disk",{id:a.lb+".disk"+H(++Zh,4)},0,8192);this.controller=a;this.J=a.J;this.F=a.F;this.v=b;this.Na=b.name;this.Aa=this.gc="";this.cc=b.cc;this.X=this.da=this.aa=this.oa=this.mode=0;this.b=[];this.i=null;this.j=!1;$h(this,c,b.X,b.da,b.aa,b.oa);this.g=this.w=null;A(this)}p(Yh,q);h=Yh.prototype;h.ta=function(a,b,c,d){this.F=d};
function $h(a,b,c,d,e,f){a.mode=b;a.X=c;a.da=d;a.aa=e;a.oa=f;a.b=[];if("preload"!=a.mode){b=Array(a.X);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.X);for(d=0;d>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.X);for(d=0;dc.indexOf("/api/v1/dump")&&(b=Qa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):Ra(c,"/")&&(d="dir"),f=db()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.cc?"":e)+"&format=json"));return!!bb(f,
null,!0,function(b,c,d){ci(a,b,c,d)})}
function ci(a,b,c,d){var e=null,f=0>d&&!!a.J&&!a.J.A.fa;a.j=!1;if(d)a.controller.O('Unable to load disk "'+a.Na+'" (error '+d+": "+b+")",f);else{ua(a.controller.lb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+
@@ -317,17 +317,17 @@ function qk(a,b,c){if("?"==c)a.u("trace commands:"),a.u("\tt [#]\ttrace # instr
function Qj(a,b,c,d){if(b=vj(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c)if("l"==c.charAt(0))c=hj(a,c.substr(1)),null!=c&&(d=c);else{d=vj(a,c,!0);if(!d||d.Kk[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.u(m)}k[3]&&(g=k[3],f=null);f=Xj(a,b,g,f);a.u(f);a.H=b;e-=b.K-l;c++}}}
function Wj(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(">> "+b):(a.P&&(a.u("ended assemble at "+yj(a,a.N)),a.H=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(Ja(a)&&0n||"z"Ga.length&&(a.u("note: only "+Ga.length+" available"),qa=Ga.length);wa-=qa;0>wa&&(null==Ga[Ga.length-1].K?(qa=wa+qa,wa=0):wa+=Ga.length);var Qe=[];"call"==ni&&(rc=1E5,Qe=["CALL"]);for(void 0!==mi&&a.u(qa+" instructions earlier:");0=Ga.length&&(wa=0);a.na=qa;pi++;rc--}}pi||(a.u("no "+oi+"history available"),a.na=void 0)}else{var fa=vj(a,Fa);if(fa)if("da"==Ta){var Re=fa.Ka||65535K.length?(2hb&&(hb=0);65536Ve?String.fromCharCode(Ve):"."),yd=yd>>8}jb&&(jb+="\n");jb=Se?jb+(kb+","):jb+(Fa+": "+kb+(xd?"":" "+Ue))}jb&&a.u(jb);a.Ca=fa;a.xa=Tk}}}}break;case "e":if("else"==g[0])break;var Lb,We,Xe,Ye,Ze=g[0],$e=g[1];"eb"==Ze?
+Na(K[1],13,3)+" "+G(K[1],8)),a.u("+ "+sk[K[2]]+"PAR"+K[3]+": "+Na(K[4],22,3)+" "+G(K[4],8)),a.u("& MMUMASK: "+Na(K[5],22,3)+" "+G(K[5],8)),a.u("= PHYSICAL: "+Na(K[0],22,3)+" "+G(K[0],8)))}else{var ib=0,Se="ds"==Ta;if(Ua){if("l"==Ua.charAt(0))Ua=Ua.substr(1)||Qk,ib=hj(a,Ua);else{var si=vj(a,Ua);si&&(ib=si.K-fa.K)}0>ib&&(ib=0);65536Ve?String.fromCharCode(Ve):"."),yd=yd>>8}kb&&(kb+="\n");kb=Se?kb+(lb+","):kb+(Fa+": "+lb+(xd?"":" "+Ue))}kb&&a.u(kb);a.Ca=fa;a.xa=Tk}}}}break;case "e":if("else"==g[0])break;var Lb,We,Xe,Ye,Ze=g[0],$e=g[1];"eb"==Ze?
(Lb=1,We=255,Xe=a.Mc,Ye=a.Nc):"e"==Ze||"ew"==Ze?(Lb=2,We=65535,Xe=a.Oa,Ye=a.yd):$e=null;if(null==$e)a.u("edit memory commands:"),a.u("\teb [a] [...] edit bytes at address a"),a.u("\tew [a] [...] edit words at address a");else{var zd=vj(a,$e);if(zd)for(var Ad=2;Adcf;){for(var lb=null,Xk=256;65536>xc.K>>>0;){df.K=a.Oa(xc,2);if(null==xc.K||!Xk--)break;if(!(df.K&1)){for(var Yk=a,Bd=df,ui=null,yc=Bd.K,vi=yc,ef=1;6>=ef&&yc;ef++){if(2cf;){for(var mb=null,Xk=256;65536>xc.K>>>0;){df.K=a.Oa(xc,2);if(null==xc.K||!Xk--)break;if(!(df.K&1)){for(var Yk=a,Bd=df,ui=null,yc=Bd.K,vi=yc,ef=1;6>=ef&&yc;ef++){if(2=d||30<=(c.oc+=d))&&(e.textContent=c.A.U?c.mb.toFixed(2)+"Mhz":"Stopped",c.oc=0)}if(a.i&&(a=a.i,b=b||0,a.v)){c=a.f.A.U;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;e/g.exec(a)){var e=
"");a=a.replace(d[0],g);il(a,b,c)}})}else c(a,null)}
function jl(a,b,c,d){function e(a){if(void 0===k){var b=g&&y(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=Sa(a))}function f(a){e("Error: "+a);l&&(--fl||zb(!0));l=!1}var g,k,l=!0;fl++;va[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c||
(c="/versions/pdpjs/1.32.0/components.xsl");m=function(d,k){k?gl(c,null,null,!1,e,function(d,l){l?(ua(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fl||zb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--fl||zb(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gl(b,a,d,!0,e,m):hl(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return l}window.embedPDP11=function(a,b,c,d){zb(!1);return jl(a,b,c,d)};window.enableEvents=zb;window.sendEvent=Bb;})();//# sourceMappingURL=/tmp/pdpjs/1.32.0/pdp11-dbg.map
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gl(b,a,d,!0,e,m):hl(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return l}window.embedPDP11=function(a,b,c,d){zb(!1);return jl(a,b,c,d)};window.findMachineComponent=function(a,b){return Ba(b,a+".machine")};window.enableEvents=zb;window.sendEvent=Bb;})();//# sourceMappingURL=/tmp/pdpjs/1.32.0/pdp11-dbg.map
diff --git a/versions/pdpjs/1.32.0/pdp11.js b/versions/pdpjs/1.32.0/pdp11.js
index d26fb68be..cc2fc5111 100644
--- a/versions/pdpjs/1.32.0/pdp11.js
+++ b/versions/pdpjs/1.32.0/pdp11.js
@@ -280,4 +280,4 @@ function mh(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],g);mh(a,b,c)}})}else c(a,null)}
function nh(a,b,c,d){function e(a){if(void 0===k){var b=g&&C(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=Ea(a))}function f(a){e("Error: "+a);l&&(--jh||Ya(!0));l=!1}var g,k,l=!0;jh++;ra[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=m:t.appendChild(document.createTextNode(m));p.appendChild(t)}c||
(c="/versions/pdpjs/1.32.0/components.xsl");m=function(d,k){k?kh(c,null,null,!1,e,function(d,l){l?(qa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--jh||Ya(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--jh||Ya(!0)):f("invalid machine element: "+
-a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?kh(b,a,d,!0,e,m):lh(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(x){f(x.message)}return l}window.embedPDP11=function(a,b,c,d){Ya(!1);return nh(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.32.0/pdp11.map
+a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?kh(b,a,d,!0,e,m):lh(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(x){f(x.message)}return l}window.embedPDP11=function(a,b,c,d){Ya(!1);return nh(a,b,c,d)};window.findMachineComponent=function(a,b){return va(b,a+".machine")};window.enableEvents=Ya;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.32.0/pdp11.map