Started work on v1.35.1
This commit is contained in:
parent
b954bed327
commit
6fd2a3bcb6
324 changed files with 190808 additions and 282 deletions
|
|
@ -14,11 +14,11 @@
|
|||
<xsl:variable name="CSSCLASS">pcjs</xsl:variable>
|
||||
<xsl:variable name="APPCLASS">pcx86</xsl:variable>
|
||||
<xsl:variable name="APPNAME">PCx86</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.35.0</xsl:variable>
|
||||
<xsl:variable name="APPVERSION">1.35.1</xsl:variable>
|
||||
<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
|
||||
|
||||
<xsl:template name="componentStyles">
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.35.0/components.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/versions/pcx86/1.35.1/components.css"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="componentScripts">
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ a.P("no return addresses found")}break;case "l":if("ln"==g[0]){fB(a,g[1],!0);bre
|
|||
fb)Ae=1610481663,fb=null;else if("on"==fb)nd=!0,fb=null;else if("off"==fb)nd=!1,fb=null;else{"keys"==fb&&(fb="key");"kbd"==fb&&(fb="keyboard");for(md in Rb)if(fb==md){Ae=Rb[md];nd=!!(a.ic&Ae);break}if(!Ae){a.P("unknown message category: "+fb);break a}}Ae&&("on"==g[2]?(a.ic|=Ae,nd=!0):"off"==g[2]&&(a.ic&=~Ae,nd=!1))}var jC=0,$g="";for(md in Rb)if(!fb||fb==md){var kC=!!(a.ic&Rb[md]);if(null===nd||nd==kC)$g&&($g+=","),++jC%10||($g+="\n\t"),"key"==md&&(md="keys"),$g+=md}void 0===fb&&a.P("message commands:\n\tm [category] [on|off]\tturn categories on/off");
|
||||
a.P((null!==nd?nd?"messages on: ":"messages off: ":"message categories:\n\t")+($g||"none"));my(a)}break;case "o":var Dm=g[1],lC=g[2];if(Dm&&"?"!=Dm){var Em=$x(a,Dm,"port #"),Fm=$x(a,lC);void 0!==Em&&void 0!==Fm&&(Sc(a.ka,Em,1,Fm),a.P(sa(Em)+": "+r(Fm)))}else a.P("output commands:"),a.P("\to [p] [b]\twrite byte [b] to port [p]"),a.P("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){iB(a,b.substr(5));break}var St="pr"==g[0]?1:0,tf=1+St;if(a.K)a.P("step in progress");
|
||||
else{var ej,Tt=!1,Hb=ky(a,A(a.H),a.H.Z.U);do switch(ej=!1,a.Ia(Hb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:Ny(a,Hb,1);ej=!0;break;case 204:case 206:a.K=tf;Ny(a,Hb,1);break;case 205:case 224:case 225:case 226:a.K=tf;Ny(a,Hb,Hb.Hb?4:2);break;case 232:a.K=tf;Ny(a,Hb,Hb.Hb?5:3);break;case 154:a.K=tf;Ny(a,Hb,Hb.Hb?7:5);break;case 255:var Ut=a.jb(Hb)&14591;if(4351==Ut||6399==Ut)a.K=tf,$z(a,Hb);break;case 243:case 242:Ny(a,Hb,1);Tt=ej=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:Tt&&
|
||||
(a.K=tf,Ny(a,Hb,1))}while(ej);a.K?(a.Hd(a.C,Hb,!0),Qz(a)||(a.pa&&a.pa.md(),a.K=0)):kB(a,St?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();break}Sz(a,g);break;case "t":kB(a,g[0],g[1]);break;case "u":Tz(a,g[1],g[2],8);break;case "v":if("var"==g[0]){eB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.35.0 ("+a.H.ca+",RELEASE,NOPREFETCH"+(Nb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Ma());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ah;void 0!==g[3]&&(ah=+g[3]);
|
||||
(a.K=tf,Ny(a,Hb,1))}while(ej);a.K?(a.Hd(a.C,Hb,!0),Qz(a)||(a.pa&&a.pa.md(),a.K=0)):kB(a,St?"tr":"t")}break;case "r":if("reset"==b){a.pa&&a.pa.reset();break}Sz(a,g);break;case "t":kB(a,g[0],g[1]);break;case "u":Tz(a,g[1],g[2],8);break;case "v":if("var"==g[0]){eB(a,b.substr(3))||(d=!1);break}a.P("PCx86 version 1.35.1 ("+a.H.ca+",RELEASE,NOPREFETCH"+(Nb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.P(Ma());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var ah;void 0!==g[3]&&(ah=+g[3]);
|
||||
switch(g[2]){case "int":a.H.T.Te=ah;break;case "start":a.H.T.xf=ah;break;case "stop":a.H.T.Ve=ah;break;default:a.P("unknown cs option");break a}void 0!==ah&&Ad(a.H);a.P("checksums "+(a.H.ea.Ie?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(Ed(a.H,+g[2])||a.P("warning: using 1x multiplier, previous target not reached"));a.P("target speed: "+(a.H.T.pe.toFixed(2)+"Mhz")+" ("+a.H.T.Ld+"x)");break;default:a.P("unknown option: "+g[1])}else a.P("execution options:"),a.P("\tcs int #\tset checksum cycle interval to #"),
|
||||
a.P("\tcs start #\tset checksum cycle start count to #"),a.P("\tcs stop #\tset checksum cycle stop count to #"),a.P("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){iB(a,b.substr(1));break}var Gm="commands:",Hm;for(Hm in mB)Gm+="\n"+Aa(Hm,7)+mB[Hm];Ig(a)||(Gm+="\nnote: frequency/history disabled if no exec breakpoints");a.P(Gm);break;default:a.P("unknown command: "+b),d=!1}}}catch(Wt){a.P("debugger error: "+(Wt.stack||Wt.message)),d=!1}return d}
|
||||
function oy(a,b,c){b=a.Dg(b,c);for(var d in b)if(!Zz(a,b[+d]))return!1;return!0}
|
||||
|
|
@ -854,23 +854,23 @@ qy,[119,R|S|X,oB|4096]],[[155,R|V|4096,W|V|4096],qy,[98,R|V|X],[96,R|V|X],[95,R|
|
|||
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Ay={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
|
||||
TASK_IOPM:100};$a(function(){for(var a=zb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=vb(c),d=new jy(d);yb(d,c)}});
|
||||
function EB(a,b,c){mb.call(this,"Computer",a,67108864);this.ea.Yb=!1;FB(this,b);this.N=yd(this,"autoPower",a);this.B=0;this.aa=a.busWidth||a.buswidth;this.A=GB;this.L=null;this.I=this.Z=!1;this.da=yd(this,"url")||"";this.ha=(Math.random()+.1).toString(36).substr(2,12);this.C=HB(this);if(this.H=ub("CPU",this.id)){this.ba=ub("Debugger",this.id);this.G=[];for(b=null;b=Wb(this,"Video",b);)this.G.push(b);this.ka=new lc({id:this.ye+".bus",busWidth:this.aa},this.H,this.ba);var d,e=sb(this.id);if((this.D=
|
||||
ub("Panel",this.id))&&this.D.Je)for(b=0;b<e.length;b++)d=e[b],d.Ea=this.D.Ea,d.P=this.D.P,d.Je=this.D.Je;this.P("PCx86 v1.35.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.uc&&d.uc(this,this.ka,this.H,this.ba);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.K=d:this.A=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.W=a,f||(this.I=!0,this.A=GB),this.A&&(this.M=new Wf(this,
|
||||
"1.35.0"),this.M.load()?b=null:delete this.M);!b&&this.A&&(b=IB(this))&&(this.I=!0);if(b){var g=this;Ka(b,null,!0,function(a,b,c){c?(g.K=null,g.I=!1,g.Ea("Unable to load machine state from server (error "+c+(b?": "+Ba(b):"")+")")):(g.L=b,g.Z=!0);Ib(g)})}else Ib(this);this.na.power||(this.N=!0);!c&&this.N&&JB(this,this.Mf)}else gb("Unable to find CPU component")}ba(EB,mb);
|
||||
ub("Panel",this.id))&&this.D.Je)for(b=0;b<e.length;b++)d=e[b],d.Ea=this.D.Ea,d.P=this.D.P,d.Je=this.D.Je;this.P("PCx86 v1.35.1\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.uc&&d.uc(this,this.ka,this.H,this.ba);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.K=d:this.A=parseInt(d,10));var f;if(a=yd(this,"state")||(f=!0,a.state))b=this.W=a,f||(this.I=!0,this.A=GB),this.A&&(this.M=new Wf(this,
|
||||
"1.35.1"),this.M.load()?b=null:delete this.M);!b&&this.A&&(b=IB(this))&&(this.I=!0);if(b){var g=this;Ka(b,null,!0,function(a,b,c){c?(g.K=null,g.I=!1,g.Ea("Unable to load machine state from server (error "+c+(b?": "+Ba(b):"")+")")):(g.L=b,g.Z=!0);Ib(g)})}else Ib(this);this.na.power||(this.N=!0);!c&&this.N&&JB(this,this.Mf)}else gb("Unable to find CPU component")}ba(EB,mb);
|
||||
function FB(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){gb(d.message+" ("+c+")")}}a.J=b}function yd(a,b,c){var d=b.toLowerCase(),d=Ua(b)||Ua(d);void 0===d&&a.J&&(d=a.J[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function JB(a,b,c){for(var d=sb(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!Gb(f)){Gb(f,function(){JB(a,b,c)});return}}b.call(a,c)}
|
||||
function KB(a,b){var c=new Wf(a,"1.35.0",LB);if(c.load()&&MB(c)){var d=c.get(NB),e=b?b.get(NB):"unknown";d!=e&&(a.Ea("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=EB.prototype;
|
||||
l.Mf=function(a){void 0===a&&(a=this.A||(this.L?OB:GB));if(!this.B){this.B++;var b=!1,c=!1;this.Y=!1;var d=this.M||new Wf(this,"1.35.0");if(a==PB)b=!0;else if(a>GB){if(d.load(this.L)){this.F=new Wf(this,"1.35.0",QB);this.F.load()&&(RB(this,d),a=SB,TB(this.F));this.F.set(NB,Ea());UB(this.F);var e=this.A&&!this.I;if(a==OB||qb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=MB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
function KB(a,b){var c=new Wf(a,"1.35.1",LB);if(c.load()&&MB(c)){var d=c.get(NB),e=b?b.get(NB):"unknown";d!=e&&(a.Ea("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}l=EB.prototype;
|
||||
l.Mf=function(a){void 0===a&&(a=this.A||(this.L?OB:GB));if(!this.B){this.B++;var b=!1,c=!1;this.Y=!1;var d=this.M||new Wf(this,"1.35.1");if(a==PB)b=!0;else if(a>GB){if(d.load(this.L)){this.F=new Wf(this,"1.35.1",QB);this.F.load()&&(RB(this,d),a=SB,TB(this.F));this.F.set(NB,Ea());UB(this.F);var e=this.A&&!this.I;if(a==OB||qb("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=MB(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.Ea("Error: "+g),"unable to verify user"==g&&(Ra(VB,""),this.C=null)):this.P(f+": "+g),TB(d),d.load()?(c=MB(d),e=!0):c=!1))}e&&KB(this,c?d:null)}else a==SB&&d.clear()}else KB(this);delete this.L;delete this.M}e=sb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.H&&(c=WB(this,g,d,b,c));b=[d,a,c];a!=PB?JB(this,this.nj,b):this.nj(b)}};
|
||||
function WB(a,b,c,d,e){if(!b.ea.Yb){b.ea.Yb=!0;if(b.Xb){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Xb(f,d)&&f&&(gb("Unable to restore state for "+b.type),a.W&&!a.Z?(c.clear(),a.A=GB,window&&window.location.reload()):a.Y=!0,b.Xb(null),e=!1)}if(!d&&b.yj)for(a=b.yj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
l.nj=function(a){var b=a[0],c=0>a[1];a=a[2];this.ga=!0;this.ea.Yb=!0;var d=this.na.power;d&&(d.textContent="Shutdown");this.H&&(WB(this,this.H,b,c,a),this.H.mf());this.Y&&(RB(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.B=0};
|
||||
function RB(a,b){if(qb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.C||"";b=b.toString();var d={app:"PCx86",ver:"1.35.0"};d.url=a.da;d.user=c;d.type="bug";d.data=b;Ka("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function lB(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new Wf(a,"1.35.0"),g=new Wf(a,"1.35.0",LB),h=Ea();g.set(NB,h);f.set(NB,h);f.set(XB,"1.35.0");f.set(YB,window?window.location.href:null);f.set(ZB,Ma());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=sb(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Yb&&(m.Wb&&(d=m.Wb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ea.Yb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.C&&$B(a,
|
||||
function RB(a,b){if(qb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.C||"";b=b.toString();var d={app:"PCx86",ver:"1.35.1"};d.url=a.da;d.user=c;d.type="bug";d.data=b;Ka("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function lB(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new Wf(a,"1.35.1"),g=new Wf(a,"1.35.1",LB),h=Ea();g.set(NB,h);f.set(NB,h);f.set(XB,"1.35.1");f.set(YB,window?window.location.href:null);f.set(ZB,Ma());a.H&&a.H.Wb&&(c&&a.H.Jb(),d=a.H.Wb(b,c),"object"===typeof d&&f.set(a.H.id,d),c&&(a.H.ea.Yb=!1,!1===d&&(e=null)));for(var h=sb(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Yb&&(m.Wb&&(d=m.Wb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ea.Yb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.C&&$B(a,
|
||||
a.C,f.toString()),UB(g)&&UB(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==aC),d&&f.clear(h)):e=f.toString());c&&(a.ea.Yb=!1,b=a.na.power)&&(b.textContent="Power");a.B=0;return e}l.reset=function(){this.ka&&this.ka.reset&&(Lb(this,"Resetting "+this.ka.type),this.ka.reset());for(var a=sb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ka&&c.reset&&(Lb(this,"Resetting "+c.type),c.reset())}};
|
||||
l.start=function(a,b){for(var c=sb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};l.stop=function(a,b){for(var c=sb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
l.Cb=function(a,b,c){var d=this;switch(b){case "power":return this.na[b]=c,c.onclick=function(){d.B||(d.ea.Yb?lB(d,!1,!0):JB(d,d.Mf))},!0;case "reset":return this.na[b]=c,c.onclick=function(){if(d.ea.Yb&&!d.B)if(d.A&&!d.K){var a=qb("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");lB(d,a,!0);!a&&d.W?window&&window.location.reload():(a||(d.O=!0),d.Mf(GB),d.O=!1)}else d.reset(),d.H&&d.H.mf()},!0;case "save":if(wa(La(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.na[b]=c,c.onclick=function(){var a=HB(d,!0);if(a){var b=!!(d.A&&!d.K||d.W),c=lB(d,b);b?$B(d,a,c):d.Ea("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function HB(a,b){var c=a.C;c||((c=Pa(VB),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=mC(a,c))||a.Ea("The user ID is invalid.")):b&&a.Ea("Browser local storage is not available"));return c}
|
||||
function mC(a,b){a.C=null;b=Ka(La()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ra(VB,b.data),a.C=b.data)}catch(d){gb(d.message+" ("+c+")")}return a.C}function IB(a){var b=null;a.C&&(b=La()+"/api/v1/user?req=load&user="+a.C+"&state="+nC(a,"1.35.0"));return b}
|
||||
function $B(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=nC(a,"1.35.0");d.data=c;b=Ka(La()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Ea("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Ea(c),Ra(VB,""),a.C=null)}}
|
||||
function mC(a,b){a.C=null;b=Ka(La()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ra(VB,b.data),a.C=b.data)}catch(d){gb(d.message+" ("+c+")")}return a.C}function IB(a){var b=null;a.C&&(b=La()+"/api/v1/user?req=load&user="+a.C+"&state="+nC(a,"1.35.1"));return b}
|
||||
function $B(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=nC(a,"1.35.1");d.data=c;b=Ka(La()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Ea("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Ea(c),Ra(VB,""),a.C=null)}}
|
||||
function Wb(a,b,c){a=sb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.md=function(a){if(this.G.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.G[0];d.D&&d.D.focus();!a&&window&&window.scrollTo(b,c)}};
|
||||
function Md(a,b){a.H&&(a=a.H,a.uj&&(b||!a.ea.vb||a.ea.lj)&&(Hg(a,"EAX",a.D),Hg(a,"EBX",a.G),Hg(a,"ECX",a.I),Hg(a,"EDX",a.L),Hg(a,"ESP",z(a)),Hg(a,"EBP",a.M),Hg(a,"ESI",a.K),Hg(a,"EDI",a.J),Hg(a,"CS",a.Z.U),Hg(a,"DS",a.Ca.U),Hg(a,"SS",a.Y.U),Hg(a,"ES",a.oa.U),Hg(a,"EIP",A(a)),b=qe(a),Hg(a,"PS",b),Hg(a,"V",b&2048),Hg(a,"D",b&1024),Hg(a,"I",b&512),Hg(a,"T",b&256),Hg(a,"S",b&128),Hg(a,"Z",b&64),Hg(a,"A",b&16),Hg(a,"P",b&4),Hg(a,"C",b&1),80386==a.ca&&(Hg(a,"FS",a.Ga.U),Hg(a,"GS",a.Ha.U),Hg(a,"CR0",a.qa),
|
||||
Hg(a,"CR2",a.Dd),Hg(a,"CR3",a.Wc))),b=a.na.speed)&&(b.textContent=a.ea.vb&&a.T.Xd?a.T.Xd.toFixed(2)+"Mhz":"Stopped")}
|
||||
|
|
@ -887,10 +887,10 @@ a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2")
|
|||
function rC(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ka(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],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[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);rC(a,b,c)}})}else c(a,null)}
|
||||
function sC(a,b,c,d){function e(a){if(void 0===h){var b=g&&zb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=xa(a))}function f(a){e("Error: "+a);k&&(--oC||hb(!0));k=!1}var g,h,k=!0;oC++;pb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));p.appendChild(v)}c||
|
||||
(c="/versions/pcx86/1.35.0/components.xsl");m=function(d,h){h?pC(c,null,null,!1,e,function(d,k){k?(ob(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--oC||hb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--oC||hb(!0)):f("invalid machine element: "+
|
||||
(c="/versions/pcx86/1.35.1/components.xsl");m=function(d,h){h?pC(c,null,null,!1,e,function(d,k){k?(ob(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--oC||hb(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--oC||hb(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?pC(b,a,d,!0,e,m):qC(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function tC(a,b,c,d){hb(!1);return sC(a,b,c,d)}window.embedPC=tC;window.embedPCx86=tC;window.findMachineComponent=function(a,b){return ub(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!Bb[a]){for(var c=!0,d=Bb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p<f;p++){var v=b[p];if('"'==v||"'"==v)m&&v!=m?k+=v:(m?m=null:m=v,k&&(h.push(k),k=""));else{if(!m){if("\r"==v||"\n"==v)v=";";if(" "==v||"\t"==v||";"==v){k&&(h.push(k),k="");";"==v&&h.length&&(g.push(h),h=[]);continue}}k+=v}}k&&h.push(k);h.length&&g.push(h);d[e]=g;Ab(a)||(c=!1)}return c};window.enableEvents=hb;window.sendEvent=kb;
|
||||
function uC(a,b,c,d){if(!c&&b){d.push(b);a=pb[d[0]];b=null;for(var e in a)if(wa(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ka(b,null,!0,function(a,b){vC(b,d)}):vC(null,d)}else gb("Error ("+c+") requesting "+a)}
|
||||
function vC(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=pb[f],k={},m;for(m in h){var p=h[m],v=va(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=v.exec(h[m]);){var u=d[2];u&&(h[u]||(p=p.replace(d[0],"")))}d=m=ta(m)}else"xsl"==v&&(e=m=ta(m));k[m]=p}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Wa(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",gb(a)):gb("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=lB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Pk:g}))return!0;Ka(b,null,!0,function(c,d,e){uC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.0/pcx86-dbg.map
|
||||
window.savePC=function(a,b,c){var d=ub("Computer",a),e=ub("Debugger",a);if(d){var f=lB(d,!0),g=d.J?JSON.stringify(d.J):null;b||(b="/versions/pcx86/1.35.1/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Pk:g}))return!0;Ka(b,null,!0,function(c,d,e){uC(c,d,e,[a,ta(b,!0),g,f])});return!0}gb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.1/pcx86-dbg.map
|
||||
|
|
|
|||
|
|
@ -657,23 +657,23 @@ var Dt="Hard Drive",Gt=["XTC","ATC","COMPAQ"],Et=[{0:[306,2],1:[375,8],2:[306,6]
|
|||
112,gu=144,nu=145,hu=240,ou=2,bu=4,uu=0,vu=2,yu=0,zu=1,qu=3,Au=5,Bu=8,Du=10,Ot=12,Fu=15,wu=224,xu=228,Ct=0,su=4,Hu=20,Bt=0,Pt=1,It=2,Mt=4,Nt=8,Ht=32,tt={800:Z.prototype.Fl,801:Z.prototype.Gl,802:Z.prototype.El},st={496:Z.prototype.ek,497:Z.prototype.Mk,498:Z.prototype.Ok,499:Z.prototype.Pk,500:Z.prototype.Kk,501:Z.prototype.Jk,502:Z.prototype.Lk,503:Z.prototype.Qk},vt={800:Z.prototype.Vm,801:Z.prototype.Ym,802:Z.prototype.Xm,803:Z.prototype.Wm,807:Z.prototype.mh,811:Z.prototype.mh,815:Z.prototype.mh},
|
||||
ut={496:Z.prototype.fm,497:Z.prototype.km,498:Z.prototype.im,499:Z.prototype.jm,500:Z.prototype.em,501:Z.prototype.dm,502:Z.prototype.gm,503:Z.prototype.cm,1014:Z.prototype.hm};Ma(function(){for(var a=eb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=bb(c),d=new Z(d);db(d,c)}});
|
||||
function Ju(a,b,c){t.call(this,"Computer",a);this.ca.Pb=!1;Ku(this,b);this.M=Mc(this,"autoPower",a);this.C=0;this.Z=a.busWidth||a.buswidth;this.A=Lu;this.K=null;this.H=this.X=!1;this.ba=Mc(this,"url")||"";this.ga=(Math.random()+.1).toString(36).substr(2,12);this.B=Mu(this);if(this.U=ab("CPU",this.id)){this.Ea=ab("Debugger",this.id);this.G=[];for(b=null;b=vb(this,"Video",b);)this.G.push(b);this.ma=new Nb({id:this.Wd+".bus",busWidth:this.Z},this.U,this.Ea);var d,e=Ya(this.id);if((this.D=ab("Panel",
|
||||
this.id))&&this.D.Df)for(b=0;b<e.length;b++)d=e[b],d.xa=this.D.xa,d.Zb=this.D.Zb,d.Df=this.D.Df;this.Zb("PCx86 v1.35.0\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.ic&&d.ic(this,this.ma,this.U,this.Ea);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.J=d:this.A=parseInt(d,10));var f;if(a=Mc(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.H=!0,this.A=Lu),this.A&&(this.L=new Qe(this,"1.35.0"),
|
||||
this.id))&&this.D.Df)for(b=0;b<e.length;b++)d=e[b],d.xa=this.D.xa,d.Zb=this.D.Zb,d.Df=this.D.Df;this.Zb("PCx86 v1.35.1\nCopyright \u00a9 2012-2017 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");for(b=0;b<e.length;b++)d=e[b],d.ic&&d.ic(this,this.ma,this.U,this.Ea);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.J=d:this.A=parseInt(d,10));var f;if(a=Mc(this,"state")||(f=!0,a.state))b=this.V=a,f||(this.H=!0,this.A=Lu),this.A&&(this.L=new Qe(this,"1.35.1"),
|
||||
this.L.load()?b=null:delete this.L);!b&&this.A&&(b=Nu(this))&&(this.H=!0);if(b){var g=this;Ba(b,null,!0,function(a,b,c){c?(g.J=null,g.H=!1,g.xa("Unable to load machine state from server (error "+c+(b?": "+ua(b):"")+")")):(g.K=b,g.X=!0);mb(g)})}else mb(this);this.ia.power||(this.M=!0);!c&&this.M&&Ou(this,this.af)}else r("Unable to find CPU component")}ba(Ju,t);
|
||||
function Ku(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){r(d.message+" ("+c+")")}}a.I=b}function Mc(a,b,c){var d=b.toLowerCase(),d=Ia(b)||Ia(d);void 0===d&&a.I&&(d=a.I[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}function Ou(a,b,c){for(var d=Ya(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!lb(f)){lb(f,function(){Ou(a,b,c)});return}}b.call(a,c)}
|
||||
function Pu(a,b){var c=new Qe(a,"1.35.0",Qu);if(c.load()&&Ru(c)){var d=c.get(Su),e=b?b.get(Su):"unknown";d!=e&&(a.xa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Ju.prototype;
|
||||
k.af=function(a){void 0===a&&(a=this.A||(this.K?Tu:Lu));if(!this.C){this.C++;var b=!1,c=!1;this.W=!1;var d=this.L||new Qe(this,"1.35.0");if(a==Uu)b=!0;else if(a>Lu){if(d.load(this.K)){this.F=new Qe(this,"1.35.0",Vu);this.F.load()&&(Wu(this,d),a=Xu,Yu(this.F));this.F.set(Su,wa());Zu(this.F);var e=this.A&&!this.H;if(a==Tu||Xa("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Ru(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
function Pu(a,b){var c=new Qe(a,"1.35.1",Qu);if(c.load()&&Ru(c)){var d=c.get(Su),e=b?b.get(Su):"unknown";d!=e&&(a.xa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}k=Ju.prototype;
|
||||
k.af=function(a){void 0===a&&(a=this.A||(this.K?Tu:Lu));if(!this.C){this.C++;var b=!1,c=!1;this.W=!1;var d=this.L||new Qe(this,"1.35.1");if(a==Uu)b=!0;else if(a>Lu){if(d.load(this.K)){this.F=new Qe(this,"1.35.1",Vu);this.F.load()&&(Wu(this,d),a=Xu,Yu(this.F));this.F.set(Su,wa());Zu(this.F);var e=this.A&&!this.H;if(a==Tu||Xa("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Ru(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
|
||||
g?(this.xa("Error: "+g),"unable to verify user"==g&&(Ga($u,""),this.B=null)):this.Zb(f+": "+g),Yu(d),d.load()?(c=Ru(d),e=!0):c=!1))}e&&Pu(this,c?d:null)}else a==Xu&&d.clear()}else Pu(this);delete this.K;delete this.L}e=Ya(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.U&&(c=av(this,g,d,b,c));b=[d,a,c];a!=Uu?Ou(this,this.li,b):this.li(b)}};
|
||||
function av(a,b,c,d,e){if(!b.ca.Pb){b.ca.Pb=!0;if(b.Ob){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Ob(f,d)&&f&&(r("Unable to restore state for "+b.type),a.V&&!a.X?(c.clear(),a.A=Lu,window&&window.location.reload()):a.W=!0,b.Ob(null),e=!1)}if(!d&&b.ui)for(a=b.ui.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
|
||||
k.li=function(a){var b=a[0],c=0>a[1];a=a[2];this.ea=!0;this.ca.Pb=!0;var d=this.ia.power;d&&(d.textContent="Shutdown");this.U&&(av(this,this.U,b,c,a),this.U.Fe());this.W&&(Wu(this,b),b.clear());!c&&this.F&&(this.F.clear(),delete this.F);this.C=0};
|
||||
function Wu(a,b){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.35.0"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function bv(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Qe(a,"1.35.0"),g=new Qe(a,"1.35.0",Qu),h=wa();g.set(Su,h);f.set(Su,h);f.set(cv,"1.35.0");f.set(dv,window?window.location.href:null);f.set(ev,window?window.navigator.userAgent:"");a.U&&a.U.Nb&&(c&&Qc(a.U),d=a.U.Nb(b,c),"object"===typeof d&&f.set(a.U.id,d),c&&(a.U.ca.Pb=!1,!1===d&&(e=null)));for(var h=Ya(a.id),l=0;l<h.length;l++){var m=h[l];m.ca.Pb&&(m.Nb&&(d=m.Nb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ca.Pb=!1,!1===d&&(e=
|
||||
function Wu(a,b){if(Xa("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.35.1"};d.url=a.ba;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}}
|
||||
function bv(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new Qe(a,"1.35.1"),g=new Qe(a,"1.35.1",Qu),h=wa();g.set(Su,h);f.set(Su,h);f.set(cv,"1.35.1");f.set(dv,window?window.location.href:null);f.set(ev,window?window.navigator.userAgent:"");a.U&&a.U.Nb&&(c&&Qc(a.U),d=a.U.Nb(b,c),"object"===typeof d&&f.set(a.U.id,d),c&&(a.U.ca.Pb=!1,!1===d&&(e=null)));for(var h=Ya(a.id),l=0;l<h.length;l++){var m=h[l];m.ca.Pb&&(m.Nb&&(d=m.Nb(b,c),"object"===typeof d&&f.set(m.id,d)),c&&(m.ca.Pb=!1,!1===d&&(e=
|
||||
null)))}e&&(c?(h=d=!1,b?(a.B&&fv(a,a.B,f.toString()),Zu(g)&&Zu(f)||(e=null,d=h=!0)):a.A&&(d=!0,h=a.A==gv),d&&f.clear(h)):e=f.toString());c&&(a.ca.Pb=!1,b=a.ia.power)&&(b.textContent="Power");a.C=0;return e}k.reset=function(){this.ma&&this.ma.reset&&this.ma.reset();for(var a=Ya(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ma&&c.reset&&c.reset()}};k.start=function(a,b){for(var c=Ya(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};
|
||||
k.stop=function(a,b){for(var c=Ya(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
|
||||
k.wb=function(a,b,c){var d=this;switch(b){case "power":return this.ia[b]=c,c.onclick=function(){d.C||(d.ca.Pb?bv(d,!1,!0):Ou(d,d.af))},!0;case "reset":return this.ia[b]=c,c.onclick=function(){if(d.ca.Pb&&!d.C)if(d.A&&!d.J){var a=Xa("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");bv(d,a,!0);!a&&d.V?window&&window.location.reload():(a||(d.O=!0),d.af(Lu),d.O=!1)}else d.reset(),d.U&&d.U.Fe()},!0;case "save":if(ra(Ca(),"pcjs.org"))c.parentNode.removeChild(c);
|
||||
else return this.ia[b]=c,c.onclick=function(){var a=Mu(d,!0);if(a){var b=!!(d.A&&!d.J||d.V),c=bv(d,b);b?fv(d,a,c):d.xa("Resume disabled, machine state not saved")}},!0}return!1};
|
||||
function Mu(a,b){var c=a.B;c||((c=Fa($u),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=hv(a,c))||a.xa("The user ID is invalid.")):b&&a.xa("Browser local storage is not available"));return c}
|
||||
function hv(a,b){a.B=null;b=Ba(Ca()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ga($u,b.data),a.B=b.data)}catch(d){r(d.message+" ("+c+")")}return a.B}function Nu(a){var b=null;a.B&&(b=Ca()+"/api/v1/user?req=load&user="+a.B+"&state="+iv(a,"1.35.0"));return b}
|
||||
function fv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=iv(a,"1.35.0");d.data=c;b=Ba(Ca()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.xa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.xa(c),Ga($u,""),a.B=null)}}
|
||||
function hv(a,b){a.B=null;b=Ba(Ca()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Ga($u,b.data),a.B=b.data)}catch(d){r(d.message+" ("+c+")")}return a.B}function Nu(a){var b=null;a.B&&(b=Ca()+"/api/v1/user?req=load&user="+a.B+"&state="+iv(a,"1.35.1"));return b}
|
||||
function fv(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=iv(a,"1.35.1");d.data=c;b=Ba(Ca()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.xa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.xa(c),Ga($u,""),a.B=null)}}
|
||||
function vb(a,b,c){a=Ya(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}function Zc(a,b){if(a.G.length){var c=0,d=0;!b&&window&&(c=window.scrollX,d=window.scrollY);a=a.G[0];a.D&&a.D.focus();!b&&window&&window.scrollTo(c,d)}}
|
||||
function $c(a,b){a.U&&(a=a.U,a.ri&&(b||!a.ca.Ib||a.ca.ji)&&(wf(a,"EAX",a.F),wf(a,"EBX",a.G),wf(a,"ECX",a.H),wf(a,"EDX",a.K),wf(a,"ESP",C(a)),wf(a,"EBP",a.L),wf(a,"ESI",a.J),wf(a,"EDI",a.I),wf(a,"CS",a.ga.ha),wf(a,"DS",a.Ca.ha),wf(a,"SS",a.W.ha),wf(a,"ES",a.ua.ha),wf(a,"EIP",E(a)),b=Ad(a),wf(a,"PS",b),wf(a,"V",b&2048),wf(a,"D",b&1024),wf(a,"I",b&512),wf(a,"T",b&256),wf(a,"S",b&128),wf(a,"Z",b&64),wf(a,"A",b&16),wf(a,"P",b&4),wf(a,"C",b&1),80386==a.aa&&(wf(a,"FS",a.qb.ha),wf(a,"GS",a.rb.ha),wf(a,"CR0",
|
||||
a.pa),wf(a,"CR2",a.Xd),wf(a,"CR3",a.nd))),b=a.ia.speed)&&(b.textContent=a.ca.Ib&&a.R.wd?a.R.wd.toFixed(2)+"Mhz":"Stopped")}
|
||||
|
|
@ -690,10 +690,10 @@ a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2")
|
|||
function mv(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ba(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 l=h[0],m,q=/( [a-z]+=)(['"])(.*?)\2/g;m=q.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,
|
||||
"");a=a.replace(d[0],g);mv(a,b,c)}})}else c(a,null)}
|
||||
function nv(a,b,c,d){function e(a){if(void 0===h){var b=g&&eb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=sa(a))}function f(a){e("Error: "+a);l&&(--jv||Qa(!0));l=!1}var g,h,l=!0;jv++;Wa[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");y.type="text/css";y.styleSheet?y.styleSheet.cssText=m:y.appendChild(document.createTextNode(m));q.appendChild(y)}c||
|
||||
(c="/versions/pcx86/1.35.0/components.xsl");m=function(d,h){h?kv(c,null,null,!1,e,function(d,l){l?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--jv||Qa(!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),--jv||Qa(!0)):f("invalid machine element: "+
|
||||
(c="/versions/pcx86/1.35.1/components.xsl");m=function(d,h){h?kv(c,null,null,!1,e,function(d,l){l?(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--jv||Qa(!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),--jv||Qa(!0)):f("invalid machine element: "+
|
||||
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?kv(b,a,d,!0,e,m):lv(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}function ov(a,b,c,d){Qa(!1);return nv(a,b,c,d)}window.embedPC=ov;window.embedPCx86=ov;window.findMachineComponent=function(a,b){return ab(b,a+".machine")};
|
||||
window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!gb[a]){for(var c=!0,d=gb,e=a,f=b.length,g=[],h=[],l="",m=null,q=0;q<f;q++){var y=b[q];if('"'==y||"'"==y)m&&y!=m?l+=y:(m?m=null:m=y,l&&(h.push(l),l=""));else{if(!m){if("\r"==y||"\n"==y)y=";";if(" "==y||"\t"==y||";"==y){l&&(h.push(l),l="");";"==y&&h.length&&(g.push(h),h=[]);continue}}l+=y}}l&&h.push(l);h.length&&g.push(h);d[e]=g;fb(a)||(c=!1)}return c};window.enableEvents=Qa;window.sendEvent=Sa;
|
||||
function pv(a,b,c,d){if(!c&&b){d.push(b);a=Wa[d[0]];b=null;for(var e in a)if(ra(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Ba(b,null,!0,function(a,b){qv(b,d)}):qv(null,d)}else r("Error ("+c+") requesting "+a)}
|
||||
function qv(a,b){var c,d,e,f=b[0],g=b[1];c=b[4];c=c.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);\s*)$/);var h=Wa[f],l={},m;for(m in h){var q=h[m],y=qa(m);if("xml"==y){for(y=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=y.exec(h[m]);){var w=d[2];w&&(h[w]||(q=q.replace(d[0],"")))}d=m=pa(m)}else"xsl"==y&&(e=m=pa(m));l[m]=q}a&&(l[m="css"]=a);b[2]&&(l[m="parms"]=b[2]);b[3]&&(l[m="state"]=b[3]);d&&e?(a=JSON.stringify(l),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
|
||||
"©"),a=Ka(c,"javascript",!1,g),a=a+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+g+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",r(a)):r("Missing XML/XSL resources")}
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=bv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.35.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ij:g}))return!0;Ba(b,null,!0,function(c,d,e){pv(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.0/pcx86.map
|
||||
window.savePC=function(a,b,c){var d=ab("Computer",a),e=ab("Debugger",a);if(d){var f=bv(d,!0),g=d.I?JSON.stringify(d.I):null;b||(b="/versions/pcx86/1.35.1/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ij:g}))return!0;Ba(b,null,!0,function(c,d,e){pv(c,d,e,[a,pa(b,!0),g,f])});return!0}r("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.35.1/pcx86.map
|
||||
|
|
|
|||
Loading…
Reference in a new issue