Fixed assorted inspection errors

This commit is contained in:
Jeff Parsons 2016-12-21 17:40:02 -08:00 committed by Jeff Parsons
commit a6a855c4cd
4 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
Shared Sources
===
Shared (ES6) Sources
====================
This folder contains a mix of shared code, with some files used only by Node (server) modules,
some used only by Browser (client) modules, and others used by both.
@ -8,7 +8,7 @@ At the moment, only a few files are completely agnostic; eg: [strlib.js](strlib.
One give-away is that neither contain references to any globals (although references to each other
would be fine).
**netlib.js** is appropriate only for Node modules, because it contains code that relies on Node's
[netlib.js](netlib.js) is appropriate only for Node modules, because it contains code that relies on Node's
global *Buffer* object, as indicated by:
/* global Buffer: false */

View file

@ -1,5 +1,5 @@
Shared (ES6) Sources
===
Shared Sources
==============
This folder contains a mix of shared code, with some files used only by Node (server) modules,
some used only by Browser (client) modules, and others used by both.
@ -8,7 +8,7 @@ At the moment, only a few files are completely agnostic; eg: [strlib.js](strlib.
One give-away is that neither contain references to any globals (although references to each other
would be fine).
**netlib.js** is appropriate only for Node modules, because it contains code that relies on Node's
[netlib.js](netlib.js) is appropriate only for Node modules, because it contains code that relies on Node's
global *Buffer* object, as indicated by:
/* global Buffer: false */

View file

@ -194,8 +194,8 @@ G(this)};h.kd=function(a){if(!this.v){var b=Pd(this.I,"connection");if(b){var c=
h.qa=function(a,b){if(!b)if(this.kd(this.H),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.za=function(a){return a?this.save():!0};h.reset=function(){sh(this)};h.save=function(){var a=new ie(this);a.set(0,[]);return a.data()};h.restore=function(){return sh(this)};function sh(a){a.G=0;a.b=8192;a.g=128;a.j=[];return!0}
h.cc=function(a){if("number"==typeof a)this.j.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.j.push(b)}else this.j=this.j.concat(a);Zc(this.f,this.R,1E3/Math.round(this.S/10));return!0};h.df=function(a){var b=this.b;this.b&=-12289;a&32&&(this.b|=8192);a&256&&(this.b|=4096);b!=this.b&&(this.b|=32768,this.b&32&&Yc(this.f,this.P))};h.xe=function(){var a=this.b&65534;this.b&=-32769;return a};
h.Gf=function(a){var b=a^this.b;this.b=this.b&-112|a&111;this.O&&b&6&&(b=0,b=this.H?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.O.call(this.v,b))};h.we=function(){this.b&=-129;return this.G};h.Ff=function(){};h.cf=function(){return this.g};h.lg=function(a){this.g&128&&(a&64?Yc(this.f,this.L):dd(this.f,this.L));this.g=this.g&-70|a&69};h.bf=function(){return 0};
h.kg=function(a){a&=255;I(this,"transmitByte("+v(a,2,!0)+")");this.M&&this.M.call(this.v,a);a&=127;if(this.i)if(13==a)this.B=0;else if(8==a)this.i.value=this.i.value.slice(0,-1),0<this.B&&this.B--;else{if(a){var b;b=(b=13!=a&&10!=a?wa[a]:null)?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.V||8,c=a-this.B%a,this.V&&(b=ta("",c)));this.U&&!this.B&&c&&(b=String.fromCharCode(this.U)+b);this.i.value+=b;this.i.scrollTop=this.i.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==
a||1024<=this.w.length)this.u(this.w),this.w="";10!=a&&(this.w+=String.fromCharCode(a))}Zc(this.f,this.X,1E3/Math.round(this.aa/10));this.g&=-129};var qh="buffer",th={},rh=(th[65392]=[null,null,ph.prototype.xe,ph.prototype.Gf,"RCSR"],th[65394]=[null,null,ph.prototype.we,ph.prototype.Ff,"RBUF"],th[65396]=[null,null,ph.prototype.cf,ph.prototype.lg,"XCSR"],th[65398]=[null,null,ph.prototype.bf,ph.prototype.kg,"XBUF"],th);
h.kg=function(a){var b=a&255;I(this,"transmitByte("+v(b,2,!0)+")");this.M&&this.M.call(this.v,b);b&=127;if(this.i)if(13==b)this.B=0;else if(8==b)this.i.value=this.i.value.slice(0,-1),0<this.B&&this.B--;else{if(b){a=13!=b&&10!=b?"<"+wa[b]+">":String.fromCharCode(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(b=this.V||8,c=b-this.B%b,this.V&&(a=ta("",c)));this.U&&!this.B&&c&&(a=String.fromCharCode(this.U)+a);this.i.value+=a;this.i.scrollTop=this.i.scrollHeight;this.B+=c}}else if(null!=this.w){if(10==b||
1024<=this.w.length)this.u(this.w),this.w="";10!=b&&(this.w+=String.fromCharCode(b))}Zc(this.f,this.X,1E3/Math.round(this.aa/10));this.g&=-129};var qh="buffer",th={},rh=(th[65392]=[null,null,ph.prototype.xe,ph.prototype.Gf,"RCSR"],th[65394]=[null,null,ph.prototype.we,ph.prototype.Ff,"RBUF"],th[65396]=[null,null,ph.prototype.cf,ph.prototype.lg,"XCSR"],th[65398]=[null,null,ph.prototype.bf,ph.prototype.kg,"XBUF"],th);
Ua(function(){for(var a=D(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=B(c),d=new ph(d);nb(d,c)}});function md(a){A.call(this,"PC11",a);this.M=uh(this,a.autoMount);this.g=0;this.S=a.baudReceive||3600;this.B=this.G=this.b=0;this.w=[];this.v=vh;this.i=wh;this.L=this.j="";this.ba=this.La=this.Ka=null;this.P=-1;this.O=!Ma("Mobi")&&window&&"FileReader"in window;this.H=null;this.R=-1;this.J=null}p(md,A);
function uh(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){y(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=md.prototype;
h.na=function(a,b,c){var d=this,e=wh;switch(b){case "listTapes":return this.C[b]=c,c.onchange=function(){var a=d.C.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){y("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.C[b]=c,!0;case "readTape":e=xh;case "loadTape":return e||(e=yh),this.C[b]=c,c.onclick=
@ -317,11 +317,11 @@ else{var F=E.charAt(1);if("l"==F){var bb;bb=0+Lj(a,a.g);bb+=Lj(a,a.L);(bb+=Lj(a,
F))}}}break;case "c":a.Oa&&(a.Oa.value="");break;case "d":a:{var Bb,Ra=g[0],Fa=g[1],Sa=g[2],Gk=g[3];if("?"==Fa){var Cb="";for(Bb in Hb)a.ka[Bb]&&(Cb&&(Cb+=","),Cb+=Bb);Cb+=",state,symbols";a.u("dump memory commands:");a.u("\tda [a] dump info for address a");a.u("\tdb [a] [n] dump n bytes at address a");a.u("\tdw [a] [n] dump n words at address a");a.u("\tdd [a] [n] dump n dwords at address a");a.u("\tds [a] [n] dump n words at address a as JSON");a.u("\tdh [p] [n] dump n instructions from history position p");
Cb.length&&a.u("dump extension commands:\n\t"+Cb)}else if("state"==Fa){var Ke=hk(a.I,!0);"console"==Sa?console.log(Ke):(a.Oa&&(a.Oa.value=""),Ke&&a.u(Ke))}else if("symbols"==Fa)for(var Le=0;Le<a.B.length;Le++){var Me=a.B[Le],Db;for(Db in Me.da)if("."!=Db.charAt(0)){var bi=Me.da[Db].o;if(void 0!==bi){var ci=Me.da[Db].l;ci&&(Db=ci);a.u(O(a,bi)+" "+Db)}}}else{if("d"==Ra){for(Bb in Hb)if(g[1]==Bb){var di=a.ka[Bb];di?(g.shift(),g.shift(),di(g)):a.u("no dump registered for "+Fa);break a}Fa||(Ra=a.Fa||"dw")}else a.Fa=
Ra;if("dh"==Ra){var ei=Fa,fi=Sa,gi="",hi=0,va=a.R,Ga=a.i;if(Ga.length){var qa=+ei||a.oa,nc=+fi||10;isNaN(qa)?qa=nc:gi="more ";qa>Ga.length&&(a.u("note: only "+Ga.length+" available"),qa=Ga.length);va-=qa;0>va&&(null==Ga[Ga.length-1].K?(qa=va+qa,va=0):va+=Ga.length);var Ne=[];"call"==fi&&(nc=1E5,Ne=["CALL"]);for(void 0!==ei&&a.u(qa+" instructions earlier:");0<nc&&va!=a.R;){var ii=Ga[va++];if(null==ii.K)break;var oc=W(ii.K),Hk=qa--,ji=Nj(a,oc,"history",Hk);(!Ne.length||0<=ji.indexOf(Ne[0]))&&a.u(ji);
oc.zc&&(va+=oc.zc,nc-=oc.zc,qa-=oc.zc);va>=Ga.length&&(va=0);a.oa=qa;hi++;nc--}}hi||(a.u("no "+gi+"history available"),a.oa=void 0)}else{var fa=kj(a,Fa);if(fa)if("da"==Ra){var Oe=fa.Ha||65535<fa.K,K=we(a.f,fa.K,Oe);a.u(ta("",Oe?12:19)+ma(fa.K,Oe?22:17,3)+" "+q(fa.K,8));6>K.length?(2<K.length&&(a.u(" OFFSET: "+ma(K[3],13,3)+" "+q(K[3],8)),a.u("UNIMAP["+na(K[1])+"]: "+ma(K[2],22,3)+" "+q(K[2],8))),a.u(" PHYSICAL: "+ma(K[0],22,3)+" "+q(K[0],8))):(a.u(" OFFSET: "+ma(K[1],
13,3)+" "+q(K[1],8)),a.u("+ "+ik[K[2]]+"PAR"+K[3]+": "+ma(K[4],22,3)+" "+q(K[4],8)),a.u("& MMUMASK: "+ma(K[5],22,3)+" "+q(K[5],8)),a.u("= PHYSICAL: "+ma(K[0],22,3)+" "+q(K[0],8)))}else{var db=0,Pe="ds"==Ra;if(Sa){if("l"==Sa.charAt(0))Sa=Sa.substr(1)||Gk,db=Yi(a,Sa);else{var ki=kj(a,Sa);ki&&(db=ki.K-fa.K)}0>db&&(db=0);65536<db&&(db=65536)}var Jk=a.ua;fa.ua&&(a.ua=fa.ua);for(var eb="dd"==Ra?4:"db"==Ra?1:2,sd=eb*db||128,Qe=Pe?16:a.ua,Kk=(sd+Qe-1)/Qe|0||1,fb="";Kk--&&0<sd;){for(var gb="",Re="",
Fa=nj(a,fa),td=Qe,pc=0,qc=0;0<td&&0<sd;){var Eb=1,ud=1==eb?a.Lc(fa,Eb):a.Na(fa,Eb=2),pc=pc|ud<<(qc<<3),qc=qc+Eb;qc==eb&&(Pe?(gb&&(gb+=","),gb+="0x"+v(pc,2*eb)):(gb+=O(a,pc,eb),gb+=1==eb?9==td?"-":" ":" "),pc=qc=0);td-=Eb;for(sd-=Eb;1==eb&&Eb--;)var Se=ud&255,Re=Re+(32<=Se&&128>Se?String.fromCharCode(Se):"."),ud=ud>>8}fb&&(fb+="\n");fb=Pe?fb+(gb+","):fb+(Fa+": "+gb+(0==td?" "+Re:""))}fb&&a.u(fb);a.Aa=fa;a.ua=Jk}}}}break;case "e":if("else"==g[0])break;var Fb,Te,Ue,Ve,We=g[0],Xe=g[1];"eb"==We?(Fb=
1,Te=255,Ue=a.Lc,Ve=a.Mc):"e"==We||"ew"==We?(Fb=2,Te=65535,Ue=a.Na,Ve=a.wd):Xe=null;if(null==Xe)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 vd=kj(a,Xe);if(vd)for(var wd=2;wd<g.length;wd++){var rc=Wi(a,g[wd]);if(void 0===rc){a.u("unrecognized value: "+g[wd]);break}rc&~Te&&a.u("warning: "+v(rc)+" exceeds "+Fb+"-byte value");a.u("changing "+nj(a,vd)+(H(a,16)?"":" from "+O(a,Ue.call(a,vd),Fb))+" to "+O(a,rc,Fb));Ve.call(a,
vd,rc,Fb)}}break;case "g":a:{var li=g[1],Lk=b;if(void 0!==li){var Ye=kj(a,li,!0);if(!Ye)break a;mj(a,Ye,Lk);a.nb(a.g,Ye,!0)}Dj(a,!0,c)}break;case "h":a.A.T?(c||a.u("halting"),Bj(a)):rb(a,!0)||c||a.u("already halted");break;case "i":if("if"==g[0]){var Ze;var sc=b.substr(2),sc=ua(sc);Wi(a,sc)?(c||a.u("true: "+sc),Ze=!0):(c||a.u("false: "+sc),Ze=!1);Ze||(d=!1);break}f=!0;break;case "k":var Mk=g[0];if("?"==g[1])a.u("stack trace commands:"),a.u("\tk\tshow frame addresses"),a.u("\tks\tshow symbol information");
oc.zc&&(va+=oc.zc,nc-=oc.zc,qa-=oc.zc);va>=Ga.length&&(va=0);a.oa=qa;hi++;nc--}}hi||(a.u("no "+gi+"history available"),a.oa=void 0)}else{var fa=kj(a,Fa);if(fa)if("da"==Ra){var Oe=fa.Ha||65535<fa.K,K=we(a.f,fa.K||0,Oe);a.u(ta("",Oe?12:19)+ma(fa.K,Oe?22:17,3)+" "+q(fa.K,8));6>K.length?(2<K.length&&(a.u(" OFFSET: "+ma(K[3],13,3)+" "+q(K[3],8)),a.u("UNIMAP["+na(K[1])+"]: "+ma(K[2],22,3)+" "+q(K[2],8))),a.u(" PHYSICAL: "+ma(K[0],22,3)+" "+q(K[0],8))):(a.u(" OFFSET: "+
ma(K[1],13,3)+" "+q(K[1],8)),a.u("+ "+ik[K[2]]+"PAR"+K[3]+": "+ma(K[4],22,3)+" "+q(K[4],8)),a.u("& MMUMASK: "+ma(K[5],22,3)+" "+q(K[5],8)),a.u("= PHYSICAL: "+ma(K[0],22,3)+" "+q(K[0],8)))}else{var db=0,Pe="ds"==Ra;if(Sa){if("l"==Sa.charAt(0))Sa=Sa.substr(1)||Gk,db=Yi(a,Sa);else{var ki=kj(a,Sa);ki&&(db=ki.K-fa.K)}0>db&&(db=0);65536<db&&(db=65536)}var Jk=a.ua;fa.ua&&(a.ua=fa.ua);for(var eb="dd"==Ra?4:"db"==Ra?1:2,sd=eb*db||128,Qe=Pe?16:a.ua,Kk=(sd+Qe-1)/Qe|0||1,fb="";Kk--&&0<sd;){for(var gb=
"",Re="",Fa=nj(a,fa),td=Qe,pc=0,qc=0;0<td&&0<sd;){var Eb=1,ud=1==eb?a.Lc(fa,Eb):a.Na(fa,Eb=2),pc=pc|ud<<(qc<<3),qc=qc+Eb;qc==eb&&(Pe?(gb&&(gb+=","),gb+="0x"+v(pc,2*eb)):(gb+=O(a,pc,eb),gb+=1==eb?9==td?"-":" ":" "),pc=qc=0);td-=Eb;for(sd-=Eb;1==eb&&Eb--;)var Se=ud&255,Re=Re+(32<=Se&&128>Se?String.fromCharCode(Se):"."),ud=ud>>8}fb&&(fb+="\n");fb=Pe?fb+(gb+","):fb+(Fa+": "+gb+(0==td?" "+Re:""))}fb&&a.u(fb);a.Aa=fa;a.ua=Jk}}}}break;case "e":if("else"==g[0])break;var Fb,Te,Ue,Ve,We=g[0],Xe=g[1];"eb"==
We?(Fb=1,Te=255,Ue=a.Lc,Ve=a.Mc):"e"==We||"ew"==We?(Fb=2,Te=65535,Ue=a.Na,Ve=a.wd):Xe=null;if(null==Xe)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 vd=kj(a,Xe);if(vd)for(var wd=2;wd<g.length;wd++){var rc=Wi(a,g[wd]);if(void 0===rc){a.u("unrecognized value: "+g[wd]);break}rc&~Te&&a.u("warning: "+v(rc)+" exceeds "+Fb+"-byte value");a.u("changing "+nj(a,vd)+(H(a,16)?"":" from "+O(a,Ue.call(a,vd),Fb))+" to "+O(a,rc,
Fb));Ve.call(a,vd,rc,Fb)}}break;case "g":a:{var li=g[1],Lk=b;if(void 0!==li){var Ye=kj(a,li,!0);if(!Ye)break a;mj(a,Ye,Lk);a.nb(a.g,Ye,!0)}Dj(a,!0,c)}break;case "h":a.A.T?(c||a.u("halting"),Bj(a)):rb(a,!0)||c||a.u("already halted");break;case "i":if("if"==g[0]){var Ze;var sc=b.substr(2),sc=ua(sc);Wi(a,sc)?(c||a.u("true: "+sc),Ze=!0):(c||a.u("false: "+sc),Ze=!1);Ze||(d=!1);break}f=!0;break;case "k":var Mk=g[0];if("?"==g[1])a.u("stack trace commands:"),a.u("\tk\tshow frame addresses"),a.u("\tks\tshow symbol information");
else{var $e=0,af=W(),tc=W(a.f.g[6]);for(a.u("stack trace for "+nj(a,tc));10>$e;){for(var hb=null,Nk=256;65536>tc.K>>>0;){af.K=a.Na(tc,2);if(null==tc.K||!Nk--)break;if(!(af.K&1)){for(var Ok=a,xd=af,mi=null,uc=xd.K,ni=uc,bf=1;6>=bf&&uc;bf++){if(2<bf){xd.K=uc;var yd=Nj(Ok,xd);if(0<=yd.indexOf("JSR")){var oi=yd.indexOf(" ");if(uc+(yd.indexOf(" ",oi+1)-oi-1)/2==ni){mi=yd;break}}}uc-=2}xd.K=ni;if(hb=mi)break}}if(!hb||null==hb)break;var pi=null;if("ks"==Mk){var qi=hb.match(/[0-9A-F]+$/);qi&&(pi=ek(a,qi[0]))}hb=
ta(hb,50)+" ;"+(pi||"stack="+nj(a,tc));a.u(hb);$e++}$e||a.u("no return addresses found")}break;case "l":if("ln"==g[0]){ek(a,g[1],!0);break}f=!0;break;case "m":a:{var Ha,Ia=null,M=g[1];"?"==M&&(M=void 0);if(void 0!==M){var Ta=0;if("all"==M)Ta=1879046143,M=null;else if("on"==M)Ia=!0,M=null;else if("off"==M)Ia=!1,M=null;else{"keys"==M&&(M="key");"kbd"==M&&(M="keyboard");for(Ha in Hb)if(M==Ha){Ta=Hb[Ha];Ia=!!(a.fa&Ta);break}if(!Ta){a.u("unknown message category: "+M);break a}}if(Ta)if("on"==g[2])a.fa|=
Ta,Ia=!0;else if("off"==g[2]&&(a.fa&=~Ta,Ia=!1,1073741824==Ta)){for(var ri=1E3<=a.M.length?a.M.length-1E3:0;ri<a.M.length;)a.u(a.M[ri++]);a.M=[]}}var Pk=0,vc="";for(Ha in Hb)if(!M||M==Ha){var Qk=!!(a.fa&Hb[Ha]);if(null===Ia||Ia==Qk)vc&&(vc+=","),++Pk%10||(vc+="\n\t"),"key"==Ha&&(Ha="keys"),vc+=Ha}void 0===M&&a.u("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.u((null!==Ia?Ia?"messages on: ":"messages off: ":"message categories:\n\t")+(vc||"none"));dj(a)}break;case "p":if("print"==

View file

@ -178,8 +178,8 @@ h.Bc=function(a){if(!this.h){var b=Bc(this.A,"connection");if(b){var c=b.split("
h.Y=function(a,b){if(!b)if(this.Bc(this.u),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){pf(this)};h.save=function(){var a=new R(this);a.set(0,[]);return a.data()};h.restore=function(){return pf(this)};function pf(a){a.o=0;a.a=8192;a.b=128;a.g=[];return!0}
h.Gb=function(a){if("number"==typeof a)this.g.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d<a.length;d++){c=b;b=a.charCodeAt(d);if(10==b){if(13==c)continue;b=13}this.g.push(b)}else this.g=this.g.concat(a);bc(this.c,this.H,1E3/Math.round(this.I/10));return!0};h.xe=function(a){var b=this.a;this.a&=-12289;a&32&&(this.a|=8192);a&256&&(this.a|=4096);b!=this.a&&(this.a|=32768,this.a&32&&M(this.c,this.G))};h.Sd=function(){var a=this.a&65534;this.a&=-32769;return a};
h.$e=function(a){var b=a^this.a;this.a=this.a&-112|a&111;this.F&&b&6&&(b=0,b=this.u?b|(a&4?32:0)|(a&2?320:0):b|(a&4?16:0)|(a&2?1048576:0),this.F.call(this.h,b))};h.Rd=function(){this.a&=-129;return this.o};h.Ze=function(){};h.we=function(){return this.b};h.Gf=function(a){if(this.b&128)if(a&64)M(this.c,this.w);else{var b=this.w;b&&ec(this.c,b)}this.b=this.b&-70|a&69};h.ve=function(){return 0};
h.Ff=function(a){a&=255;this.C&&this.C.call(this.h,a);a&=127;if(this.f)if(13==a)this.m=0;else if(8==a)this.f.value=this.f.value.slice(0,-1),0<this.m&&this.m--;else{if(a){var b;b=(b=13!=a&&10!=a?pa[a]:null)?"<"+b+">":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.M||8,c=a-this.m%a,this.M&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.m+=c}}else if(null!=
this.i){if(10==a||1024<=this.i.length)this.U(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}bc(this.c,this.W,1E3/Math.round(this.da/10));this.b&=-129};var nf="buffer",qf={},of=(qf[65392]=[null,null,Z.prototype.Sd,Z.prototype.$e,"RCSR"],qf[65394]=[null,null,Z.prototype.Rd,Z.prototype.Ze,"RBUF"],qf[65396]=[null,null,Z.prototype.we,Z.prototype.Gf,"XCSR"],qf[65398]=[null,null,Z.prototype.ve,Z.prototype.Ff,"XBUF"],qf);
h.Ff=function(a){var b=a&255;this.C&&this.C.call(this.h,b);b&=127;if(this.f)if(13==b)this.m=0;else if(8==b)this.f.value=this.f.value.slice(0,-1),0<this.m&&this.m--;else{if(b){a=13!=b&&10!=b?"<"+pa[b]+">":String.fromCharCode(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(b=this.M||8,c=b-this.m%b,this.M&&(a=" ".slice(0,c)));this.K&&!this.m&&c&&(a=String.fromCharCode(this.K)+a);this.f.value+=a;this.f.scrollTop=this.f.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==
b||1024<=this.i.length)this.U(this.i),this.i="";10!=b&&(this.i+=String.fromCharCode(b))}bc(this.c,this.W,1E3/Math.round(this.da/10));this.b&=-129};var nf="buffer",qf={},of=(qf[65392]=[null,null,Z.prototype.Sd,Z.prototype.$e,"RCSR"],qf[65394]=[null,null,Z.prototype.Rd,Z.prototype.Ze,"RBUF"],qf[65396]=[null,null,Z.prototype.we,Z.prototype.Gf,"XCSR"],qf[65398]=[null,null,Z.prototype.ve,Z.prototype.Ff,"XBUF"],qf);
Ea(function(){for(var a=F(document,"pdp11","serial"),b=0;b<a.length;b++){var c=a[b],d=D(c),d=new Z(d);E(d,c)}});function jc(a){A.call(this,"PC11",a);this.C=rf(this,a.autoMount);this.b=0;this.I=a.baudReceive||3600;this.m=this.o=this.a=0;this.i=[];this.h=sf;this.f=tf;this.w=this.g="";this.N=this.ja=this.ia=null;this.G=-1;this.F=!Ba("Mobi")&&window&&"FileReader"in window;this.u=null;this.H=-1;this.v=null}n(jc,A);
function rf(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){z(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=jc.prototype;
h.aa=function(a,b,c){var d=this,e=tf;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){z("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b='<a href="'+e+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "readTape":e=uf;case "loadTape":return e||(e=vf),this.j[b]=c,c.onclick=