Minor annotation and name changes; the PDP11 emulator "branded" as PDP11js now, since PDP11 is too generic

This commit is contained in:
Jeff Parsons 2016-09-06 10:06:08 -07:00
commit 483d247491
13 changed files with 137 additions and 135 deletions

View file

@ -806,8 +806,8 @@ Ma.exit.push(function(){for(var a=pb(document,"pcx86","computer"),b=0;b<a.length
lf.prototype={constructor:lf,value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.A=!0):this.A?!0:Ea()&&(a=Fa(this.key))?(this[this.id]=a,this.A=!0):!1},toString:function(){var a=this[this.id];return"string"==typeof a?a:JSON.stringify(a)},clear:function(a){Yr(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==
this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}}};function Yr(a,b){a[a.id]={};b&&N(a,"parms",b);a.A=!1}function Zr(a){var b=!0;if(Ea()){var c=JSON.stringify(a[a.id]);Ga(a.key,c)||(w("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function Vr(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){w(c.message||c),b=!1}return b}function Wr(a,b){return a[a.id][b]||null}function N(a,b,c){try{a[a.id][b]=c}catch(d){}}var ds=0;
function es(a,b,c,d,e,f){e("Loading "+a+"...");xa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):fs(h,a,b,c,d,e,f)})}
function fs(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{if(c){hb(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<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+h+'"}';"object"==typeof resources&&(h=null);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));
h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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<a.length?a.substr(0,255)+"...":a);g(a,h)}}a?e?rs(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function fs(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{if(c){hb(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<d.length&&(d+=",")):d='{state:"'+d+'",':d="{";d+='url:"'+h+'"}';"object"==typeof resources&&(h=null);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(h?' url="'+h+'"':""))}e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,"$1PCx86$2"),
a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\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<a.length?a.substr(0,255)+"...":a);g(a,h)}}a?e?rs(a,f,h):h(a,null):g("no data"+(b?" for file: "+b:""),null)}
function rs(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/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||