diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl
index fa882c147..2828c82b7 100644
--- a/docs/pcx86/examples/components.xsl
+++ b/docs/pcx86/examples/components.xsl
@@ -1369,7 +1369,7 @@
computer
- ,autoPower:,busWidth:,resume:,state:''
+ ,autoPower:,busWidth:,resume:'',state:''
diff --git a/modules/markout/lib/markout.js b/modules/markout/lib/markout.js
index 6f0db504f..0c2b31c30 100644
--- a/modules/markout/lib/markout.js
+++ b/modules/markout/lib/markout.js
@@ -351,6 +351,7 @@ MarkOut.aHTMLEntities = {
* 'messages' (eg, "disk")
* 'autopower' (eg, true)
* 'autostart' (eg, true)
+ * 'resume' (eg, "0", "1", "2", "3", or "state.json")
*
* and any other string-based property you wish to pass through to PCjs (via the embedPC() sParms parameter).
*
diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js
index c5de07d37..98e3c7822 100644
--- a/modules/pdp11/lib/computer.js
+++ b/modules/pdp11/lib/computer.js
@@ -194,7 +194,20 @@ class ComputerPDP11 extends Component {
if (component.initBus) component.initBus(this, this.bus, this.cpu, this.dbg);
}
- this.resume = /** @type {number} */ (this.getMachineParm('resume', parmsComputer, Str.TYPES.NUMBER, ComputerPDP11.RESUME_NONE));
+ var sStatePath = null;
+ var sResume = this.getMachineParm('resume', parmsComputer);
+ if (sResume !== undefined) {
+ /*
+ * DEPRECATE: This goofiness is a holdover from when the 'resume' property was a string (either a
+ * single-digit string or a path); now it's always a number, so it never has a 'length' property and
+ * the call to parseInt() is unnecessary.
+ */
+ if (sResume.length > 1) {
+ sStatePath = this.sResumePath = sResume;
+ } else {
+ this.resume = parseInt(sResume, 10);
+ }
+ }
/*
* The Computer 'state' property allows a state file to be specified independent of the 'resume' feature;
@@ -210,7 +223,7 @@ class ComputerPDP11 extends Component {
* OVERRIDES everything; it overrides any 'state' Computer parameter AND it disables resume of any saved state in
* localStorage (in other words, it prevents fAllowResume from being true, and forcing resume off).
*/
- var fAllowResume, sStatePath = null;
+ var fAllowResume;
var sState = this.getMachineParm('state') || (fAllowResume = true) && parmsComputer['state'];
if (sState) {
diff --git a/modules/shared/templates/components.xsl b/modules/shared/templates/components.xsl
index b25181e42..17aee9409 100644
--- a/modules/shared/templates/components.xsl
+++ b/modules/shared/templates/components.xsl
@@ -1376,7 +1376,7 @@
computer
- ,autoPower:,busWidth:,resume:,state:''
+ ,autoPower:,busWidth:,resume:'',state:''
diff --git a/versions/pc8080/1.32.2/components.xsl b/versions/pc8080/1.32.2/components.xsl
index 641fe7112..10d2d5e2f 100644
--- a/versions/pc8080/1.32.2/components.xsl
+++ b/versions/pc8080/1.32.2/components.xsl
@@ -1369,7 +1369,7 @@
computer
- ,autoPower:,busWidth:,resume:,state:''
+ ,autoPower:,busWidth:,resume:'',state:''
diff --git a/versions/pcx86/1.32.2/components.xsl b/versions/pcx86/1.32.2/components.xsl
index b2e226940..798f2cfb8 100644
--- a/versions/pcx86/1.32.2/components.xsl
+++ b/versions/pcx86/1.32.2/components.xsl
@@ -1369,7 +1369,7 @@
computer
- ,autoPower:,busWidth:,resume:,state:''
+ ,autoPower:,busWidth:,resume:'',state:''
diff --git a/versions/pdpjs/1.32.2/components.xsl b/versions/pdpjs/1.32.2/components.xsl
index 3ebc4c03c..c3bf7de29 100644
--- a/versions/pdpjs/1.32.2/components.xsl
+++ b/versions/pdpjs/1.32.2/components.xsl
@@ -1369,7 +1369,7 @@
computer
- ,autoPower:,busWidth:,resume:,state:''
+ ,autoPower:,busWidth:,resume:'',state:''
diff --git a/versions/pdpjs/1.32.2/pdp11-dbg.js b/versions/pdpjs/1.32.2/pdp11-dbg.js
index 12860f91b..91738ab20 100644
--- a/versions/pdpjs/1.32.2/pdp11-dbg.js
+++ b/versions/pdpjs/1.32.2/pdp11-dbg.js
@@ -76,7 +76,7 @@ function kc(a,b,c){if(a=a.H[b])a.style.marginTop=c?"0px":"20px",a.style.backgrou
function ac(a,b){var c=a.b[b];c[2]&&c[3]&&(kc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.mf=function(a){a||this.f.A.T||(a=this.f,a.C.reset(),pc(a),this.b[qc]&&this.b[qc][1]&&rc(this.f))};h.nf=function(){};h.hf=function(a){a||this.f.aa()};
h.ff=function(a){if(!a&&!this.f.A.T)if(this.b[qc]&&this.b[qc][1])rc(this.f);else{if((a=this.F)&&!Ja(a,!0))Ka(a,!0),sc(a,0,null),Ka(a,!1);else try{var b=this.f.pc(1);0=a.f.ia?8:16,c=65472<=a.da&&a.da<65472+b,b=c?1:2,c=c?15:a.C.I;a.b[mc]&&a.b[mc][1]||(b=-b);hc(a,a.da&~c|a.da+b&c)}
-function hc(a,b){a.da=b&a.C.I;if(a.B!==a.da){a.B=a.da;b=a.B;for(var c=0;22>c;c++)Bc(a,"A"+c,b&1<c;c++)Bc(a,"D"+c,b&1<c;c++)a.b["S"+c][1]=b&1<c;c++)Mc(a,"A"+c,b&1<c;c++)Mc(a,"D"+c,b&1<c;c++)a.b["S"+c][1]=b&1<>2;this.i=this.j-1;this.G=this.M/this.j|0;this.U=this.G-1;this.Na=[];this.la=0;this.D=!1;this.N=[];this.Ye=[Sc,Tc,Uc,Vc];this.b=this.v=[];this.B=this.L=this.w=this.O=this.P=0;a=new J(this);Wc(a,this.F);this.b=Array(this.G);this.v=Array(this.G);for(b=0;b>>this.g;this.L=0;this.w=this.I;y(this)}p(Qc,q);function Zc(a,b){if(b!=a.L){for(var c=0;c>>a.g,a.v[a.P]=a.b[a.O])}}h=Qc.prototype;h.reset=function(){for(var a=0;aNa.length&&(a.u("note: only "+Na.length+" available"),wa=Na.length);Ca-=wa;0>Ca&&(null==Na[Na.length-1].J?(wa=Ca+wa,Ca=0):Ca+=Na.length);var af=[];"call"==ti&&(Cc=1E5,af=["CALL"]);for(void 0!==si&&a.u(wa+" instructions earlier:");0=Na.length&&(Ca=0);a.oa=wa;vi++;Cc--}}vi||(a.u("no "+ui+"history available"),a.oa=void 0)}else{var ia=Fj(a,Ma);if(ia)if("da"==bb){var bf=ia.Ka||65535M.length?(2Na.length&&(a.u("note: only "+Na.length+" available"),wa=Na.length);Ca-=wa;0>Ca&&(null==Na[Na.length-1].J?(wa=Ca+wa,Ca=0):Ca+=Na.length);var af=[];"call"==ti&&(Bc=1E5,af=["CALL"]);for(void 0!==si&&a.u(wa+" instructions earlier:");0=Na.length&&(Ca=0);a.oa=wa;vi++;Bc--}}vi||(a.u("no "+ui+"history available"),a.oa=void 0)}else{var ia=Fj(a,Ma);if(ia)if("da"==bb){var bf=ia.Ka||65535M.length?(2qb&&(qb=0);65536ff?String.fromCharCode(ff):"."),Qd=Qd>>8}sb&&(sb+="\n");sb=cf?sb+(tb+","):sb+(Ma+": "+tb+(Pd?"":" "+ef))}sb&&a.u(sb);a.va=ia;a.Aa=dl}}}}break;case "e":if("else"==
-g[0])break;var Wb,gf,hf,jf,kf=g[0],lf=g[1];"eb"==kf?(Wb=1,gf=255,hf=a.sd,jf=a.td):"e"==kf||"ew"==kf?(Wb=2,gf=65535,hf=a.Oa,jf=a.se):lf=null;if(null==lf)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 Rd=Fj(a,lf);if(Rd)for(var Sd=2;Sdof;){for(var ub=null,hl=256;65536>Ic.J>>>0;){pf.J=a.Oa(Ic,2);if(null==Ic.J||!hl--)break;if(!(pf.J&1)){for(var il=a,Td=pf,Ai=null,Jc=Td.J,Bi=Jc,qf=1;6>=qf&&Jc;qf++){if(2ff?String.fromCharCode(ff):"."),Qd=Qd>>8}sb&&(sb+="\n");sb=cf?sb+(tb+","):sb+(Ma+": "+tb+(Pd?"":" "+ef))}sb&&a.u(sb);a.va=ia;a.Aa=dl}}}}break;case "e":if("else"==
+g[0])break;var Wb,gf,hf,jf,kf=g[0],lf=g[1];"eb"==kf?(Wb=1,gf=255,hf=a.sd,jf=a.td):"e"==kf||"ew"==kf?(Wb=2,gf=65535,hf=a.Oa,jf=a.se):lf=null;if(null==lf)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 Rd=Fj(a,lf);if(Rd)for(var Sd=2;Sdof;){for(var ub=null,hl=256;65536>Hc.J>>>0;){pf.J=a.Oa(Hc,2);if(null==Hc.J||!hl--)break;if(!(pf.J&1)){for(var il=a,Td=pf,Ai=null,Ic=Td.J,Bi=Ic,qf=1;6>=qf&&Ic;qf++){if(2> ";yb(function(){for(var a=x(document,w,"debugger"),b=0;b\nLicense: GPL version 3 or later ");this.u("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.u("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;bIk){if(Jk(d,this.G)){this.v=new G(this,"1.32.2",Sk);Jk(this.v)&&(Tk(this,d),a=Uk,Vk(this.v));this.v.set(Pk,eb());Wk(this.v);var e=this.b&&!this.B;if(a==Qk||za("Click OK to restore the previous "+Hb+" machine state, or CANCEL to reset the machine.")){if(c=Ok(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Jk(d,g):("error"==f&&"no machine state"!=
-g?(this.S("Error: "+g),"unable to verify user"==g&&(lb(Xk,""),this.g=null)):this.u(f+": "+g),Vk(d),Jk(d)?(c=Ok(d),e=!0):c=!1))}e&&Mk(this,c?d:null)}else a==Uk&&d.clear()}else Mk(this);delete this.G;delete this.w}e=Aa(this.id);for(f=0;fIk){if(Jk(d,this.G)){this.v=new G(this,"1.32.2",Sk);Jk(this.v)&&(Tk(this,d),a=Uk,Vk(this.v));this.v.set(Pk,eb());Wk(this.v);var e=this.b&&!this.D;if(a==Qk||za("Click OK to restore the previous "+Hb+" machine state, or CANCEL to reset the machine.")){if(c=Ok(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Jk(d,g):("error"==f&&"no machine state"!=
+g?(this.S("Error: "+g),"unable to verify user"==g&&(lb(Xk,""),this.g=null)):this.u(f+": "+g),Vk(d),Jk(d)?(c=Ok(d),e=!0):c=!1))}e&&Mk(this,c?d:null)}else a==Uk&&d.clear()}else Mk(this);delete this.G;delete this.B}e=Aa(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.A.Z=!0;var d=this.H.power;d&&(d.textContent="Shutdown");this.f&&(Yk(this,this.f,b,c,a),I(this,-2),this.f.qa());this.N&&(Tk(this,b),b.clear());!c&&this.v&&(this.v.clear(),delete this.v);this.j=0};
function Tk(a,b){if(za("There may be a problem with your "+Hb+" machine.\n\nTo help us diagnose it, click OK to send this "+Hb+" machine state to http://www.pcjs.org.")){var c=a.V;a=a.g||"";b=b.toString();var d={};d.app=Hb;d.ver="1.32.2";d.url=c;d.user=a;d.type="bug";d.data=b;fb("http://www.pcjs.org/api/v1/report",d,!0)}}
@@ -354,14 +354,14 @@ function Ck(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new G(a,"1.32.2
!1,!1===d&&(e=null)))}e&&(c?(k=d=!1,b?(a.g&&ml(a,a.g,f.toString()),Wk(g)&&Wk(f)||(e=null,d=k=!0)):a.b&&(d=!0,k=a.b==nl),d&&f.clear(k)):e=f.toString());c&&(a.A.Z=!1,b=a.H.power)&&(b.textContent="Power");a.j=0;return e}
h.reset=function(){this.C&&this.C.reset&&(D(this,"Resetting "+this.C.type),this.C.reset());this.f&&this.f.reset&&(D(this,"Resetting "+this.f.type),this.f.reset());for(var a=Aa(this.id),b=0;b=d||30<=(c.Kc+=d))&&(e.textContent=c.A.T?c.rb.toFixed(2)+"Mhz":"Stopped",c.Kc=0)}if(a.i&&(a=a.i,b=b||0,a.v)){c=a.f.A.T;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;eb?a.da=a.f.g[7]:0=d||30<=(c.Kc+=d))&&(e.textContent=c.A.T?c.rb.toFixed(2)+"Mhz":"Stopped",c.Kc=0)}if(a.i&&(a=a.i,b=b||0,a.v)){c=a.f.A.T;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;eb?a.da=a.f.g[7]:0>16-X.S.va&X.va;
h.yg=function(a){this.a=this.a&~X.Ta|a&X.Ta;this.i=this.i&60|(a&X.va)>>X.S.va;if(!(this.a&X.wa)){a=!0;var b,c=this.b[(this.a&X.Ma)>>X.S.Ma],d=c.V,e,f,g;this.a&=~X.Xa;switch(this.a&X.ra){case Pg.fe:this.l&Qg.Sc&&(this.a&=X.Xa|X.ra|X.va);this.l=c.status|this.g&Z.Rb|(d&&512==d.N?Qg.Id:0);break;case Pg.Sb:(this.f&Z.Hd)==Z.ce&&(b=this.f&Z.vb,c=(this.f&Z.ee)<<2,this.g=this.f&Z.de?this.g+b:this.g-b,this.f=this.g=this.g&Z.vb|c);break;case Pg.Qd:this.l=this.g;break;case Pg.Od:b=this.Gb;case Pg.je:b||(b=this.gc),
e=this.f>>Z.S.vb,f=this.f&Z.Rb?1:0,g=this.f&Z.ed,!d||e>=d.N||g>=d.P?this.a=this.a|Y.ya|X.tb:(a=65536-this.l&65535,d=(this.i&Og.vc)<<16|this.o,a=b.call(this,c,e,f,g,a,d,2,!1,this.Wd.bind(this)))}a&&(this.a=this.a|X.Xa|X.wa,this.a&X.tc&&oc(this.c,this.jb))}};h.mf=function(){return this.o};h.wg=function(a){this.o=a&Rg.Ta};h.qf=function(){return this.f};h.zg=function(a){this.f=a};h.rf=function(){return this.l};h.Ag=function(a){this.l=a};h.nf=function(){return this.i};
h.xg=function(a){this.i=a&Og.vc;this.a=this.a&~X.va|(this.i&3)<\nLicense: GPL version 3 or later ");this.Z("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.Z("Portions adapted from the PDP-11/70 Emulator by Paul Nankervis ");for(b=0;bWg){if(Xg(d,this.s)){this.h=new E(this,"1.32.2",fh);Xg(this.h)&&(ih(this,d),a=jh,kh(this.h));this.h.set(ch,Na());lh(this.h);var e=this.a&&!this.l;if(a==dh||wa("Click OK to restore the previous "+hb+" machine state, or CANCEL to reset the machine.")){if(c=bh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Xg(d,g):("error"==f&&"no machine state"!=
-g?(this.G("Error: "+g),"unable to verify user"==g&&(Ua(mh,""),this.b=null)):this.Z(f+": "+g),kh(d),Xg(d)?(c=bh(d),e=!0):c=!1))}e&&$g(this,c?d:null)}else a==jh&&d.clear()}else $g(this);delete this.s;delete this.i}e=xa(this.id);for(f=0;fWg){if(Xg(d,this.s)){this.h=new E(this,"1.32.2",fh);Xg(this.h)&&(ih(this,d),a=jh,kh(this.h));this.h.set(ch,Na());lh(this.h);var e=this.a&&!this.o;if(a==dh||wa("Click OK to restore the previous "+hb+" machine state, or CANCEL to reset the machine.")){if(c=bh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Xg(d,g):("error"==f&&"no machine state"!=
+g?(this.G("Error: "+g),"unable to verify user"==g&&(Ua(mh,""),this.b=null)):this.Z(f+": "+g),kh(d),Xg(d)?(c=bh(d),e=!0):c=!1))}e&&$g(this,c?d:null)}else a==jh&&d.clear()}else $g(this);delete this.s;delete this.l}e=xa(this.id);for(f=0;fa[1];a=a[2];this.H=!0;this.j.O=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.c&&(nh(this,this.c,b,c,a),Kb(this,-2),this.c.Y());this.C&&(ih(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0};
function ih(a,b){if(wa("There may be a problem with your "+hb+" machine.\n\nTo help us diagnose it, click OK to send this "+hb+" machine state to http://www.pcjs.org.")){var c=a.K;a=a.b||"";b=b.toString();var d={};d.app=hb;d.ver="1.32.2";d.url=c;d.user=a;d.type="bug";d.data=b;Oa("http://www.pcjs.org/api/v1/report",d,!0)}}
@@ -265,12 +265,12 @@ function oh(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new E(a,"1.32.2
h.start=function(a,b){for(var c=xa(this.id),d=0;d=d||30<=(c.Lc+=d))&&(e.textContent=c.j.L?c.Oa.toFixed(2)+"Mhz":"Stopped",c.Lc=0)}if(a.f&&(a=a.f,b=b||0,a.l)){c=a.c.j.L;d=!!(a.c.g&8);if(0>=b||60<=(a.i+=b)){for(e=0;eb?a.U=a.c.b[7]:0