Merged next-release

This commit is contained in:
Jeff Parsons 2016-08-23 22:50:46 -07:00
commit bd5c32795c
274 changed files with 11029 additions and 1395 deletions

View file

@ -0,0 +1,76 @@
Unix v7 for the PDP-11
----------------------
Here's the result of following along with [How To Emulate Unix V7 Using Simh (2015)](http://www.jdpressman.com/2015/11/27/how-to-emulate-unix-v7-using-SIMH-(2015).html),
which also draws from an old [README](http://ftp.fibranet.cat/UnixArchive/PDP-11/Boot_Images/README).
[~/Projects/GitHub/other/simh] cd kits
[~/Projects/GitHub/other/simh/kits] ls
1401_fortran_autocoder.tgz decsys.zip iu7swre.zip s3scp.zip uv6swre.zip
1401koans.zip dms8.zip lispswre.zip sim8swre.tar.Z uv7swre.tar.Z
211bsd.dsk.gz dos11.zip os8swre.tar.Z sim8swre.zip uv7swre.zip
BASIC_CAPS-11_distribution.zip dos15.zip psaltair.zip simh-imp-1973-sw-kit.zip xvmdos.zip
adss15.zip esixswre.tar.Z rdosswre.tar.Z swtp6800-swk.zip xvmrsx_simh_kit.zip
caps11_system.zip focal15.zip rstsv7gen.tar.Z tss8.zip zrdos75.zip
caps8_all.zip foclswre.tar.Z rstsv7swre.tar.Z utils.zip
ceo1401.zip ibm1130software.zip rt11swre.tar.Z uv5swre.tar.Z
ceoaltair.zip ibsys_kit.zip rte6200.zip uv5swre.zip
ddt1.zip iu6swre.zip rtv53swre.tar.Z uv6swre.tar.Z
[~/Projects/GitHub/other/simh/kits] mkdir unix
[~/Projects/GitHub/other/simh/kits] cd unix
[~/Projects/GitHub/other/simh/kits/unix] unzip -d uv7 ../uv7swre.zip
Archive: uv7swre.zip
inflating: uv7/AncientUnix.pdf
inflating: uv7/unix_v7_rl.dsk
inflating: uv7/README.txt
[~/Projects/GitHub/other/simh/kits/unix] more uv7/README.txt
THE ENCLOSED SOFTWARE IS PROVIDED UNDER LICENSE.
DO NOT USE THIS SOFTWARE UNTIL YOU HAVE READ THE LICENSE AGREEMENT.
BY USING THE SOFTWARE (OR AUTHORIZING ANY OTHER PERSON TO DO SO), YOU
AGREE TO ACCEPT AND ABIDE BY ALL THE TERMS OF THIS LICENSE AGREEMENT.
[~/Projects/GitHub/other/simh/kits/unix] cd uv7
[~/Projects/GitHub/other/simh/kits/unix/uv7] ../../../BIN/pdp11
PDP-11 simulator V4.0-0 Beta git commit id: 592deb8f
sim> set cpu 11/45
Disabling XQ
sim> set tto 7b
sim> att rl unix_v7_rl.dsk
sim> boot rl
@boot
New Boot, known devices are hp ht rk rl rp tm vt
: rl(0,0)rl2unix
mem = 177856
# mkdir /tmp
# chmod 777 /tmp
# mkdir /usr/dmr
# chown dmr /usr/dmr
# chgrp 3 /usr/dmr
# Restricted rights: Use, duplication, or disclosure
is subject to restrictions stated in your contract with
Western Electric Company, Inc.
Thu Sep 22 05:48:50 EDT 1988
login: dmr
$ ls
$ pwd
/usr/dmr
$ cd /
$ ls -l
total 643
drwxrwxr-x 2 bin 2512 Sep 22 05:32 bin
-rwxr-xr-x 1 bin 8986 Jun 8 1979 boot
drwxrwxr-x 2 bin 160 Sep 22 05:47 dev
drwxrwxr-x 2 bin 336 Sep 22 05:48 etc
-rwxr-xr-x 1 sys 53302 Jun 8 1979 hphtunix
-rwxr-xr-x 1 sys 52850 Jun 8 1979 hptmunix
drwxrwxr-x 2 bin 320 Sep 22 05:33 lib
drwxrwxr-x 2 root 96 Sep 22 05:46 mdec
-rwxr-xr-x 1 root 50990 Jun 8 1979 rkunix
-rwxr-xr-x 1 root 51982 Jun 8 1979 rl2unix
-rwxr-xr-x 1 sys 51790 Jun 8 1979 rphtunix
-rwxr-xr-x 1 sys 51274 Jun 8 1979 rptmunix
drwxrwxrwx 2 root 32 Sep 22 05:48 tmp
drwxrwxr-x12 root 192 Sep 22 05:48 usr

File diff suppressed because it is too large Load diff

View file

@ -600,23 +600,23 @@ function Zm(a,b){if(a.errorCode)return-1;do{if(a.Wa&&a.ta.write(a.Wa,a.Ua++,b))b
var Pm={800:Z.prototype.Rk,801:Z.prototype.Sk,802:Z.prototype.Qk},Om={496:Z.prototype.xj,497:Z.prototype.Xj,498:Z.prototype.Zj,499:Z.prototype.$j,500:Z.prototype.Vj,501:Z.prototype.Uj,502:Z.prototype.Wj,503:Z.prototype.ak},Rm={800:Z.prototype.Zl,801:Z.prototype.bm,802:Z.prototype.am,803:Z.prototype.$l,807:Z.prototype.jh,811:Z.prototype.jh,815:Z.prototype.jh},Qm={496:Z.prototype.jl,497:Z.prototype.ol,498:Z.prototype.ml,499:Z.prototype.nl,500:Z.prototype.il,501:Z.prototype.hl,502:Z.prototype.kl,503:Z.prototype.gl,
1014:Z.prototype.ll};Ha(function(){for(var a=bb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=Za(c),d=new Z(d);ab(d,c)}});
function ln(a,b,c){La.call(this,"Computer",a,ln);this.ea.Sb=!1;mn(this,b);this.ba=mc(this,"autoPower",a);this.G=0;this.da=a.busWidth||a.buswidth;this.B=nn;this.R=null;this.K=this.Z=!1;this.ha=mc(this,"url")||"";this.ma=(Math.random()+.1).toString(36).substr(2,12);this.C=on(this);if(this.A=Ya("CPU",this.id)){this.Ia=Ya("Debugger",this.id);this.I=[];for(b=null;b=nb(this,"Video",b);)this.I.push(b);this.ia=new ub({id:this.Fe+".bus",busWidth:this.da},this.A,this.Ia);var d,e=Wa(this.id);if((this.D=Ya("Panel",
this.id))&&this.D.ig)for(b=0;b<e.length;b++)d=e[b],d.Ba=this.D.Ba,d.rc=this.D.rc,d.ig=this.D.ig;this.rc("PCx86 v1.24.0\nCopyright \u00a9 2012-2016 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.pc&&d.pc(this,this.ia,this.A,this.Ia);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.S=d:this.B=parseInt(d,10));var f;if(a=mc(this,"state")||(f=!0,a.state))b=this.W=a,f||(this.K=!0,this.B=nn),this.B&&(this.P=new ee(this,"1.24.0"),
this.id))&&this.D.ig)for(b=0;b<e.length;b++)d=e[b],d.Ba=this.D.Ba,d.rc=this.D.rc,d.ig=this.D.ig;this.rc("PCx86 v1.24.1\nCopyright \u00a9 2012-2016 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.pc&&d.pc(this,this.ia,this.A,this.Ia);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.S=d:this.B=parseInt(d,10));var f;if(a=mc(this,"state")||(f=!0,a.state))b=this.W=a,f||(this.K=!0,this.B=nn),this.B&&(this.P=new ee(this,"1.24.1"),
this.P.load()?b=null:delete this.P);!b&&this.B&&(b=pn(this))&&(this.K=!0);if(b){var g=this;ra(b,null,!0,function(a,b,c){c?(g.S=null,g.K=!1,g.Ba("Unable to load machine state from server (error "+c+(b?": "+ka(b):"")+")")):(g.R=b,g.Z=!0);db(g)})}else db(this);this.la.power||(this.ba=!0);!c&&this.ba&&qn(this,this.gf)}else p("Unable to find CPU component")}Ta(ln);var nn=0;l=ln.prototype;l.te=function(){return this.ma};
function mn(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){p(d.message+" ("+c+")")}}a.L=b}function mc(a,b,c){var d=b.toLowerCase(),d=Oa[b]||Oa[d];void 0===d&&a.L&&(d=a.L[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l.Ad=function(){return this.C||""};function qn(a,b,c){for(var d=Wa(a.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:a;if(!eb(f)){eb(f,function(){qn(a,b,c)});return}}b.call(a,c)}
function rn(a,b){var c=new ee(a,"1.24.0","validate");if(c.load()&&sn(c)){var d=tn(c,"timestamp"),e=b?tn(b,"timestamp"):"unknown";d!=e&&(a.Ba("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
l.gf=function(a){void 0===a&&(a=this.B||(this.R?1:nn));if(!this.G){this.G++;var b=!1,c=!1;this.Y=!1;var d=this.P||new ee(this,"1.24.0");if(-1==a)b=!0;else if(a>nn){if(d.load(this.R)){this.H=new ee(this,"1.24.0","failsafe");this.H.load()&&(un(this,d),a=2,vn(this.H));C(this.H,"timestamp",na());wn(this.H);var e=this.B&&!this.K;if(1==a||ta("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=sn(d)){var f=tn(d,"code"),g=tn(d,"data");f&&("ok"==f?d.load(g):("error"==
function rn(a,b){var c=new ee(a,"1.24.1","validate");if(c.load()&&sn(c)){var d=tn(c,"timestamp"),e=b?tn(b,"timestamp"):"unknown";d!=e&&(a.Ba("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
l.gf=function(a){void 0===a&&(a=this.B||(this.R?1:nn));if(!this.G){this.G++;var b=!1,c=!1;this.Y=!1;var d=this.P||new ee(this,"1.24.1");if(-1==a)b=!0;else if(a>nn){if(d.load(this.R)){this.H=new ee(this,"1.24.1","failsafe");this.H.load()&&(un(this,d),a=2,vn(this.H));C(this.H,"timestamp",na());wn(this.H);var e=this.B&&!this.K;if(1==a||ta("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=sn(d)){var f=tn(d,"code"),g=tn(d,"data");f&&("ok"==f?d.load(g):("error"==
f&&"no machine state"!=g?(this.Ba("Error: "+g),"unable to verify user"==g&&(za("user",""),this.C=null)):this.rc(f+": "+g),vn(d),d.load()?(c=sn(d),e=!0):c=!1))}e&&rn(this,c?d:null)}else 2==a&&d.clear()}else rn(this);delete this.R;delete this.P}e=Wa(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.A&&(c=xn(this,g,d,b,c));b=[d,a,c];-1!=a?qn(this,this.Ph,b):this.Ph(b)}};
function xn(a,b,c,d,e){if(!b.ea.Sb){b.ea.Sb=!0;if(b.Vb){var f=null;e&&((f=tn(c,b.id))||(f=tn(c,b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.Vb(f,d)&&f&&(p("Unable to restore state for "+b.type),a.W&&!a.Z?(c.clear(),a.B=nn,window&&window.location.reload()):a.Y=!0,b.Vb(null),e=!1)}if(!d&&b.Bh)for(a=b.Bh.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.Ph=function(a){var b=a[0],c=0>a[1];a=a[2];this.ka=!0;this.ea.Sb=!0;var d=this.la.power;d&&(d.textContent="Shutdown");this.A&&(xn(this,this.A,b,c,a),qc(this.A));this.Y&&(un(this,b),b.clear());!c&&this.H&&(this.H.clear(),delete this.H);this.G=0};
function un(a,b){if(ta("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.Ad(),d=b.toString(),e={app:"PCx86",ver:"1.24.0"};e.url=a.ha;e.user=c;e.type="bug";e.data=d;ra("http://www.pcjs.org/api/v1/report",e,!0)}}
function yn(a,b,c){var d,e="none";if(a.G)return null;a.G--;var f=new ee(a,"1.24.0"),g=new ee(a,"1.24.0","validate"),h=na();C(g,"timestamp",h);C(f,"timestamp",h);C(f,"version","1.24.0");C(f,"url",window?window.location.href:null);C(f,"browser",window?window.navigator.userAgent:"");a.A&&a.A.Ub&&(c&&rc(a.A),d=a.A.Ub(b,c),"object"===typeof d&&C(f,a.A.id,d),c&&(a.A.ea.Sb=!1,!1===d&&(e=null)));for(var h=Wa(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Sb&&(m.Ub&&(d=m.Ub(b,c),"object"===typeof d&&C(f,m.id,d)),
function un(a,b){if(ta("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.Ad(),d=b.toString(),e={app:"PCx86",ver:"1.24.1"};e.url=a.ha;e.user=c;e.type="bug";e.data=d;ra("http://www.pcjs.org/api/v1/report",e,!0)}}
function yn(a,b,c){var d,e="none";if(a.G)return null;a.G--;var f=new ee(a,"1.24.1"),g=new ee(a,"1.24.1","validate"),h=na();C(g,"timestamp",h);C(f,"timestamp",h);C(f,"version","1.24.1");C(f,"url",window?window.location.href:null);C(f,"browser",window?window.navigator.userAgent:"");a.A&&a.A.Ub&&(c&&rc(a.A),d=a.A.Ub(b,c),"object"===typeof d&&C(f,a.A.id,d),c&&(a.A.ea.Sb=!1,!1===d&&(e=null)));for(var h=Wa(a.id),k=0;k<h.length;k++){var m=h[k];m.ea.Sb&&(m.Ub&&(d=m.Ub(b,c),"object"===typeof d&&C(f,m.id,d)),
c&&(m.ea.Sb=!1,!1===d&&(e=null)))}e&&(c?(h=d=!1,b?(a.C&&zn(a,a.C,f.toString()),wn(g)&&wn(f)||(e=null,d=h=!0)):a.B&&(d=!0,h=3==a.B),d&&f.clear(h)):e=f.toString());c&&(a.ea.Sb=!1,b=a.la.power)&&(b.textContent="Power");a.G=0;return e}l.reset=function(){this.ia&&this.ia.reset&&this.ia.reset();for(var a=Wa(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ia&&c.reset&&c.reset()}};
l.start=function(a,b){for(var c=Wa(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=Wa(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.zb=function(a,b,c){var d=this;switch(b){case "power":return this.la[b]=c,c.onclick=function(){d.G||(d.ea.Sb?yn(d,!1,!0):qn(d,d.gf))},!0;case "reset":return this.la[b]=c,c.onclick=function(){if(d.ea.Sb&&!d.G)if(d.B&&!d.S){var a=ta("Click OK to save changes to this PCx86 machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");yn(d,a,!0);!a&&d.W?window&&window.location.reload():(a||(d.lg=!0),d.gf(nn),d.lg=!1)}else d.reset(),d.A&&qc(d.A)},!0;case "save":if(ha(sa(),"pcjs.org")){c.parentNode.removeChild(c);
break}this.la[b]=c;c.onclick=function(){var a=on(d,!0);if(a){var b=!!(d.B&&!d.S||d.W),c=yn(d,b);b?zn(d,a,c):d.Ba("Resume disabled, machine state not saved")}};return!0}return!1};
function on(a,b){var c=a.C;c||(c=ya("user"),void 0!==c?!c&&b&&(c=null,window&&(c=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&&((c=An(a,c))||a.Ba("The user ID is invalid."))):b&&a.Ba("Browser local storage is not available"));return c}
function An(a,b){a.C=null;var c=ra(sa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(za("user",c.data),a.C=c.data)}catch(e){p(e.message+" ("+d+")")}return a.C}function pn(a){var b=null;a.C&&(b=sa()+"/api/v1/user?req=load&user="+a.C+"&state="+Bn(a,"1.24.0"));return b}
function zn(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Bn(a,"1.24.0");d.data=c;b=ra(sa()+"/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.Ba("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.Ba(c),za("user",""),a.C=null)}}
function An(a,b){a.C=null;var c=ra(sa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(za("user",c.data),a.C=c.data)}catch(e){p(e.message+" ("+d+")")}return a.C}function pn(a){var b=null;a.C&&(b=sa()+"/api/v1/user?req=load&user="+a.C+"&state="+Bn(a,"1.24.1"));return b}
function zn(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Bn(a,"1.24.1");d.data=c;b=ra(sa()+"/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.Ba("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.Ba(c),za("user",""),a.C=null)}}
function nb(a,b,c){a=Wa(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 xc(a,b){if(a.I.length){var c=0,d=0;b&&window&&(c=window.scrollX,d=window.scrollY);var e=a.I[0];e.G&&e.G.focus();b&&window&&window.scrollTo(c,d)}}l.Yd=function(a){this.A&&this.A.Yd(a);this.D&&this.D.Yd(a)};
function Ac(a,b){for(var c=0;c<a.I.length;c++)nl(a.I[c],b);if(a.D&&(c=a.D,c.ua)){rb(c,18,c.S,c.ra);if(c.Ga){var d=c.ia,e=c.B,f,g;null==f&&(f=0);null==g&&(g=d.L-f|0);null==e&&(e={hg:0,hd:0,bg:[]});var h=f>>>d.da;f=f+g-1>>>d.da;e.hg=0;for(e.hd=0;h<=f;)g=d.R[h],e.hg+=g.size,g.size&&(e.bg.push(pa(qb,h,0,0,g.type)),e.hd++),h++;c.B=e;c.ma=c.B.hd*c.ia.xb/691200;d=0;c.B.Jh=0;c.B.Ke||(c.B.Ke=[]);var e=-1,h=0,k=-1;for(f=0;f<c.B.hd;f++){var m=c.B.bg[f];g=qa(qb.type,m);m=qa(qb.ej,m);if(g!=e||m!=k+1)(k=f-h)&&
(d+=tb(c,h,k,e)),e=g,h=f;k=m}d+=tb(c,h,f-h,e);e=c.B.Ej!=d;c.B.Ej=d;if(e){e=new lb(0,0,c.S.width,c.S.height);c.B.de=[];h=c.B.hd;for(d=0;d<c.B.Jh;d++)f=c.B.Ke[d].hd,c.B.de.push(mb(e,f,h,!d)),h-=f;for(d=0;d<c.B.de.length;d++)e=c.B.Ke[d],h=f=c.B.de[d],g=c.ra,(k=Zb[e.type])||(k=new kb),g.strokeStyle="black",g.strokeRect(h.x,h.y,h.Fc,h.A),g.fillStyle="string"==typeof k?k:k.toString(),g.fillRect(h.x,h.y,h.Fc,h.A),h=c,g=f,h.P=h.ha,h.L=h.ka,f=g.x+(g.Fc>>1),k=g.y+(g.A>>1),m=g.A,g.Fc<g.A&&(m=g.Fc,h.da=!0,h.G.save(),
@ -631,9 +631,9 @@ h=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,""))
function Fn(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");ra(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Fn(a,b,c)}})}else c(a,null)}
function Gn(a,b,c,d){function e(a){if(void 0===h){var b=g&&bb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ja(a))}function f(a){e("Error: "+a);k&&(--Cn||Ja(!0));k=!1}var g,h,k=!0;Cn++;Ua[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],x=document.createElement("style");x.type="text/css";x.styleSheet?x.styleSheet.cssText=m:x.appendChild(document.createTextNode(m));n.appendChild(x)}c||
(c="/versions/pcx86/1.24.0/components.xsl");m=function(d,h){h?Dn(c,null,null,!1,e,function(d,k){if(k)if(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=h.transformNode(k);m?(g.outerHTML=m,--Cn||Ja(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(k),(m=m.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Cn||Ja(!0)):f("invalid machine element: "+
(c="/versions/pcx86/1.24.1/components.xsl");m=function(d,h){h?Dn(c,null,null,!1,e,function(d,k){if(k)if(Va(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=h.transformNode(k);m?(g.outerHTML=m,--Cn||Ja(!0)):f("transformNodeToObject failed")}else document.implementation&&document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(k),(m=m.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Cn||Ja(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f(d)}):f(d)};"<"!=b.charAt(0)?Dn(b,a,d,!0,e,m):En(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return k}function Hn(a,b,c,d){Ja(!1);return Gn(a,b,c,d)}window.embedPC=Hn;window.embedPCx86=Hn;window.enableEvents=Ja;window.sendEvent=Ka;
function In(a,b,c,d){if(!c&&b){d.push(b);a=Ua[d[0]];b=null;for(var e in a)if(ha(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?ra(b,null,!0,function(a,b){Jn(b,d)}):Jn(null,d)}else p("Error ("+c+") requesting "+a)}
function Jn(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=Ua[f],k={},m;for(m in h){var n=h[m],x=ga(m);if("xml"==x){for(x=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=x.exec(h[m]);){var r=d[2];r&&(h[r]||(n=n.replace(d[0],"")))}d=m=fa(m)}else"xsl"==x&&(e=m=fa(m));k[m]=n}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);d&&e?(m=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+m+";"+c[2]+c[3],c=c.replace(/\u00A9/g,
"&#xA9;"),c=Ba(c,"javascript",!1,g),c=c+(', copy it to your web server as "'+g+'", and then add the following to your web page:\n\n')+('<div id="'+f+'"></div>\n'),c+="...\n",c+='<script type="text/javascript" src="'+g+'">\x3c/script>\n',c+='<script type="text/javascript">embedPC("'+f+'","'+d+'","'+e+'");\x3c/script>\n\n',c+="The machine should appear where the <div> is located.",p(c)):p("Missing XML/XSL resources")}
window.savePC=function(a,b,c){var d=Ya("Computer",a),e=Ya("Debugger",a);if(d){var f=yn(d,!0),g=d.L?JSON.stringify(d.L):null;b||(b="/versions/pcx86/1.24.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,ij:g}))return!0;ra(b,null,!0,function(c,d,e){In(c,d,e,[a,fa(b,!0),g,f])});return!0}p("Unable to identify machine '"+a+"'");return!1};})();
window.savePC=function(a,b,c){var d=Ya("Computer",a),e=Ya("Debugger",a);if(d){var f=yn(d,!0),g=d.L?JSON.stringify(d.L):null;b||(b="/versions/pcjs/1.24.1/pc"+(e?"-dbg":"")+".js");if(c&&c({state:f,ij:g}))return!0;ra(b,null,!0,function(c,d,e){In(c,d,e,[a,fa(b,!0),g,f])});return!0}p("Unable to identify machine '"+a+"'");return!1};})();