diff --git a/modules/shared/es6/README.md b/modules/shared/es6/README.md index 5fdee8d8a..c01780b84 100644 --- a/modules/shared/es6/README.md +++ b/modules/shared/es6/README.md @@ -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 */ diff --git a/modules/shared/lib/README.md b/modules/shared/lib/README.md index 4a678495d..045f2377e 100644 --- a/modules/shared/lib/README.md +++ b/modules/shared/lib/README.md @@ -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 */ diff --git a/versions/pdpjs/1.31.0/pdp11-dbg.js b/versions/pdpjs/1.31.0/pdp11-dbg.js index 1b37de24b..72c840c19 100644 --- a/versions/pdpjs/1.31.0/pdp11-dbg.js +++ b/versions/pdpjs/1.31.0/pdp11-dbg.js @@ -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":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":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'+b+"");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;LeGa.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=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||65535K.length?(2db&&(db=0);65536Se?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=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||65535K.length?(2db&&(db=0);65536Se?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$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":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":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'+b+"");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=