From 9e480d75748a828827e3a0b7d4522f1d09bf5e86 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Mon, 24 Oct 2016 16:28:48 -0700 Subject: [PATCH 01/30] Added new RL11 component (work-in-progress) --- .../machine/1170/panel/debugger/machine.xml | 1 + devices/pdp11/machine/1170/panel/machine.xml | 1 + .../machine/1170/test/debugger/machine.xml | 1 + devices/pdp11/machine/1170/test/machine.xml | 1 + .../machine/1170/vt100/debugger/machine.xml | 1 + devices/pdp11/machine/1170/vt100/machine.xml | 1 + devices/pdp11/rl11/README.md | 42 + devices/pdp11/rl11/default.xml | 13 + docs/pcx86/examples/pcx86-dbg.js | 16 +- docs/pcx86/examples/pcx86.js | 14 +- modules/diskdump/lib/diskdump.js | 11 +- modules/pcx86/lib/disk.js | 18 +- modules/pcx86/lib/fdc.js | 40 +- modules/pdp11/lib/defines.js | 54 +- modules/pdp11/lib/device.js | 5 + modules/pdp11/lib/disk.js | 1233 +++++++++++++++++ modules/pdp11/lib/rk11.js | 85 -- modules/pdp11/lib/rl11.js | 868 ++++++++++++ modules/shared/lib/diskapi.js | 27 +- package.json | 3 + versions/pcx86/1.30.2/pcx86-dbg.js | 16 +- versions/pcx86/1.30.2/pcx86.js | 14 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 513 +++---- versions/pdpjs/1.30.2/pdp11.js | 367 ++--- 24 files changed, 2760 insertions(+), 585 deletions(-) create mode 100644 devices/pdp11/rl11/README.md create mode 100644 devices/pdp11/rl11/default.xml create mode 100644 modules/pdp11/lib/disk.js delete mode 100644 modules/pdp11/lib/rk11.js create mode 100644 modules/pdp11/lib/rl11.js diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 651afa204..45dc0237e 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -11,4 +11,5 @@ + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index d67b09ac4..b0ba7dc2f 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -10,4 +10,5 @@ + diff --git a/devices/pdp11/machine/1170/test/debugger/machine.xml b/devices/pdp11/machine/1170/test/debugger/machine.xml index 1755805b5..7f7edaa71 100644 --- a/devices/pdp11/machine/1170/test/debugger/machine.xml +++ b/devices/pdp11/machine/1170/test/debugger/machine.xml @@ -10,4 +10,5 @@ + diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/test/machine.xml index d23a38295..11de545fe 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/test/machine.xml @@ -9,4 +9,5 @@ + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index 1ead1d4b6..d6b697b9f 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -10,4 +10,5 @@ + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 31267276b..86b340930 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -9,4 +9,5 @@ + diff --git a/devices/pdp11/rl11/README.md b/devices/pdp11/rl11/README.md new file mode 100644 index 000000000..ea6cc8416 --- /dev/null +++ b/devices/pdp11/rl11/README.md @@ -0,0 +1,42 @@ +--- +layout: page +title: RL11 Disk Controller +permalink: /devices/pdp11/rl11/ +--- + +RL11 Disk Controller +-------------------- + +Machines containing the [RL11 Component](/modules/pdp11/lib/pc11.js) include: + +- [PDP-11/70 Boot Test](/devices/pdp11/machine/1170/test/) (with [Debugger](/devices/pdp11/machine/1170/test/debugger/)) +- [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) (with [Debugger](/devices/pdp11/machine/1170/panel/debugger/)) + +PCjs has archived a selection of [RL02K Disk Images](/disks/dec/rl02k/) for use by those machines, most of which are +listed in the following RL11 Device XML file: + +- [Default](/devices/pdp11/rl11/default.xml) + +which is typically referenced by a Machine XML file as: + + + +Device XML files not only configure a device, but also list all the resource the device will use, and define UI elements +used to control the device, such as choosing which disks should be "auto-mounted" by the RL11 device. For example: + + + + Paper Tape Controls + + + + + + + Attach + Load + + + Tape Progress + + diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml new file mode 100644 index 000000000..4cdd2817c --- /dev/null +++ b/devices/pdp11/rl11/default.xml @@ -0,0 +1,13 @@ + + + Disk Drive Controls + + + + + + Load + + + + diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 98816b5d4..7b88797de 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -43,9 +43,9 @@ http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ -var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, -Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; -da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74, +Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"]; +ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} @@ -618,9 +618,9 @@ function ap(a,b,c){var d;c=c||2;var e=b&511,f=bp(a.za,a.xe[b>>9]);if(f){if(e+c<= Oo.prototype.xj=function(a,b){var c=null;if(this.yd)for(var d in this.yd){var e=this.yd[d];if(a>=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.jg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b,"/")&& -(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; +l.load=function(a,b,c,d,e){var f=b;if(this.W)return!0;this.ga=a;this.V=b;this.Ug=ja(b);var g=this;this.W=d;this.ka=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ba[c];if(d){g.Bb=d[0];g.ub=d[1];g.lb=d[2];g.Va=d[3]||512;b=g.Va>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, +"/")&&(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.xg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= m<<2,F=q.length;F'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)])? -(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)|| +0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;a":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, -Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; -p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; +var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74, +Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"]; +da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} @@ -574,8 +574,8 @@ l.le=function(a,b){if(this.cc&&this.A&&this.A.ea.Nb)switch(a){case pl:this.S!=b& function cm(a,b,c){Ka.call(this,"Disk",{id:a.Fe+".disk"+fa(++dm,4)},cm);this.controller=a;this.ba=a.ba;this.Ia=a.Ia;this.C=b;this.B=b.name;this.qe=b.qe;this.Gf=this.D=!1;em(this,c,b.ib,b.jb,b.eb,b.nb);this.I=[];this.S=[];this.G=null;this.P=0;this.R=!1;t(this)}var dm=0;Ta(cm);l=cm.prototype;l.pc=function(a,b,c,d){this.Ia=d};l.Ub=function(a,b){b||!this.Gf||this.D||(t(this,!1),this.load(this.B,this.H,null,this.lk,this));return!0};l.lk=function(){t(this,!0)}; l.Tb=function(a,b){if(this.D){var c,d=0;if(this.R&&!ua("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=fm(this,!1);)if(d=c[0]){this.controller.Ba('Unable to save "'+this.B+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+this.controller.ue(),b+="&user="+this.controller.yd(),sa(ta()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.controller.Ba(this.B+" saved")}return!0}; function em(a,b,c,d,e,f){a.mode=b;a.ib=c;a.jb=d;a.eb=e;a.nb=f;a.A=[];if("preload"!=a.mode){b=Array(a.ib);for(c=0;c>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.ib);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hm(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): +l.load=function(a,b,c,d,e){var f=b;if(this.K)return!0;this.B=a;this.H=b;this.th=ga(b);var g=this;this.K=d;this.ia=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ca[c];if(d){g.ib=d[0];g.jb=d[1];g.eb=d[2];g.nb=d[3]||512;b=g.nb>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.ib);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hm(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): ia(b,"/")&&(c="dir"),f=ta()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.qe?"":d)+"&format=json"));return!!sa(f,null,!0,function(a,b,c){im(g,a,b,c)})}; function im(a,b,c,d){var e=null;a.te=!1;var f=0>d&&a.ba&&!a.ba.ea.Vb;if(a.Gf)d?a.controller.Ba('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,e=a);else if(d)a.controller.Ba('Unable to load disk "'+a.B+'" (error '+d+": "+b+")",f);else{Va(a.controller.Fe,b,c);try{if(0g&&0 c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)r(h[0]);else{a.ib=h.length;a.jb=h[0].length;a.eb=h[0][0].length;var k=h[0][0][0];a.nb=k&&k.length||512;for(d=c=0;d>2,q=k.pattern;void 0===q&&(q=k.pattern=0);var y=k.data;if(void 0===y){var w=k.bytes;if(void 0!==w&&w.length){for(var z= @@ -595,8 +595,8 @@ l.toJSON=function(){var a;a=0;for(var b;b=km(this,a++);)sm(b);a=JSON.stringify(t function sm(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function tm(a){Ka.call(this,"FDC",a,tm);this.dmaRead=this.Tj;this.dmaWrite=this.Uj;this.dmaFormat=this.hk;this.K=a.autoMount||null;this.W=a.sortBy||"name";"none"==this.W&&(this.W=null);this.C=[];this.Y=!za("Mobi")&&window&&"FileReader"in window}Ta(tm);ba={}; var um={3:{gd:3,wd:0,name:ba.dn},4:{gd:2,wd:1,name:ba.bn},5:{gd:9,wd:7,name:ba.hn},6:{gd:9,wd:7,name:ba.Ym},7:{gd:2,wd:0,name:ba.$m},8:{gd:1,wd:2,name:ba.cn},10:{gd:2,wd:7,name:ba.Zm},13:{gd:6,wd:7,name:ba.Vm},15:{gd:3,wd:0,name:ba.an}};l=tm.prototype; l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.la[b]=c;if(this.W){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)])?(a= -a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +void 0!==g&&(b=''+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)||0])? +(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.S=mb(a,"ChipSet");if((this.K=nc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){r("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}xm(this);Sb(b,this,ym);Ub(b,this,zm);Am(this,"None","",!0);this.Y&&Am(this,"Local Disk","?");Am(this,"Remote Disk","??");Bm(this)||t(this)}; l.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.pg){this.C=[];for(a=0;a> 2, dwPattern = 0, dwChecksum = 0; var ib = 0; @@ -1138,7 +1138,7 @@ Disk.prototype.build = function(buffer, fModified) this.dwChecksum = dwChecksum; disk = this; } else { - this.notice("Unrecognized diskette format (" + cbDiskData + " bytes)"); + this.notice("Unrecognized disk format (" + cbDiskData + " bytes)"); } if (this.fnNotify) { diff --git a/modules/pcx86/lib/fdc.js b/modules/pcx86/lib/fdc.js index ee246e214..c4aafc8fb 100644 --- a/modules/pcx86/lib/fdc.js +++ b/modules/pcx86/lib/fdc.js @@ -547,7 +547,7 @@ FDC.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) control.onclick = function onClickSaveDrive(event) { var controlDrives = fdc.bindings["listDrives"]; if (controlDrives && controlDrives.options && fdc.aDrives) { - var iDriveSelected = str.parseInt(controlDrives.value, 10); + var iDriveSelected = str.parseInt(controlDrives.value, 10) || 0; var drive = fdc.aDrives[iDriveSelected]; if (drive) { /* @@ -1069,17 +1069,17 @@ FDC.prototype.initDrive = function(drive, iDrive, data) * so all we have to do is mount a blank diskette and let disk.restore() do the rest; ie, there's nothing to * "load" (it's a purely synchronous operation). * - * Otherwise, we must call loadDiskette(); in the common case, loadDiskette() will have already "auto-mounted" + * Otherwise, we must call loadDrive(); in the common case, loadDrive() will have already "auto-mounted" * the diskette, so it will return true, and then we restore any deltas to the current image. * - * However, if loadDiskette() returns false, then it has initiated the load for a *different* disk image, + * However, if loadDrive() returns false, then it has initiated the load for a *different* disk image, * so we must mark ourselves as "not ready" again, and add another "wait for ready" test in Computer before * finally powering the CPU. */ if (fLocal) { - this.mountDiskette(iDrive, sDisketteName, sDiskettePath); + this.mountDrive(iDrive, sDisketteName, sDiskettePath); } - else if (this.loadDiskette(iDrive, sDisketteName, sDiskettePath, true)) { + else if (this.loadDrive(iDrive, sDisketteName, sDiskettePath, true)) { if (drive.disk) { if (sDiskettePath) { this.addDiskHistory(sDisketteName, sDiskettePath, drive.disk); @@ -1103,7 +1103,7 @@ FDC.prototype.initDrive = function(drive, iDrive, data) } /* - * TODO: If loadDiskette() returned true, then this can happen immediately. Otherwise, loadDiskette() + * TODO: If loadDrive() returned true, then this can happen immediately. Otherwise, loadDrive() * will have merely "queued up" the load request and drive.disk won't be ready yet, so figure out how/when * we can properly restore drive.sector in that case. */ @@ -1288,7 +1288,7 @@ FDC.prototype.autoMount = function(fRemount) */ var iDrive = sDrive.charCodeAt(0) - 0x41; if (iDrive >= 0 && iDrive < this.aDrives.length) { - if (!this.loadDiskette(iDrive, sDisketteName, sDiskettePath, true) && fRemount) { + if (!this.loadDrive(iDrive, sDisketteName, sDiskettePath, true) && fRemount) { this.setReady(false); } continue; @@ -1342,16 +1342,16 @@ FDC.prototype.loadSelectedDrive = function(sDisketteName, sDiskettePath, file) if (DEBUG) this.println("loading disk " + sDiskettePath + "..."); - while (this.loadDiskette(iDrive, sDisketteName, sDiskettePath, false, file) < 0) { + while (this.loadDrive(iDrive, sDisketteName, sDiskettePath, false, file) < 0) { if (!window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)")) { return; } /* - * So here's the story: loadDiskette() returned true, which it does ONLY if the specified disk is already + * So here's the story: loadDrive() returned true, which it does ONLY if the specified disk is already * mounted, AND the user clicked OK to reload the original disk image. So we must toss any history we have - * for the disk, unload it, and then loop back around to loadDiskette(). + * for the disk, unload it, and then loop back around to loadDrive(). * - * loadDiskette() should NEVER return true the second time, since no disk is loaded. In other words, + * loadDrive() should NEVER return true the second time, since no disk is loaded. In other words, * this isn't really a loop so much as a one-time retry operation. */ this.removeDiskHistory(sDisketteName, sDiskettePath); @@ -1363,24 +1363,24 @@ FDC.prototype.loadSelectedDrive = function(sDisketteName, sDiskettePath, file) }; /** - * mountDiskette(iDrive, sDisketteName, sDiskettePath) + * mountDrive(iDrive, sDisketteName, sDiskettePath) * * @this {FDC} * @param {number} iDrive * @param {string} sDisketteName * @param {string} sDiskettePath */ -FDC.prototype.mountDiskette = function(iDrive, sDisketteName, sDiskettePath) +FDC.prototype.mountDrive = function(iDrive, sDisketteName, sDiskettePath) { var drive = this.aDrives[iDrive]; this.unloadDrive(iDrive, true, true); drive.fLocal = true; var disk = new Disk(this, drive, DiskAPI.MODE.PRELOAD); - this.doneLoadDiskette(drive, disk, sDisketteName, sDiskettePath, true); + this.doneLoadDrive(drive, disk, sDisketteName, sDiskettePath, true); }; /** - * loadDiskette(iDrive, sDisketteName, sDiskettePath, fAutoMount, file) + * loadDrive(iDrive, sDisketteName, sDiskettePath, fAutoMount, file) * * NOTE: If sDiskettePath is already loaded in the drive, nothing needs to be done. * @@ -1392,7 +1392,7 @@ FDC.prototype.mountDiskette = function(iDrive, sDisketteName, sDiskettePath) * @param {File} [file] is set if there's an associated File object * @return {number} 1 if diskette loaded, 0 if queued up (or busy), -1 if already loaded */ -FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAutoMount, file) +FDC.prototype.loadDrive = function(iDrive, sDisketteName, sDiskettePath, fAutoMount, file) { var drive = this.aDrives[iDrive]; if (sDiskettePath) { @@ -1419,7 +1419,7 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut } drive.fLocal = !!file; var disk = new Disk(this, drive, DiskAPI.MODE.PRELOAD); - if (!disk.load(sDisketteName, sDiskettePath, file, this.doneLoadDiskette)) { + if (!disk.load(sDisketteName, sDiskettePath, file, this.doneLoadDrive)) { return 0; } return 1; @@ -1429,7 +1429,7 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut }; /** - * doneLoadDiskette(drive, disk, sDisketteName, sDiskettePath, fAutoMount) + * doneLoadDrive(drive, disk, sDisketteName, sDiskettePath, fAutoMount) * * @this {FDC} * @param {Object} drive @@ -1438,7 +1438,7 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut * @param {string} sDiskettePath * @param {boolean} [fAutoMount] */ -FDC.prototype.doneLoadDiskette = function onFDCLoadNotify(drive, disk, sDisketteName, sDiskettePath, fAutoMount) +FDC.prototype.doneLoadDrive = function onFDCLoadNotify(drive, disk, sDisketteName, sDiskettePath, fAutoMount) { var aDiskInfo; @@ -1481,7 +1481,7 @@ FDC.prototype.doneLoadDiskette = function onFDCLoadNotify(drive, disk, sDiskette this.addDiskHistory(sDisketteName, sDiskettePath, disk); /* - * For a local disk (ie, one loaded via mountDiskette()), the disk.restore() performed by addDiskHistory() + * For a local disk (ie, one loaded via mountDrive()), the disk.restore() performed by addDiskHistory() * may have altered the disk geometry, so refresh the disk info. */ aDiskInfo = disk.info(); diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 86601ffaf..27001524f 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -520,31 +520,6 @@ var PDP11 = { SL: 0o177774, // Stack Limit Register PSW: 0o177776 // 777776 17777776 0x3FFFFE Processor Status Word }, - PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit) - PRI: 4, // NOTE: reader has precedence over punch - RVEC: 0o70, // reader vector - PVEC: 0o74, // punch vector - PRS: { - RE: 0x0001, // Reader Enable (W/O) - RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt) - DONE: 0x0080, // Done (R/O) - BUSY: 0x0800, // Busy (R/O) - ERROR: 0x8000, // Error (R/O) - CLEAR: 0x08C0, // bits cleared on INIT - RMASK: 0xFFFE, // bits readable (TODO: All I know for sure is that bit 0 is NOT readable; see readPRS()) - WMASK: 0x0041, // bits writable - BAUD: 3600 - }, - PRB: { - MASK: 0x00FF // Data - }, - PPS: { - /* - * TODO: Flesh this out if/when we add Paper Tape Punch support - */ - BAUD: 600 - }, - }, DL11: { // Serial Line Interface (program compatible with the KL11 for control of console teleprinters) PRI: 4, RVEC: 0o60, @@ -595,6 +570,35 @@ var PDP11 = { IE: 0x0040, // Interrupt Enable MON: 0x0080 // Monitor } + }, + PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit) + PRI: 4, // NOTE: reader has precedence over punch + RVEC: 0o70, // reader vector + PVEC: 0o74, // punch vector + PRS: { + RE: 0x0001, // Reader Enable (W/O) + RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt) + DONE: 0x0080, // Done (R/O) + BUSY: 0x0800, // Busy (R/O) + ERROR: 0x8000, // Error (R/O) + CLEAR: 0x08C0, // bits cleared on INIT + RMASK: 0xFFFE, // bits readable (TODO: All I know for sure is that bit 0 is NOT readable; see readPRS()) + WMASK: 0x0041, // bits writable + BAUD: 3600 + }, + PRB: { + MASK: 0x00FF // Data + }, + PPS: { + /* + * TODO: Flesh this out if/when we add Paper Tape Punch support + */ + BAUD: 600 + }, + }, + RL11: { // RL11 Disk Controller + PRI: 5, // TODO: Review controller defaults and their configurability + VEC: 0o160 } }; diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index ab4bc2101..141040188 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -40,6 +40,7 @@ if (NODE) { var BusPDP11 = require("./bus"); var MessagesPDP11 = require("./messages"); var PC11 = require("./pc11"); + var RL11 = require("./rl11"); } /** @@ -1231,6 +1232,10 @@ DevicePDP11.init = function() device = new PC11(parmsDevice); Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); break; + case 'rl11': + device = new RL11(parmsDevice); + Component.bindComponentControls(device, eDevice, PDP11.APPCLASS); + break; } } }; diff --git a/modules/pdp11/lib/disk.js b/modules/pdp11/lib/disk.js new file mode 100644 index 000000000..9df2ec0ff --- /dev/null +++ b/modules/pdp11/lib/disk.js @@ -0,0 +1,1233 @@ +/** + * @fileoverview Implements disk image support for various disk controllers. + * @author Jeff Parsons + * @copyright © Jeff Parsons 2012-2016 + * + * This file is part of PCjs, a computer emulation software project at . + * + * PCjs is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCjs. If not, + * see . + * + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . + * + * Some PCjs files also attempt to load external resource files, such as character-image files, + * ROM files, and disk image files. Those external resource files are not considered part of PCjs + * for purposes of the GNU General Public License, and the author does not claim any copyright + * as to their contents. + */ + +/* + * The DiskPDP11 component provides methods for: + * + * 1) creating an empty disk: create() + * 2) loading a disk image: load() + * 3) getting disk information: info() + * 4) seeking a disk sector: seek() + * 5) reading data from a sector: read() + * 6) writing data to a sector: write() + * 7) save disk deltas: save() + * 8) restore disk deltas: restore() + * 9) converting disk contents: toJSON() + * + * More functionality may be factored out of the disk controller components later and moved here, + * to further reduce some of the duplication between them, but the above functionality is a good start. + */ + +"use strict"; + +if (NODE) { + var str = require("../../shared/lib/strlib"); + var usr = require("../../shared/lib/usrlib"); + var web = require("../../shared/lib/weblib"); + var DiskAPI = require("../../shared/lib/diskapi"); + var DumpAPI = require("../../shared/lib/dumpapi"); + var Component = require("../../shared/lib/component"); + var MessagesPDP11 = require("./messages"); +} + +/** + * DiskPDP11(controller, drive, mode) + * + * Disk contents are stored as an array (aDiskData) of cylinders, each of which is an array of + * heads, each of which is an array of sector objects; the latter contain sector numbers and + * sector data, where sector data is an array of dwords. The format does not impose any + * limitations on number of cylinders, number of heads, sectors per track, or bytes per sector. + * + * WARNING: All accesses to disk sector properties must be via their string names, not their + * "dot" names, otherwise code will break after it's been processed by the Closure Compiler, + * and any dumped disks may be unmountable. This is a side-effect of how we mount and dump + * disk images (ie, as JSON-encoded streams). + * + * This means, for example, that all references to "track[iSector].data" must actually appear as + * "track[iSector]['data']". + * + * @constructor + * @extends Component + * @param {RL11} controller + * @param {Object} drive + * @param {string} mode + */ +function DiskPDP11(controller, drive, mode) +{ + Component.call(this, "Disk", {'id': controller.idMachine + ".disk" + str.toHex(++DiskPDP11.nDisks, 4)}, DiskPDP11, MessagesPDP11.DISK); + + /* + * Route all non-Debugger messages (eg, notice() and println() calls) through + * this.controller (eg, controller.notice() and controller.println()), because + * the Computer component is unaware of any Disk objects and therefore will not + * set up the usual overrides when a Control Panel is installed. + */ + this.controller = controller; + this.cmp = controller.cmp; + this.dbg = controller.dbg; + this.drive = drive; + + /* + * We pull out a number of drive properties that we may or may not need as defaults + */ + this.sDiskName = drive.name; + this.fRemovable = drive.fRemovable; + + /* + * Initialize the disk contents + */ + this.create(mode, drive.nCylinders, drive.nHeads, drive.nSectors, drive.cbSector); + + this.setReady(); +} + +/* + * A global disk count, used to form unique Disk component IDs (totally optional; for debugging purposes only) + */ +DiskPDP11.nDisks = 0; + +Component.subclass(DiskPDP11); + +/** + * Every Sector object (once loaded, parsed, and "normalized") should have ALL of the following named properties: + * + * 'sector': sector number + * 'length': size of the sector, in bytes + * 'data': array of dwords + * 'pattern': dword pattern to use for empty or partial sectors (or null if sector still needs to be loaded) + * + * initSector() also sets the following properties, to help us quickly identify its location within aDiskData: + * + * iCylinder + * iHead + * + * In addition, we will maintain the following information on a per-sector basis, as sectors are modified: + * + * iModify: index of first modified dword in sector + * cModify: number of modified dwords in sector + * fDirty: true if sector is dirty, false if clean (or cleaning in progress) + * + * @typedef {{ + * sector: number, + * length: number, + * data: Array., + * pattern: (number|null), + * iCylinder: number, + * iHead: number, + * iModify: number, + * cModify: number + * }} + */ +var SectorInfo; + +/** + * initBus(cmp, bus, cpu, dbg) + * + * We have no real interest in this notification, other than to obtain a reference to the Debugger + * for every disk loaded BEFORE the initBus() phase; any disk loaded AFTER that point will get its Debugger + * reference, if any, from the disk controller passed to the DiskPDP11() constructor. + * + * @this {DiskPDP11} + * @param {ComputerPDP11} cmp + * @param {BusPDP11} bus + * @param {CPUStatePDP11} cpu + * @param {DebuggerPDP11} dbg + */ +DiskPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) { + this.dbg = dbg; +}; + +/** + * create() + * + * @this {DiskPDP11} + * @param {string} mode + * @param {number} nCylinders + * @param {number} nHeads + * @param {number} nSectors (per track) + * @param {number} cbSector + * + * Initializes the disk contents according to the current drive mode and parameters. + */ +DiskPDP11.prototype.create = function(mode, nCylinders, nHeads, nSectors, cbSector) +{ + this.mode = mode; + this.nCylinders = nCylinders; + this.nHeads = nHeads; + this.nSectors = nSectors; + this.cbSector = cbSector; + this.aDiskData = []; + /* + * If the drive is using PRELOAD mode, then it will use the load()/mount() process to initialize the disk contents; + * it wouldn't hurt to let create() do its thing, too, but it's a waste of time. + */ + if (this.mode != DiskAPI.MODE.PRELOAD) { + if (DEBUG && this.messageEnabled()) { + this.printMessage("blank disk for \"" + this.sDiskName + "\": " + this.nCylinders + " cylinders, " + this.nHeads + " head(s)"); + } + var aCylinders = new Array(this.nCylinders); + for (var iCylinder = 0; iCylinder < aCylinders.length; iCylinder++) { + var aHeads = new Array(this.nHeads); + for (var iHead = 0; iHead < aHeads.length; iHead++) { + var aSectors = new Array(this.nSectors); + for (var iSector = 1; iSector <= aSectors.length; iSector++) { + /* + * Now that our read() and write() functions can deal with unallocated data + * arrays, and can read/write the specified pattern on-the-fly, we no longer need + * to pre-allocate and pre-initialize the 'data' array. + */ + aSectors[iSector - 1] = this.initSector(null, iCylinder, iHead, iSector, this.cbSector, 0); + } + aHeads[iHead] = aSectors; + } + aCylinders[iCylinder] = aHeads; + } + this.aDiskData = aCylinders; + } + this.dwChecksum = null; +}; + +/** + * load(sDiskName, sDiskPath, file, fnNotify) + * + * TODO: Figure out how we can strongly type fnNotify, because the Closure Compiler has issues with: + * + * param {function(Component,Object,Disk,string,string)} fnNotify + * + * for: + * + * this.fnNotify.call(this.controller, this.drive, disk, this.sDiskName, this.sDiskPath); + * + * Also, while we're at it, learn if there are ways to: + * + * 1) declare a function taking NO parameters (ie, generate a warning if any parameters are specified) + * 2) declare a type for a function's return value + * + * @this {DiskPDP11} + * @param {string} sDiskName + * @param {string} sDiskPath + * @param {File} [file] is set if there's an associated File object + * @param {function(...)} [fnNotify] + * @param {Component} [controller] + * @return {boolean} true if load completed (successfully or not), false if queued + */ +DiskPDP11.prototype.load = function(sDiskName, sDiskPath, file, fnNotify, controller) +{ + var sDiskURL = sDiskPath; + + /* + * We could use this.log() as well, but it wouldn't display which component initiated the load. + */ + if (DEBUG) { + var sMessage = 'load("' + sDiskName + '","' + sDiskPath + '")'; + this.controller.log(sMessage); + this.printMessage(sMessage); + } + + if (this.fnNotify) { + if (DEBUG) this.controller.log('too many load requests for "' + sDiskName + '" (' + sDiskPath + ')'); + return true; + } + + this.sDiskName = sDiskName; + this.sDiskPath = sDiskPath; + this.sDiskFile = str.getBaseName(sDiskPath); + + var disk = this; + this.fnNotify = fnNotify; + this.controllerNotify = controller || this.controller; + + if (file) { + var reader = new FileReader(); + reader.onload = function() { + disk.build(reader.result, true); + }; + reader.readAsArrayBuffer(file); + return true; + } + + /* + * If there's an occurrence of API_ENDPOINT anywhere in the path, we assume we can use it as-is; + * ie, that the user has already formed a URL of the type we use ourselves for unconverted disk images. + */ + if (sDiskPath.indexOf(DumpAPI.ENDPOINT) < 0) { + /* + * If the selected disk image has a "json" extension, then we assume it's a pre-converted + * JSON-encoded disk image, so we load it as-is; otherwise, we ask our server-side disk image + * converter to return the corresponding JSON-encoded data. + */ + var sDiskExt = str.getExtension(sDiskPath); + if (sDiskExt == DumpAPI.FORMAT.JSON || sDiskExt == DumpAPI.FORMAT.JSON_GZ) { + sDiskURL = encodeURI(sDiskPath); + } else { + var sDiskParm = DumpAPI.QUERY.PATH; + var sSizeParm = '&' + DumpAPI.QUERY.MBHD + "=10"; + /* + * 'mbhd' is a new parm added for hard drive support. In the case of 'file' or 'dir' requests, + * 'mbhd' informs DumpAPI.ENDPOINT that it should create a hard disk image, and one not larger than + * the specified size (eg, 10mb). In fact, until DumpAPI.ENDPOINT is changed to create custom hard + * disk BPBs, you'll always get a standard PC XT 10mb disk image, so if the 'file' or 'dir' contains + * more than 10mb of data, the request will fail. Ultimately, I want to honor the controller's + * driveConfig 'size' parm, or to match the capacity required by the driveConfig 'type' parameter. + * + * If a 'disk' is specified, we pass mbhd=0, because the actual size will depend on the image. + * However, I don't currently have any "dsk" or "img" files containing hard disk images; those formats + * were really intended for floppy disk images. If I never create any hard disk image files, then + * we can simply eliminate sSizeParm in the 'disk' case. + * + * Added more extensions to the list of paths-treated-as-disk-images, so that URLs to files located here: + * + * ftp://ftp.oldskool.org/pub/TOPBENCH/dskimage/ + * + * can be used as-is. TODO: There's a TODO in netlib.getFile() regarding remote support that needs + * to be resolved first; DiskDump relies on that function for its remote requests, and it currently + * supports only HTTP. + */ + if (!sDiskPath.indexOf("http:") || !sDiskPath.indexOf("ftp:") || ["dsk", "ima", "img", "360", "720", "12", "144"].indexOf(sDiskExt) >= 0) { + sDiskParm = DumpAPI.QUERY.DISK; + sSizeParm = '&' + DumpAPI.QUERY.MBHD + "=0"; + } else if (str.endsWith(sDiskPath, '/')) { + sDiskParm = DumpAPI.QUERY.DIR; + } + sDiskURL = web.getHost() + DumpAPI.ENDPOINT + '?' + sDiskParm + '=' + encodeURIComponent(sDiskPath) + (this.fRemovable ? "" : sSizeParm) + "&" + DumpAPI.QUERY.FORMAT + "=" + DumpAPI.FORMAT.JSON; + } + } + return !!web.getResource(sDiskURL, null, true, function(sURL, sResponse, nErrorCode) { + disk.doneLoad(sURL, sResponse, nErrorCode); + }); +}; + +/** + * build(buffer, fModified) + * + * Builds a disk image from an ArrayBuffer (eg, from a FileReader object), rather than from JSON-encoded data. + * + * @this {DiskPDP11} + * @param {?} buffer (we KNOW this is an ArrayBuffer, but we can't seem to convince the Closure Compiler) + * @param {boolean} [fModified] is true if we should mark the entire disk modified (to ensure that we save/restore it) + */ +DiskPDP11.prototype.build = function(buffer, fModified) +{ + var disk; + var cbDiskData = buffer? buffer.byteLength : 0; + var diskFormat = DiskAPI.DISK_FORMATS[cbDiskData]; + + if (diskFormat) { + this.nCylinders = diskFormat[0]; + this.nHeads = diskFormat[1]; + this.nSectors = diskFormat[2]; + this.cbSector = (diskFormat[3] || 512); + + var cdw = this.cbSector >> 2, dwPattern = 0, dwChecksum = 0; + var ib = 0; + var dv = new DataView(buffer, 0, cbDiskData); + + this.aDiskData = new Array(this.nCylinders); + for (var iCylinder = 0; iCylinder < this.aDiskData.length; iCylinder++) { + var cylinder = this.aDiskData[iCylinder] = new Array(this.nHeads); + for (var iHead = 0; iHead < cylinder.length; iHead++) { + var head = cylinder[iHead] = new Array(this.nSectors); + for (var iSector = 0; iSector < head.length; iSector++) { + var sector = this.initSector(null, iCylinder, iHead, iSector + 1, this.cbSector, dwPattern); + var adw = sector['data']; + for (var idw = 0; idw < cdw; idw++, ib += 4) { + var dw = adw[idw] = dv.getInt32(ib, true); + dwChecksum = (dwChecksum + dw) & (0xffffffff|0); + } + if (fModified) sector.cModify = cdw; + head[iSector] = sector; + } + } + } + this.dwChecksum = dwChecksum; + disk = this; + } else { + this.notice("Unrecognized disk format (" + cbDiskData + " bytes)"); + } + + if (this.fnNotify) { + this.fnNotify.call(this.controller, this.drive, disk, this.sDiskName, this.sDiskPath); + this.fnNotify = null; + } +}; + +/** + * doneLoad(sURL, sDiskData, nErrorCode) + * + * This function was originally called mount(). If the mount is successful, we pass the Disk object to the + * caller's fnNotify handler; otherwise, we pass null. + * + * @this {DiskPDP11} + * @param {string} sURL + * @param {string} sDiskData + * @param {number} nErrorCode (response from server if anything other than 200) + */ +DiskPDP11.prototype.doneLoad = function(sURL, sDiskData, nErrorCode) +{ + var disk = null; + this.fWriteProtected = false; + var fPrintOnly = (nErrorCode < 0 && this.cmp && !this.cmp.flags.powered); + + if (nErrorCode) { + /* + * This can happen for innocuous reasons, such as the user switching away too quickly, forcing + * the request to be cancelled. And unfortunately, the browser cancels XMLHttpRequest requests + * BEFORE it notifies any page event handlers, so if the Computer's being powered down, we won't know + * that yet. For now, we rely on the lack of a specific error (nErrorCode < 0), and suppress the + * notify() alert if there's no specific error AND the computer is not powered up yet. + */ + this.controller.notice("Unable to load disk \"" + this.sDiskName + "\" (error " + nErrorCode + ": " + sURL + ")", fPrintOnly); + } else { + if (DEBUG && this.messageEnabled()) { + this.printMessage('doneLoad("' + this.sDiskPath + '")'); + } + + Component.addMachineResource(this.controller.idMachine, sURL, sDiskData); + + try { + /* + * The following code was a hack to turn on write-protection for a disk image if there was + * an initial comment line containing the string "write-protected". However, since comments + * are technically not allowed in JSON, I needed an alternative solution. So, if the basename + * contains the suffix "-readonly", then I'll turn on write-protection for that disk as well. + * + * TODO: Provide some UI for turning write-protection on/off for disks at will, and provide + * an XML-based solution (ie, a per-disk XML configuration option) for controlling it as well. + */ + var sBaseName = str.getBaseName(this.sDiskFile, true).toLowerCase(); + if (sBaseName.indexOf("-readonly") > 0) { + this.fWriteProtected = true; + } else { + var iEOL = sDiskData.indexOf("\n"); + if (iEOL > 0 && iEOL < 1024) { + var sConfig = sDiskData.substring(0, iEOL); + if (sConfig.indexOf("write-protected") > 0) { + this.fWriteProtected = true; + } + } + } + /* + * The most likely source of any exception will be here, where we're parsing the disk data. + */ + var aDiskData; + if (sDiskData.substr(0, 1) == "<") { // if the "data" begins with a "<"... + /* + * Early server configs reported an error (via the nErrorCode parameter) if a disk URL was invalid, + * but more recent server configs now display a somewhat friendlier HTML error page. The downside, + * however, is that the original error has been buried, and we've received "data" that isn't actually + * disk data. + * + * So, if the data we've received appears to be "HTML-like", all we can really do is assume that the + * disk image is missing. And so we pretend we received an error message to that effect. + */ + aDiskData = ["Missing disk image: " + this.sDiskName]; + } else { + /* + * TODO: IE9 is rather unfriendly and restrictive with regard to how much data it's willing to + * eval(). In particular, the 10Mb disk image we use for the Windows 1.01 demo config fails in + * IE9 with an "Out of memory" exception. One work-around would be to chop the data into chunks + * (perhaps one track per chunk, using regular expressions) and then manually re-assemble it. + * + * However, it turns out that using JSON.parse(sDiskData) instead of eval("(" + sDiskData + ")") + * is a much easier fix. The only drawback is that we must first quote any unquoted property names + * and remove any comments, because while eval() was cool with them, JSON.parse() is more particular; + * the following RegExp replacements take care of those requirements. + * + * The use of hex values is something else that eval() was OK with, but JSON.parse() is not, and + * while I've stopped using hex values in DumpAPI responses (at least when "format=json" is specified), + * I can't guarantee they won't show up in "legacy" images, and there's no simple RegExp replacement + * for transforming hex values into decimal values, so I cop out and fall back to eval() if I detect + * any hex prefixes ("0x") in the sequence. Ditto for error messages, which appear like so: + * + * ["unrecognized disk path: test.img"] + */ + if (sDiskData.indexOf("0x") < 0 && sDiskData.substr(0, 2) != "[\"") { + aDiskData = JSON.parse(sDiskData.replace(/([a-z]+):/gm, "\"$1\":").replace(/\/\/[^\n]*/gm, "")); + } else { + aDiskData = eval("(" + sDiskData + ")"); + } + } + + if (!aDiskData.length) { + Component.error("Empty disk image: " + this.sDiskName); + } + else if (aDiskData.length == 1) { + Component.error(aDiskData[0]); + } + /* + * aDiskData is an array of cylinders, each of which is an array of heads, each of which + * is an array of sector objects. The format does not impose any limitations on number of + * cylinders, number of heads, or number of bytes in any of the sector object byte-arrays. + * + * WARNING: All accesses to sector object properties must be via their string names, not their + * "dot" names, otherwise code will break after it's been processed by the Closure Compiler. + * + * Sector object properties include: + * + * 'sector' the sector number (1-based, not required to be sequential) + * 'length' the byte-length (ie, formatted length) of the sector + * 'data' the dword-array containing the sector data + * 'pattern' if the dword-array length is less than 'length'/4, this value must be used + * to pad out the sector; if no 'pattern' is specified, it's assumed to be zero + * + * We still support the older JSON encoding, where sector data was encoded as an array of 'bytes' + * rather than a dword 'data' array. However, our support is strictly limited to an on-the-fly + * conversion to a forward-compatible 'data' array. + */ + else { + if (DEBUG && this.messageEnabled(MessagesPDP11.DISK | MessagesPDP11.LOG)) { + var sCylinders = aDiskData.length + " track" + (aDiskData.length > 1 ? "s" : ""); + var nHeads = aDiskData[0].length; + var sHeads = nHeads + " head" + (nHeads > 1 ? "s" : ""); + var nSectorsPerTrack = aDiskData[0][0].length; + var sSectorsPerTrack = nSectorsPerTrack + " sector" + (nSectorsPerTrack > 1 ? "s" : "") + "/track"; + this.printMessage(sCylinders + ", " + sHeads + ", " + sSectorsPerTrack); + } + /* + * Before the image is usable, we must "normalize" all the sectors. In the past, this meant + * "inflating" them all. However, that's no longer strictly necessary. Mainly, it just means + * setting 'length', 'data', and 'pattern' properties, so that all the sectors are well-defined. + * This includes detecting sector data in older formats (eg, the old array of 'bytes' instead + * of the new 'data' array of dwords) and converting them on-the-fly to the current format. + */ + this.nCylinders = aDiskData.length; + this.nHeads = aDiskData[0].length; + this.nSectors = aDiskData[0][0].length; + var sector = aDiskData[0][0][0]; + this.cbSector = (sector && sector['length']) || 512; + + var dwChecksum = 0; + for (var iCylinder = 0; iCylinder < this.nCylinders; iCylinder++) { + for (var iHead = 0; iHead < this.nHeads; iHead++) { + for (var iSector = 0; iSector < this.nSectors; iSector++) { + sector = aDiskData[iCylinder][iHead][iSector]; + if (!sector) continue; // non-standard (eg, XDF) disk images may have "unused" (null) sectors + var length = sector['length']; + if (length === undefined) { // provide backward-compatibility with older JSON... + length = sector['length'] = 512; + } + length >>= 2; // convert length from a byte-length to a dword-length + var dwPattern = sector['pattern']; + if (dwPattern === undefined) { + dwPattern = sector['pattern'] = 0; + } + var adw = sector['data']; + if (adw === undefined) { + var ab = sector['bytes']; + if (ab === undefined || !ab.length) { + /* + * It would be odd if there was neither a 'bytes' nor 'data' array; I'm just + * being paranoid. It's more likely that the 'bytes' array is simply empty, + * in which case we need only create an empty 'data' array and turn the byte + * pattern, if any, into a dword pattern. + */ + adw = []; + this.assert((dwPattern & 0xff) == dwPattern); + dwPattern = sector['pattern'] = (dwPattern | (dwPattern << 8) | (dwPattern << 16) | (dwPattern << 24)); + sector['data'] = adw; + } else { + /* + * To keep the conversion code simple, we'll do any necessary pattern-filling first, + * to fully "inflate" the sector, eliminating the possibility of partial dwords and + * saving any code downstream from dealing with byte-size patterns. + */ + var cb = length << 2; + for (var ib = ab.length; ib < cb; ib++) { + ab[ib] = dwPattern; // the pattern for byte-arrays was only a byte + } + this.fill(sector, ab, 0); + } + delete sector['bytes']; + } + this.initSector(sector, iCylinder, iHead); + /* + * For the disk as a whole, we maintain a checksum of the original unmodified data: + * + * dwChecksum: summation of all dwords in all non-empty sectors + * + * Pattern-filling of sectors is deferred until absolutely necessary (eg, when a sector is + * being written). So all we need to do at this point is checksum all the initial sector data. + */ + for (var idw = 0; idw < adw.length; idw++) { + dwChecksum = (dwChecksum + adw[idw]) & (0xffffffff|0); + } + } + } + } + this.aDiskData = aDiskData; + this.dwChecksum = dwChecksum; + disk = this; + } + } catch (e) { + Component.error("Disk image error (" + sURL + "): " + e.message); + } + } + + if (this.fnNotify) { + this.fnNotify.call(this.controllerNotify, this.drive, disk, this.sDiskName, this.sDiskPath); + this.fnNotify = null; + } +}; + +/** + * getSectorString(sector, off, len) + * + * WARNING: This function is restricted to reading a string contained ENTIRELY within the specified sector. + * + * @this {DiskPDP11} + * @param {Object} sector + * @param {number} off (byte offset) + * @param {number} len (use -1 to read a null-terminated string) + * @return {string} + */ +DiskPDP11.prototype.getSectorString = function(sector, off, len) +{ + var s = ""; + while (len--) { + var b = this.read(sector, off++); + if (b <= 0) break; + s += String.fromCharCode(b); + } + return s; +}; + +/** + * initSector(sector, iCylinder, iHead, iSector, cbSector, dwPattern) + * + * Ensures every sector has ALL the properties of a proper Sector object; ie: + * + * 'sector': sector number + * 'length': size of the sector, in bytes + * 'data': array of dwords + * 'pattern': dword pattern to use for empty or partial sectors + * + * In addition, we will maintain the following information on a per-sector basis, + * as sectors are modified: + * + * iModify: index of first modified dword in sector + * cModify: number of modified dwords in sector + * fDirty: true if sector is dirty, false if clean (or cleaning in progress) + * + * @this {DiskPDP11} + * @param {Object} sector + * @param {number} iCylinder + * @param {number} iHead + * @param {number} [iSector] + * @param {number} [cbSector] + * @param {number|null} [dwPattern] + * @return {Object} + */ +DiskPDP11.prototype.initSector = function(sector, iCylinder, iHead, iSector, cbSector, dwPattern) +{ + if (!sector) { + sector = {'sector': iSector, 'length': cbSector, 'data': [], 'pattern': dwPattern}; + } + sector.iCylinder = iCylinder; + sector.iHead = iHead; + sector.iModify = sector.cModify = 0; + sector.fDirty = false; + return sector; +}; + +/** + * info() + * + * @this {DiskPDP11} + * @return {Array} containing: [nCylinders, nHeads, nSectorsPerTrack, nBytesPerSector] + */ +DiskPDP11.prototype.info = function() +{ + if (!this.aDiskData.length) { + return [0, 0, 0, 0]; + } + return [this.aDiskData.length, this.aDiskData[0].length, this.aDiskData[0][0].length, this.aDiskData[0][0][0]['length']]; +}; + +/** + * seek(iCylinder, iHead, iSector, fWrite, done) + * + * TODO: There's some dodgy code in seek() that allows floppy images to be dynamically + * reconfigured with more heads and/or sectors/track, and it does so by peeking at more drive + * properties. That code used to be in the FDC component, where it was perfectly reasonable + * to access those properties. We need a cleaner interface back to the drive, similar to the + * info() interface we provide to the controller. + * + * Whether or not the "dynamic reconfiguration" feature itself is perfectly reasonable is, + * of course, a separate question. + * + * @this {DiskPDP11} + * @param {number} iCylinder + * @param {number} iHead + * @param {number} iSector + * @param {boolean} [fWrite] + * @param {function(Object,boolean)} [done] + * @return {Object|null} is the requested sector, or null if not found (or not available yet) + */ +DiskPDP11.prototype.seek = function(iCylinder, iHead, iSector, fWrite, done) +{ + var sector = null; + var drive = this.drive; + var cylinder = this.aDiskData[iCylinder]; + if (cylinder) { + var i; + var track = cylinder[iHead]; + /* + * The following code allows a single-sided diskette image to be reformatted (ie, "expanded") + * as a double-sided image, provided the drive has more than one head (see drive.nHeads). + */ + if (!track && drive.bFormatting && iHead < drive.nHeads) { + track = cylinder[iHead] = new Array(drive.bSectorEnd); + for (i = 0; i < track.length; i++) { + track[i] = this.initSector(null, iCylinder, iHead, i + 1, drive.nBytes, 0); + } + } + if (track) { + for (i = 0; i < track.length; i++) { + if (track[i] && track[i]['sector'] == iSector) { + /* + * If the sector's pattern is null, then this sector's true contents have not yet + * been fetched from the server. + */ + sector = track[i]; + break; + } + } + /* + * The following code allows an 8-sector track to be reformatted (ie, "expanded") as a 9-sector track. + */ + if (!sector && drive.bFormatting && drive.bSector == 9) { + sector = track[i] = this.initSector(null, iCylinder, iHead, drive.bSector, drive.nBytes, 0); + } + } + } + if (done) done(sector, false); + return sector; +}; + +/** + * fill(sector, ab, off) + * + * @this {DiskPDP11} + * @param {Object} sector + * @param {*} ab (technically, this should be typed as Array. but I'm having trouble coercing JSON.parse() to that) + * @param {number} off + */ +DiskPDP11.prototype.fill = function(sector, ab, off) +{ + var cdw = sector['length'] >> 2; + var adw = new Array(cdw); + for (var idw = 0; idw < cdw; idw++) { + adw[idw] = ab[off] | (ab[off + 1] << 8) | (ab[off + 2] << 16) | (ab[off + 3] << 24); + off += 4; + } + sector['data'] = adw; + /* + * TODO: Consider taking this opportunity to shrink 'data' down by the number of dwords at the end of the buffer that + * contain the same pattern, and setting 'pattern' accordingly. + */ +}; + +/** + * toBytes(sector) + * + * @this {DiskPDP11} + * @param {Object} sector + * @return {Array.} is an array of bytes + */ +DiskPDP11.prototype.toBytes = function(sector) +{ + var cb = sector['length']; + var ab = new Array(cb); + var ib = 0; + var cdw = cb >> 2; + var adw = sector['data']; + var dwPattern = sector['pattern']; + for (var idw = 0; idw < cdw; idw++) { + var dw = (idw < adw.length? adw[idw] : dwPattern); + ab[ib++] = dw & 0xff; + ab[ib++] = (dw >> 8) & 0xff; + ab[ib++] = (dw >> 16) & 0xff; + ab[ib++] = (dw >> 24) & 0xff; + } + return ab; +}; + +/** + * read(sector, ibSector, fCompare) + * + * @this {DiskPDP11} + * @param {Object} sector (returned from a previous seek) + * @param {number} ibSector a byte index within the given sector + * @param {boolean} [fCompare] is true if this write-compare read + * @return {number} the specified (unsigned) byte, or -1 if no more data in the sector + */ +DiskPDP11.prototype.read = function(sector, ibSector, fCompare) +{ + var b = -1; + if (sector) { + if (DEBUG && !ibSector && !fCompare && this.messageEnabled()) { + this.printMessage('read("' + this.sDiskFile + '",CHS=' + sector.iCylinder + ':' + sector.iHead + ':' + sector['sector'] + ')'); + } + if (ibSector < sector['length']) { + var adw = sector['data']; + var idw = ibSector >> 2; + var dw = (idw < adw.length ? adw[idw] : sector['pattern']); + b = ((dw >> ((ibSector & 0x3) << 3)) & 0xff); + } + } + return b; +}; + +/** + * write(sector, ibSector, b) + * + * @this {DiskPDP11} + * @param {Object} sector (returned from a previous seek) + * @param {number} ibSector a byte index within the given sector + * @param {number} b the byte value to write + * @return {boolean|null} true if write successful, false if write-protected, null if out of bounds + */ +DiskPDP11.prototype.write = function(sector, ibSector, b) +{ + if (this.fWriteProtected) + return false; + + if (DEBUG && !ibSector && this.messageEnabled()) { + this.printMessage('write("' + this.sDiskFile + '",CHS=' + sector.iCylinder + ':' + sector.iHead + ':' + sector['sector'] + ')'); + } + + if (ibSector < sector['length']) { + if (b != this.read(sector, ibSector, true)) { + var adw = sector['data']; + var dwPattern = sector['pattern']; + var idw = ibSector >> 2; + var nShift = (ibSector & 0x3) << 3; + + /* + * Ensure every byte up to the specified byte is properly initialized. + */ + for (var i = adw.length; i <= idw; i++) adw[i] = dwPattern; + + if (!sector.cModify) { + sector.iModify = idw; + sector.cModify = 1; + } else if (idw < sector.iModify) { + sector.cModify += sector.iModify - idw; + sector.iModify = idw; + } else if (idw >= sector.iModify + sector.cModify) { + sector.cModify += idw - (sector.iModify + sector.cModify) + 1; + } + adw[idw] = (adw[idw] & ~(0xff << nShift)) | (b << nShift); + } + return true; + } + return null; +}; + +/** + * getSector(pba) + * + * @this {DiskPDP11} + * @param {number} pba (physical block address) + * @return {Object|null} sector + */ +DiskPDP11.prototype.getSector = function(pba) +{ + var nSectorsPerCylinder = this.nHeads * this.nSectors; + var iCylinder = (pba / nSectorsPerCylinder) | 0; + if (iCylinder < this.nCylinders) { + var nSectorsRemaining = (pba % nSectorsPerCylinder); + var iHead = (nSectorsRemaining / this.nSectors) | 0; + /* + * PBA numbers are 0-based, but the sector numbers in CHS addressing are 1-based, so add one to iSector + */ + var iSector = (nSectorsRemaining % this.nSectors) + 1; + return this.seek(iCylinder, iHead, iSector); + } + return null; +}; + +/** + * getSectorData(sector, off, len) + * + * WARNING: This function is restricted to reading data contained ENTIRELY within the specified sector. + * + * NOTE: Yes, this function is not the most efficient way to read a byte/word/dword value from within a sector, + * but given the different states a sector may be in, it's certainly the simplest and safest, and since this is + * only used by buildFileTable() and its progeny, it's not clear that we need to be superfast anyway. + * + * @this {DiskPDP11} + * @param {Object} sector + * @param {number} off (byte offset) + * @param {number} len (1 to 4 bytes) + * @return {number} + */ +DiskPDP11.prototype.getSectorData = function(sector, off, len) +{ + var dw = 0; + var nShift = 0; + this.assert(len > 0 && len <= 4); + while (len--) { + this.assert(off < sector['length']); + var b = this.read(sector, off++); + this.assert(b >= 0); + if (b < 0) break; + dw |= (b << nShift); + nShift += 8; + } + return dw; +}; + +/** + * encodeAsBase64() + * + * @this {DiskPDP11} + * @return {string} + */ +DiskPDP11.prototype.encodeAsBase64 = function() +{ + /* + * Gross, but simple; more importantly, it works -- at least for disks of typical floppy magnitude. + */ + var s = "", pba = 0, sector; + while ((sector = this.getSector(pba++))) { + for (var off = 0, len = sector['length']; off < len; off++) { + s += String.fromCharCode(this.getSectorData(sector, off, 1)); + } + } + return btoa(s); +}; + +/** + * save() + * + * The first array entry contains some disk information: + * + * [sDiskPath, dwChecksum, nCylinders, nHeads, nSectors, cbSector] + * + * Each subsequent entry in the returned array contains the following: + * + * [iCylinder, iHead, iSector, iModify, [...]] + * + * where [...] is an array of modified dword(s) in the corresponding sector. + * + * @this {DiskPDP11} + * @return {Array} of modified sectors + */ +DiskPDP11.prototype.save = function() +{ + var i = 0; + var deltas = []; + deltas[i++] = [this.sDiskPath, this.dwChecksum, this.nCylinders, this.nHeads, this.nSectors, this.cbSector]; + if (!this.fWriteProtected) { + var aDiskData = this.aDiskData; + for (var iCylinder = 0; iCylinder < aDiskData.length; iCylinder++) { + for (var iHead = 0; iHead < aDiskData[iCylinder].length; iHead++) { + for (var iSector = 0; iSector < aDiskData[iCylinder][iHead].length; iSector++) { + var sector = aDiskData[iCylinder][iHead][iSector]; + if (sector && sector.cModify) { + var mods = [], n = 0; + var iModify = sector.iModify, iModifyLimit = sector.iModify + sector.cModify; + while (iModify < iModifyLimit) { + mods[n++] = sector['data'][iModify++]; + } + deltas[i++] = [iCylinder, iHead, iSector, sector.iModify, mods]; + } + } + } + } + } + if (DEBUG && this.messageEnabled()) { + this.printMessage('save("' + this.sDiskName + '"): saved ' + (deltas.length - 1) + ' change(s)'); + } + return deltas; +}; + +/** + * restore(deltas) + * + * The first array entry contains some disk information: + * + * [sDiskPath, dwChecksum, nCylinders, nHeads, nSectors, cbSector] + * + * Each subsequent entry in the supplied array contains the following: + * + * [iCylinder, iHead, iSector, iModify, [...]] + * + * where [...] is an array of modified dword(s) in the corresponding sector. + * + * @this {DiskPDP11} + * @param {Array} deltas + * @return {number} 0 if no changes applied, -1 if an error occurred, otherwise the number of sectors modified + */ +DiskPDP11.prototype.restore = function(deltas) +{ + /* + * If deltas is undefined, that's not necessarily an error; the controller may simply be (re)initializing + * itself (although neither controller should be calling restore() under those conditions anymore). + */ + var nChanges = 0; + var sReason = "unsupported restore format"; + /* + * I originally added a check for aDiskData here on the assumption that if there was an error loading + * a disk image, we will have already notified the user, so any additional errors about differing checksums, + * failure to restore the disk state, etc, would just be annoying. HOWEVER, HDC will create an empty disk + * image if its initialization code discovers that no disk was loaded earlier (see verifyDrive). So while + * checking aDiskData is still a good idea, be aware that it won't necessarily avoid redundant error messages + * (at least in the case of HDC). + */ + if (deltas && deltas.length > 0) { + + var i = 0; + var aDiskInfo = deltas[i++]; + + if (aDiskInfo && aDiskInfo.length >= 2) { + /* + * Before getting to the checksum, we have to deal with a new situation: restoring an uninitialized + * disk image from a complete set of deltas. And that is only possible if the disk was saved with the + * original disk geometry. + */ + if (!this.aDiskData.length && aDiskInfo.length >= 6) { + this.create(DiskAPI.MODE.LOCAL, aDiskInfo[2], aDiskInfo[3], aDiskInfo[4], aDiskInfo[5]); + /* + * TODO: Consider setting a flag here that we can check at the end of the restore() function + * that indicates we should recalculate dwChecksum, because we currently have an inconsistency + * between local disks that are mounted via build() and the same disks that are "remounted" + * later by this code; the former has the correct checksum, while the latter has a null checksum. + * + * As you can see below, we currently deal with this by simply ignoring null checksums.... + */ + } + /* + * v1.01 failed to indicate an error if either one of these failure conditions occurred. Although maybe that's + * just as well, since v1.01 also failed to properly deal with situations where the user mounted different diskette(s) + * prior to exiting (hopefully fixed in v1.02). + */ + else if (aDiskInfo[1] != null && this.dwChecksum != null && aDiskInfo[1] != this.dwChecksum) { + sReason = "original checksum (" + aDiskInfo[1] + ") differs from current checksum (" + this.dwChecksum + ")"; + nChanges = -2; + } + /* + * Checksum is more important than disk path, and for now, I want the flexibility to move disk images. + * + else if (aDiskInfo[0] != this.sDiskPath) { + sReason = "original path '" + aDiskInfo[0] + "' differs from current path '" + this.sDiskPath + "'"; + nChanges = -1; + } + */ + } + + if (!this.aDiskData.length) nChanges = -1; + + while (i < deltas.length && nChanges >= 0) { + var m = 0; + var mod = deltas[i++]; + var iCylinder = mod[m++]; + var iHead = mod[m++]; + var iSector = mod[m++]; + /* + * Note the buried test for write-protection. Yes, an invariant condition should be tested + * outside the loop, not inside, but (a) it's a trivial test, (b) the test should never fail + * because save() should never generate any mods for a write-protected disk, and (c) it + * centralizes all the failure conditions we're currently checking (which, admittedly, ain't much). + */ + if (iCylinder >= this.aDiskData.length || iHead >= this.aDiskData[iCylinder].length || iSector >= this.aDiskData[iCylinder][iHead].length) { + sReason = "sector (CHS=" + iCylinder + ':' + iHead + ':' + iSector + ") out of range (" + nChanges + " changes applied)"; + nChanges = -1; + break; + } + if (this.fWriteProtected) { + sReason = "unable to modify write-protected disk"; + nChanges = -1; + break; + } + var iModify = mod[m++]; + var mods = mod[m++]; + var iModifyLimit = iModify + mods.length; + var sector = this.aDiskData[iCylinder][iHead][iSector]; + if (!sector) continue; + /* + * Since write() now deals with empty/partial sectors, we no longer need to completely "inflate" + * the sector prior to applying modifications. So let's just make sure that the sector is "inflated" + * up to iModify. + */ + var idw = sector['data'].length; + while (idw < iModify) { + sector['data'][idw++] = sector['pattern']; + } + var n = 0; + sector.iModify = iModify; + sector.cModify = mods.length; + while (iModify < iModifyLimit) { + sector['data'][iModify++] = mods[n++]; + } + nChanges++; + } + } + + if (nChanges < 0) { + /* + * We're suppressing checksum messages for the general public for now.... + */ + if (DEBUG || nChanges != -2) { + this.controller.notice("Unable to restore disk '" + this.sDiskName + ": " + sReason); + } + } else { + if (DEBUG && this.messageEnabled()) { + this.printMessage('restore("' + this.sDiskName + '"): restored ' + nChanges + ' change(s)'); + } + } + return nChanges; +}; + +/** + * toJSON() + * + * We perform some RegExp massaging on the JSON data to eliminate unnecessary properties + * (eg, 'length' values of 512, 'pattern' values of 0, since those are defaults). + * + * In addition, we first check every sector to see if it can be "deflated". Sectors that were + * initially "deflated" should remain that way unless/until they were modified, so technically, + * we could call deflateSector() just for modified sectors, but this isn't a common operation, + * so it doesn't hurt to check every sector. + * + * @this {DiskPDP11} + * @return {string} containing the entire disk image as JSON-encoded data + */ +DiskPDP11.prototype.toJSON = function() +{ + var s, pba = 0, sector, sectorLast; + + while ((sector = this.getSector(pba++))) { + this.deflateSector(sector); + } + + s = JSON.stringify(this.aDiskData, function(key, value) { + /* + * If BACKTRACK support is enabled, we have to filter out any 'file' properties that may + * be attached to the sector objects, lest we risk blowing the stack due to circular references. + */ + if (key == 'file') { + return undefined; + } + return value; + }); + + /* + * Eliminate unnecessary default properties (eg, 'length' values of 512, 'pattern' values of 0). + */ + s = s.replace(/,"length":512/gm, "").replace(/,"pattern":0/gm, ""); + + /* + * I don't really want to strip quotes from disk image property names, since I would have to put them + * back again during mount() -- or whenever JSON.parse() is used instead of eval(). But I still remove + * them temporarily, so that any remaining property names (eg, "iModify", "cModify", "fDirty") can + * easily be stripped out, by virtue of their being the only quoted properties left. We then "requote" + * all the property names that remain. + */ + s = s.replace(/"(sector|length|data|pattern)":/gm, "$1:"); + + /* + * The next line will remove any other numeric or boolean properties that were added at runtime, although + * they may have completely different ("minified") names if the code has been compiled. + */ + s = s.replace(/,"[^"]*":([0-9]+|true|false)/gm, ""); + s = s.replace(/(sector|length|data|pattern):/gm, "\"$1\":"); + + /* + * Last but not least, insert line breaks after every object definition, to ease the pain on text editors. + */ + s = s.replace(/([\]}]),/gm, "$1,\n"); + return s; +}; + +/** + * deflateSector(sector) + * + * This is just the first revision: it currently looks only at fully inflated sectors. + * + * @this {DiskPDP11} + * @param {Object} sector + */ +DiskPDP11.prototype.deflateSector = function(sector) +{ + var adw = sector['data']; + var cdw = adw.length; + if ((cdw << 2) == sector['length']) { + var idw = cdw - 1; + var dwPattern = adw[idw], cDupes = 0; + while (idw--) { + if (adw[idw] !== dwPattern) break; + cDupes++; + } + if (cDupes++) { + adw.length = cdw - cDupes; + sector['pattern'] = dwPattern; + } + } +}; + +/** + * dumpSector(sector, pba, sDesc) + * + * @this {DiskPDP11} + * @param {Object} sector (returned from a previous seek) + * @param {number} [pba] + * @param {string} [sDesc] + * @return {string} + */ +DiskPDP11.prototype.dumpSector = function(sector, pba, sDesc) +{ + var sDump = ""; + if (DEBUG && sector) { + if (pba != null) sDump += "sector " + pba + (sDesc? (" for " + sDesc) : "") + ':'; + var sBytes = "", sChars = ""; + var cbSector = sector['length']; + var cdwData = sector['data'].length; + var dw = 0; + for (var i = 0; i < cbSector; i++) { + if ((i % 16) === 0) { + if (sDump) sDump += sBytes + ' ' + sChars + '\n'; + sDump += str.toHex(i, 4) + ": "; + sBytes = sChars = ""; + } + if ((i % 4) === 0) { + var idw = i >> 2; + dw = (idw < cdwData? sector['data'][idw] : sector['pattern']); + } + var b = dw & 0xff; + dw >>>= 8; + sBytes += str.toHex(b, 2) + (i % 16 == 7? "-" : " "); + sChars += (b >= 32 && b < 128? String.fromCharCode(b) : "."); + } + if (sBytes) sDump += sBytes + ' ' + sChars; + } + return sDump; +}; + +if (NODE) module.exports = Disk; diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js deleted file mode 100644 index 443e81eed..000000000 --- a/modules/pdp11/lib/rk11.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @fileoverview Implements RK11 device support. - * @author Jeff Parsons - * @copyright © Jeff Parsons 2012-2016 - * - * This file is part of PCjs, a computer emulation software project at . - * - * It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis - * (paulnank@hotmail.com) as of September 2016 at . This code - * may be used freely provided the original authors are acknowledged in any modified source code. - * - * PCjs is free software: you can redistribute it and/or modify it under the terms of the - * GNU General Public License as published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with PCjs. If not, - * see . - * - * You are required to include the above copyright notice in every modified copy of this work - * and to display that copyright notice when the software starts running; see COPYRIGHT in - * . - * - * Some PCjs files also attempt to load external resource files, such as character-image files, - * ROM files, and disk image files. Those external resource files are not considered part of PCjs - * for purposes of the GNU General Public License, and the author does not claim any copyright - * as to their contents. - */ - -"use strict"; - -if (NODE) { - var web = require("../../shared/lib/weblib"); - var Component = require("../../shared/lib/component"); - var State = require("../../shared/lib/state"); - var BusPDP11 = require("./bus"); -} - -/** - * RK11(parmsDevice) - * - * @constructor - * @extends Component - * @param {Object} parmsRK11 - */ -function RK11(parmsRK11) -{ - Component.call(this, "RK11", parmsRK11, RK11); - - this.rkds = 0x9C0;/*04700*/ // 017777400 Drive Status - this.rker = 0; // 017777402 Error Register - this.rkcs = 0x80; /*0200*/ // 017777404 Control Status - this.rkwc = 0; // 017777406 Word Count - this.rkba = 0; // 017777410 Bus Address - this.rkda = 0; // 017777412 Disk Address - this.rkdb = 0; // 017777416 Data Buffer - this.meta = []; - this.TRACKS = [406, 406, 406, 406]; - this.SECTORS = [12, 12, 12, 12]; -} - -Component.subclass(RK11); - -/** - * initBus(cmp, bus, cpu, dbg) - * - * @this {DevicePDP11} - * @param {ComputerPDP11} cmp - * @param {BusPDP11} bus - * @param {CPUStatePDP11} cpu - * @param {DebuggerPDP11} dbg - */ -RK11.prototype.initBus = function(cmp, bus, cpu, dbg) -{ - this.bus = bus; - this.cpu = cpu; - this.dbg = dbg; - - this.setReady(); -}; - -if (NODE) module.exports = RK11; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js new file mode 100644 index 000000000..541201326 --- /dev/null +++ b/modules/pdp11/lib/rl11.js @@ -0,0 +1,868 @@ +/** + * @fileoverview Implements the RL11 Disk Controller (for RL01 and RL02 Disks) + * @author Jeff Parsons + * @copyright © Jeff Parsons 2012-2016 + * + * This file is part of PCjs, a computer emulation software project at . + * + * PCjs is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCjs. If not, + * see . + * + * You are required to include the above copyright notice in every modified copy of this work + * and to display that copyright notice when the software starts running; see COPYRIGHT in + * . + * + * Some PCjs files also attempt to load external resource files, such as character-image files, + * ROM files, and disk image files. Those external resource files are not considered part of PCjs + * for purposes of the GNU General Public License, and the author does not claim any copyright + * as to their contents. + */ + +"use strict"; + +if (NODE) { + var str = require("../../shared/lib/strlib"); + var web = require("../../shared/lib/weblib"); + var DiskAPI = require("../../shared/lib/diskapi"); + var Component = require("../../shared/lib/component"); + var State = require("../../shared/lib/state"); + var PDP11 = require("./defines"); + var MessagesPDP11 = require("./messages"); + var DiskPDP11 = require("./disk"); +} + +/** + * RL11(parms) + * + * The RL11 component has the following component-specific (parms) properties: + * + * autoMount: one or more JSON-encoded objects, each containing 'name' and 'path' properties + * + * @constructor + * @extends Component + * @param {Object} parms + */ +function RL11(parms) +{ + Component.call(this, "RL11", parms, RL11, MessagesPDP11.DISK); + + /* + * We record any 'autoMount' object now, but we no longer parse it until initBus(), because the + * Computer's getMachineParm() service may have an override for us. + */ + this.configMount = parms['autoMount'] || null; + this.cAutoMount = 0; + + /* + * TODO: Make this configurable + */ + this.nDrives = 1; + this.aDrives = new Array(this.nDrives); + + this.fLocalDisks = (!web.isMobile() && window && 'FileReader' in window); +} + +Component.subclass(RL11); + +/* + * There's nothing super special about these values, except that NONE should be falsey and the others should not. + */ +RL11.SOURCE = { + NONE: "", + LOCAL: "?", + REMOTE: "??" +}; + +/** + * setBinding(sType, sBinding, control, sValue) + * + * @this {RL11} + * @param {string|null} sType is the type of the HTML control (eg, "button", "list", "text", etc) + * @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "listDisks") + * @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement) + * @param {string} [sValue] optional data value + * @return {boolean} true if binding was successful, false if unrecognized binding request + */ +RL11.prototype.setBinding = function(sType, sBinding, control, sValue) +{ + var rl11 = this; + + switch (sBinding) { + + case "listDisks": + this.bindings[sBinding] = control; + + control.onchange = function onChangeListDisks(event) { + var controlDesc = rl11.bindings["descDisk"]; + var controlOption = control.options[control.selectedIndex]; + if (controlDesc && controlOption) { + var dataValue = {}; + var sValue = controlOption.getAttribute("data-value"); + if (sValue) { + try { + dataValue = eval("(" + sValue + ")"); + } catch (e) { + Component.error("RL11 option error: " + e.message); + } + } + var sHTML = dataValue['desc']; + if (sHTML === undefined) sHTML = ""; + var sHRef = dataValue['href']; + if (sHRef !== undefined) sHTML = "" + sHTML + ""; + controlDesc.innerHTML = sHTML; + } + }; + return true; + + case "descDisk": + case "listDrives": + this.bindings[sBinding] = control; + /* + * I tried going with onclick instead of onchange, so that if you wanted to confirm what's + * loaded in a particular drive, you could click the drive control without having to change it. + * However, that doesn't seem to work for all browsers, so I've reverted to onchange. + */ + control.onchange = function onChangeListDrives(event) { + var iDrive = str.parseInt(control.value, 10); + if (iDrive != null) rl11.displayDisk(iDrive); + }; + return true; + + case "loadDrive": + this.bindings[sBinding] = control; + + control.onclick = function onClickLoadDrive(event) { + var controlDisks = rl11.bindings["listDisks"]; + if (controlDisks) { + var sDiskName = controlDisks.options[controlDisks.selectedIndex].text; + var sDiskPath = controlDisks.value; + rl11.loadSelectedDrive(sDiskName, sDiskPath); + } + }; + return true; + + case "saveDrive": + /* + * Yes, technically, this feature does not require "Local disk support" (which is really a reference + * to FileReader support), but since fLocalDisks is also false for all mobile devices, and since there + * is an "orthogonality" to disabling both features in tandem, let's just let it slide, OK? + */ + if (!this.fLocalDisks) { + if (DEBUG) this.log("Local disk support not available"); + /* + * We could also simply hide the control; eg: + * + * control.style.display = "none"; + * + * but removing the control altogether seems better. + */ + control.parentNode.removeChild(/** @type {Node} */ (control)); + return false; + } + + this.bindings[sBinding] = control; + + control.onclick = function onClickSaveDrive(event) { + var controlDrives = rl11.bindings["listDrives"]; + if (controlDrives && controlDrives.options && rl11.aDrives) { + var iDriveSelected = str.parseInt(controlDrives.value, 10) || 0; + var drive = rl11.aDrives[iDriveSelected]; + if (drive) { + /* + * Note the similarity (and hence factoring opportunity) between this code and the HDC's "saveHD*" binding. + */ + var disk = drive.disk; + if (disk) { + if (DEBUG) rl11.println("saving disk " + disk.sDiskPath + "..."); + var sAlert = web.downloadFile(disk.encodeAsBase64(), "octet-stream", true, disk.sDiskFile.replace(".json", ".img")); + web.alertUser(sAlert); + } else { + rl11.notice("No disk loaded in drive."); + } + } else { + rl11.notice("No disk drive selected."); + } + } + }; + return true; + + case "mountDrive": + if (!this.fLocalDisks) { + if (DEBUG) this.log("Local disk support not available"); + /* + * We could also simply hide the control; eg: + * + * control.style.display = "none"; + * + * but removing the control altogether seems better. + */ + control.parentNode.removeChild(/** @type {Node} */ (control)); + return false; + } + + this.bindings[sBinding] = control; + + /* + * Enable "Mount" button only if a file is actually selected + */ + control.addEventListener('change', function() { + var fieldset = control.children[0]; + var files = fieldset.children[0].files; + var submit = fieldset.children[1]; + submit.disabled = !files.length; + }); + + control.onsubmit = function(event) { + var file = event.currentTarget[1].files[0]; + if (file) { + var sDiskPath = file.name; + var sDiskName = str.getBaseName(sDiskPath, true); + rl11.loadSelectedDrive(sDiskName, sDiskPath, file); + } + /* + * Prevent reloading of web page after form submission + */ + return false; + }; + return true; + + default: + break; + } + return false; +}; + +/** + * initBus(cmp, bus, cpu, dbg) + * + * @this {RL11} + * @param {ComputerPDP11} cmp + * @param {BusPDP11} bus + * @param {CPUStatePDP11} cpu + * @param {DebuggerPDP11} dbg + */ +RL11.prototype.initBus = function(cmp, bus, cpu, dbg) +{ + this.cmp = cmp; + this.bus = bus; + this.cpu = cpu; + this.dbg = dbg; + + this.configMount = this.cmp.getMachineParm('autoMount') || this.configMount; + + if (this.configMount) { + if (typeof this.configMount == "string") { + try { + /* + * The most likely source of any exception will be right here, where we're parsing + * this JSON-encoded data. + */ + this.configMount = eval("(" + this.configMount + ")"); + } catch (e) { + Component.error("RL11 auto-mount error: " + e.message + " (" + this.configMount + ")"); + this.configMount = null; + } + } + } + + this.triggerReaderInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI); + + bus.addIOTable(this, RL11.UNIBUS_IOTABLE); + + this.addDisk("None", RL11.SOURCE.NONE, true); + if (this.fLocalDisks) this.addDisk("Local Disk", RL11.SOURCE.LOCAL); + this.addDisk("Remote Disk", RL11.SOURCE.REMOTE); + + if (!this.autoMount()) this.setReady(); +}; + +/** + * getDriveName(iDrive) + * + * @this {RL11} + * @param {number} iDrive + * @return {string} + */ +RL11.prototype.getDriveName = function(iDrive) +{ + return "RL" + iDrive; +}; + +/** + * powerUp(data, fRepower) + * + * @this {RL11} + * @param {Object|null} data + * @param {boolean} [fRepower] + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.powerUp = function(data, fRepower) +{ + if (!fRepower) { + if (!data || !this.restore) { + this.reset(); + if (this.cmp.fReload) { + /* + * If the computer's fReload flag is set, we're required to toss all currently + * loaded disks and remount all disks specified in the auto-mount configuration. + */ + this.unloadAllDrives(true); + this.autoMount(true); + } + } else { + if (!this.restore(data)) return false; + } + /* + * Populate the HTML controls to match the actual (well, um, specified) number of floppy drives. + */ + var controlDrives; + if ((controlDrives = this.bindings['listDrives'])) { + while (controlDrives.firstChild) { + controlDrives.removeChild(controlDrives.firstChild); + } + controlDrives.value = ""; + for (var iDrive = 0; iDrive < this.nDrives; iDrive++) { + var controlOption = document.createElement("option"); + controlOption.value = iDrive; + /* + * TODO: This conversion of drive number to drive letter, starting with A:, is very simplistic + * and will NOT match the drive mappings that DOS ultimately uses. We'll need to spiff this up at + * some point. + */ + controlOption.text = this.getDriveName(iDrive); + controlDrives.appendChild(controlOption); + } + if (this.nDrives > 0) { + controlDrives.value = "0"; + this.displayDisk(0); + } + } + } + return true; +}; + +/** + * powerDown(fSave, fShutdown) + * + * @this {RL11} + * @param {boolean} [fSave] + * @param {boolean} [fShutdown] + * @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure + */ +RL11.prototype.powerDown = function(fSave, fShutdown) +{ + return fSave? this.save() : true; +}; + +/** + * reset() + * + * @this {RL11} + */ +RL11.prototype.reset = function() +{ + this.initController(); +}; + +/** + * save() + * + * This implements save support for the RL11 component. + * + * @this {RL11} + * @return {Object} + */ +RL11.prototype.save = function() +{ + var state = new State(this); + // state.set(0, this.saveController()); + return state.data(); +}; + +/** + * restore(data) + * + * This implements restore support for the RL11 component. + * + * @this {RL11} + * @param {Object} data + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.restore = function(data) +{ + return true; // this.initController(data[0]); +}; + +/** + * initController(data) + * + * @this {RL11} + * @param {Array} [data] + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.initController = function(data) +{ + var fSuccess = true; + for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { + var drive = this.aDrives[iDrive]; + if (drive === undefined) { + drive = this.aDrives[iDrive] = {}; + } + if (!this.initDrive(drive, iDrive)) { + fSuccess = false; + } + } + return true; +}; + +/** + * saveController() + * + * @this {RL11} + * @return {Array} + */ +RL11.prototype.saveController = function() +{ + var data = []; + return data; +}; + +/** + * initDrive(drive, iDrive, data) + * + * TODO: Consider a separate Drive class that any drive controller can use, since there's a lot of commonality + * between the drive objects created by disk controllers. This will clean up overall drive management and allow + * us to factor out some common Drive methods. + * + * @this {RL11} + * @param {Object} drive + * @param {number} iDrive + * @param {Array|undefined} [data] + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.initDrive = function(drive, iDrive, data) +{ + var i = 0; + var fSuccess = true; + + drive.iDrive = iDrive; + drive.fBusy = drive.fLocal = false; + + drive.name = this.idComponent; + drive.nCylinders = 512; + drive.nHeads = 2; + drive.nSectors = 40; + drive.cbSector = 256; + drive.fRemovable = true; + + /* + * The next group of properties are set by various controller command sequences. + */ + drive.bHead = 0; + drive.bCylinderSeek = 0; + drive.bCylinder = 0; + drive.bSector = 1; + drive.bSectorEnd = drive.nSectors; // aka EOT + drive.nBytes = drive.cbSector; + + /* + * The next group of properties are managed by worker functions (eg, doRead()) to maintain state across DMA requests. + */ + drive.ibSector = 0; + drive.sector = null; + + if (!drive.disk) { + drive.sDiskPath = ""; // ensure this is initialized to a default that displayDisk() can deal with + } + + return fSuccess; +}; + +/** + * autoMount(fRemount) + * + * @this {RL11} + * @param {boolean} [fRemount] is true if we're remounting all auto-mounted disks + * @return {boolean} true if one or more disk images are being auto-mounted, false if none + */ +RL11.prototype.autoMount = function(fRemount) +{ + if (!fRemount) this.cAutoMount = 0; + if (this.configMount) { + for (var sDrive in this.configMount) { + var configDrive = this.configMount[sDrive]; + var sDiskPath = configDrive['path'] || ""; + var sDiskName = configDrive['name'] || this.findDisk(sDiskPath); + if (sDiskPath && sDiskName) { + /* + * WARNING: This conversion of drive letter to drive number, starting with A:, is very simplistic + * and is not guaranteed to match the drive mapping that DOS ultimately uses. + */ + var iDrive = sDrive.charCodeAt(0) - 0x41; + if (iDrive >= 0 && iDrive < this.aDrives.length) { + if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) { + this.setReady(false); + } + continue; + } + } + this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")"); + } + } + return !!this.cAutoMount; +}; + +/** + * loadSelectedDrive(sDiskName, sDiskPath, file) + * + * @this {RL11} + * @param {string} sDiskName + * @param {string} sDiskPath + * @param {File} [file] is set if there's an associated File object + */ +RL11.prototype.loadSelectedDrive = function(sDiskName, sDiskPath, file) +{ + var controlDrives = this.bindings["listDrives"]; + var iDrive = controlDrives && str.parseInt(controlDrives.value, 10); + + if (iDrive === undefined || iDrive < 0 || iDrive >= this.aDrives.length) { + this.notice("Unable to load the selected drive"); + return; + } + + if (!sDiskPath) { + this.unloadDrive(iDrive); + return; + } + + if (sDiskPath == RL11.SOURCE.LOCAL) { + this.notice('Use "Choose File" and "Mount" to select and load a local disk.'); + return; + } + + /* + * If the special RL11.SOURCE.REMOTE path is selected, then we want to prompt the user for a URL. + * Oh, and make sure we pass an empty string as the 2nd parameter to prompt(), so that IE won't display + * "undefined" -- because after all, undefined and "undefined" are EXACTLY the same thing, right? + * + * TODO: This is literally all I've done to support remote disk images. There's probably more + * I should do, like dynamically updating "listDisks" to include new entries, and adding new entries + * to the save/restore data. + */ + if (sDiskPath == RL11.SOURCE.REMOTE) { + sDiskPath = window.prompt("Enter the URL of a remote disk image.", "") || ""; + if (!sDiskPath) return; + sDiskName = str.getBaseName(sDiskPath); + this.status("Attempting to load " + sDiskPath + " as \"" + sDiskName + "\""); + this.sDiskSource = RL11.SOURCE.REMOTE; + } + else { + this.sDiskSource = sDiskPath; + } + + this.loadDrive(iDrive, sDiskName, sDiskPath, false, file); +}; + +/** + * loadDrive(iDrive, sDiskName, sDiskPath, fAutoMount, file) + * + * NOTE: If sDiskPath is already loaded, nothing needs to be done. + * + * @this {RL11} + * @param {number} iDrive + * @param {string} sDiskName + * @param {string} sDiskPath + * @param {boolean} [fAutoMount] + * @param {File} [file] is set if there's an associated File object + * @return {number} 1 if disk loaded, 0 if queued up (or busy), -1 if already loaded + */ +RL11.prototype.loadDrive = function(iDrive, sDiskName, sDiskPath, fAutoMount, file) +{ + var nResult = -1; + var drive = this.aDrives[iDrive]; + + if (drive.sDiskPath.toLowerCase() != sDiskPath.toLowerCase()) { + + nResult++; + this.unloadDrive(iDrive, true); + + if (drive.fBusy) { + this.notice("RL11 busy"); + } + else { + // this.status("disk queued: " + sDiskName); + drive.fBusy = true; + if (fAutoMount) { + drive.fAutoMount = true; + this.cAutoMount++; + if (this.messageEnabled()) this.printMessage("auto-loading disk: " + sDiskName); + } + drive.fLocal = !!file; + var disk = new DiskPDP11(this, drive, DiskAPI.MODE.PRELOAD); + if (disk.load(sDiskName, sDiskPath, file, this.doneLoadDrive)) { + nResult++; + } + } + } + return nResult; +}; + +/** + * doneLoadDrive(drive, disk, sDiskName, sDiskPath, fAutoMount) + * + * The disk parameter is set if the disk was successfully loaded, null if not. + * + * @this {RL11} + * @param {Object} drive + * @param {DiskPDP11} disk + * @param {string} sDiskName + * @param {string} sDiskPath + * @param {boolean} [fAutoMount] + */ +RL11.prototype.doneLoadDrive = function onLoadDrive(drive, disk, sDiskName, sDiskPath, fAutoMount) +{ + var aDiskInfo; + + drive.fBusy = false; + + if (disk) { + /* + * We shouldn't mount the disk unless we're sure the drive is able to handle it. + */ + aDiskInfo = disk.info(); + if (disk && aDiskInfo[0] > drive.nCylinders || aDiskInfo[1] > drive.nHeads /* || aDiskInfo[2] > drive.nSectors */) { + this.notice("Disk \"" + sDiskName + "\" too large for drive " + this.getDriveName(drive.iDrive)); + disk = null; + } + } + + if (disk) { + drive.disk = disk; + drive.sDiskName = sDiskName; + drive.sDiskPath = sDiskPath; + + /* + * Adding local disk image names to the disk list seems like a nice idea, but it's too confusing, + * because then it looks like the "Mount" button should be able to (re)load them, and that can NEVER + * happen, for security reasons; local disk images can ONLY be loaded via the "Mount" button after + * the user has selected them via the "Choose File" button. + * + * this.addDisk(sDiskName, sDiskPath); + * + * So we're going to take a different approach: when displayDisk() is asked to display the name + * of a local disk image, it will map all such disks to "Local Disk", and any attempt to "Mount" such + * a disk, will essentially result in a "Disk not found" error. + */ + + // this.addDiskHistory(sDiskName, sDiskPath, disk); + + /* + * For a local disk (ie, one loaded via mountDrive()), the disk.restore() performed by addDiskHistory() + * may have altered the disk geometry, so refresh the disk info. + */ + aDiskInfo = disk.info(); + + /* + * Clearly, a successful mount implies a disk change, and I suppose that, technically, an *unsuccessful* + * mount should imply the same, but what would the real-world analog be? Inserting a piece of cardboard + * instead of an actual disk? In any case, if we can do the user a favor by pretending (as far as the + * disk change line is concerned) that an unsuccessful mount never happened, let's do it. + * + * Successful unmounts are a different story, however; those *do* trigger a change. See unloadDrive(). + */ + + // this.regInput |= FDC.REG_INPUT.DISK_CHANGE; + + /* + * With the addition of notify(), users are now "alerted" whenever a disk has finished loading; + * notify() is selective about its output, using print() if a print window is open, alert() otherwise. + * + * WARNING: This conversion of drive number to drive letter, starting with A:, is very simplistic + * and will not match the drive mappings that DOS ultimately uses (ie, for drives beyond B:). + */ + this.notice("Mounted disk \"" + sDiskName + "\" in drive " + this.getDriveName(drive.iDrive), drive.fAutoMount || fAutoMount); + + /* + * Since you usually want the Computer to have focus again after loading a new disk, let's try automatically + * updating the focus after a successful load. + */ + if (this.cmp) this.cmp.setFocus(); + } + else { + drive.fLocal = false; + } + + if (drive.fAutoMount) { + drive.fAutoMount = false; + if (!--this.cAutoMount) this.setReady(); + } + + this.displayDisk(drive.iDrive); +}; + +/** + * addDisk(sName, sPath, fTop) + * + * @this {RL11} + * @param {string} sName + * @param {string} sPath + * @param {boolean} [fTop] (default is bottom) + */ +RL11.prototype.addDisk = function(sName, sPath, fTop) +{ + var controlDisks = this.bindings["listDisks"]; + if (controlDisks && controlDisks.options) { + for (var i = 0; i < controlDisks.options.length; i++) { + if (controlDisks.options[i].value == sPath) return; + } + var controlOption = document.createElement("option"); + controlOption.text = sName; + controlOption.value = sPath; + if (fTop && controlDisks.childNodes[0]) { + controlDisks.insertBefore(controlOption, controlDisks.childNodes[0]); + } else { + controlDisks.appendChild(controlOption); + } + } +}; + +/** + * findDisk(sPath) + * + * This is used to deal with mount requests (eg, autoMount) that supply a path without a name; + * if we can find the path in the "listDisks" control, then we return the associated disk name. + * + * @this {RL11} + * @param {string} sPath + * @return {string|null} + */ +RL11.prototype.findDisk = function(sPath) +{ + var controlDisks = this.bindings["listDisks"]; + if (controlDisks && controlDisks.options) { + for (var i = 0; i < controlDisks.options.length; i++) { + var control = controlDisks.options[i]; + if (control.value == sPath) return control.text; + } + } + return str.getBaseName(sPath, true); +}; + +/** + * displayDisk(iDrive, fUpdateDrive) + * + * @this {RL11} + * @param {number} iDrive (unvalidated) + * @param {boolean} [fUpdateDrive] is true to update the drive list to match the specified drive (eg, the auto-mount case) + */ +RL11.prototype.displayDisk = function(iDrive, fUpdateDrive) +{ + /* + * First things first: validate iDrive. + */ + if (iDrive >= 0 && iDrive < this.aDrives.length) { + var drive = this.aDrives[iDrive]; + var controlDisks = this.bindings["listDisks"]; + var controlDrives = this.bindings["listDrives"]; + /* + * Next, make sure controls for both drives and disks exist. + */ + if (controlDisks && controlDrives && controlDisks.options && controlDrives.options) { + /* + * Next, make sure the drive whose disk we're updating is the currently selected drive. + */ + var i; + var iDriveSelected = str.parseInt(controlDrives.value, 10); + var sTargetPath = (drive.fLocal? RL11.SOURCE.LOCAL : drive.sDiskPath); + if (!isNaN(iDriveSelected) && iDriveSelected == iDrive) { + for (i = 0; i < controlDisks.options.length; i++) { + if (controlDisks.options[i].value == sTargetPath) { + if (controlDisks.selectedIndex != i) { + controlDisks.selectedIndex = i; + } + break; + } + } + if (i == controlDisks.options.length) controlDisks.selectedIndex = 0; + } + if (fUpdateDrive) { + for (i = 0; i < controlDrives.options.length; i++) { + if (str.parseInt(controlDrives.options[i].value, 10) == drive.iDrive) { + if (controlDrives.selectedIndex != i) { + controlDrives.selectedIndex = i; + } + break; + } + } + } + } + } +}; + +/** + * unloadDrive(iDrive, fLoading) + * + * @this {RL11} + * @param {number} iDrive + * @param {boolean} [fLoading] + */ +RL11.prototype.unloadDrive = function(iDrive, fLoading) +{ + var drive = this.aDrives[iDrive]; + + if (drive.disk || fLoading === false) { + + /* + * Before we toss the disk's information, capture any deltas that may have occurred. + */ + // this.updateDiskHistory(drive.sDiskName, drive.sDiskPath, drive.disk); + + drive.sDiskName = ""; + drive.sDiskPath = ""; + drive.disk = null; + drive.fLocal = false; + + // this.regInput |= FDC.REG_INPUT.DISK_CHANGE; + + /* + * WARNING: This conversion of drive number to drive letter, starting with A:, is very simplistic + * and is not guaranteed to match the drive mapping that DOS ultimately uses. + */ + if (!fLoading) { + this.notice("Drive " + this.getDriveName(iDrive) + " unloaded", fLoading); + this.sDiskSource = RL11.SOURCE.NONE; + this.displayDisk(iDrive); + } + } +}; + +/** + * unloadAllDrives(fDiscard) + * + * @this {RL11} + * @param {boolean} fDiscard to discard all disk history before unloading + */ +RL11.prototype.unloadAllDrives = function(fDiscard) +{ + // if (fDiscard) this.aDiskHistory = []; + + for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { + this.unloadDrive(iDrive, true); + } +}; + +/* + * ES6 ALERT: As you can see below, I've finally started using computed property names. + */ +RL11.UNIBUS_IOTABLE = { +}; + +if (NODE) module.exports = RL11; diff --git a/modules/shared/lib/diskapi.js b/modules/shared/lib/diskapi.js index 1dead2e19..e42cf05a9 100644 --- a/modules/shared/lib/diskapi.js +++ b/modules/shared/lib/diskapi.js @@ -70,8 +70,16 @@ var DiskAPI = { /* * Common (supported) diskette formats + * + * For no particular reason that I can recall, each entry in DISK_FORMATS is an array of values in "CHS" order: + * + * [# cylinders, # heads, # sectors/track, # bytes/sector] + * + * If the 4th value is omitted, the sector size is assumed to be 512. The order of these "geometric" values mirrors + * the structure of our JSON-encoded disk images, which consist of an array of cylinders, each of which is an array of + * heads, each of which is an array of sector objects. */ -DiskAPI.DISKETTE_FORMATS = { +DiskAPI.DISK_FORMATS = { 163840: [40,1,8], // media type 0xFE: 40 cylinders, 1 head (single-sided), 8 sectors/track, ( 320 total sectors x 512 bytes/sector == 163840) 184320: [40,1,9], // media type 0xFC: 40 cylinders, 1 head (single-sided), 9 sectors/track, ( 360 total sectors x 512 bytes/sector == 184320) 327680: [40,2,8], // media type 0xFF: 40 cylinders, 2 heads (double-sided), 8 sectors/track, ( 640 total sectors x 512 bytes/sector == 327680) @@ -83,7 +91,22 @@ DiskAPI.DISKETTE_FORMATS = { /* * The following are common early hard drive sizes, which we explicitly map to CHS values, since the BPB can mislead us when attempting to calculate total cylinders */ - 21368320:[615,4,17] // PC AT 20Mb hard drive (type 2) + 21368320:[615,4,17], // PC AT 20Mb hard drive (type 2) + /* + * Assorted DEC disk pack formats. + */ + 5242880: [256,2,40,256], // RL01K single-platter disk cartridge: 256 tracks, 2 heads, 40 sectors/track, 256 bytes/sector, for a total of 5242880 bytes + 10485760:[512,2,40,256] // RL02K single-platter disk cartridge: 512 tracks, 2 heads, 40 sectors/track, 256 bytes/sector, for a total of 10485760 bytes +}; + +/* + * TODO: Eventually, our tools will need to support looking up disk formats by "model" rather than by raw disk size, + * because obviously multiple disk geometries can yield the same raw disk size. For each conflict that arises, I'll + * probably create a fake (approximate) disk size entry above, and then create a mapping to that approximate size below. + */ +DiskAPI.DISK_MODELS = { + "RL01": 5242880, + "RL02": 10485760 }; DiskAPI.MBR = { diff --git a/package.json b/package.json index 0eec26c5f..1d8ecc4e3 100644 --- a/package.json +++ b/package.json @@ -176,6 +176,7 @@ ], "pdp11Files": [ "./modules/shared/lib/defines.js", + "./modules/shared/lib/diskapi.js", "./modules/shared/lib/dumpapi.js", "./modules/shared/lib/reportapi.js", "./modules/shared/lib/userapi.js", @@ -198,6 +199,8 @@ "./modules/pdp11/lib/keyboard.js", "./modules/pdp11/lib/serialport.js", "./modules/pdp11/lib/pc11.js", + "./modules/pdp11/lib/disk.js", + "./modules/pdp11/lib/rl11.js", "./modules/shared/lib/debugger.js", "./modules/pdp11/lib/debugger.js", "./modules/pdp11/lib/computer.js", diff --git a/versions/pcx86/1.30.2/pcx86-dbg.js b/versions/pcx86/1.30.2/pcx86-dbg.js index 98816b5d4..7b88797de 100644 --- a/versions/pcx86/1.30.2/pcx86-dbg.js +++ b/versions/pcx86/1.30.2/pcx86-dbg.js @@ -43,9 +43,9 @@ http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ -var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82, -Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"]; -da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74, +Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"]; +ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} @@ -618,9 +618,9 @@ function ap(a,b,c){var d;c=c||2;var e=b&511,f=bp(a.za,a.xe[b>>9]);if(f){if(e+c<= Oo.prototype.xj=function(a,b){var c=null;if(this.yd)for(var d in this.yd){var e=this.yd[d];if(a>=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.jg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b,"/")&& -(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; +l.load=function(a,b,c,d,e){var f=b;if(this.W)return!0;this.ga=a;this.V=b;this.Ug=ja(b);var g=this;this.W=d;this.ka=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ba[c];if(d){g.Bb=d[0];g.ub=d[1];g.lb=d[2];g.Va=d[3]||512;b=g.Va>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, +"/")&&(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.xg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= m<<2,F=q.length;F'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)])? -(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)|| +0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;a":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82, -Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"]; -p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; +var l,ba,ca={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74, +Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"]; +da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} @@ -574,8 +574,8 @@ l.le=function(a,b){if(this.cc&&this.A&&this.A.ea.Nb)switch(a){case pl:this.S!=b& function cm(a,b,c){Ka.call(this,"Disk",{id:a.Fe+".disk"+fa(++dm,4)},cm);this.controller=a;this.ba=a.ba;this.Ia=a.Ia;this.C=b;this.B=b.name;this.qe=b.qe;this.Gf=this.D=!1;em(this,c,b.ib,b.jb,b.eb,b.nb);this.I=[];this.S=[];this.G=null;this.P=0;this.R=!1;t(this)}var dm=0;Ta(cm);l=cm.prototype;l.pc=function(a,b,c,d){this.Ia=d};l.Ub=function(a,b){b||!this.Gf||this.D||(t(this,!1),this.load(this.B,this.H,null,this.lk,this));return!0};l.lk=function(){t(this,!0)}; l.Tb=function(a,b){if(this.D){var c,d=0;if(this.R&&!ua("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=fm(this,!1);)if(d=c[0]){this.controller.Ba('Unable to save "'+this.B+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+this.controller.ue(),b+="&user="+this.controller.yd(),sa(ta()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.controller.Ba(this.B+" saved")}return!0}; function em(a,b,c,d,e,f){a.mode=b;a.ib=c;a.jb=d;a.eb=e;a.nb=f;a.A=[];if("preload"!=a.mode){b=Array(a.ib);for(c=0;c>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.ib);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hm(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): +l.load=function(a,b,c,d,e){var f=b;if(this.K)return!0;this.B=a;this.H=b;this.th=ga(b);var g=this;this.K=d;this.ia=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b,c=a?a.byteLength:0,d=ca[c];if(d){g.ib=d[0];g.jb=d[1];g.eb=d[2];g.nb=d[3]||512;b=g.nb>>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.ib);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hm(this,b),this.Gf=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"): ia(b,"/")&&(c="dir"),f=ta()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.qe?"":d)+"&format=json"));return!!sa(f,null,!0,function(a,b,c){im(g,a,b,c)})}; function im(a,b,c,d){var e=null;a.te=!1;var f=0>d&&a.ba&&!a.ba.ea.Vb;if(a.Gf)d?a.controller.Ba('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,e=a);else if(d)a.controller.Ba('Unable to load disk "'+a.B+'" (error '+d+": "+b+")",f);else{Va(a.controller.Fe,b,c);try{if(0g&&0 c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)r(h[0]);else{a.ib=h.length;a.jb=h[0].length;a.eb=h[0][0].length;var k=h[0][0][0];a.nb=k&&k.length||512;for(d=c=0;d>2,q=k.pattern;void 0===q&&(q=k.pattern=0);var y=k.data;if(void 0===y){var w=k.bytes;if(void 0!==w&&w.length){for(var z= @@ -595,8 +595,8 @@ l.toJSON=function(){var a;a=0;for(var b;b=km(this,a++);)sm(b);a=JSON.stringify(t function sm(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function tm(a){Ka.call(this,"FDC",a,tm);this.dmaRead=this.Tj;this.dmaWrite=this.Uj;this.dmaFormat=this.hk;this.K=a.autoMount||null;this.W=a.sortBy||"name";"none"==this.W&&(this.W=null);this.C=[];this.Y=!za("Mobi")&&window&&"FileReader"in window}Ta(tm);ba={}; var um={3:{gd:3,wd:0,name:ba.dn},4:{gd:2,wd:1,name:ba.bn},5:{gd:9,wd:7,name:ba.hn},6:{gd:9,wd:7,name:ba.Ym},7:{gd:2,wd:0,name:ba.$m},8:{gd:1,wd:2,name:ba.cn},10:{gd:2,wd:7,name:ba.Zm},13:{gd:6,wd:7,name:ba.Vm},15:{gd:3,wd:0,name:ba.an}};l=tm.prototype; l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.la[b]=c;if(this.W){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)])?(a= -a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +void 0!==g&&(b=''+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)||0])? +(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.S=mb(a,"ChipSet");if((this.K=nc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){r("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}xm(this);Sb(b,this,ym);Ub(b,this,zm);Am(this,"None","",!0);this.Y&&Am(this,"Local Disk","?");Am(this,"Remote Disk","??");Bm(this)||t(this)}; l.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.pg){this.C=[];for(a=0;a>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function oa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ta(a){return a.replace(/[&<>"']/g,function(a){return sa[a]})} -function ua(a,b){return(a+" ").slice(0,b)}function va(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var wa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function xa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function Ba(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ca(a,b){var c,d={da:null,fa:null,ya:null,xa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ya=g.load;d.xa=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.fa=g.symbols;d.da.length?1==d.da.length&&(n(d.da[0]),d=null):(n("Empty resource: "+a),d=null)}catch(h){n("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.$a=this.id:(this.Sa=this.id.substr(0,b),this.$a=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Ja:!1,Lb:!1,ka:!1,error:!1};this.Cb=null;this.v.error=!1;this.I={};this.i=null;this.na=d||0;t.push(this)}var Xa=void 0,db={}; -if(window){Xa||(Xa=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(Xa);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function hb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function u(a,b){b||(b=r);a.prototype=hb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var ib=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else ib={},t=[];function jb(a,b,c){ib[a]&&b&&(ib[a][b]=c)}function kb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function ra(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function va(a){return a.replace(/[&<>"']/g,function(a){return ua[a]})} +function wa(a,b){return(a+" ").slice(0,b)}function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ya={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function Ea(a,b){var c,d={ea:null,ga:null,Ca:null,Ba:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ca=g.load;d.Ba=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ga=g.symbols;d.ea.length?1==d.ea.length&&(p(d.ea[0]),d=null):(p("Empty resource: "+a),d=null)}catch(h){p("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Za=this.id:(this.Ia=this.id.substr(0,b),this.Za=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Qa:!1,Vb:!1,ha:!1,error:!1};this.Lb=null;this.v.error=!1;this.F={};this.i=null;this.na=d||0;t.push(this)}var $a=void 0,ab={}; +if(window){$a||($a=window.location.search.substr(1));for(var hb,ib=/\+/g,jb=/([^&=]+)=?([^&]*)/g;hb=jb.exec($a);)ab[decodeURIComponent(hb[1].replace(ib," "))]=decodeURIComponent(hb[2].replace(ib," "))}function kb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b){b||(b=r);a.prototype=kb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},t=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.ua-1;this.C=this.H/this.ua|0;this.Ia=[];this.f=0;this.A=[];this.nc=[Ob,Pb,Qb,Rb];a=new I(this);Sb(a,this.i);this.V=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ia[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&D(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!0);this.i&&F(this.i,64)&&D(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Pb(a,b,c){var d=!1,e=this.controller,f=e.Ia[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ia[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&D(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!0,b),this.i&&F(this.i,64)&&D(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Qb(a,b){var c=-1,d=this.controller;(a=d.Ia[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&D(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Ub(d,b,!1);this.i&&F(this.i,64)&&D(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Rb(a,b,c){var d=!1,e=this.controller;if(a=e.Ia[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&D(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Ub(e,c,!1,b),this.i&&F(this.i,64)&&D(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Vb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ia;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.D)return m.yb+=m.D-f,m.D=f,!0;if(f>=m.D+m.yb){q=m.size-(f-p);q>g&&(q=g);m.yb=f-m.D+q;f=p+a.ua;g-=q;h++;continue}}return ac(1,f,g)}f=new I(a,f,q,a.ua,d,e);Sb(f,a.i,m);a.V[h++]=f;f=p+a.ua;g-=q}if(0>=g){c/=1024;var v;e="";v?10>>=a.ia;0>>=a.ia;0>>this.ia].Fb(a&this.w,a)};k.Db=function(a){this.f++;a=this.V[(a&this.g)>>>this.ia].Nb(a&this.w,a);this.f--;return a};k.oa=function(a){return this.V[(a&this.g)>>>this.ia].pa(a&this.w,a)}; -k.eb=function(a){var b=a&this.w,c=(a&this.g)>>>this.ia;this.f++;a=this.V[c].Ob(b,a);this.f--;return a};k.Gb=function(a,b){this.V[(a&this.g)>>>this.ia].Jb(a&this.w,b&255,a)};k.Ya=function(a,b){this.f++;this.V[(a&this.g)>>>this.ia].Kb(a&this.w,b&255,a);this.f--};k.Za=function(a,b){this.V[(a&this.g)>>>this.ia].zb(a&this.w,b&65535,a)};k.Hb=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.ia;this.f++;this.V[d].Sb(c,b&65535,a);this.f--}; -function cc(a){for(var b=0,c=[],d=0;da.b.fb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!h&&p&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));dc(a,e,e,g,h,m,p,f[4])}}}function fc(a,b){a.A.push(b)} -function gc(a,b,c){a.f||(a.i&&F(a.i,64)&&(D(a.i,"memory fault ("+c+") on address "+J(a.i,b),!0,!0),$b(a.i)),a.b.ha(4,b))}function ac(a,b,c){n("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Ud:0,Eb:20,jd:0};this.f={Vd:0,Rb:-1}}u(K);k=K.prototype; -k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.Rb=hc(c,function(){e.f.La|=128;e.f.La&64&&(ic(e.b,e.f.kd),jc(e.b,e.f.Rb,1E3/60))});this.f.kd=kc(64,6);ec(b,this,L);fc(b,this.reset.bind(this));H(this)};k.reset=function(){this.g.Eb=this.g.Eb&-120|20;this.f.La=0};k.Fc=function(){var a=this.f.La;this.f.La&=-129;return a};k.td=function(a){this.f.La=a;a&64&&jc(this.b,this.f.Rb,1E3/60);this.f.La=a&-129};k.yc=function(a){return(a?this.g.jd:this.g.data)&65535}; -k.md=function(a){this.g.data=a};k.Hc=function(){var a=this.b;return a.C&62337|a.Ba<<5|a.Ca<<1};k.vd=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ba=a>>5&3;b.Ca=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ma!=c&&(b.Ma=c,lc(b))}vc(this)};k.Ic=function(){var a=this.b.Oa;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.Jc=function(){return this.b.xb};k.Kc=function(){return this.b.Pa}; -k.wd=function(a){var b=this.b;1170>b.fb&&(a&=-49);b.Pa!=a&&(b.Pa=a,a&16?(b.rb=4194303,b.Ta=3915776):(b.rb=262143,b.Ta=253952),lc(b));vc(this)};function vc(a){a.g.Eb=a.g.Eb&-8|(a.b.Ma?a.b.Pa&16?1:2:4)}k.Yc=function(a){return this.b.U[1][a>>1&7]};k.Kd=function(a,b){this.b.U[1][b>>1&7]=a&65295};k.Wc=function(a){return this.b.U[1][(a>>1&7)+8]};k.Id=function(a,b){this.b.U[1][(b>>1&7)+8]=a&65295};k.Xc=function(a){return this.b.ta[1][a>>1&7]}; -k.Jd=function(a,b){b=b>>1&7;this.b.ta[1][b]=a;this.b.U[1][b]&=65295};k.Vc=function(a){return this.b.ta[1][(a>>1&7)+8]};k.Hd=function(a,b){b=(b>>1&7)+8;this.b.ta[1][b]=a;this.b.U[1][b]&=65295};k.Ec=function(a){return this.b.U[0][a>>1&7]};k.sd=function(a,b){this.b.U[0][b>>1&7]=a&65295};k.Cc=function(a){return this.b.U[0][(a>>1&7)+8]};k.qd=function(a,b){this.b.U[0][(b>>1&7)+8]=a&65295};k.Dc=function(a){return this.b.ta[0][a>>1&7]};k.rd=function(a,b){b=b>>1&7;this.b.ta[0][b]=a;this.b.U[0][b]&=65295}; -k.Bc=function(a){return this.b.ta[0][(a>>1&7)+8]};k.pd=function(a,b){b=(b>>1&7)+8;this.b.ta[0][b]=a;this.b.U[0][b]&=65295};k.dd=function(a){return this.b.U[3][a>>1&7]};k.Qd=function(a,b){this.b.U[3][b>>1&7]=a&65295};k.bd=function(a){return this.b.U[3][(a>>1&7)+8]};k.Od=function(a,b){this.b.U[3][(b>>1&7)+8]=a&65295};k.cd=function(a){return this.b.ta[3][a>>1&7]};k.Pd=function(a,b){b=b>>1&7;this.b.ta[3][b]=a;this.b.U[3][b]&=65295};k.ad=function(a){return this.b.ta[3][(a>>1&7)+8]}; -k.Nd=function(a,b){b=(b>>1&7)+8;this.b.ta[3][b]=a;this.b.U[3][b]&=65295};k.jb=function(a){a&=7;return this.b.M&2048?this.b.Ha[a]:this.b.u[a]};k.ob=function(a,b){b&=7;this.b.M&2048?this.b.Ha[b]=a:this.b.u[b]=a};k.Pc=function(){return this.b.M&49152?this.b.wa[0]:this.b.u[6]};k.Bd=function(a){this.b.M&49152?this.b.wa[0]=a:this.b.u[6]=a};k.Sc=function(){return this.b.u[7]};k.Ed=function(a){this.b.u[7]=a};k.kb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ha[a]}; -k.pb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ha[b]=a};k.Qc=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.wa[1]};k.Cd=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.wa[1]=a};k.Rc=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.wa[3]};k.Dd=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.wa[3]=a};k.Ac=function(a){return this.b.hc[a-65504>>1]};k.od=function(a,b){this.b.hc[b-65504>>1]=a};k.ec=function(a){return 65520==a?61183:0};k.kc=function(){}; -k.$c=function(){return 1};k.Md=function(){};k.zc=function(){return this.b.ba};k.nd=function(){this.b.ba=0};k.Gc=function(){return this.b.gc};k.ud=function(a,b){b&1||(a&=255);this.b.gc=a};k.Lc=function(a){return a?this.b.Qb:0};k.xd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Qb=a;b.G|=2};k.Zc=function(a){return a?this.b.Qa&65280:0};k.Ld=function(a){this.b.Qa=a|255};k.Oc=function(){return Lb(this.b)};k.Ad=function(a){wc(this.b,a&-1809|Lb(this.b)&1808);this.b.G|=128}; -k.jc=function(a,b){F(this)&&D(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; -var M={},L=(M[62592]=[null,null,K.prototype.Yc,K.prototype.Kd,"SISDR",1145],M[62608]=[null,null,K.prototype.Wc,K.prototype.Id,"SDSDR",1145],M[62624]=[null,null,K.prototype.Xc,K.prototype.Jd,"SISAR",1145],M[62640]=[null,null,K.prototype.Vc,K.prototype.Hd,"SDSAR",1145],M[62656]=[null,null,K.prototype.Ec,K.prototype.sd,"KISDR",1145],M[62672]=[null,null,K.prototype.Cc,K.prototype.qd,"KDSDR",1145],M[62688]=[null,null,K.prototype.Dc,K.prototype.rd,"KISAR",1145],M[62704]=[null,null,K.prototype.Bc,K.prototype.pd, -"KDSAR",1145],M[62798]=[null,null,K.prototype.Kc,K.prototype.wd,"MMR3",1145],M[65382]=[null,null,K.prototype.Fc,K.prototype.td,"LKS"],M[65400]=[null,null,K.prototype.yc,K.prototype.md,"CNSL"],M[65402]=[null,null,K.prototype.Hc,K.prototype.vd,"MMR0",1145],M[65404]=[null,null,K.prototype.Ic,K.prototype.jc,"MMR1",1145],M[65406]=[null,null,K.prototype.Jc,K.prototype.jc,"MMR2",1145],M[65408]=[null,null,K.prototype.dd,K.prototype.Qd,"UISDR",1145],M[65424]=[null,null,K.prototype.bd,K.prototype.Od,"UDSDR", -1145],M[65440]=[null,null,K.prototype.cd,K.prototype.Pd,"UISAR",1145],M[65456]=[null,null,K.prototype.ad,K.prototype.Nd,"UDSAR",1145],M[65472]=[null,null,K.prototype.jb,K.prototype.ob,"R0SET0"],M[65473]=[null,null,K.prototype.jb,K.prototype.ob,"R1SET0"],M[65474]=[null,null,K.prototype.jb,K.prototype.ob,"R2SET0"],M[65475]=[null,null,K.prototype.jb,K.prototype.ob,"R3SET0"],M[65476]=[null,null,K.prototype.jb,K.prototype.ob,"R4SET0"],M[65477]=[null,null,K.prototype.jb,K.prototype.ob,"R5SET0"],M[65478]= -[null,null,K.prototype.Pc,K.prototype.Bd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Sc,K.prototype.Ed,"R7KERNEL"],M[65480]=[null,null,K.prototype.kb,K.prototype.pb,"R0SET1",1145],M[65481]=[null,null,K.prototype.kb,K.prototype.pb,"R1SET1",1145],M[65482]=[null,null,K.prototype.kb,K.prototype.pb,"R2SET1",1145],M[65483]=[null,null,K.prototype.kb,K.prototype.pb,"R3SET1",1145],M[65484]=[null,null,K.prototype.kb,K.prototype.pb,"R4SET1",1145],M[65485]=[null,null,K.prototype.kb,K.prototype.pb,"R5SET1",1145], -M[65486]=[null,null,K.prototype.Qc,K.prototype.Cd,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Rc,K.prototype.Dd,"R6USER",1145],M[65504]=[null,null,K.prototype.Ac,K.prototype.od,"CTRL",1170],M[65520]=[null,null,K.prototype.ec,K.prototype.kc,"LSIZE",1170],M[65522]=[null,null,K.prototype.ec,K.prototype.kc,"HSIZE",1170],M[65524]=[null,null,K.prototype.$c,K.prototype.Md,"SYSID",1170],M[65526]=[null,null,K.prototype.zc,K.prototype.nd,"CPUERR",1170],M[65528]=[null,null,K.prototype.Gc,K.prototype.ud, -"MB",1170],M[65530]=[null,null,K.prototype.Lc,K.prototype.xd,"PIR"],M[65532]=[null,null,K.prototype.Zc,K.prototype.Ld,"SL"],M[65534]=[null,null,K.prototype.Oc,K.prototype.Ad,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; +var vb="undefined"!==typeof ArrayBuffer,wb={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function xb(a){r.call(this,"Panel",a,xb);this.f=0;this.v.jc=!0}u(xb);k=xb.prototype; +k.qa=function(a,b,c,d){if(this.B&&this.B.qa(a,b,c,d)||this.b&&this.b.qa(a,b,c,d)||this.i&&this.i.qa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.F[b]=c,this.f++,!0;default:return"rled"==a?(this.F[b]=c,this.f++,!0):this.parent.qa.call(this,a,b,c,d)}};k.wa=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d};k.za=function(a,b){b||yb();return!0};k.ya=function(){return!0}; +function zb(a,b,c,d){if(a.F[b]){void 0===c&&(ub(a,"Value for "+b+" is invalid"),a.b.ia());var e=a.i&&a.i.Z||8;c=!a.b.v.fa||a.v.jc?8==e?qa(c,d):l(c,d):"--------".substr(0,d||4);a.F[b].textContent!=c&&(a.F[b].textContent=c)}}function Ab(a,b,c,d){for(var e=0;e>2;this.w=this.ua-1;this.C=this.I/this.ua|0;this.Pa=[];this.f=0;this.A=[];this.Fc=[Rb,Sb,Tb,Ub];a=new I(this);Vb(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Pa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Xb(d,b,!0);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Sb(a,b,c){var d=!1,e=this.controller,f=e.Pa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Pa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Xb(e,c,!0,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Tb(a,b){var c=-1,d=this.controller;(a=d.Pa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Xb(d,b,!1);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Ub(a,b,c){var d=!1,e=this.controller;if(a=e.Pa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Xb(e,c,!1,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Yb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.D)return m.Eb+=m.D-f,m.D=f,!0;if(f>=m.D+m.Eb){q=m.size-(f-n);q>g&&(q=g);m.Eb=f-m.D+q;f=n+a.ua;g-=q;h++;continue}}return dc(1,f,g)}f=new I(a,f,q,a.ua,d,e);Vb(f,a.i,m);a.W[h++]=f;f=n+a.ua;g-=q}if(0>=g){c/=1024;var w;e="";w?10>>=a.ka;0>>=a.ka;0>>this.ka].Pb(a&this.w,a)};k.Mb=function(a){this.f++;a=this.W[(a&this.g)>>>this.ka].ac(a&this.w,a);this.f--;return a};k.oa=function(a){return this.W[(a&this.g)>>>this.ka].pa(a&this.w,a)}; +k.lb=function(a){var b=a&this.w,c=(a&this.g)>>>this.ka;this.f++;a=this.W[c].bc(b,a);this.f--;return a};k.Qb=function(a,b){this.W[(a&this.g)>>>this.ka].Tb(a&this.w,b&255,a)};k.fb=function(a,b){this.f++;this.W[(a&this.g)>>>this.ka].Ub(a&this.w,b&255,a);this.f--};k.hb=function(a,b){this.W[(a&this.g)>>>this.ka].Fb(a&this.w,b&65535,a)};k.Rb=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.ka;this.f++;this.W[d].fc(c,b&65535,a);this.f--}; +function fc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));gc(a,e,e,g,h,m,n,f[4])}}}function ic(a,b){a.A.push(b)} +function jc(a,b,c){a.f||(a.i&&F(a.i,64)&&(E(a.i,"memory fault ("+c+") on address "+J(a.i,b),!0,!0),cc(a.i)),a.b.ja(4,b))}function dc(a,b,c){p("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,oe:0,Ob:20,Ed:0};this.f={se:0,ec:-1}}u(K);k=K.prototype; +k.wa=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.ec=kc(c,function(){e.f.Ra|=128;e.f.Ra&64&&(lc(e.b,e.f.Fd),mc(e.b,e.f.ec,1E3/60))});this.f.Fd=nc(64,6);hc(b,this,L);ic(b,this.reset.bind(this));G(this)};k.reset=function(){this.g.Ob=this.g.Ob&-120|20;this.f.Ra=0};k.$c=function(){var a=this.f.Ra;this.f.Ra&=-129;return a};k.Od=function(a){this.f.Ra=a;a&64&&mc(this.b,this.f.ec,1E3/60);this.f.Ra=a&-129};k.Tc=function(a){return(a?this.g.Ed:this.g.data)&65535}; +k.Hd=function(a){this.g.data=a};k.bd=function(){var a=this.b;return a.C&62337|a.Ea<<5|a.Fa<<1};k.Qd=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ea=a>>5&3;b.Fa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Sa!=c&&(b.Sa=c,oc(b))}pc(this)};k.cd=function(){var a=this.b.Ua;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.dd=function(){return this.b.Db};k.ed=function(){return this.b.Va}; +k.Rd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Va!=a&&(b.Va=a,a&16?(b.xb=4194303,b.$a=3915776):(b.xb=262143,b.$a=253952),oc(b));pc(this)};function pc(a){a.g.Ob=a.g.Ob&-8|(a.b.Sa?a.b.Va&16?1:2:4)}k.td=function(a){return this.b.V[1][a>>1&7]};k.ee=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.rd=function(a){return this.b.V[1][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.sd=function(a){return this.b.ta[1][a>>1&7]}; +k.de=function(a,b){b=b>>1&7;this.b.ta[1][b]=a;this.b.V[1][b]&=65295};k.qd=function(a){return this.b.ta[1][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.ta[1][b]=a;this.b.V[1][b]&=65295};k.Zc=function(a){return this.b.V[0][a>>1&7]};k.Nd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.Xc=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ld=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.Yc=function(a){return this.b.ta[0][a>>1&7]};k.Md=function(a,b){b=b>>1&7;this.b.ta[0][b]=a;this.b.V[0][b]&=65295}; +k.Wc=function(a){return this.b.ta[0][(a>>1&7)+8]};k.Kd=function(a,b){b=(b>>1&7)+8;this.b.ta[0][b]=a;this.b.V[0][b]&=65295};k.zd=function(a){return this.b.V[3][a>>1&7]};k.ke=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.xd=function(a){return this.b.V[3][(a>>1&7)+8]};k.ie=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.yd=function(a){return this.b.ta[3][a>>1&7]};k.je=function(a,b){b=b>>1&7;this.b.ta[3][b]=a;this.b.V[3][b]&=65295};k.wd=function(a){return this.b.ta[3][(a>>1&7)+8]}; +k.he=function(a,b){b=(b>>1&7)+8;this.b.ta[3][b]=a;this.b.V[3][b]&=65295};k.qb=function(a){a&=7;return this.b.M&2048?this.b.Na[a]:this.b.u[a]};k.ub=function(a,b){b&=7;this.b.M&2048?this.b.Na[b]=a:this.b.u[b]=a};k.kd=function(){return this.b.M&49152?this.b.Aa[0]:this.b.u[6]};k.Wd=function(a){this.b.M&49152?this.b.Aa[0]=a:this.b.u[6]=a};k.nd=function(){return this.b.u[7]};k.Zd=function(a){this.b.u[7]=a};k.rb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Na[a]}; +k.vb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Na[b]=a};k.ld=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Aa[1]};k.Xd=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Aa[1]=a};k.md=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Aa[3]};k.Yd=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Aa[3]=a};k.Vc=function(a){return this.b.yc[a-65504>>1]};k.Jd=function(a,b){this.b.yc[b-65504>>1]=a};k.vc=function(a){return 65520==a?61183:0};k.Cc=function(){}; +k.vd=function(){return 1};k.ge=function(){};k.Uc=function(){return this.b.ca};k.Id=function(){this.b.ca=0};k.ad=function(){return this.b.xc};k.Pd=function(a,b){b&1||(a&=255);this.b.xc=a};k.fd=function(a){return a?this.b.dc:0};k.Sd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.dc=a;b.H|=2};k.ud=function(a){return a?this.b.Wa&65280:0};k.fe=function(a){this.b.Wa=a|255};k.jd=function(){return Bb(this.b)};k.Vd=function(a){qc(this.b,a&-1809|Bb(this.b)&1808);this.b.H|=128}; +k.Bc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; +var M={},L=(M[62592]=[null,null,K.prototype.td,K.prototype.ee,"SISDR",1145],M[62608]=[null,null,K.prototype.rd,K.prototype.ce,"SDSDR",1145],M[62624]=[null,null,K.prototype.sd,K.prototype.de,"SISAR",1145],M[62640]=[null,null,K.prototype.qd,K.prototype.be,"SDSAR",1145],M[62656]=[null,null,K.prototype.Zc,K.prototype.Nd,"KISDR",1145],M[62672]=[null,null,K.prototype.Xc,K.prototype.Ld,"KDSDR",1145],M[62688]=[null,null,K.prototype.Yc,K.prototype.Md,"KISAR",1145],M[62704]=[null,null,K.prototype.Wc,K.prototype.Kd, +"KDSAR",1145],M[62798]=[null,null,K.prototype.ed,K.prototype.Rd,"MMR3",1145],M[65382]=[null,null,K.prototype.$c,K.prototype.Od,"LKS"],M[65400]=[null,null,K.prototype.Tc,K.prototype.Hd,"CNSL"],M[65402]=[null,null,K.prototype.bd,K.prototype.Qd,"MMR0",1145],M[65404]=[null,null,K.prototype.cd,K.prototype.Bc,"MMR1",1145],M[65406]=[null,null,K.prototype.dd,K.prototype.Bc,"MMR2",1145],M[65408]=[null,null,K.prototype.zd,K.prototype.ke,"UISDR",1145],M[65424]=[null,null,K.prototype.xd,K.prototype.ie,"UDSDR", +1145],M[65440]=[null,null,K.prototype.yd,K.prototype.je,"UISAR",1145],M[65456]=[null,null,K.prototype.wd,K.prototype.he,"UDSAR",1145],M[65472]=[null,null,K.prototype.qb,K.prototype.ub,"R0SET0"],M[65473]=[null,null,K.prototype.qb,K.prototype.ub,"R1SET0"],M[65474]=[null,null,K.prototype.qb,K.prototype.ub,"R2SET0"],M[65475]=[null,null,K.prototype.qb,K.prototype.ub,"R3SET0"],M[65476]=[null,null,K.prototype.qb,K.prototype.ub,"R4SET0"],M[65477]=[null,null,K.prototype.qb,K.prototype.ub,"R5SET0"],M[65478]= +[null,null,K.prototype.kd,K.prototype.Wd,"R6KERNEL"],M[65479]=[null,null,K.prototype.nd,K.prototype.Zd,"R7KERNEL"],M[65480]=[null,null,K.prototype.rb,K.prototype.vb,"R0SET1",1145],M[65481]=[null,null,K.prototype.rb,K.prototype.vb,"R1SET1",1145],M[65482]=[null,null,K.prototype.rb,K.prototype.vb,"R2SET1",1145],M[65483]=[null,null,K.prototype.rb,K.prototype.vb,"R3SET1",1145],M[65484]=[null,null,K.prototype.rb,K.prototype.vb,"R4SET1",1145],M[65485]=[null,null,K.prototype.rb,K.prototype.vb,"R5SET1",1145], +M[65486]=[null,null,K.prototype.ld,K.prototype.Xd,"R6SUPER",1145],M[65487]=[null,null,K.prototype.md,K.prototype.Yd,"R6USER",1145],M[65504]=[null,null,K.prototype.Vc,K.prototype.Jd,"CTRL",1170],M[65520]=[null,null,K.prototype.vc,K.prototype.Cc,"LSIZE",1170],M[65522]=[null,null,K.prototype.vc,K.prototype.Cc,"HSIZE",1170],M[65524]=[null,null,K.prototype.vd,K.prototype.ge,"SYSID",1170],M[65526]=[null,null,K.prototype.Uc,K.prototype.Id,"CPUERR",1170],M[65528]=[null,null,K.prototype.ad,K.prototype.Pd, +"MB",1170],M[65530]=[null,null,K.prototype.fd,K.prototype.Sd,"PIR"],M[65532]=[null,null,K.prototype.ud,K.prototype.fe,"SL"],M[65534]=[null,null,K.prototype.jd,K.prototype.Vd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; -L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504];Ta(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Ec(this,Ac?Fc:Gc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},R:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&gc(this.w,b,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535: -c&255|(this.b[b+1]&255)<<8},Sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ka=!0},O:function(a,b){if(this.i&&null!=this.D){var c=this.i;Lc(c,this.D+a,1,c.L)&&c.ga(!0)}return this.Nb(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Lc(c,this.D+a,2,c.L)&&c.ga(!0)}return this.Ob(a, -b)},ra:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Lc(d,this.D+a,1,d.C)&&d.ga(!0)}this.g?this.A(a,b,c):this.Kb(a,b,c)},$a:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Lc(d,this.D+a,2,d.C)&&d.ga(!0)}this.g?this.A(a,b,c):this.Sb(a,b,c)},N:function(a){return this.f[a]},P:function(a,b){a=this.f[a];this.i&&F(this.i,128)&&D(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},X:function(a,b){a&1&&gc(this.w,b,2);return this.F.getUint16(a,!0)},aa:function(a,b){a&1&&gc(this.w, -b,2);a=this.J[a>>1];this.i&&F(this.i,128)&&D(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ma:function(a,b){this.f[a]=b;this.Ka=!0},sa:function(a,b,c){this.f[a]=b;this.Ka=!0;this.i&&F(this.i,128)&&D(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},va:function(a,b,c){a&1&&gc(this.w,c,4);this.F.setUint16(a,b,!0);this.Ka=!0},Ba:function(a,b,c){a&1&&gc(this.w,c,4);this.J[a>>1]=b;this.Ka=!0;this.i&&F(this.i,128)&&D(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function Sb(a,b,c){a.i=b;a.I=a.B=0;c&&((a.I=c.I)&&Kc(a,Jc,!1),(a.B=c.B)&&Ic(a,Jc,!1))}function Mc(a,b){b?--a.B||(a.Jb=a.g?a.A:a.Kb,a.zb=a.g?a.H:a.Sb):--a.I||(a.Fb=a.Nb,a.pa=a.Ob)}function Ic(a,b,c){c&&a.B||(a.Jb=!a.g&&b[1]||a.A,a.zb=!a.g&&b[3]||a.H);if(c||void 0===c)a.Kb=b[1]||a.A,a.Sb=b[3]||a.H}function Kc(a,b,c){c&&a.I||(a.Fb=b[0]||a.K,a.pa=b[2]||a.L);if(c||void 0===c)a.Nb=b[0]||a.K,a.Ob=b[2]||a.L}function Ec(a,b){b||(b=Nc);Kc(a,b,void 0);Ic(a,b,void 0)} -var Nc=[],Hc=[I.prototype.R,I.prototype.Sa,I.prototype.la,I.prototype.Ca],Jc=[I.prototype.O,I.prototype.ra,I.prototype.Y,I.prototype.$a];if(sb)var Gc=[I.prototype.N,I.prototype.ma,I.prototype.X,I.prototype.va],Fc=[I.prototype.P,I.prototype.sa,I.prototype.aa,I.prototype.Ba]; -function Oc(a,b){r.call(this,"CPU",a,Oc,1);var c=a.multiplier||1;this.Ra=a.cycles||b;this.Na=c;this.qb=Math.round(this.Ra/1E4)/100;this.Xa=this.qb*this.Na;this.v.ea=!1;this.v.Ib=!1;this.v.ab=a.autoStart;this.v.cb=!1;this.ub=this.ma=0;this.vb=a.csStart;this.gb=a.csInterval;this.hb=a.csStop;this.K=[];this.dc=this.hd.bind(this);H(this)}u(Oc);var Pc=["power","reset"];k=Oc.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.gb,c=!0);0<=a.hb&&a.hb<=Vc(a)&&(a.gb=a.hb=-1,Sc(a),a.ga(),c=!0);c&&a.j(Vc(a)+" cycles: checksum="+l(a.ub))}} -k.qa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.I[b]=c,!0;case "run":return this.I[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ka)a=!0;else{var b=null,c,h=kb(a.id);for(c=0;ca.X/a.Xa?b=1:d=!0;a.Na=b;b=a.qb*a.Na;if(a.Xa!=b){a.Xa=b;b=a.Xa.toFixed(2)+"Mhz";var e=a.I.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.lb()}Xc(a,a.R);a.R=0;a.P=za();a.Y=0;Yc(a);return d}function hc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function jc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Ra*a.Na/1E3*c|0,a.K[b][0]=c+Zc(a))} -function $c(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ad(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Zc(a,b){var c=a.aa-=a.b;a.b=a.J=0;b&&(a.aa=0);return c} -k.hd=function(){if(this.v.ea){this.sb>=this.Ra&&Yc(this,!0);this.va=0;this.Ua=za();if(this.Y){var a=this.Ua-this.Y;a>this.ac&&(this.P+=a,this.P>this.Ua&&(this.P=this.Ua))}try{do{var b=$c(this,this.v.cb?1:this.Va);try{this.nb(b)}catch(e){if("number"!=typeof e)throw e;}b=Zc(this,!0);this.va+=b;this.R+=b;Uc(this,b);ad(this,b);this.ra-=b;if(0>=this.ra){this.ra+=this.Va;15<=++this.bc&&(this.B&&this.B.ca(),this.bc=0);break}}while(this.v.ea)}catch(e){this.ga();this.B&&this.B.stop(za(),Vc(this));rb(this, -e.stack||e.message);return}if(this.v.ea){a=setTimeout;b=this.dc;this.Y=za();var c=this.ac;this.va&&(c=Math.round(c*this.va/this.Va));var c=c-(this.Y-this.Ua),d=this.Y-this.P;d&&(this.X=Math.round(this.R/(10*d))/100,864E5<=d&&(this.la=0,Wc(this)));if(0>c||this.Xc&&(this.P-=c),c=0;this.sb+=this.va;this.Y+=c;a(b,c)}}}; -k.mb=function(a){if(qb(this))return!1;if(this.v.ea)return this.j(this.toString()+" busy"),!1;Wc(this);this.v.ea=!0;this.v.Ib=!0;var b=this.I.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.lb(!0),this.B.start(this.P,Vc(this)));setTimeout(this.dc,0);return!0};k.nb=function(){return 0};k.ga=function(a){var b=!1;if(this.v.ea){Zc(this);Xc(this,this.R);this.R=0;this.v.ea=!1;if(b=this.I.run)b.textContent="Run";this.B&&this.B.stop(za(),Vc(this));b=!0}this.v.complete=a;return b}; -function bd(a){this.fb=+a.model||1170;this.Bb=a.addrReset||0;Oc.call(this,a,6666667);this.decode=1120==this.fb?cd.bind(this):dd.bind(this);ed(this);this.L=0;this.N=null;this.v.complete=!1}u(bd,Oc);k=bd.prototype;k.reset=function(){this.status("model "+this.fb);this.v.ea&&this.ga();ed(this);Rc(this);this.v.error=!1;this.parent.reset.call(this)}; -function ed(a){a.S=65536;a.T=32768;a.Z=65535;a.W=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Bb];a.Ha=[0,0,0,0,0,0];a.wa=[0,0,0,0];a.A=0;a.Ca=0;a.sc=[4,2,0,1];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ta=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.hc=[0,0,0,0,0,0,0,0];a.gc=0;a.G=0;a.F=a.H=0;a.g=a.f=a.bb=0;a.sa=-1;fd(a)}function fd(a){a.Qa=255;a.ba=0;a.Qb=0;a.C=0;a.Oa=0;a.xb=0;a.Pa=0;a.Ma=0;a.Ba=0;a.rb=262143;a.Ta=253952;a.N=null;a.w&&lc(a)}function lc(a){a.Ma?(a.O=65536,a.$=a.rc,a.pa=a.ed,a.zb=a.Rd,Vb(a.w,a.Pa&16?22:18)):(a.O=0,a.$=a.qc,a.pa=a.fc,a.zb=a.lc,Vb(a.w,16))}function gd(a,b,c){a.Bb=b;N(a,b);!c&&a.i&&(a.ga()||a.i.ca())}k.Yb=function(){return 0}; -k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.la,this.Na]);a.set(2,cc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];Wc(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.A!=c&&(a.wa[c]=a.u[6],a.u[6]=a.wa[a.A]);a.M=b;a.G|=2}function P(a,b){a.G&128||(a.W=a.Z=b,a.T=0)}function md(a,b,c){a.G&128||(a.W=a.Z=a.S=b,a.T=c||0)}function Fd(a,b,c,d){a.G&128||(a.W=a.Z=a.S=b,a.T=(c^b)&(d^b))}function Gd(a,b){a.G&128||(a.W=a.Z=a.S=b,a.T=a.W^a.S>>1)} -function Hd(a,b,c,d){a.G&128||(a.W=a.Z=a.S=b,a.T=(c^d)&(d^b))}k.ha=function(a,b){if(!this.L){var c=!1;0>this.sa?this.sa=Lb(this):this.A||(a=4,c=!0);this.C&57344||(this.Oa=63222,this.xb=a);this.A=0;var d=this.pa(a|this.O),e=this.pa(a+2&65535|this.O);wc(this,e&-12289|this.sa>>2&12288);c&&(this.ba|=4,this.u[6]=4);Id(this,this.sa);Id(this,this.u[7]);N(this,d);this.G&=-113;this.sa=-1;this.G|=8;this.wc=a;this.vc=b;if(26!=b)throw a;}}; -function Jd(a){var b=Kd(a),c=Kd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);N(a,b);wc(a,c);a.G&=-17} -function Ld(a,b,c){var d,e,f,g=0;d=b>>13;a.Pa&a.sc[a.A]||(d&=7);e=a.U[a.A][d];f=(a.ta[a.A][d]<<6)+(b&8191)&a.rb;if(ff){if(3932160<=f){f&=262143;var h=f>>13&31;31>h?a.Pa&32&&(f=a.xc[h]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ta&&4186112>f&&(a.ba|=32,a.ha(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c& -4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.U[a.A][d]=e;if(4194170!==f||a.A)a.Ba=a.A,a.Ca=d;g&&(g&57344&&(0<=a.sa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ba<<5|a.Ca<<1),a.ha(168,16)),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.pa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.pa(e)| -g;a.b-=8;break;case 6:return e=a.pa(ld(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.pa(ld(a,2)),e=e+a.u[c]&65535,e=a.pa(e|a.O)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Oa=a.Oa<<8|f<<3&248|c);6==c&&!a.A&&d&4&&0>=f&&(a.u[6]<=a.Qa||65534<=a.u[6])&&(a.u[6]<=a.Qa-32?(a.ba|=4,a.u[6]=4,a.ha(4,24)):(a.ba|=8,a.G|=64));return e}k.Db=function(a){if(!this.Ma)return this.w.Db(a);this.L++;a=Md(this,Ld(this,a,3));this.L--;return a}; -k.eb=function(a){if(!this.Ma)return this.w.eb(a);this.L++;a=this.fc(Ld(this,a,2));this.L--;return a};k.Ya=function(a,b){this.Ma?(this.L++,Nd(this,Ld(this,a,5),b),this.L--):this.w.Ya(a,b)};k.Hb=function(a,b){this.Ma?(this.L++,this.lc(Ld(this,a,4),b),this.L--):this.w.Hb(a,b)};k.qc=function(a,b,c){return Od(this,a,b,c)};k.rc=function(a,b,c){return Ld(this,Od(this,a,b,c),c)};k.fc=function(a){return this.w.oa(a)};k.ed=function(a){return this.w.oa(Ld(this,a,2))};k.lc=function(a,b){this.w.Za(a,b&65535)}; -k.Rd=function(a,b){this.w.Za(Ld(this,a,4),b)};function Pd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Od(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.A=a.M>>12&3,c=a.pa(d|c&a.O),a.A=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.wa[a.M>>12&3];return c}function Qd(a,b,c,d){a.C&57344||(a.Oa=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Od(a,b,e,4),c&65536||(e&=65535),a.A=a.M>>12&3,e=Ld(a,e|c&65536,4),a.A=a.M>>14&3,a.w.Za(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.wa[a.M>>12&3]=d} -function Rd(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Sd(a,b){b>>=6;var c=a.H=b&7;return(b=a.F=(b&56)>>3)?a.w.oa(a.$(b,c,2)):a.u[c]}function Td(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Od(a,b,c,8)}function Ud(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Md(a,a.$(b,c,3)):a.u[c]&255}function Vd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.$(b,c,2)):a.u[c]} -function Q(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.bb=a.$(b,e,7),Nd(a,e,d.call(a,c,Md(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.$(b,e,6),a.w.Za(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function Wd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Nd(a,a.$(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c}function Xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.Za(a.$(b,d,4),c):a.u[d]=c&65535;return c} -function S(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.nb=function(a){this.v.complete=!0;var b=this.i&&Yd(this.i)?1:this.v.Ib?-1:0,c=a?this.v.Ib?0:1:-1;this.v.Ib=!1;this.aa=this.b=a;do{if(b){if(this.i&&Zd(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.G){this.G&112&&(this.G&32?this.ha(168,28):this.G&64?this.ha(4,30):this.G&16&&this.ha(12,32),this.G&=-113);if(a=this.G&7){a=!1;if(this.G&2){this.G&=-3;var d=160,e=(this.Qb&224)>>5,f=this.N&&this.N.ib>e?this.N:null;f&&(d=f.ld,e=f.ib);e>(this.M&224)>>5?(this.G&4&&(ld(this,2),this.G&=-5),this.ha(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.G&1&&this.G++;a=a&&0>c}if(a)break}this.G=this.G&7|this.M&16;this.decode(kd(this))}while(0>1|b<<16;Gd(this,a);return a&65535}function ee(a,b){a=b&2048|b>>1|b<<8;Gd(this,a<<8);return a&255}function fe(a,b){a=b&~a;P(this,a);return a}function ge(a,b){a=b&~a;P(this,a<<8);return a}function he(a,b){a|=b;P(this,a);return a}function ie(a,b){a|=b;P(this,a<<8);return a} -function je(a,b){a=~b|65536;md(this,a);return a&65535}function ke(a,b){a=~b|256;md(this,a<<8);return a&255}function le(a,b){a=b-a;this.G&128||(this.W=this.Z=a,this.T=b&(b^a));return a&65535}function me(a,b){a=b-a;var c=a<<8;b<<=8;this.G&128||(this.W=this.Z=c,this.T=b&(b^c));return a&255}function ne(a,b){a=b+a;this.G&128||(this.W=this.Z=a,this.T=a&(b^a));return a&65535}function oe(a,b){a=b+a;var c=a<<8;this.G&128||(this.W=this.Z=c,this.T=c&(b<<8^c));return a&255} -function pe(a,b){a=-b;md(this,a,a&b&32768);return a&65535}function qe(a,b){a=-b;md(this,a<<8,(a&b&128)<<8);return a&255}function re(a,b){a=b<<1|this.S>>16&1;Gd(this,a);return a&65535}function se(a,b){a=b<<1|this.S>>16&1;Gd(this,a<<8);return a&255}function te(a,b){a=(this.S&65536|b)>>1|b<<16;Gd(this,a);return a&65535}function ue(a,b){a=((this.S&65536)>>8|b)>>1|b<<8;Gd(this,a<<8);return a&255}function ve(a,b){var c=b-a;Hd(this,c,a,b);return c&65535} -function we(a,b){var c=b-a;Hd(this,c<<8,a<<8,b<<8);return c&255}function xe(a,b){this.G&128||(this.W=this.Z=b&65280,this.T=this.S=0);return(b<<8|b>>8)&65535}function ye(a,b){a^=b;P(this,a);return a&65535}function ze(a){R(this,a,Sd(this,a),$d);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function Ae(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.S=this.T=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.T=32768)}this.u[a]=c&65535;this.W=this.Z=c;this.b-=(this.g?6:7)+b} -function Be(a){var b=Vd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.S=this.T=0;b&=63;if(b&32){b=64-b;32>b-1;this.S=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.W=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function Ce(a){S(this,a,!hd(this))}function De(a){S(this,a,hd(this))} -function Ee(a){R(this,a,Sd(this,a),fe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Fe(a){Q(this,a,Rd(this,a),ge);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ge(a){R(this,a,Sd(this,a),he);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function He(a){Q(this,a,Rd(this,a),ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function Ie(a){P(this,Sd(this,a)&Vd(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Je(a){P(this,(Rd(this,a)&Ud(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ke(a){S(this,a,jd(this))}function Le(a){S(this,a,!this.Ga()==!id(this))}function Me(a){S(this,a,!jd(this)&&!this.Ga()==!id(this))}function Ne(a){S(this,a,!hd(this)&&!jd(this))}function Oe(a){S(this,a,jd(this)||!this.Ga()!=!id(this))} -function Pe(a){S(this,a,hd(this)||jd(this))}function Qe(a){S(this,a,!this.Ga()!=!id(this))}function Re(a){S(this,a,this.Ga())}function Se(a){S(this,a,!jd(this))}function Te(a){S(this,a,!this.Ga())}function Ue(){this.ha(12,1);this.b-=5}function Ve(a){S(this,a,!0)}function We(a){S(this,a,!id(this))}function Xe(a){S(this,a,id(this))}function T(a){a&1&&(this.S=0);a&2&&(this.T=0);a&4&&(this.Z=1);a&8&&(this.W=0);this.b-=5} -function Ye(a){var b=Sd(this,a);a=Vd(this,a);Hd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ze(a){var b=Rd(this,a)<<8;a=Ud(this,a)<<8;Hd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} -function $e(a){var b=Vd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.S=this.T=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Z=d>>16|d,this.W=d>>16):(this.T=32768,this.Z=d>>15|d,this.W=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.W=0,this.T=32768,this.S=65536,this.b-=7}function af(){this.ha(24,2);this.b-=25} -function bf(){this.M&49152?(this.ba|=128,this.ha(4,3)):this.i?$b(this.i):this.ga();this.b-=7}function cf(){this.ha(16,4);this.b-=25}var df=[0,7,7,10,7,11,9,13];function ef(a){this.J=this.b;N(this,Td(this,a));this.b=this.J-df[this.g]}var ff=[0,14,14,17,14,18,16,20];function gf(a){this.J=this.b;var b=Td(this,a);a=a>>6&7;Id(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-ff[this.g]}var hf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function jf(a){var b=Sd(this,a);this.J=this.b;P(this,Xd(this,a,b));this.b=this.J-hf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function kf(a){var b=Rd(this,a);P(this,Wd(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var lf=[7,13,13,17,14,18,17,21]; -function mf(a){var b=Vd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.G&128||(this.W=b>>16,this.Z=this.W|b,this.T=0,this.S=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function sf(a){R(this,a,Sd(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function tf(a){R(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)}function uf(){this.ha(28,5);this.b-=5}function vf(){this.G&4||this.B.ca();this.G|=4;ld(this,-2);this.b-=3}function wf(a){R(this,a,Sd(this,a),ye);this.b-=this.g?9:3+(7==this.f?2:0)}function U(a){var b;if(b=this.i)b=this.i,D(b,"undefined opcode "+J(b,a),!0,!0),b=$b(b);b||this.ha(8,6)}function cd(a){xf[a>>12].call(this,a)}function yf(a){zf[a>>6&3].call(this,a)}function Af(a){Bf[a>>6&3].call(this,a)} -function Cf(a){Df[a>>6&3].call(this,a)}function Ef(a){Ff[a&15].call(this,a)}function Gf(a){Hf[a&15].call(this,a)}function If(a){Jf[a>>6&3].call(this,a)}function Kf(a){Lf[a>>6&3].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)} -var xf=[function(a){Of[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,U,function(a){Pf[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,U],Of=[function(a){Qf[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,U,U,U],zf=[function(a){md(this,Xd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,le);this.b-=this.g?9:3+(7==this.f?2:0)}],Bf=[function(a){R(this,a,0, -pe);this.b-=this.g?11:6},function(a){R(this,a,hd(this)?1:0,$d);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,hd(this)?1:0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Vd(this,a);md(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Df=[function(a){R(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,be);this.b-=this.g?9:3+(7==this.f?2:0)}], -Qf=[function(a){Rf[a&15].call(this,a)},U,U,U,ef,ef,ef,ef,qf,U,Ef,Gf,tf,tf,tf,tf],Rf=[bf,vf,pf,Ue,cf,of,U,U,U,U,U,U,U,U,U,U],Ff=[nf,function(){this.S=0;this.b-=5},function(){this.T=0;this.b-=5},T,function(){this.Z=1;this.b-=5},T,T,T,function(){this.W=0;this.b-=5},T,T,T,T,T,T,T],Hf=[nf,function(){this.S=65536;this.b-=5},function(){this.T=32768;this.b-=5},W,function(){this.Z=0;this.b-=5},W,W,W,function(){this.W=32768;this.b-=5},W,W,W,W,W,W,W],Pf=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,U,U,U],Jf=[function(a){md(this, -Wd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,1,me);this.b-=this.g?9:3+(7==this.f?2:0)}],Lf=[function(a){Q(this,a,0,qe);this.b-=this.g?11:6},function(a){Q(this,a,hd(this)?1:0,ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,hd(this)?1:0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Ud(this,a);md(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],Nf=[function(a){Q(this,a,0,ue);this.b-=this.g?9+(this.bb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Q(this,a,0,ee);this.b-=this.g?9+(this.bb&1):3+(7==this.f?2:0)},function(a){Q(this,a,0,ce);this.b-=this.g?9:3+(7==this.f?2:0)}];function dd(a){Sf[a>>12].call(this,a)} -var Sf=[function(a){lg[a>>8&15].call(this,a)},jf,Ye,Ie,Ee,Ge,ze,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},kf,Ze,Je,Fe,He,sf,U],lg=[function(a){og[a>>4&15].call(this,a)},Ve,Se,Ke,Le,Qe,Me,Oe,gf,gf,yf,Af,Cf,function(a){pg[a>>6&3].call(this,a)},U,U],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.pa(a|this.O);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Pd(this,a,0);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this);this.J= -this.b;Qd(this,a,0,b);P(this,b);this.b=this.J-lf[this.g]},function(a){P(this,Xd(this,a,this.Ga?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},U,U,U,ef,ef,ef,ef,qf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.G|=1),this.b-=5):U.call(this,a)},Ef,Gf,tf,tf,tf,tf],qg=[bf,vf,pf,Ue,cf,of,function(){Jd(this);this.b-=13},U,U,U,U,U,U,U,U,U],mg=[mf,mf,$e,$e,Ae,Ae,Be,Be,wf,wf,U,U,U,U,rf,rf],ng=[Te,Re,Ne,Pe,We,Xe,Ce,De,af,uf,If,Kf,Mf,function(a){rg[a>> -6&3].call(this,a)},U,U],rg=[U,function(a){a=Pd(this,a,65536);Id(this,a);P(this,a);this.b-=11},function(a){var b=Kd(this);this.J=this.b;Qd(this,a,65536,b);P(this,b);this.b=this.J-lf[this.g]},U]; -function sg(a){r.call(this,"ROM",a,sg);this.fa=this.f=null;this.C=a.addr;this.g=a.size;this.A=a.alias;this.B=a.file;this.F=oa(this.B);if(this.B){a=this.B;var b=pa(this.F);"json"!=b&&"hex"!=b&&(a=ra()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ba(a,null,!0,function(a,b,f){f?c.ja("Unable to load ROM resource (error "+f+": "+a+")"):(jb(c.Sa,a,b),(a=Ca(a,b))?(c.f=a.da,c.fa=a.fa):c.B=null,tg(c))})}}u(sg);sg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)}; -sg.prototype.Aa=function(){this.fa&&(this.i&&ug(this.i,this.id,this.C,this.g,this.fa),delete this.fa);return!0};sg.prototype.za=function(){return!0}; -function tg(a){if(!pb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)rb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(Yb(a.w,b,a.g,Dc)){var c;for(c=0;c>>a.ia;0=b.length)break;for(var h=h+2,p=b[h++]&255|(b[h++]&255)<<8,q=b[h++]&255|(b[h++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),v=h,w=p-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(w)for(;w--;)a.b.Ya(q++,b[v++]&255);else q&1?a.b.ga():gd(a.b,q,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&ic(e.b,e.la))});this.ma=kc(52,4);this.Y=hc(this.b,function(){e.g|=128;e.g&64&&ic(e.b,e.ma)});ec(b,this,Ag);H(this)}; -k.cc=function(){if(!this.J){var a=Qc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=va(b[0]);if(c!=this.$a)return;b=va(b[1]);if(this.J=lb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Sa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Aa=function(a,b){if(!b)if(this.cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.za=function(a){return a?this.save():!0};k.reset=function(){Bg(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Bg(this)};function Bg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.Pb=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.R||8,c=a-this.H%a,this.R&&(b=ua("",c)));this.O&&!this.H&&c&&(b=String.fromCharCode(this.O)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.H+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), -this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;jc(this.b,this.Y,1E3/Math.round(this.P/10))}};var Cg={},Ag=(Cg[65392]=[null,null,X.prototype.Uc,X.prototype.Gd,"RCSR"],Cg[65394]=[null,null,X.prototype.Tc,X.prototype.Fd,"RBUF"],Cg[65396]=[null,null,X.prototype.gd,X.prototype.Td,"XCSR"],Cg[65398]=[null,null,X.prototype.fd,X.prototype.Sd,"XBUF"],Cg);Ta(function(){for(var a=C(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.I[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.I[b]=c,c.onclick= -function(){var a=d.I.listTapes;a&&Fg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.I[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Fg(d,oa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.I[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.R=Gg(a);var e=this;if((this.g=Qc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){n("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.X=kc(56,4);this.aa=hc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=pa(c),f="json"==e||"gz"==e?encodeURI(c):ra()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ba(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.v.ka;g?a.ja('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(jb(a.Sa,e,f),(e=Ca(e,f))&&Pg(a,b,c,d,e.da,e.ya, -e.xa));a.v.Ja=!1;a.F&&(a.F--,a.F||H(a));Mg(a)})}function Jg(a,b,c,d){if((a=a.I.listTapes)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Rg.prototype.Zb=function(){return-1};Rg.prototype.$b=function(){}; -function Tg(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.O?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(va(b.substring(c,f))),c=f+1}}return a} -function Ug(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Wa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Ic(this,Ec?Jc:Kc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&jc(this.w,b,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535: +c&255|(this.b[b+1]&255)<<8},sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.La=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,1,c.L)&&c.ia(!0)}return this.ac(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,2,c.L)&&c.ia(!0)}return this.bc(a, +b)},ma:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,1,d.C)&&d.ia(!0)}this.f?this.A(a,b,c):this.Ub(a,b,c)},va:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,2,d.C)&&d.ia(!0)}this.f?this.A(a,b,c):this.fc(a,b,c)},N:function(a){return this.F[a]},R:function(a,b){a=this.F[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Ia:function(a,b){a&1&&jc(this.w,b,2);return this.G.getUint16(a,!0)},Z:function(a,b){a&1&&jc(this.w, +b,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.F[a]=b;this.La=!0},ra:function(a,b,c){this.F[a]=b;this.La=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},Za:function(a,b,c){a&1&&jc(this.w,c,4);this.G.setUint16(a,b,!0);this.La=!0},Ea:function(a,b,c){a&1&&jc(this.w,c,4);this.J[a>>1]=b;this.La=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function Vb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Oc(a,Nc,!1),(a.B=c.B)&&Mc(a,Nc,!1))}function Qc(a,b){b?--a.B||(a.Tb=a.f?a.A:a.Ub,a.Fb=a.f?a.I:a.fc):--a.g||(a.Pb=a.ac,a.pa=a.bc)}function Mc(a,b,c){c&&a.B||(a.Tb=!a.f&&b[1]||a.A,a.Fb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Ub=b[1]||a.A,a.fc=b[3]||a.I}function Oc(a,b,c){c&&a.g||(a.Pb=b[0]||a.K,a.pa=b[2]||a.L);if(c||void 0===c)a.ac=b[0]||a.K,a.bc=b[2]||a.L}function Ic(a,b){b||(b=Rc);Oc(a,b,void 0);Mc(a,b,void 0)} +var Rc=[],Lc=[I.prototype.S,I.prototype.sa,I.prototype.ba,I.prototype.Fa],Nc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.va];if(vb)var Kc=[I.prototype.N,I.prototype.la,I.prototype.Ia,I.prototype.Za],Jc=[I.prototype.R,I.prototype.ra,I.prototype.Z,I.prototype.Ea]; +function Sc(a,b){r.call(this,"CPU",a,Sc,1);var c=a.multiplier||1;this.Ya=a.cycles||b;this.Ta=c;this.wb=Math.round(this.Ya/1E4)/100;this.eb=this.wb*this.Ta;this.v.fa=!1;this.v.Sb=!1;this.v.ib=a.autoStart;this.v.kb=!1;this.Ab=this.ma=0;this.Bb=a.csStart;this.nb=a.csInterval;this.ob=a.csStop;this.K=[];this.tc=this.Dd.bind(this);G(this)}u(Sc);var Tc=["power","reset"];k=Sc.prototype; +k.wa=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.nb,c=!0);0<=a.ob&&a.ob<=Zc(a)&&(a.nb=a.ob=-1,Wc(a),a.ia(),c=!0);c&&a.j(Zc(a)+" cycles: checksum="+l(a.Ab))}} +k.qa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.F[b]=c,!0;case "run":return this.F[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Y/a.eb?b=1:d=!0;a.Ta=b;b=a.wb*a.Ta;if(a.eb!=b){a.eb=b;b=a.eb.toFixed(2)+"Mhz";var e=a.F.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.gb()}ad(a,a.S);a.S=0;a.R=Aa();a.Z=0;bd(a);return d}function kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Ya*a.Ta/1E3*c|0,a.K[b][0]=c+cd(a))} +function dd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function cd(a,b){var c=a.ba-=a.b;a.b=a.J=0;b&&(a.ba=0);return c} +k.Dd=function(){if(this.v.fa){this.yb>=this.Ya&&bd(this,!0);this.va=0;this.ab=Aa();if(this.Z){var a=this.ab-this.Z;a>this.qc&&(this.R+=a,this.R>this.ab&&(this.R=this.ab))}try{do{var b=dd(this,this.v.kb?1:this.bb);try{this.tb(b)}catch(e){if("number"!=typeof e)throw e;}b=cd(this,!0);this.va+=b;this.S+=b;Yc(this,b);ed(this,b);this.ra-=b;if(0>=this.ra){this.ra+=this.bb;15<=++this.rc&&(this.B&&this.B.da(),this.rc=0);break}}while(this.v.fa)}catch(e){this.ia();this.B&&this.B.stop(Aa(),Zc(this));ub(this, +e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.tc;this.Z=Aa();var c=this.qc;this.va&&(c=Math.round(c*this.va/this.bb));var c=c-(this.Z-this.ab),d=this.Z-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.la=0,$c(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.yb+=this.va;this.Z+=c;a(b,c)}}}; +k.sb=function(a){if(tb(this))return!1;if(this.v.fa)return this.j(this.toString()+" busy"),!1;$c(this);this.v.fa=!0;this.v.Sb=!0;var b=this.F.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.gb(!0),this.B.start(this.R,Zc(this)));setTimeout(this.tc,0);return!0};k.tb=function(){return 0};k.ia=function(a){var b=!1;if(this.v.fa){cd(this);ad(this,this.S);this.S=0;this.v.fa=!1;if(b=this.F.run)b.textContent="Run";this.B&&this.B.stop(Aa(),Zc(this));b=!0}this.v.complete=a;return b}; +function fd(a){this.mb=+a.model||1170;this.Kb=a.addrReset||0;Sc.call(this,a,6666667);this.decode=1120==this.mb?gd.bind(this):hd.bind(this);id(this);this.L=0;this.N=null;this.v.complete=!1}u(fd,Sc);k=fd.prototype;k.reset=function(){this.status("model "+this.mb);this.v.fa&&this.ia();id(this);Vc(this);this.v.error=!1;this.parent.reset.call(this)}; +function id(a){a.T=65536;a.U=32768;a.$=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Kb];a.Na=[0,0,0,0,0,0];a.Aa=[0,0,0,0];a.A=0;a.Fa=0;a.Nc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ta=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Sc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.yc=[0,0,0,0,0,0,0,0];a.xc=0;a.H=0;a.G=a.I=0;a.g=a.f=a.jb=0;a.sa=-1;jd(a)}function jd(a){a.Wa=255;a.ca=0;a.dc=0;a.C=0;a.Ua=0;a.Db=0;a.Va=0;a.Sa=0;a.Ea=0;a.xb=262143;a.$a=253952;a.N=null;a.w&&oc(a)}function oc(a){a.Sa?(a.P=65536,a.aa=a.Mc,a.pa=a.Ad,a.Fb=a.le,Yb(a.w,a.Va&16?22:18)):(a.P=0,a.aa=a.Lc,a.pa=a.wc,a.Fb=a.Dc,Yb(a.w,16))}function kd(a,b,c){a.Kb=b;N(a,b);!c&&a.i&&(a.ia()||a.i.da())}k.nc=function(){return 0}; +k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.la,this.Ta]);a.set(2,fc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];$c(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.A!=c&&(a.Aa[c]=a.u[6],a.u[6]=a.Aa[a.A]);a.M=b;a.H|=2}function Q(a,b){a.H&128||(a.X=a.$=b,a.U=0)}function qd(a,b,c){a.H&128||(a.X=a.$=a.T=b,a.U=c||0)}function rd(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^b)&(d^b))}function sd(a,b){a.H&128||(a.X=a.$=a.T=b,a.U=a.X^a.T>>1)} +function td(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^d)&(d^b))}k.ja=function(a,b){if(!this.L){var c=!1;0>this.sa?this.sa=Bb(this):this.A||(a=4,c=!0);this.C&57344||(this.Ua=63222,this.Db=a);this.A=0;var d=this.pa(a|this.P),e=this.pa(a+2&65535|this.P);qc(this,e&-12289|this.sa>>2&12288);c&&(this.ca|=4,this.u[6]=4);ud(this,this.sa);ud(this,this.u[7]);N(this,d);this.H&=-113;this.sa=-1;this.H|=8;this.Rc=a;this.Qc=b;if(26!=b)throw a;}}; +function Md(a){var b=Nd(a),c=Nd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);N(a,b);qc(a,c);a.H&=-17} +function Od(a,b,c){var d,e,f,g=0;d=b>>13;a.Va&a.Nc[a.A]||(d&=7);e=a.V[a.A][d];f=(a.ta[a.A][d]<<6)+(b&8191)&a.xb;if(ff){if(3932160<=f){f&=262143;var h=f>>13&31;31>h?a.Va&32&&(f=a.Sc[h]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.$a&&4186112>f&&(a.ca|=32,a.ja(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c& +4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.A][d]=e;if(4194170!==f||a.A)a.Ea=a.A,a.Fa=d;g&&(g&57344&&(0<=a.sa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ea<<5|a.Fa<<1),a.ja(168,16)),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.pa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.pa(e)| +g;a.b-=8;break;case 6:return e=a.pa(pd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.pa(pd(a,2)),e=e+a.u[c]&65535,e=a.pa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ua=a.Ua<<8|f<<3&248|c);6==c&&!a.A&&d&4&&0>=f&&(a.u[6]<=a.Wa||65534<=a.u[6])&&(a.u[6]<=a.Wa-32?(a.ca|=4,a.u[6]=4,a.ja(4,24)):(a.ca|=8,a.H|=64));return e}k.Mb=function(a){if(!this.Sa)return this.w.Mb(a);this.L++;a=Pd(this,Od(this,a,3));this.L--;return a}; +k.lb=function(a){if(!this.Sa)return this.w.lb(a);this.L++;a=this.wc(Od(this,a,2));this.L--;return a};k.fb=function(a,b){this.Sa?(this.L++,Qd(this,Od(this,a,5),b),this.L--):this.w.fb(a,b)};k.Rb=function(a,b){this.Sa?(this.L++,this.Dc(Od(this,a,4),b),this.L--):this.w.Rb(a,b)};k.Lc=function(a,b,c){return Rd(this,a,b,c)};k.Mc=function(a,b,c){return Od(this,Rd(this,a,b,c),c)};k.wc=function(a){return this.w.oa(a)};k.Ad=function(a){return this.w.oa(Od(this,a,2))};k.Dc=function(a,b){this.w.hb(a,b&65535)}; +k.le=function(a,b){this.w.hb(Od(this,a,4),b)};function Sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Rd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.A=a.M>>12&3,c=a.pa(d|c&a.P),a.A=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Aa[a.M>>12&3];return c}function Td(a,b,c,d){a.C&57344||(a.Ua=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Rd(a,b,e,4),c&65536||(e&=65535),a.A=a.M>>12&3,e=Od(a,e|c&65536,4),a.A=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Aa[a.M>>12&3]=d} +function Ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.G=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.G=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]}function Wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Rd(a,b,c,8)}function Xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.jb=a.aa(b,e,7),Qd(a,e,d.call(a,c,Pd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function Zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Qd(a,a.aa(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function $d(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.aa(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.tb=function(a){this.v.complete=!0;var b=this.i&&ae(this.i)?1:this.v.Sb?-1:0,c=a?this.v.Sb?0:1:-1;this.v.Sb=!1;this.ba=this.b=a;do{if(b){if(this.i&&be(this.i,this.u[7],c)){this.ia();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.ja(168,28):this.H&64?this.ja(4,30):this.H&16&&this.ja(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.dc&224)>>5,f=this.N&&this.N.pb>e?this.N:null;f&&(d=f.Gd,e=f.pb);e>(this.M&224)>>5?(this.H&4&&(pd(this,2),this.H&=-5),this.ja(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function he(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function ie(a,b){a=b&~a;Q(this,a);return a}function je(a,b){a=b&~a;Q(this,a<<8);return a}function ke(a,b){a|=b;Q(this,a);return a}function le(a,b){a|=b;Q(this,a<<8);return a} +function me(a,b){a=~b|65536;qd(this,a);return a&65535}function ne(a,b){a=~b|256;qd(this,a<<8);return a&255}function oe(a,b){a=b-a;this.H&128||(this.X=this.$=a,this.U=b&(b^a));return a&65535}function pe(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.$=c,this.U=b&(b^c));return a&255}function qe(a,b){a=b+a;this.H&128||(this.X=this.$=a,this.U=a&(b^a));return a&65535}function re(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.$=c,this.U=c&(b<<8^c));return a&255} +function se(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function te(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function ue(a,b){a=b<<1|this.T>>16&1;sd(this,a);return a&65535}function ve(a,b){a=b<<1|this.T>>16&1;sd(this,a<<8);return a&255}function we(a,b){a=(this.T&65536|b)>>1|b<<16;sd(this,a);return a&65535}function xe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function ye(a,b){var c=b-a;td(this,c,a,b);return c&65535} +function ze(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function Ae(a,b){this.H&128||(this.X=this.$=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Be(a,b){a^=b;Q(this,a);return a&65535}function Ce(a){S(this,a,Vd(this,a),ce);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} +function De(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.$=c;this.b-=(this.g?6:7)+b} +function Ee(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.$=d>>16|d;this.b-=(this.g?6:7)+b}function Fe(a){T(this,a,!ld(this))}function Ge(a){T(this,a,ld(this))} +function He(a){S(this,a,Vd(this,a),ie);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Ie(a){R(this,a,Ud(this,a),je);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Je(a){S(this,a,Vd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Ke(a){R(this,a,Ud(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} +function Le(a){Q(this,Vd(this,a)&Yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function Me(a){Q(this,(Ud(this,a)&Xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function Ne(a){T(this,a,nd(this))}function Oe(a){T(this,a,!this.Ma()==!md(this))}function Pe(a){T(this,a,!nd(this)&&!this.Ma()==!md(this))}function Qe(a){T(this,a,!ld(this)&&!nd(this))}function Re(a){T(this,a,nd(this)||!this.Ma()!=!md(this))} +function Se(a){T(this,a,ld(this)||nd(this))}function Te(a){T(this,a,!this.Ma()!=!md(this))}function Ue(a){T(this,a,this.Ma())}function Ve(a){T(this,a,!nd(this))}function We(a){T(this,a,!this.Ma())}function Xe(){this.ja(12,1);this.b-=5}function Ye(a){T(this,a,!0)}function Ze(a){T(this,a,!md(this))}function $e(a){T(this,a,md(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.$=1);a&8&&(this.X=0);this.b-=5} +function af(a){var b=Vd(this,a);a=Yd(this,a);td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function bf(a){var b=Ud(this,a)<<8;a=Xd(this,a)<<8;td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)} +function cf(a){var b=Yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.$=d>>16|d,this.X=d>>16):(this.U=32768,this.$=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.$=this.X=0,this.U=32768,this.T=65536,this.b-=7}function df(){this.ja(24,2);this.b-=25} +function ef(){this.M&49152?(this.ca|=128,this.ja(4,3)):this.i?cc(this.i):this.ia();this.b-=7}function ff(){this.ja(16,4);this.b-=25}var gf=[0,7,7,10,7,11,9,13];function hf(a){this.J=this.b;N(this,Wd(this,a));this.b=this.J-gf[this.g]}var jf=[0,14,14,17,14,18,16,20];function kf(a){this.J=this.b;var b=Wd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-jf[this.g]}var lf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function mf(a){var b=Vd(this,a);this.J=this.b;Q(this,$d(this,a,b));this.b=this.J-lf[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)}function nf(a){var b=Ud(this,a);Q(this,Zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}var of=[7,13,13,17,14,18,17,21]; +function pf(a){var b=Yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.$=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function vf(a){S(this,a,Vd(this,a),ye);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} +function wf(a){S(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}function xf(){this.ja(28,5);this.b-=5}function yf(){this.H&4||this.B.da();this.H|=4;pd(this,-2);this.b-=3}function zf(a){S(this,a,Vd(this,a),Be);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=cc(b);b||this.ja(8,6)}function gd(a){Af[a>>12].call(this,a)}function Bf(a){Cf[a>>6&3].call(this,a)}function Df(a){Ef[a>>6&3].call(this,a)} +function Ff(a){Gf[a>>6&3].call(this,a)}function Hf(a){If[a&15].call(this,a)}function Jf(a){Kf[a&15].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)} +var Af=[function(a){Rf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,V,function(a){Sf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,vf,V],Rf=[function(a){Tf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Bf,Df,Ff,V,V,V],Cf=[function(a){qd(this,$d(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)}],Ef=[function(a){S(this,a,0, +se);this.b-=this.g?11:6},function(a){S(this,a,ld(this)?1:0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ld(this)?1:0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Yd(this,a);qd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Gf=[function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)}], +Tf=[function(a){Uf[a&15].call(this,a)},V,V,V,hf,hf,hf,hf,tf,V,Hf,Jf,wf,wf,wf,wf],Uf=[ef,yf,sf,Xe,ff,rf,V,V,V,V,V,V,V,V,V,V],If=[qf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.$=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],Kf=[qf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.$=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],Sf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,xf,Lf,Nf,Pf,V,V,V],Mf=[function(a){qd(this, +Zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,pe);this.b-=this.g?9:3+(7==this.f?2:0)}],Of=[function(a){R(this,a,0,te);this.b-=this.g?11:6},function(a){R(this,a,ld(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Xd(this,a);qd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],Qf=[function(a){R(this,a,0,xe);this.b-=this.g?9+(this.jb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,he);this.b-=this.g?9+(this.jb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}];function hd(a){Vf[a>>12].call(this,a)} +var Vf=[function(a){Wf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,function(a){Xf[a>>8&15].call(this,a)},function(a){Yf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,vf,V],Wf=[function(a){Zf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Bf,Df,Ff,function(a){$f[a>>6&3].call(this,a)},V,V],$f=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.pa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Sd(this,a,0);ud(this,a);Q(this,a);this.b-=11},function(a){var b=Nd(this);this.J= +this.b;Td(this,a,0,b);Q(this,b);this.b=this.J-of[this.g]},function(a){Q(this,$d(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){ag[a&15].call(this,a)},V,V,V,hf,hf,hf,hf,tf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):V.call(this,a)},Hf,Jf,wf,wf,wf,wf],ag=[ef,yf,sf,Xe,ff,rf,function(){Md(this);this.b-=13},V,V,V,V,V,V,V,V,V],Xf=[pf,pf,cf,cf,De,De,Ee,Ee,zf,zf,V,V,V,V,uf,uf],Yf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,xf,Lf,Nf,Pf,function(a){bg[a>> +6&3].call(this,a)},V,V],bg=[V,function(a){a=Sd(this,a,65536);ud(this,a);Q(this,a);this.b-=11},function(a){var b=Nd(this);this.J=this.b;Td(this,a,65536,b);Q(this,b);this.b=this.J-of[this.g]},V]; +function cg(a){r.call(this,"ROM",a,cg);this.ga=this.f=null;this.C=a.addr;this.g=a.size;this.A=a.alias;this.B=a.file;this.G=ra(this.B);if(this.B){a=this.B;var b=sa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(mb(c.Ia,a,b),(a=Ea(a,b))?(c.f=a.ea,c.ga=a.ga):c.B=null,dg(c))})}}u(cg);cg.prototype.wa=function(a,b,c,d){this.w=b;this.b=c;this.i=d;dg(this)}; +cg.prototype.za=function(){this.ga&&(this.i&&eg(this.i,this.id,this.C,this.g,this.ga),delete this.ga);return!0};cg.prototype.ya=function(){return!0}; +function dg(a){if(!sb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)ub(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(ac(a.w,b,a.g,Hc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,q=b[h++]&255|(b[h++]&255)<<8,m=m+((n&255)+(n>>8)+(q&255)+(q>>8)),w=h,v=n-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(v)for(;v--;)a.b.fb(q++,b[w++]&255);else q&1?a.b.ia():kd(a.b,q,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&lc(e.b,e.la))});this.ma=nc(52,4);this.Z=kc(this.b,function(){e.g|=128;e.g&64&&lc(e.b,e.ma)});hc(b,this,Dg);G(this)}; +k.sc=function(){if(!this.J){var a=Uc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Za)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Ia+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.za=function(a,b){if(!b)if(this.sc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ya=function(a){return a?this.save():!0};k.reset=function(){Eg(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Eg(this)};function Eg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.cc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=wa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.I+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.j(this.G), +this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;mc(this.b,this.Z,1E3/Math.round(this.R/10))}};var Fg={},Dg=(Fg[65392]=[null,null,X.prototype.pd,X.prototype.ae,"RCSR"],Fg[65394]=[null,null,X.prototype.od,X.prototype.$d,"RBUF"],Fg[65396]=[null,null,X.prototype.Cd,X.prototype.ne,"XCSR"],Fg[65398]=[null,null,X.prototype.Bd,X.prototype.me,"XBUF"],Fg);Wa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.F[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.F[b]=c,c.onclick= +function(){var a=d.F.listTapes;a&&Ig(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.F[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ig(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.F[b]=c,!0}return!1}; +k.wa=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.Y=Jg(a);var e=this;if((this.g=Uc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){p("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.P=nc(56,4);this.ba=kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.v.ha;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.Ia,e,f),(e=Ea(e,f))&&Sg(a,b,c,d,e.ea,e.Ca, +e.Ba));a.v.Qa=!1;a.G&&(a.G--,a.G||G(a));Pg(a)})}function Mg(a,b,c,d){if((a=a.F.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Ha);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Zb?"":e)+"&format=json"));return!!Da(f, +null,!0,function(b,c,d){Zg(a,b,c,d)})} +function Zg(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.v.ha;if(d)a.controller.O('Unable to load disk "'+a.Oa+'" (error '+d+": "+b+")",f);else{mb(a.controller.Ia,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)p(h[0]);else{a.Ha=h.length;a.Da=h[0].length;a.xa=h[0][0].length;var m=h[0][0][0];a.Ja=m&&m.length||512;for(d=c=0;d>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var w=m.data;if(void 0===w){var v=m.bytes;if(void 0!==v&&v.length){for(var x=n<<2,z=v.length;z>2,e=Array(d),f=0;f>2,g=(h>((f&3)<<3)&255;f=g;if(0>f)break;d|=f<=this.b.length||m>=this.b[h].length||n>=this.b[h][m].length){c="sector (CHS="+h+":"+m+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][m][n]){for(m=h.data.length;mb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Oa+": "+c);return b}; +Ug.prototype.toJSON=function(){var a;a=0;for(var b;b=ah(this,a++);)ch(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function ch(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function sc(a){r.call(this,"RL11",a,sc,2097152);this.g=a.autoMount||null;this.A=0;this.f=Array(1);this.C=!Oa("Mobi")&&window&&"FileReader"in window}u(sc);k=sc.prototype; +k.qa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.F[b]=c,c.onchange=function(){var a=d.F.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){p("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.F[b]=c,c.onchange=function(){var a=pa(c.value,10);null!=a&&dh(d,a)},!0;case "loadDrive":return this.F[b]= +c,c.onclick=function(){var a=d.F.listDisks;a&&eh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.C){c.parentNode.removeChild(c);break}this.F[b]=c;c.onclick=function(){var a=d.F.listDrives;if(a&&a.options&&d.f)if(a=d.f[pa(a.value,10)||0])if(a=a.Hb){var b;b="";for(var c=0,h;h=ah(a,c++);)for(var m=0,n=h.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";dh(this,0)}}return!0};k.ya=function(a){return a?this.save():!0}; +k.reset=function(){for(var a=0;ae||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}jh(a,e,b,c,!1,d)}else ih(a,e)} +function jh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.Xa.toLowerCase()!=d.toLowerCase()&&(g++,ih(a,b,!0),h.Yb?a.O("RL11 busy"):(h.Yb=!0,e&&(h.Xb=!0,a.A++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ib=!!f,Yg(new Ug(a,h,"preload"),c,d,f,a.Jc)&&g++));return g} +k.Jc=function(a,b,c,d,e){var f;a.Yb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.Ha||f[1]>a.Da)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.$b)),b=null);b?(a.Hb=b,a.Oa=c,a.Xa=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.$b),a.Xb||e),this.B&&this.B.gb()):a.Ib=!1;a.Xb&&(a.Xb=!1,--this.A||G(this));dh(this,a.$b)}; +function gh(a,b,c,d){if((a=a.F.listDisks)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};kh.prototype.oc=function(){return-1};kh.prototype.pc=function(){}; +function mh(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} +function nh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Vg(a,b,c){var d;if(b){b=Wg(a,b);for(var e=0,f=!1,g=b,h=[],m=[],p=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Zg(a,b){if(b)return Yg(a,b,a.R[b]);var c=0;for(b in a.R)Yg(a,b,a.R[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function sh(a,b){if(b)return rh(a,b,a.S[b]);var c=0;for(b in a.S)rh(a,b,a.S[b]),c++;return 0this.b.fb?hh:[];ih(this,function(a){a:{var b=d.w.V,c=a[0],e=a=0,m=b.length;if(c){a=d.$(jh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ia;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,p=0;m--;){var q=b[e];q.type==c?p++||d.j("..."):(c=q.type,p=bc[c],q&&d.j(l(q.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.$b=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ha[a-8]:20>a?b=this.b.wa[a-16]:20==a&&(b=Lb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.xb).D));this.na&1073741824?this.ra.push(a):this.aa&&a==this.aa||(this.aa=a,this.na&-2147483648&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,Zc(a),a.ra=0,a.B.ca()))};function bh(a){var b;if(!Yd(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.X=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.P?qh(this):rh(this)}};function ph(a,b){var c;(c=!a.b||!pb(a.b))||(c=a.b,c.v.ka?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.ea?(b||a.j("cpu busy or unavailable, command ignored"),!1):!qb(a.b)}k.Aa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.za=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){bh(this);this.sa=0;this.aa=null;this.J=0;this.K=Z(this.b.u[7]);this.v.ea=!1;sh(this);a||this.ca()};k.save=function(){var a=new O(this);a.set(0,lh(this.K));a.set(1,lh(this.N));a.set(2,[this.g,this.O,this.na]);a.set(3,this.H);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=mh(a[b++]),this.N=mh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.O=a[b][1],this.na|=a[b][2]);a[3]&&(this.H=a[3]);return!0};k.start=function(a,b){this.P||this.j("running");this.v.ea=!0;this.rb=a;this.sb=b}; -k.stop=function(a,b){if(this.v.ea){this.v.ea=!1;this.J=b-this.sb;if(!this.P){b="stopped";if(this.J){a-=this.rb;var c=0d&&(d=a.b.eb(b)),65535!=(d&65535)&&(c=a.F[a.X],c.D=b,c.Da=!1,++a.X==a.F.length&&(a.X=0)));return!1}function $b(a){var b=a.b;if(b.v.ea)throw N(b,a.b.xb),a.ga(),-1;return!1} -function ah(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ia],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ia],!0);a.C=["bw"];a.Ra=0}k.Wa=function(a,b,c){var d=!0;c||th(this,a,b,!1,!0);if(a!=this.f){var e=this.$(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.V[e>>>f.ia].Wa(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Da=!0:(uh(this,a,a.length-1,"set"),bh(this)));return d}; -function th(a,b,c,d,e){var f=!1;c=a.$(c);for(var g=1;g>>d.ia],b==a.C));h.Da||bh(a);break}}return f}function vh(a,b){for(var c=1;c>23)&65535,y=J(x,w);else if(8192==A)w=w.D-((f&63)<<1)&65535,y=J(x,w);else if(12288==A)y=J(x,f&7,1);else if(24576==A)y=J(x,f&63,1);else if(32768==A)y=J(x,f&255,1);else if(A=f&E,E&4032&&(A>>=6,E>>=6), -E&63)switch(E=A&7,A&56){case 0:y=oh(E);break;case 8:y="@"+oh(E);break;case 16:7>E?y="("+oh(E)+")+":(A=x.oa(w,2),y="#"+J(x,A,0,!0));break;case 24:7>E?y="@("+oh(E)+")+":(A=x.oa(w,2),y="@#"+J(x,A,0,!0));break;case 32:y="-("+oh(E)+")";break;case 40:y="@-("+oh(E)+")";break;case 48:A=x.oa(w,2);y=J(x,A,0,!0)+"("+oh(E)+")";7==E&&(y=J(x,A+w.D&65535));break;case 56:A=x.oa(w,2),y="@"+J(x,A)+"("+oh(E)+")",7==E&&(y="@"+J(x,A+w.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(p=x[1],x=x[0]); -0b?(c=oh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ha[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.wa[b-16]):20==b&&(c="PS="+J(a,Lb(d)));c&&(c+=" ");return c}function Ah(a){var b,c="";for(b=0;6>b;b++)c+=zh(a,b);c=c+"\n"+(zh(a,6)+zh(a,7)+zh(a,20));return c+=yh(a,"T")+yh(a,"N")+yh(a,"Z")+yh(a,"V")+yh(a,"C")}k.Ub=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=xa(q,m,a.Ub);0>v&&q.splice(-(v+1),0,m)}p&&(h.a=p.replace(/''/g,'"'))}a.H.push({Wd:b,D:c,uc:d,fa:e,Tb:f})}function Bh(a,b,c){var d=[],e=a.$(b)>>>0;for(b=0;b>>0,h=f.uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.ca();a.j("updated registers:")}a.j(Ah(a));c&&(a.K=Z(d.u[7]),rh(a,J(a,a.K.D)))}}function Fh(a,b){b=va(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var p=h[0]+":";h[2]&&(p+=" "+h[2]);a.j(p)}h[3]&&(g=h[3],f=null);f=xh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} -function wh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.O&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.aa=null;if(pb(a)&&0q||"z"ka.length&&(a.j("note: only "+ka.length+" available"),Y=ka.length);ca-=Y;0>ca&&(null==ka[ka.length-1].D?(Y=ca+Y,ca=0):ca+=ka.length);var qd=[];"call"==Yf&&(yb=1E5,qd=["CALL"]);for(void 0!==Xf&&a.j(Y+" instructions earlier:");0=ka.length&&(ca=0);a.Va=Y;$f++;yb--}}$f||(a.j("no "+Zf+"history available"),a.Va=void 0)}else{var Ab=jh(a,ja);if(Ab){var mc=0;Ia&&("l"==Ia.charAt(0)&&(Ia=Ia.substr(1)||Zh),mc=Xg(a,Ia)>>>0,65536>4||1;ai--&&0qc?String.fromCharCode(qc):".";nc-=pc}Bb&&(Bb+="\n");Bb+=ja+" "+rd+(0==Db?" "+cg:"")}Bb&&a.j(Bb);a.Ta=Ab}}}}break;case "e":if("else"==g[0])break;var cb,sd,td,ud,vd=g[0],wd=g[1];"eb"==vd?(cb=1,sd=255,td=a.tb,ud=a.Gb):"e"==vd||"ew"==vd?(cb=2,sd=65535,td=a.oa,ud=a.Za):wd=null;if(null==wd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var rc=jh(a,wd);if(rc)for(var sc=2;sczd;){for(var Ja=null,ei=256;65536>Gb.D>>>0;){Ad.D=a.oa(Gb,2);if(null==Gb.D||!ei--)break;if(!(Ad.D&1)){for(var fi=a,tc=Ad,eg=null,Hb=tc.D,fg=Hb,Bd=1;6>=Bd&&Hb;Bd++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bKh){if(Mh(d,this.J)){this.C=new O(this,"1.30.2","failsafe");Mh(this.C)&&(Rh(this,d),a=2,Sh(this.C));this.C.set("timestamp",Aa());Th(this.C);var e=this.f&&!this.F;if(1==a||Da("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Qh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Mh(d,g):("error"== -f&&"no machine state"!=g?(this.ja("Error: "+g),"unable to verify user"==g&&(Ka("user",""),this.g=null)):this.j(f+": "+g),Sh(d),Mh(d)?(c=Qh(d),e=!0):c=!1))}e&&Ph(this,c?d:null)}else 2==a&&d.clear()}else Ph(this);delete this.J;delete this.K}e=kb(this.id);for(f=0;fa[1];a=a[2];this.aa=!0;this.v.ka=!0;var d=this.I.power;d&&(d.textContent="Shutdown");this.b&&(Uh(this,this.b,b,c,a),this.b.ab());this.O&&(Rh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; -function Rh(a,b){if(Da("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Y;d.user=c;d.type="bug";d.data=b;Ba("http://www.pcjs.org/api/v1/report",d,!0)}} -function Hh(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.2"),g=new O(a,"1.30.2","validate"),h=Aa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.za&&(c&&a.b.ga(),d=a.b.za(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ka=!1,!1===d&&(e=null)));for(var h=kb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/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 m=h[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);li(a,b,c)}})}else c(a,null)} -function mi(a,b,c,d){function e(a){if(void 0===h){var b=g&&C(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ta(a))}function f(a){e("Error: "+a);m&&(--Yh||Va(!0));m=!1}var g,h,m=!0;Yh++;ib[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=p:v.appendChild(document.createTextNode(p));q.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,h){h?ji(c,null,null,!1,e,function(d,m){m?(jb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--Yh||Va(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Yh||Va(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ji(b,a,d,!0,e,p):ki(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(w){f(w.message)}return m}window.embedPDP11=function(a,b,c,d){Va(!1);return mi(a,b,c,d)};window.enableEvents=Va;window.sendEvent=Wa;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Ah=[0],Bh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=th.prototype; +k.wa=function(a,b,c,d){this.w=b;this.b=c;this.B=a;(a=Uc(a,"messages"))&&wh(this,a);this.jb=zh;this.wb=1145>this.b.mb?Bh:[];Ch(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.aa(Dh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var q=b[e];q.type==c?n++||d.j("..."):(c=q.type,n=ec[c],q&&d.j(l(q.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Na[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Bb(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Db).D));this.na&1073741824?this.ra.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ra=0,a.B.da()))};function vh(a){var b;if(!ae(a))a.G&&a.G.length&&a.j("instruction history buffer freed"),a.Y=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Y(this.b.u[7]);a&&1!=this.R?Kh(this):Lh(this)}};function Jh(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.v.ha?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.fa?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.za=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.ya=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){vh(this);this.sa=0;this.ba=null;this.J=0;this.K=Y(this.b.u[7]);this.v.fa=!1;Mh(this);a||this.da()};k.save=function(){var a=new O(this);a.set(0,Fh(this.K));a.set(1,Fh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Gh(a[b++]),this.N=Gh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.v.fa=!0;this.xb=a;this.yb=b}; +k.stop=function(a,b){if(this.v.fa){this.v.fa=!1;this.J=b-this.yb;if(!this.R){b="stopped";if(this.J){a-=this.xb;var c=0d&&(d=a.b.lb(b)),65535!=(d&65535)&&(c=a.G[a.Y],c.D=b,c.Ga=!1,++a.Y==a.G.length&&(a.Y=0)));return!1}function cc(a){var b=a.b;if(b.v.fa)throw N(b,a.b.Db),a.ia(),-1;return!1} +function uh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.Ya=0}k.cb=function(a,b,c){var d=!0;c||Nh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].cb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Ga=!0:(Oh(this,a,a.length-1,"set"),vh(this)));return d}; +function Nh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.Ga||vh(a);break}}return f}function Ph(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), +z&63)switch(z=B&7,B&56){case 0:y=Ih(z);break;case 8:y="@"+Ih(z);break;case 16:7>z?y="("+Ih(z)+")+":(B=x.oa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Ih(z)+")+":(B=x.oa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Ih(z)+")";break;case 40:y="@-("+Ih(z)+")";break;case 48:B=x.oa(v,2);y=J(x,B,0,!0)+"("+Ih(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.oa(v,2),y="@"+J(x,B)+"("+Ih(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); +0b?(c=Ih(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Na[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Aa[b-16]):20==b&&(c="PS="+J(a,Bb(d)));c&&(c+=" ");return c}function Uh(a){var b,c="";for(b=0;6>b;b++)c+=Th(a,b);c=c+"\n"+(Th(a,6)+Th(a,7)+Th(a,20));return c+=Sh(a,"T")+Sh(a,"N")+Sh(a,"Z")+Sh(a,"V")+Sh(a,"C")}k.ic=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],w=za(q,m,a.ic);0>w&&q.splice(-(w+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({we:b,D:c,Pc:d,ga:e,gc:f})}function Vh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Pc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Uh(a));c&&(a.K=Y(d.u[7]),Lh(a,J(a,a.K.D)))}}function Zh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Rh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} +function Qh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(sb(a)&&0q||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);ea-=Z;0>ea&&(null==ma[ma.length-1].D?(Z=ea+Z,ea=0):ea+=ma.length);var xd=[];"call"==kg&&(Db=1E5,xd=["CALL"]);for(void 0!==jg&&a.j(Z+" instructions earlier:");0=ma.length&&(ea=0);a.bb=Z;mg++;Db--}}mg||(a.j("no "+lg+"history available"),a.bb=void 0)}else{var Fb=Dh(a,la);if(Fb){var vc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||si),vc=qh(a,La)>>>0,65536>4||1;ui--&&0zc?String.fromCharCode(zc):".";wc-=yc}Gb&&(Gb+="\n");Gb+=la+" "+yd+(0==Ib?" "+pg:"")}Gb&&a.j(Gb);a.$a=Fb}}}}break;case "e":if("else"==g[0])break;var gb,zd,Ad,Bd,Cd=g[0],Dd=g[1];"eb"==Cd?(gb=1,zd=255,Ad=a.zb,Bd=a.Qb):"e"==Cd||"ew"==Cd?(gb=2,zd=65535,Ad=a.oa,Bd=a.hb):Dd=null;if(null==Dd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ac=Dh(a,Dd);if(Ac)for(var Bc=2;BcGd;){for(var Ma=null,yi=256;65536>Lb.D>>>0;){Hd.D=a.oa(Lb,2);if(null==Lb.D||!yi--)break;if(!(Hd.D&1)){for(var zi=a,Cc=Hd,rg=null,Mb=Cc.D,sg=Mb,Id=1;6>=Id&&Mb;Id++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bdi){if(fi(d,this.J)){this.C=new O(this,"1.30.2","failsafe");fi(this.C)&&(ki(this,d),a=2,li(this.C));this.C.set("timestamp",Ba());mi(this.C);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ji(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.g=null)):this.j(f+": "+g),li(d),fi(d)?(c=ji(d),e=!0):c=!1))}e&&ii(this,c?d:null)}else 2==a&&d.clear()}else ii(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.v.ha=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(ni(this,this.b,b,c,a),this.b.ib());this.P&&(ki(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; +function ki(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function ai(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.2"),g=new O(a,"1.30.2","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ya&&(c&&a.b.ia(),d=a.b.ya(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var h=nb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(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 m=h[0],n,q=/( [a-z]+=)(['"])(.*?)\2/g;n=q.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Fi(a,b,c)}})}else c(a,null)} +function Gi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);m&&(--ri||Ya(!0));m=!1}var g,h,m=!0;ri++;lb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=n:w.appendChild(document.createTextNode(n));q.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Di(c,null,null,!1,e,function(d,m){m?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--ri||Ya(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--ri||Ya(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Di(b,a,d,!0,e,n):Ei(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Ya(!1);return Gi(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=Za;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 1184f6fdd..b2aef6efe 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -1,4 +1,5 @@ (function(){/* + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 @@ -25,175 +26,205 @@ http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rl11.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var g,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function ja(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function ka(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function pa(a){return a.replace(/[&<>"']/g,function(a){return oa[a]})} -function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},sa=Date.now||function(){return+new Date}; -function ta(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function k(a,b,c,d){var e=0,f=null,h=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),h;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var n="",q;for(q in b)b.hasOwnProperty(q)&&(n&&(n+="&"),n+=q+"="+encodeURIComponent(b[q]));n=n.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(n)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),h=[f,e]);return h} -function ua(a,b){var c,d={K:null,T:null,$:null,Z:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,h;if("<"==b.substr(0,1))throw Error(b);h=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.$=h.load;d.Z=h.exec;if(e=h.bytes)d.K=e;else if(e=h.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=h.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=h;d.T=h.symbols;d.K.length?1==d.K.length&&(m(d.K[0]),d=null):(m("Empty resource: "+a),d=null)}catch(l){m("Resource data error ("+a+"): "+l.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.La=this.id:(this.ta=this.id.substr(0,b),this.La=this.id.substr(b+1));this[a]=c;this.i={ready:!1,Za:!1,gd:!1,O:!1,error:!1};this.Va=null;this.i.error=!1;this.u={};this.D=null;v.push(this)}var Ia=void 0,Ja={}; -if(window){Ia||(Ia=window.location.search.substr(1));for(var Ka,La=/\+/g,Ma=/([^&=]+)=?([^&]*)/g;Ka=Ma.exec(Ia);)Ja[decodeURIComponent(Ka[1].replace(La," "))]=decodeURIComponent(Ka[2].replace(La," "))}function Na(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function w(a,b){b||(b=u);a.prototype=Na(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Oa=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Oa={},v=[];function Pa(a,b,c){Oa[a]&&b&&(Oa[a][b]=c)}function x(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>=3;return""+c}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function n(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} +function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date}; +function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function q(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function va(a,b){var c,d={L:null,T:null,aa:null,$:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.aa=g.load;d.$=g.exec;if(e=g.bytes)d.L=e;else if(e=g.words)for(d.L=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.L=Array(4*e.length),f=c=0;c>8&255,d.L[f++]=e[c]>>16&255,d.L[f++]=e[c]>>24&255;else d.L=g;d.T=g.symbols;d.L.length?1==d.L.length&&(r(d.L[0]),d=null):(r("Empty resource: "+a),d=null)}catch(k){r("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Aa=this.id:(this.ia=this.id.substr(0,b),this.Aa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,jb:!1,Fd:!1,O:!1,error:!1};this.eb=null;this.j.error=!1;this.m={};this.D=null;z.push(this)}var Ja=void 0,Ka={}; +if(window){Ja||(Ja=window.location.search.substr(1));for(var La,Ma=/\+/g,Na=/([^&=]+)=?([^&]*)/g;La=Na.exec(Ja);)Ka[decodeURIComponent(La[1].replace(Ma," "))]=decodeURIComponent(La[2].replace(Ma," "))}function Oa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function A(a,b){b||(b=y);a.prototype=Oa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Pa=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else Pa={},z=[];function Qa(a,b,c){Pa[a]&&b&&(Pa[a][b]=c)}function B(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.g=this.c-1;this.v=this.B/this.c|0;this.ma=[];this.l=0;this.s=[];this.Cb=[ab,bb,cb,db];a=new F(this);eb(a,this.D);this.b=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ma[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=gb(d,b)}function bb(a,b,c){var d=!1,e=this.controller,f=e.ma[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ma[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||gb(e,c)} -function cb(a,b){var c=-1,d=this.controller;(a=d.ma[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=gb(d,b)}function db(a,b,c){var d=!1,e=this.controller;if(a=e.ma[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||gb(e,c)}function hb(a,b){if(b!=a.o){var c;a.o&&(c=(1<>>a.j;0h&&(t=h);if(!e&&n&&n.size){if(n.type==d){if(f+h<=n.xa)return n.Xa+=n.xa-f,n.xa=f,!0;if(f>=n.xa+n.Xa){t=n.size-(f-q);t>h&&(t=h);n.Xa=f-n.xa+t;f=q+a.c;h-=t;l++;continue}}return mb(1,f,h)}f=new F(a,f,t,a.c,d,e);eb(f,a.D,n);a.b[l++]=f;f=q+a.c;h-=t}if(0>=h){c/=1024;var z;e="";z?10>>=a.j;0>>=a.j;0>>a.j].fb(b&a.g,b)}function pb(a,b){return a.b[(b&a.h)>>>a.j].S(b&a.g,b)}$a.prototype.Ja=function(a,b){this.l++;this.b[(a&this.h)>>>this.j].mb(a&this.g,b&255,a);this.l--}; -function qb(a,b,c){a.b[(b&a.h)>>>a.j].Ya(b&a.g,c&65535,b)}function rb(a){for(var b=0,c=[],d=0;da.a.Ka)){var h=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,n=f[2]?f[2].bind(b):null,q=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!h&&n&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&q&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(q)));sb(a,e,e,h,l,n,q,f[4])}}}function ub(a,b){a.s.push(b)}function H(a,b){a.l||G(a.a,4,b)} -function mb(a,b,c){m("Memory block error ("+a+": "+ja(b)+","+ja(c)+")");return!1}function I(a){u.call(this,"Device",a,I);this.c={data:0,fd:0,Wa:20,uc:0};this.b={hd:0,kb:-1}}w(I);g=I.prototype;g.ha=function(a,b,c,d){this.j=b;this.a=c;this.D=d;var e=this;this.b.kb=vb(c,function(){e.b.pa|=128;e.b.pa&64&&(wb(e.a,e.b.vc),xb(e.a,e.b.kb,1E3/60))});this.b.vc=yb(64,6);tb(b,this,J);ub(b,this.reset.bind(this));C(this)};g.reset=function(){this.c.Wa=this.c.Wa&-120|20;this.b.pa=0}; -g.Qb=function(){var a=this.b.pa;this.b.pa&=-129;return a};g.Ec=function(a){this.b.pa=a;a&64&&xb(this.a,this.b.kb,1E3/60);this.b.pa=a&-129};g.Jb=function(a){return(a?this.c.uc:this.c.data)&65535};g.xc=function(a){this.c.data=a};g.Sb=function(){var a=this.a;return a.w&62337|a.Ma<<5|a.Na<<1};g.Gc=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.Ma=a>>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ha!=c&&(b.Ha=c,zb(b))}Ab(this)}; -g.Tb=function(){var a=this.a.qa;a&65280&&(a=(a<<8|a>>8)&65535);return a};g.Ub=function(){return this.a.hb};g.Vb=function(){return this.a.ra};g.Hc=function(a){var b=this.a;1170>b.Ka&&(a&=-49);b.ra!=a&&(b.ra=a,a&16?(b.bb=4194303,b.Oa=3915776):(b.bb=262143,b.Oa=253952),zb(b));Ab(this)};function Ab(a){a.c.Wa=a.c.Wa&-8|(a.a.Ha?a.a.ra&16?1:2:4)}g.ic=function(a){return this.a.F[1][a>>1&7]};g.Vc=function(a,b){this.a.F[1][b>>1&7]=a&65295};g.gc=function(a){return this.a.F[1][(a>>1&7)+8]}; -g.Tc=function(a,b){this.a.F[1][(b>>1&7)+8]=a&65295};g.hc=function(a){return this.a.U[1][a>>1&7]};g.Uc=function(a,b){b=b>>1&7;this.a.U[1][b]=a;this.a.F[1][b]&=65295};g.fc=function(a){return this.a.U[1][(a>>1&7)+8]};g.Sc=function(a,b){b=(b>>1&7)+8;this.a.U[1][b]=a;this.a.F[1][b]&=65295};g.Pb=function(a){return this.a.F[0][a>>1&7]};g.Dc=function(a,b){this.a.F[0][b>>1&7]=a&65295};g.Nb=function(a){return this.a.F[0][(a>>1&7)+8]};g.Bc=function(a,b){this.a.F[0][(b>>1&7)+8]=a&65295}; -g.Ob=function(a){return this.a.U[0][a>>1&7]};g.Cc=function(a,b){b=b>>1&7;this.a.U[0][b]=a;this.a.F[0][b]&=65295};g.Mb=function(a){return this.a.U[0][(a>>1&7)+8]};g.Ac=function(a,b){b=(b>>1&7)+8;this.a.U[0][b]=a;this.a.F[0][b]&=65295};g.oc=function(a){return this.a.F[3][a>>1&7]};g.ad=function(a,b){this.a.F[3][b>>1&7]=a&65295};g.mc=function(a){return this.a.F[3][(a>>1&7)+8]};g.Zc=function(a,b){this.a.F[3][(b>>1&7)+8]=a&65295};g.nc=function(a){return this.a.U[3][a>>1&7]}; -g.$c=function(a,b){b=b>>1&7;this.a.U[3][b]=a;this.a.F[3][b]&=65295};g.lc=function(a){return this.a.U[3][(a>>1&7)+8]};g.Yc=function(a,b){b=(b>>1&7)+8;this.a.U[3][b]=a;this.a.F[3][b]&=65295};g.za=function(a){a&=7;return this.a.A&2048?this.a.wa[a]:this.a.f[a]};g.Ba=function(a,b){b&=7;this.a.A&2048?this.a.wa[b]=a:this.a.f[b]=a};g.$b=function(){return this.a.A&49152?this.a.ca[0]:this.a.f[6]};g.Mc=function(a){this.a.A&49152?this.a.ca[0]=a:this.a.f[6]=a};g.cc=function(){return this.a.f[7]}; -g.Pc=function(a){this.a.f[7]=a};g.Aa=function(a){a&=7;return this.a.A&2048?this.a.f[a]:this.a.wa[a]};g.Ca=function(a,b){b&=7;this.a.A&2048?this.a.f[b]=a:this.a.wa[b]=a};g.ac=function(){return 1==(this.a.A&49152)>>14?this.a.f[6]:this.a.ca[1]};g.Nc=function(a){1==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ca[1]=a};g.bc=function(){return 3==(this.a.A&49152)>>14?this.a.f[6]:this.a.ca[3]};g.Oc=function(a){3==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ca[3]=a};g.Lb=function(a){return this.a.yb[a-65504>>1]}; -g.zc=function(a,b){this.a.yb[b-65504>>1]=a};g.wb=function(a){return 65520==a?61183:0};g.Bb=function(){};g.kc=function(){return 1};g.Xc=function(){};g.Kb=function(){return this.a.I};g.yc=function(){this.a.I=0};g.Rb=function(){return this.a.xb};g.Fc=function(a,b){b&1||(a&=255);this.a.xb=a};g.Wb=function(a){return a?this.a.ib:0};g.Ic=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ib=a;b.m|=2};g.jc=function(a){return a?this.a.sa&65280:0};g.Wc=function(a){this.a.sa=a|255}; -g.Zb=function(){return Za(this.a)};g.Lc=function(a){Bb(this.a,a&-1809|Za(this.a)&1808);this.a.m|=128};g.Ab=function(){}; -var K={},J=(K[62592]=[null,null,I.prototype.ic,I.prototype.Vc,"SISDR",1145],K[62608]=[null,null,I.prototype.gc,I.prototype.Tc,"SDSDR",1145],K[62624]=[null,null,I.prototype.hc,I.prototype.Uc,"SISAR",1145],K[62640]=[null,null,I.prototype.fc,I.prototype.Sc,"SDSAR",1145],K[62656]=[null,null,I.prototype.Pb,I.prototype.Dc,"KISDR",1145],K[62672]=[null,null,I.prototype.Nb,I.prototype.Bc,"KDSDR",1145],K[62688]=[null,null,I.prototype.Ob,I.prototype.Cc,"KISAR",1145],K[62704]=[null,null,I.prototype.Mb,I.prototype.Ac, -"KDSAR",1145],K[62798]=[null,null,I.prototype.Vb,I.prototype.Hc,"MMR3",1145],K[65382]=[null,null,I.prototype.Qb,I.prototype.Ec,"LKS"],K[65400]=[null,null,I.prototype.Jb,I.prototype.xc,"CNSL"],K[65402]=[null,null,I.prototype.Sb,I.prototype.Gc,"MMR0",1145],K[65404]=[null,null,I.prototype.Tb,I.prototype.Ab,"MMR1",1145],K[65406]=[null,null,I.prototype.Ub,I.prototype.Ab,"MMR2",1145],K[65408]=[null,null,I.prototype.oc,I.prototype.ad,"UISDR",1145],K[65424]=[null,null,I.prototype.mc,I.prototype.Zc,"UDSDR", -1145],K[65440]=[null,null,I.prototype.nc,I.prototype.$c,"UISAR",1145],K[65456]=[null,null,I.prototype.lc,I.prototype.Yc,"UDSAR",1145],K[65472]=[null,null,I.prototype.za,I.prototype.Ba,"R0SET0"],K[65473]=[null,null,I.prototype.za,I.prototype.Ba,"R1SET0"],K[65474]=[null,null,I.prototype.za,I.prototype.Ba,"R2SET0"],K[65475]=[null,null,I.prototype.za,I.prototype.Ba,"R3SET0"],K[65476]=[null,null,I.prototype.za,I.prototype.Ba,"R4SET0"],K[65477]=[null,null,I.prototype.za,I.prototype.Ba,"R5SET0"],K[65478]= -[null,null,I.prototype.$b,I.prototype.Mc,"R6KERNEL"],K[65479]=[null,null,I.prototype.cc,I.prototype.Pc,"R7KERNEL"],K[65480]=[null,null,I.prototype.Aa,I.prototype.Ca,"R0SET1",1145],K[65481]=[null,null,I.prototype.Aa,I.prototype.Ca,"R1SET1",1145],K[65482]=[null,null,I.prototype.Aa,I.prototype.Ca,"R2SET1",1145],K[65483]=[null,null,I.prototype.Aa,I.prototype.Ca,"R3SET1",1145],K[65484]=[null,null,I.prototype.Aa,I.prototype.Ca,"R4SET1",1145],K[65485]=[null,null,I.prototype.Aa,I.prototype.Ca,"R5SET1",1145], -K[65486]=[null,null,I.prototype.ac,I.prototype.Nc,"R6SUPER",1145],K[65487]=[null,null,I.prototype.bc,I.prototype.Oc,"R6USER",1145],K[65504]=[null,null,I.prototype.Lb,I.prototype.zc,"CTRL",1170],K[65520]=[null,null,I.prototype.wb,I.prototype.Bb,"LSIZE",1170],K[65522]=[null,null,I.prototype.wb,I.prototype.Bb,"HSIZE",1170],K[65524]=[null,null,I.prototype.kc,I.prototype.Xc,"SYSID",1170],K[65526]=[null,null,I.prototype.Kb,I.prototype.yc,"CPUERR",1170],K[65528]=[null,null,I.prototype.Rb,I.prototype.Fc, -"MB",1170],K[65530]=[null,null,I.prototype.Wb,I.prototype.Ic,"PIR"],K[65532]=[null,null,I.prototype.jc,I.prototype.Wc,"SL"],K[65534]=[null,null,I.prototype.Zb,I.prototype.Lc,"PSW"],K);J[62594]=J[62592];J[62596]=J[62592];J[62598]=J[62592];J[62600]=J[62592];J[62602]=J[62592];J[62604]=J[62592];J[62606]=J[62592];J[62610]=J[62608];J[62612]=J[62608];J[62614]=J[62608];J[62616]=J[62608];J[62618]=J[62608];J[62620]=J[62608];J[62622]=J[62608];J[62626]=J[62624];J[62628]=J[62624];J[62630]=J[62624];J[62632]=J[62624]; -J[62634]=J[62624];J[62636]=J[62624];J[62638]=J[62624];J[62642]=J[62640];J[62644]=J[62640];J[62646]=J[62640];J[62648]=J[62640];J[62650]=J[62640];J[62652]=J[62640];J[62654]=J[62640];J[62658]=J[62656];J[62660]=J[62656];J[62662]=J[62656];J[62664]=J[62656];J[62666]=J[62656];J[62668]=J[62656];J[62670]=J[62656];J[62674]=J[62672];J[62676]=J[62672];J[62678]=J[62672];J[62680]=J[62672];J[62682]=J[62672];J[62684]=J[62672];J[62686]=J[62672];J[62690]=J[62688];J[62692]=J[62688];J[62694]=J[62688];J[62696]=J[62688]; -J[62698]=J[62688];J[62700]=J[62688];J[62702]=J[62688];J[62706]=J[62704];J[62708]=J[62704];J[62710]=J[62704];J[62712]=J[62704];J[62714]=J[62704];J[62716]=J[62704];J[62718]=J[62704];J[65410]=J[65408];J[65412]=J[65408];J[65414]=J[65408];J[65416]=J[65408];J[65418]=J[65408];J[65420]=J[65408];J[65422]=J[65408];J[65426]=J[65424];J[65428]=J[65424];J[65430]=J[65424];J[65432]=J[65424];J[65434]=J[65424];J[65436]=J[65424];J[65438]=J[65424];J[65442]=J[65440];J[65444]=J[65440];J[65446]=J[65440];J[65448]=J[65440]; -J[65450]=J[65440];J[65452]=J[65440];J[65454]=J[65440];J[65458]=J[65456];J[65460]=J[65456];J[65462]=J[65456];J[65464]=J[65456];J[65466]=J[65456];J[65468]=J[65456];J[65470]=J[65456];J[65506]=J[65504];J[65508]=J[65504];J[65510]=J[65504];J[65512]=J[65504];J[65514]=J[65504];J[65516]=J[65504];J[65518]=J[65504];r(function(){for(var a=B(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.c,0,this.size>>2),Ib(this,Eb?Jb:Kb);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ea:function(a,b){a&1&&H(this.j,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ja:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.na=!0}, -G:function(a,b){return this.H(a,b)},P:function(a,b){return this.V(a,b)},ga:function(a,b,c){this.g?this.h(a,b,c):this.mb(a,b,c)},la:function(a,b,c){this.g?this.h(a,b,c):this.ta(a,b,c)},C:function(a){return this.b[a]},J:function(a){return this.b[a]},N:function(a,b){a&1&&H(this.j,b);return this.u.getUint16(a,!0)},W:function(a,b){a&1&&H(this.j,b);return this.s[a>>1]},fa:function(a,b){this.b[a]=b;this.na=!0},ia:function(a,b){this.b[a]=b;this.na=!0},ka:function(a,b,c){a&1&&H(this.j,c);this.u.setUint16(a, -b,!0);this.na=!0},ua:function(a,b,c){a&1&&H(this.j,c);this.s[a>>1]=b;this.na=!0}};function eb(a,b,c){a.D=b;a.o=a.l=0;c&&((a.o=c.o)&&Mb(a,Nb,!1),(a.l=c.l)&&Ob(a,Nb,!1))}function Ob(a,b,c){c&&a.l||(a.lb=!a.g&&b[1]||a.h,a.Ya=!a.g&&b[3]||a.B);if(c||void 0===c)a.mb=b[1]||a.h,a.ta=b[3]||a.B}function Mb(a,b,c){c&&a.o||(a.fb=b[0]||a.v,a.S=b[2]||a.w);if(c||void 0===c)a.H=b[0]||a.v,a.V=b[2]||a.w}function Ib(a,b){b||(b=Pb);Mb(a,b,void 0);Ob(a,b,void 0)} -var Pb=[],Lb=[F.prototype.M,F.prototype.ja,F.prototype.ea,F.prototype.va],Nb=[F.prototype.G,F.prototype.ga,F.prototype.P,F.prototype.la];if(Ua)var Kb=[F.prototype.C,F.prototype.fa,F.prototype.N,F.prototype.ka],Jb=[F.prototype.J,F.prototype.ia,F.prototype.W,F.prototype.ua]; -function Qb(a,b){u.call(this,"CPU",a,Qb);var c=a.multiplier||1;this.Ta=a.cycles||b;this.ga=c;this.ab=Math.round(this.Ta/1E4)/100;this.ia=this.ab*this.ga;this.i.X=!1;this.i.jb=!1;this.i.Fa=a.autoStart;this.i.Sa=!1;this.Qa=this.ka=0;this.Ra=a.csStart;this.ua=a.csInterval;this.va=a.csStop;this.H=[];this.vb=this.tc.bind(this);C(this)}w(Qb);var Rb=["power","reset"];g=Qb.prototype; -g.ha=function(a,b,c,d){this.o=a;this.j=b;this.D=d;for(b=0;ba.ea/a.ia&&(b=1);a.ga=b;b=a.ab*a.ga;if(a.ia!=b){a.ia=b;b=a.ia.toFixed(2)+"Mhz";var d=a.u.setSpeed;d&&(d.textContent=b);a.R("target speed: "+b)}c&&a.o&&(c=a.o,c.Ga&&(d=b=0,window&&(b=window.scrollX,d=window.scrollY),c.Ga.focus(),window&&window.scrollTo(b,d)))}a.M+=a.W;a.W=0;a.V=sa();a.fa=0;Xb(a)}function vb(a,b){var c=a.H.length;a.H.push([-1,b]);return c}function xb(a,b,c){0<=b&&ba.H[b][0]&&(c=a.Ta*a.ga/1E3*c|0,a.H[b][0]=c+Zb(a))} -function Zb(a,b){var c=a.ja-=a.a;a.a=a.G=0;b&&(a.ja=0);return c} -g.tc=function(){if(this.i.X){this.cb>=this.Ta&&Xb(this,!0);this.Ea=0;this.Pa=sa();if(this.fa){var a=this.Pa-this.fa;a>this.tb&&(this.V+=a,this.V>this.Pa&&(this.V=this.Pa))}try{do{for(var b,c=this.i.Sa?1:this.Ua,d=this.H.length-1;0<=d;d--){var e=this.H[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.zb(b)}catch(n){if("number"!=typeof n)throw n;}b=Zb(this,!0);this.Ea+=b;this.W+=b;a=b;if(this.i.Sa){var f=!1;this.Qa=this.Qa+this.pb()|0;this.ka-=a;0>=this.ka&&(this.ka+=this.ua,f=!0);0<=this.va&&this.va<=Yb(this)&& -(this.ua=this.va=-1,Ub(this),D(this),f=!0);f&&this.R(Yb(this)+" cycles: checksum="+ja(this.Qa))}for(var a=b,h=this.H.length-1;0<=h;h--){var l=this.H[h];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Da-=b;if(0>=this.Da){this.Da+=this.Ua;15<=++this.ub&&(this.o&&this.o.da(),this.ub=0);break}}while(this.i.X)}catch(n){D(this);this.o&&this.o.stop(sa(),Yb(this));b=n.stack||n.message;this.i.error=!0;this.L(b);return}if(this.i.X){b=setTimeout;c=this.vb;this.fa=sa();d=this.tb;this.Ea&&(d=Math.round(d*this.Ea/ -this.Ua));d-=this.fa-this.Pa;if(e=this.fa-this.V)this.ea=Math.round(this.W/(10*e))/100,864E5<=e&&(this.M=0,Wb(this));if(0>d||this.ead&&(this.V-=d),d=0;this.cb+=this.Ea;this.fa+=d;b(c,d)}}};function Vb(a){var b;a.i.error?(a.R(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.i.X)a.R(a.toString()+" busy");else{Wb(a);a.i.X=!0;a.i.jb=!0;if(b=a.u.run)b.textContent="Halt";a.o&&a.o.start(a.V,Yb(a));setTimeout(a.vb,0)}}g.zb=function(){return 0}; -function D(a){var b=!1;if(a.i.X){Zb(a);a.M+=a.W;a.W=0;a.i.X=!1;if(b=a.u.run)b.textContent="Run";a.o&&a.o.stop(sa(),Yb(a));b=!0}a.i.complete=void 0;return b}function $b(a){this.Ka=+a.model||1170;this.rb=a.addrReset||0;Qb.call(this,a,6666667);this.decode=1120==this.Ka?ac.bind(this):bc.bind(this);cc(this);this.eb=0;this.N=null;this.i.complete=!1}w($b,Qb);g=$b.prototype;g.reset=function(){this.status("model "+this.Ka);this.i.X&&D(this);cc(this);Tb(this);this.i.error=!1;this.parent.reset.call(this)}; -function cc(a){a.l=65536;a.g=32768;a.h=65535;a.s=32768;a.A=15;a.f=[0,0,0,0,0,0,0,a.rb];a.wa=[0,0,0,0,0,0];a.ca=[0,0,0,0];a.v=0;a.Na=0;a.Gb=[4,2,0,1];a.F=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ib=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.yb=[0,0,0,0,0,0,0,0];a.xb=0;a.m=0;a.B=a.C=0;a.c=a.b=a.$a=0;a.la=-1;dc(a)}function dc(a){a.sa=255;a.I=0;a.ib=0;a.w=0;a.qa=0;a.hb=0;a.ra=0;a.Ha=0;a.Ma=0;a.bb=262143;a.Oa=253952;a.N=null;a.j&&zb(a)}function zb(a){a.Ha?(a.P=65536,a.J=a.Fb,a.S=a.qc,a.Ya=a.cd,hb(a.j,a.ra&16?22:18)):(a.P=0,a.J=a.Eb,a.S=a.pc,a.Ya=a.bd,hb(a.j,16))}function ec(a,b,c){a.rb=b;M(a,b);!c&&a.D&&(D(a)||a.D.da())}g.pb=function(){return 0}; -g.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.M,this.ga]);a.set(2,rb(this.j));return a.data()};g.restore=function(a){var b=a[1];this.M=b[1];Wb(this,b[3]);a:{b=this.j;a=a[2];var c;for(c=0;c>14&3;c=a.A>>14&3;a.v!=c&&(a.ca[c]=a.f[6],a.f[6]=a.ca[a.v]);a.A=b;a.m|=2}function P(a,b){a.m&128||(a.s=a.h=b,a.g=0)}function Q(a,b,c){a.m&128||(a.s=a.h=a.l=b,a.g=c||0)}function hc(a,b,c,d){a.m&128||(a.s=a.h=a.l=b,a.g=(c^b)&(d^b))}function R(a,b){a.m&128||(a.s=a.h=a.l=b,a.g=a.s^a.l>>1)}function ic(a,b,c,d){a.m&128||(a.s=a.h=a.l=b,a.g=(c^d)&(d^b))} -function G(a,b,c){if(!a.eb){var d=!1;0>a.la?a.la=Za(a):a.v||(b=4,d=!0);a.w&57344||(a.qa=63222,a.hb=b);a.v=0;var e=a.S(b|a.P),f=a.S(b+2&65535|a.P);Bb(a,f&-12289|a.la>>2&12288);d&&(a.I|=4,a.f[6]=4);jc(a,a.la);jc(a,a.f[7]);M(a,e);a.m&=-113;a.la=-1;a.m|=8;if(26!=c)throw b;}}function kc(a){var b=lc(a),c=lc(a)&-1793;a.A&49152&&(c=c&-225|a.A&63712);M(a,b);Bb(a,c);a.m&=-17} -function mc(a,b,c){var d,e,f,h=0;d=b>>13;a.ra&a.Gb[a.v]||(d&=7);e=a.F[a.v][d];f=(a.U[a.v][d]<<6)+(b&8191)&a.bb;if(ff){if(3932160<=f){f&=262143;var l=f>>13&31;31>l?a.ra&32&&(f=a.Ib[l]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Oa&&4186112>f&&(a.I|=32,G(a,4,12))}switch(e&7){case 1:h=4096;case 2:e|=128;c&4&&(h=8192);break;case 4:h=4096;case 5:c&4&&(h=4096);case 6:e|=c&4?192: -128;break;default:h=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(h|=16384):(b&8128)>(e>>2&8128)&&(h|=16384));a.F[a.v][d]=e;if(4194170!==f||a.v)a.Ma=a.v,a.Na=d;h&&(h&57344&&(0<=a.la&&(h|=128),a.w&57344||(a.w=a.w|h|a.Ma<<5|a.Na<<1),G(a,168,16)),a.w&61440||!(4191360>f||4194239>>a.j].lb(b&a.g,c&255,b)}function lc(a){var b=a.S(a.f[6]|a.P);a.f[6]=a.f[6]+2&65535;return b} -function jc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.qa=a.qa<<8|246);!a.v&&c<=a.sa&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=h);e=a.S(e);e|=h;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=h);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=h);e=a.S(e)|h;a.a-= -8;break;case 6:return e=a.S(gc(a,2)),e=e+a.f[c]&65535|h,a.a-=6,e;case 7:return e=a.S(gc(a,2)),e=e+a.f[c]&65535,e=a.S(e|a.P)|h,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!h||a.w&57344||(a.qa=a.qa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.sa||65534<=a.f[6])&&(a.f[6]<=a.sa-32?(a.I|=4,a.f[6]=4,G(a,4,24)):(a.I|=8,a.m|=64));return e}g.Ja=function(a,b){this.Ha?(this.eb++,nc(this,mc(this,a,5),b),this.eb--):this.j.Ja(a,b)};g.Eb=function(a,b,c){return oc(this,a,b,c)}; -g.Fb=function(a,b,c){return mc(this,oc(this,a,b,c),c)};g.pc=function(a){return pb(this.j,a)};g.qc=function(a){return pb(this.j,mc(this,a,2))};g.bd=function(a,b){qb(this.j,a,b&65535)};g.cd=function(a,b){qb(this.j,mc(this,a,4),b)};function pc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=oc(a,b,d,2),c&65536||61440!==(a.A&61440)&&(d&=65535),a.v=a.A>>12&3,c=a.S(d|c&a.P),a.v=a.A>>14&3):c=6!=d||(a.A>>2&12288)===(a.A&12288)?a.f[d]:a.ca[a.A>>12&3];return c} -function qc(a,b,c,d){a.w&57344||(a.qa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=oc(a,b,e,4),c&65536||(e&=65535),a.v=a.A>>12&3,e=mc(a,e|c&65536,4),a.v=a.A>>14&3,qb(a.j,e,d)):6!=e||(a.A>>2&12288)===(a.A&12288)?a.f[e]=d:a.ca[a.A>>12&3]=d}function rc(a,b){b>>=6;var c=a.C=b&7;(b=a.B=(b&56)>>3)?(c=a.J(b,c,3),a=ob(a.j,c)):a=a.f[c]&255;return a}function S(a,b){b>>=6;var c=a.C=b&7;return(b=a.B=(b&56)>>3)?pb(a.j,a.J(b,c,2)):a.f[c]}function sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return oc(a,b,c,8)} -function tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=ob(a.j,c)):a=a.f[c]&255;return a}function uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?pb(a.j,a.J(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.$a=a.J(b,e,7),nc(a,e,d.call(a,c,ob(a.j,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),qb(a.j,e,d.call(a,c,pb(a.j,e)))):a.f[e]=d.call(a,c,a.f[e])} -function vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?nc(a,a.J(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?qb(a.j,a.J(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(M(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} -g.zb=function(a){this.i.complete=!0;var b=a?this.i.jb?0:1:-1;this.i.jb=!1;this.ja=this.a=a;do{if(this.m){this.m&112&&(this.m&32?G(this,168,28):this.m&64?G(this,4,30):this.m&16&&G(this,12,32),this.m&=-113);if(a=this.m&7){a=!1;if(this.m&2){this.m&=-3;var c=160,d=(this.ib&224)>>5,e=this.N&&this.N.ya>d?this.N:null;e&&(c=e.wc,d=e.ya);d>(this.A&224)>>5?(this.m&4&&(gc(this,2),this.m&=-5),G(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.m&1&&this.m++;a=a&&0>b}if(a)break}this.m=this.m&7|this.A&16;this.decode(fc(this))}while(0>1|b<<16;R(this,a);return a&65535}function Cc(a,b){a=b&2048|b>>1|b<<8;R(this,a<<8);return a&255}function Dc(a,b){a=b&~a;P(this,a);return a}function Ec(a,b){a=b&~a;P(this,a<<8);return a}function Fc(a,b){a|=b;P(this,a);return a}function Gc(a,b){a|=b;P(this,a<<8);return a}function Hc(a,b){a=~b|65536;Q(this,a);return a&65535}function Ic(a,b){a=~b|256;Q(this,a<<8);return a&255} -function Jc(a,b){a=b-a;this.m&128||(this.s=this.h=a,this.g=b&(b^a));return a&65535}function Kc(a,b){a=b-a;var c=a<<8;b<<=8;this.m&128||(this.s=this.h=c,this.g=b&(b^c));return a&255}function Lc(a,b){a=b+a;this.m&128||(this.s=this.h=a,this.g=a&(b^a));return a&65535}function Mc(a,b){a=b+a;var c=a<<8;this.m&128||(this.s=this.h=c,this.g=c&(b<<8^c));return a&255}function Nc(a,b){a=-b;Q(this,a,a&b&32768);return a&65535}function Oc(a,b){a=-b;Q(this,a<<8,(a&b&128)<<8);return a&255} -function Pc(a,b){a=b<<1|this.l>>16&1;R(this,a);return a&65535}function Qc(a,b){a=b<<1|this.l>>16&1;R(this,a<<8);return a&255}function Rc(a,b){a=(this.l&65536|b)>>1|b<<16;R(this,a);return a&65535}function Sc(a,b){a=((this.l&65536)>>8|b)>>1|b<<8;R(this,a<<8);return a&255}function Tc(a,b){var c=b-a;ic(this,c,a,b);return c&65535}function Uc(a,b){var c=b-a;ic(this,c<<8,a<<8,b<<8);return c&255}function Vc(a,b){this.m&128||(this.s=this.h=b&65280,this.g=this.l=0);return(b<<8|b>>8)&65535} -function Wc(a,b){a^=b;P(this,a);return a&65535}function Xc(a){U(this,a,S(this,a),xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function Yc(a){var b=uc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.l=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.s=this.h=c;this.a-=(this.c?6:7)+b} -function Zc(a){var b=uc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.l=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.s=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function $c(a){V(this,a,!O(this))}function ad(a){V(this,a,O(this))} -function bd(a){U(this,a,S(this,a),Dc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function cd(a){T(this,a,rc(this,a),Ec);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function dd(a){U(this,a,S(this,a),Fc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ed(a){T(this,a,rc(this,a),Gc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function fd(a){P(this,S(this,a)&uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function gd(a){P(this,(rc(this,a)&tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function hd(a){V(this,a,this.h&65535?0:4)}function id(a){V(this,a,!this.oa()==!(this.g&32768))}function jd(a){V(this,a,!!(this.h&65535)&&!this.oa()==!(this.g&32768))}function kd(a){V(this,a,!O(this)&&!!(this.h&65535))} -function ld(a){V(this,a,(this.h&65535?0:4)||!this.oa()!=!(this.g&32768))}function md(a){V(this,a,O(this)||(this.h&65535?0:4))}function nd(a){V(this,a,!this.oa()!=!(this.g&32768))}function od(a){V(this,a,this.oa())}function pd(a){V(this,a,!!(this.h&65535))}function qd(a){V(this,a,!this.oa())}function rd(){G(this,12,1);this.a-=5}function sd(a){V(this,a,!0)}function td(a){V(this,a,!(this.g&32768))}function ud(a){V(this,a,this.g&32768?2:0)} -function W(a){a&1&&(this.l=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.s=0);this.a-=5}function vd(a){var b=S(this,a);a=uc(this,a);ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function wd(a){var b=rc(this,a)<<8;a=tc(this,a)<<8;ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} -function xd(a){var b=uc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.l=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.s=d>>16):(this.g=32768,this.h=d>>15|d,this.s=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.s=0,this.g=32768,this.l=65536,this.a-=7}function yd(){G(this,24,2);this.a-=25} -function zd(){this.A&49152?(this.I|=128,G(this,4,3)):this.D?this.D.c():D(this);this.a-=7}function Ad(){G(this,16,4);this.a-=25}var Bd=[0,7,7,10,7,11,9,13];function Cd(a){this.G=this.a;M(this,sc(this,a));this.a=this.G-Bd[this.c]}var Dd=[0,14,14,17,14,18,16,20];function Ed(a){this.G=this.a;var b=sc(this,a);a=a>>6&7;jc(this,this.f[a]);this.f[a]=this.f[7];M(this,b);this.a=this.G-Dd[this.c]}var Fd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Gd(a){var b=S(this,a);this.G=this.a;P(this,wc(this,a,b));this.a=this.G-Fd[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Hd(a){var b=rc(this,a);P(this,vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Id=[7,13,13,17,14,18,17,21]; -function Jd(a){var b=uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.m&128||(this.s=b>>16,this.h=this.s|b,this.g=0,this.l=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)M(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Pd(a){U(this,a,S(this,a),Tc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function Qd(a){U(this,a,0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}function Rd(){G(this,28,5);this.a-=5}function Sd(){this.m&4||this.o.da();this.m|=4;gc(this,-2);this.a-=3}function Td(a){U(this,a,S(this,a),Wc);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){G(this,8,6)}function ac(a){Ud[a>>12].call(this,a)}function Vd(a){Wd[a>>6&3].call(this,a)}function Xd(a){Yd[a>>6&3].call(this,a)}function Zd(a){$d[a>>6&3].call(this,a)}function ae(a){be[a&15].call(this,a)}function ce(a){de[a&15].call(this,a)} -function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)}function ie(a){je[a>>6&3].call(this,a)} -var Ud=[function(a){ke[a>>8&15].call(this,a)},Gd,vd,fd,bd,dd,Xc,Y,function(a){le[a>>8&15].call(this,a)},Hd,wd,gd,cd,ed,Pd,Y],ke=[function(a){me[a>>4&15].call(this,a)},sd,pd,hd,id,nd,jd,ld,Ed,Ed,Vd,Xd,Zd,Y,Y,Y],Wd=[function(a){Q(this,wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}],Yd=[function(a){U(this,a,0,Nc); -this.a-=this.c?11:6},function(a){U(this,a,O(this)?1:0,xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,O(this)?1:0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=uc(this,a);Q(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],$d=[function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Bc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,zc);this.a-=this.c?9:3+(7==this.b?2:0)}],me=[function(a){ne[a& -15].call(this,a)},Y,Y,Y,Cd,Cd,Cd,Cd,Nd,Y,ae,ce,Qd,Qd,Qd,Qd],ne=[zd,Sd,Md,rd,Ad,Ld,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],be=[Kd,function(){this.l=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],de=[Kd,function(){this.l=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],le=[qd,od,kd,md,td,ud,$c,ad,yd,Rd,ee,ge,ie,Y,Y,Y],fe=[function(a){Q(this,vc(this, -a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}],he=[function(a){T(this,a,0,Oc);this.a-=this.c?11:6},function(a){T(this,a,O(this)?1:0,yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,O(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=tc(this,a);Q(this,a<<8);this.a-=this.c?4:3+(7==this.b?2:0)}], -je=[function(a){T(this,a,0,Sc);this.a-=this.c?9+(this.$a&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Cc);this.a-=this.c?9+(this.$a&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Ac);this.a-=this.c?9:3+(7==this.b?2:0)}];function bc(a){oe[a>>12].call(this,a)} -var oe=[function(a){pe[a>>8&15].call(this,a)},Gd,vd,fd,bd,dd,Xc,function(a){qe[a>>8&15].call(this,a)},function(a){re[a>>8&15].call(this,a)},Hd,wd,gd,cd,ed,Pd,Y],pe=[function(a){se[a>>4&15].call(this,a)},sd,pd,hd,id,nd,jd,ld,Ed,Ed,Vd,Xd,Zd,function(a){te[a>>6&3].call(this,a)},Y,Y],te=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.P);M(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=pc(this,a,0);jc(this,a);P(this,a);this.a-=11},function(a){var b=lc(this);this.G= -this.a;qc(this,a,0,b);P(this,b);this.a=this.G-Id[this.c]},function(a){P(this,wc(this,a,this.oa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],se=[function(a){ue[a&15].call(this,a)},Y,Y,Y,Cd,Cd,Cd,Cd,Nd,function(a){a&8?(this.A&49152||(this.A=this.A&-2017|(a&7)<<5,this.m|=1),this.a-=5):G(this,8,6)},ae,ce,Qd,Qd,Qd,Qd],ue=[zd,Sd,Md,rd,Ad,Ld,function(){kc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],qe=[Jd,Jd,xd,xd,Yc,Yc,Zc,Zc,Td,Td,Y,Y,Y,Y,Od,Od],re=[qd,od,kd,md,td,ud,$c,ad,yd,Rd,ee,ge,ie,function(a){ve[a>>6& -3].call(this,a)},Y,Y],ve=[Y,function(a){a=pc(this,a,65536);jc(this,a);P(this,a);this.a-=11},function(a){var b=lc(this);this.G=this.a;qc(this,a,65536,b);P(this,b);this.a=this.G-Id[this.c]},Y]; -function we(a){u.call(this,"ROM",a,we);this.T=this.b=null;this.o=a.addr;this.c=a.size;this.h=a.alias;this.g=a.file;this.l=ka(this.g);if(this.g){a=this.g;var b=la(this.l);"json"!=b&&"hex"!=b&&(a=na()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;k(a,null,!0,function(a,b,f){f?c.L("Unable to load ROM resource (error "+f+": "+a+")"):(Pa(c.ta,a,b),(a=ua(a,b))?(c.b=a.K,c.T=a.T):c.g=null,xe(c))})}}w(we);we.prototype.ha=function(a,b,c,d){this.j=b;this.a=c;this.D=d;xe(this)}; -we.prototype.ba=function(){this.T&&(this.D&&this.D.a(this.id,this.o,this.c,this.T),delete this.T);return!0};we.prototype.aa=function(){return!0}; -function xe(a){if(!Ta(a)){if(a.g){if(!a.b||!a.j)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+ja(a.b.length,8,!0)+") does not match specified size ("+ja(a.c,8,!0)+")";a.i.error=!0;a.L(b)}else{b=a.o;if(kb(a.j,b,a.c,Hb)){var c;for(c=0;c>>a.j;0=b.length)break;for(var l=l+2,q=b[l++]&255|(b[l++]&255)<<8,t=b[l++]&255|(b[l++]&255)<<8,n=n+((q&255)+(q>>8)+(t&255)+(t>>8)),z=l,Ra=q-=6;0=b.length)break;n+=b[l++]&255;if(n&255)break;if(Ra)for(;Ra--;)a.a.Ja(t++,b[z++]&255);else t&1?D(a.a):ec(a.a,t,f);h=!0}else l++;else l+=2}if(!h&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&wb(e.a,e.V))});this.W=yb(52,4);this.N=vb(this.a,function(){e.c|=128;e.c&64&&wb(e.a,e.W)});tb(b,this,De);C(this)}; -g.qb=function(){if(!this.v){var a=Sb(this.o,"connection");if(a){var b=a.split("->");if(2==b.length){var c=qa(b[0]);if(c!=this.La)return;b=qa(b[1]);if(this.v=Qa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.B=d.receiveData){this.status(this.ta+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};g.ba=function(a,b){if(!b)if(this.qb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -g.aa=function(a){return a?this.save():!0};g.reset=function(){Ee(this)};g.save=function(){var a=new N(this);a.set(0,[]);return a.data()};g.restore=function(){return Ee(this)};function Ee(a){a.w=0;a.b=0;a.c=128;a.h=[];return!0}g.gb=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.s+=c}else if(null!=this.l){if(10==a||1024<=this.l.length)this.R(this.l), -this.l="";10!=a&&(this.l+=String.fromCharCode(a))}this.c&=-129;xb(this.a,this.N,1E3/Math.round(this.H/10))}};var Fe={},De=(Fe[65392]=[null,null,Z.prototype.ec,Z.prototype.Rc,"RCSR"],Fe[65394]=[null,null,Z.prototype.dc,Z.prototype.Qc,"RBUF"],Fe[65396]=[null,null,Z.prototype.sc,Z.prototype.ed,"XCSR"],Fe[65398]=[null,null,Z.prototype.rc,Z.prototype.dd,"XBUF"],Fe);r(function(){for(var a=B(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.u[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.u[b]=c,c.onclick=function(){var a= -d.u.listTapes;a&&Ie(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.u[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ie(d,ka(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.u[b]=c,!0}return!1}; -g.ha=function(a,b,c,d){this.o=a;this.j=b;this.a=c;this.D=d;this.J=Je(a);var e=this;if((this.c=Sb(this.o,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){m("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.M=yb(56,4);this.P=vb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):na()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!k(f,null,!0,function(e,f,h){var l=0>h&&a.o&&!a.o.i.O;h?a.L('Unable to load tape "'+b+'" (error '+h+": "+e+")",l):(Pa(a.ta,e,f),(e=ua(e,f))&&Se(a,b,c,d,e.K,e.$,e.Z)); -a.i.Za=!1;a.l&&(a.l--,a.l||C(a));Pe(a)})}function Me(a,b,c,d){if((a=a.u.listTapes)&&a.options){for(var e=0;e\nLicense: GPL version 3 or later ");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bWe){if(Ye(d,this.v)){this.o=new N(this,"1.30.2","failsafe");Ye(this.o)&&(cf(this,d),a=2,df(this.o));this.o.set("timestamp",ta());ef(this.o);var e=this.b&&!this.l;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=bf(d)){var f=d.get("code"),h=d.get("data");f&&("ok"==f?Ye(d,h):("error"== -f&&"no machine state"!=h?(this.L("Error: "+h),"unable to verify user"==h&&(za("user",""),this.c=null)):this.R(f+": "+h),df(d),Ye(d)?(c=bf(d),e=!0):c=!1))}e&&af(this,c?d:null)}else 2==a&&d.clear()}else af(this);delete this.v;delete this.w}e=x(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.i.O=!0;var d=this.u.power;d&&(d.textContent="Shutdown");this.a&&(ff(this,this.a,b,c,a),this.a.Fa());this.G&&(cf(this,b),b.clear());!c&&this.o&&(this.o.clear(),delete this.o);this.g=0}; -function cf(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.N;d.user=c;d.type="bug";d.data=b;k("http://www.pcjs.org/api/v1/report",d,!0)}} -function gf(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new N(a,"1.30.2"),h=new N(a,"1.30.2","validate"),l=ta();h.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.aa&&(c&&D(a.a),d=a.a.aa(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.i.O=!1,!1===d&&(e=null)));for(var l=x(a.id),n=0;nf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");k(e,null,!0,function(f,h,l){if(l||!h)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=h.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var n=l[0],q,t=/( [a-z]+=)(['"])(.*?)\2/g;q=t.exec(f);)n=0>n.indexOf(q[1])?n.replace(">",q[0]+">"):n.replace(new RegExp(q[1]+"(['\"])(.*?)\\1"),q[0]);l[0]!=n&&(h=h.replace(l[0],n))}else{c(a,"missing <"+d[1]+"> in "+e);return}h=h.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],h);of(a,b,c)}})}else c(a,null)} -function pf(a,b,c,d){function e(a){if(void 0===l){var b=h&&B(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=pa(a))}function f(a){e("Error: "+a);n&&(--lf||Ga(!0));n=!1}var h,l,n=!0;lf++;Oa[a]={};try{if(h=document.getElementById(a)){var q;if("object"==typeof resources&&(q=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=q:z.appendChild(document.createTextNode(q));t.appendChild(z)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");q=function(d,l){l?mf(c,null,null,!1,e,function(d,n){n?(Pa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(n=l.transformNode(n))?(h.outerHTML=n,--lf||Ga(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(n),(n=d.transformToFragment(l,document))?h.parentNode?(h.parentNode.replaceChild(n,h),--lf||Ga(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?mf(b,a,d,!0,e,q):nf(b,null,a,d,!1,e,q)}else f("missing machine element: "+a)}catch(Ra){f(Ra.message)}return n}window.embedPDP11=function(a,b,c,d){Ga(!1);return pf(a,b,c,d)};window.enableEvents=Ga;window.sendEvent=Ha;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Ua="undefined"!==typeof ArrayBuffer;function Va(a){y.call(this,"Panel",a,Va);this.b=0;this.j.Cb=!0}A(Va);h=Va.prototype; +h.V=function(a,b,c,d){if(this.i&&this.i.V(a,b,c,d)||this.a&&this.a.V(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.m[b]=c,this.b++,!0;default:return"rled"==a?(this.m[b]=c,this.b++,!0):this.parent.V.call(this,a,b,c,d)}};h.ba=function(a,b,c,d){this.i=a;this.l=b;this.a=c;this.D=d};h.ea=function(a,b){b||Wa();return!0};h.da=function(){return!0}; +function Xa(a,b,c,d){if(a.m[b]){void 0===c&&(a.j.error=!0,a.C("Value for "+b+" is invalid"),H(a.a));var e=a.D&&a.D.b||8;c=!a.a.j.Z||a.j.Cb?8==e?ka(c,d):l(c,d):"--------".substr(0,d||4);a.m[b].textContent!=c&&(a.m[b].textContent=c)}}function Ya(a,b,c,d){for(var e=0;e>2;this.i=this.c-1;this.v=this.B/this.c|0;this.ta=[];this.o=0;this.u=[];this.Ub=[ab,bb,cb,db];a=new J(this);eb(a,this.D);this.b=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=gb(d,b)}function bb(a,b,c){var d=!1,e=this.controller,f=e.ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||gb(e,c)} +function cb(a,b){var c=-1,d=this.controller;(a=d.ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=gb(d,b)}function db(a,b,c){var d=!1,e=this.controller;if(a=e.ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||gb(e,c)}function hb(a,b){if(b!=a.h){var c;a.h&&(c=(1<>>a.l;0g&&(t=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.Da)return m.hb+=m.Da-f,m.Da=f,!0;if(f>=m.Da+m.hb){t=m.size-(f-p);t>g&&(t=g);m.hb=f-m.Da+t;f=p+a.c;g-=t;k++;continue}}return mb(1,f,g)}f=new J(a,f,t,a.c,d,e);eb(f,a.D,m);a.b[k++]=f;f=p+a.c;g-=t}if(0>=g){c/=1024;var w;e="";w?10>>=a.l;0>>=a.l;0>>a.l].tb(b&a.i,b)}function pb(a,b){return a.b[(b&a.g)>>>a.l].S(b&a.i,b)}$a.prototype.Qa=function(a,b){this.o++;this.b[(a&this.g)>>>this.l].Ab(a&this.i,b&255,a);this.o--}; +function qb(a,b,c){a.b[(b&a.g)>>>a.l].ib(b&a.i,c&65535,b)}function rb(a){for(var b=0,c=[],d=0;da.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!k&&p&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));sb(a,e,e,g,k,m,p,f[4])}}}function ub(a,b){a.u.push(b)}function vb(a,b){a.o||K(a.a,4,b)} +function mb(a,b,c){r("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function L(a){y.call(this,"Device",a,L);this.c={data:0,Bd:0,gb:20,Pc:0};this.b={Gd:0,yb:-1}}A(L);h=L.prototype;h.ba=function(a,b,c,d){this.l=b;this.a=c;this.D=d;var e=this;this.b.yb=wb(c,function(){e.b.va|=128;e.b.va&64&&(xb(e.a,e.b.Qc),yb(e.a,e.b.yb,1E3/60))});this.b.Qc=zb(64,6);tb(b,this,M);ub(b,this.reset.bind(this));G(this)};h.reset=function(){this.c.gb=this.c.gb&-120|20;this.b.va=0}; +h.kc=function(){var a=this.b.va;this.b.va&=-129;return a};h.Zc=function(a){this.b.va=a;a&64&&yb(this.a,this.b.yb,1E3/60);this.b.va=a&-129};h.dc=function(a){return(a?this.c.Pc:this.c.data)&65535};h.Sc=function(a){this.c.data=a};h.mc=function(){var a=this.a;return a.w&62337|a.Sa<<5|a.Ta<<1};h.ad=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.Sa=a>>5&3;b.Ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Oa!=c&&(b.Oa=c,Ab(b))}Bb(this)}; +h.nc=function(){var a=this.a.wa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.oc=function(){return this.a.vb};h.pc=function(){return this.a.xa};h.bd=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.xa!=a&&(b.xa=a,a&16?(b.pb=4194303,b.Ua=3915776):(b.pb=262143,b.Ua=253952),Ab(b));Bb(this)};function Bb(a){a.c.gb=a.c.gb&-8|(a.a.Oa?a.a.xa&16?1:2:4)}h.Dc=function(a){return this.a.H[1][a>>1&7]};h.qd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Bc=function(a){return this.a.H[1][(a>>1&7)+8]}; +h.od=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Cc=function(a){return this.a.U[1][a>>1&7]};h.pd=function(a,b){b=b>>1&7;this.a.U[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.U[1][(a>>1&7)+8]};h.nd=function(a,b){b=(b>>1&7)+8;this.a.U[1][b]=a;this.a.H[1][b]&=65295};h.jc=function(a){return this.a.H[0][a>>1&7]};h.Yc=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.hc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Wc=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295}; +h.ic=function(a){return this.a.U[0][a>>1&7]};h.Xc=function(a,b){b=b>>1&7;this.a.U[0][b]=a;this.a.H[0][b]&=65295};h.gc=function(a){return this.a.U[0][(a>>1&7)+8]};h.Vc=function(a,b){b=(b>>1&7)+8;this.a.U[0][b]=a;this.a.H[0][b]&=65295};h.Jc=function(a){return this.a.H[3][a>>1&7]};h.wd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Hc=function(a){return this.a.H[3][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Ic=function(a){return this.a.U[3][a>>1&7]}; +h.vd=function(a,b){b=b>>1&7;this.a.U[3][b]=a;this.a.H[3][b]&=65295};h.Gc=function(a){return this.a.U[3][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.U[3][b]=a;this.a.H[3][b]&=65295};h.Fa=function(a){a&=7;return this.a.A&2048?this.a.Ca[a]:this.a.f[a]};h.Ha=function(a,b){b&=7;this.a.A&2048?this.a.Ca[b]=a:this.a.f[b]=a};h.uc=function(){return this.a.A&49152?this.a.ga[0]:this.a.f[6]};h.gd=function(a){this.a.A&49152?this.a.ga[0]=a:this.a.f[6]=a};h.xc=function(){return this.a.f[7]}; +h.kd=function(a){this.a.f[7]=a};h.Ga=function(a){a&=7;return this.a.A&2048?this.a.f[a]:this.a.Ca[a]};h.Ia=function(a,b){b&=7;this.a.A&2048?this.a.f[b]=a:this.a.Ca[b]=a};h.vc=function(){return 1==(this.a.A&49152)>>14?this.a.f[6]:this.a.ga[1]};h.hd=function(a){1==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ga[1]=a};h.wc=function(){return 3==(this.a.A&49152)>>14?this.a.f[6]:this.a.ga[3]};h.jd=function(a){3==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ga[3]=a};h.fc=function(a){return this.a.Pb[a-65504>>1]}; +h.Uc=function(a,b){this.a.Pb[b-65504>>1]=a};h.Nb=function(a){return 65520==a?61183:0};h.Tb=function(){};h.Fc=function(){return 1};h.sd=function(){};h.ec=function(){return this.a.J};h.Tc=function(){this.a.J=0};h.lc=function(){return this.a.Ob};h.$c=function(a,b){b&1||(a&=255);this.a.Ob=a};h.qc=function(a){return a?this.a.wb:0};h.cd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.wb=a;b.s|=2};h.Ec=function(a){return a?this.a.ya&65280:0};h.rd=function(a){this.a.ya=a|255}; +h.tc=function(){return Za(this.a)};h.fd=function(a){Cb(this.a,a&-1809|Za(this.a)&1808);this.a.s|=128};h.Sb=function(){}; +var N={},M=(N[62592]=[null,null,L.prototype.Dc,L.prototype.qd,"SISDR",1145],N[62608]=[null,null,L.prototype.Bc,L.prototype.od,"SDSDR",1145],N[62624]=[null,null,L.prototype.Cc,L.prototype.pd,"SISAR",1145],N[62640]=[null,null,L.prototype.Ac,L.prototype.nd,"SDSAR",1145],N[62656]=[null,null,L.prototype.jc,L.prototype.Yc,"KISDR",1145],N[62672]=[null,null,L.prototype.hc,L.prototype.Wc,"KDSDR",1145],N[62688]=[null,null,L.prototype.ic,L.prototype.Xc,"KISAR",1145],N[62704]=[null,null,L.prototype.gc,L.prototype.Vc, +"KDSAR",1145],N[62798]=[null,null,L.prototype.pc,L.prototype.bd,"MMR3",1145],N[65382]=[null,null,L.prototype.kc,L.prototype.Zc,"LKS"],N[65400]=[null,null,L.prototype.dc,L.prototype.Sc,"CNSL"],N[65402]=[null,null,L.prototype.mc,L.prototype.ad,"MMR0",1145],N[65404]=[null,null,L.prototype.nc,L.prototype.Sb,"MMR1",1145],N[65406]=[null,null,L.prototype.oc,L.prototype.Sb,"MMR2",1145],N[65408]=[null,null,L.prototype.Jc,L.prototype.wd,"UISDR",1145],N[65424]=[null,null,L.prototype.Hc,L.prototype.ud,"UDSDR", +1145],N[65440]=[null,null,L.prototype.Ic,L.prototype.vd,"UISAR",1145],N[65456]=[null,null,L.prototype.Gc,L.prototype.td,"UDSAR",1145],N[65472]=[null,null,L.prototype.Fa,L.prototype.Ha,"R0SET0"],N[65473]=[null,null,L.prototype.Fa,L.prototype.Ha,"R1SET0"],N[65474]=[null,null,L.prototype.Fa,L.prototype.Ha,"R2SET0"],N[65475]=[null,null,L.prototype.Fa,L.prototype.Ha,"R3SET0"],N[65476]=[null,null,L.prototype.Fa,L.prototype.Ha,"R4SET0"],N[65477]=[null,null,L.prototype.Fa,L.prototype.Ha,"R5SET0"],N[65478]= +[null,null,L.prototype.uc,L.prototype.gd,"R6KERNEL"],N[65479]=[null,null,L.prototype.xc,L.prototype.kd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ga,L.prototype.Ia,"R0SET1",1145],N[65481]=[null,null,L.prototype.Ga,L.prototype.Ia,"R1SET1",1145],N[65482]=[null,null,L.prototype.Ga,L.prototype.Ia,"R2SET1",1145],N[65483]=[null,null,L.prototype.Ga,L.prototype.Ia,"R3SET1",1145],N[65484]=[null,null,L.prototype.Ga,L.prototype.Ia,"R4SET1",1145],N[65485]=[null,null,L.prototype.Ga,L.prototype.Ia,"R5SET1",1145], +N[65486]=[null,null,L.prototype.vc,L.prototype.hd,"R6SUPER",1145],N[65487]=[null,null,L.prototype.wc,L.prototype.jd,"R6USER",1145],N[65504]=[null,null,L.prototype.fc,L.prototype.Uc,"CTRL",1170],N[65520]=[null,null,L.prototype.Nb,L.prototype.Tb,"LSIZE",1170],N[65522]=[null,null,L.prototype.Nb,L.prototype.Tb,"HSIZE",1170],N[65524]=[null,null,L.prototype.Fc,L.prototype.sd,"SYSID",1170],N[65526]=[null,null,L.prototype.ec,L.prototype.Tc,"CPUERR",1170],N[65528]=[null,null,L.prototype.lc,L.prototype.$c, +"MB",1170],N[65530]=[null,null,L.prototype.qc,L.prototype.cd,"PIR"],N[65532]=[null,null,L.prototype.Ec,L.prototype.rd,"SL"],N[65534]=[null,null,L.prototype.tc,L.prototype.fd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; +M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; +M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; +M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +x(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.m,0,this.size>>2),Lb(this,Hb?Mb:Nb);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ia:function(a,b){a&1&&vb(this.l,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.na= +!0},G:function(a,b){return this.I(a,b)},P:function(a,b){return this.W(a,b)},ka:function(a,b,c){this.i?this.g(a,b,c):this.Ab(a,b,c)},ra:function(a,b,c){this.i?this.g(a,b,c):this.sa(a,b,c)},F:function(a){return this.b[a]},K:function(a){return this.b[a]},N:function(a,b){a&1&&vb(this.l,b);return this.c.getUint16(a,!0)},X:function(a,b){a&1&&vb(this.l,b);return this.u[a>>1]},ja:function(a,b){this.b[a]=b;this.na=!0},la:function(a,b){this.b[a]=b;this.na=!0},qa:function(a,b,c){a&1&&vb(this.l,c);this.c.setUint16(a, +b,!0);this.na=!0},Aa:function(a,b,c){a&1&&vb(this.l,c);this.u[a>>1]=b;this.na=!0}};function eb(a,b,c){a.D=b;a.h=a.o=0;c&&((a.h=c.h)&&Pb(a,Qb,!1),(a.o=c.o)&&Rb(a,Qb,!1))}function Rb(a,b,c){c&&a.o||(a.zb=!a.i&&b[1]||a.g,a.ib=!a.i&&b[3]||a.B);if(c||void 0===c)a.Ab=b[1]||a.g,a.sa=b[3]||a.B}function Pb(a,b,c){c&&a.h||(a.tb=b[0]||a.v,a.S=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.W=b[2]||a.w}function Lb(a,b){b||(b=Sb);Pb(a,b,void 0);Rb(a,b,void 0)} +var Sb=[],Ob=[J.prototype.M,J.prototype.pa,J.prototype.ia,J.prototype.Ba],Qb=[J.prototype.G,J.prototype.ka,J.prototype.P,J.prototype.ra];if(Ua)var Nb=[J.prototype.F,J.prototype.ja,J.prototype.N,J.prototype.qa],Mb=[J.prototype.K,J.prototype.la,J.prototype.X,J.prototype.Aa]; +function Tb(a,b){y.call(this,"CPU",a,Tb);var c=a.multiplier||1;this.$a=a.cycles||b;this.la=c;this.ob=Math.round(this.$a/1E4)/100;this.pa=this.ob*this.la;this.j.Z=!1;this.j.xb=!1;this.j.Ma=a.autoStart;this.j.Za=!1;this.Wa=this.ra=0;this.Ya=a.csStart;this.Ba=a.csInterval;this.Ja=a.csStop;this.I=[];this.Mb=this.Oc.bind(this);G(this)}A(Tb);var Ub=["power","reset"];h=Tb.prototype; +h.ba=function(a,b,c,d){this.i=a;this.l=b;this.D=d;for(b=0;ba.ja/a.pa&&(b=1);a.la=b;b=a.ob*a.la;if(a.pa!=b){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.R("target speed: "+b)}c&&a.i&&dc(a.i)}a.M+=a.X;a.X=0;a.W=ra();a.ka=0;bc(a)}function wb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function yb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.$a*a.la/1E3*c|0,a.I[b][0]=c+ec(a))}function ec(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.Oc=function(){if(this.j.Z){this.rb>=this.$a&&bc(this,!0);this.La=0;this.Va=ra();if(this.ka){var a=this.Va-this.ka;a>this.Jb&&(this.W+=a,this.W>this.Va&&(this.W=this.Va))}try{do{for(var b,c=this.j.Za?1:this.bb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Rb(b)}catch(m){if("number"!=typeof m)throw m;}b=ec(this,!0);this.La+=b;this.X+=b;a=b;if(this.j.Za){var f=!1;this.Wa=this.Wa+this.Fb()|0;this.ra-=a;0>=this.ra&&(this.ra+=this.Ba,f=!0);0<=this.Ja&&this.Ja<=cc(this)&& +(this.Ba=this.Ja=-1,Zb(this),H(this),f=!0);f&&this.R(cc(this)+" cycles: checksum="+l(this.Wa))}for(var a=b,g=this.I.length-1;0<=g;g--){var k=this.I[g];0>k[0]||(k[0]-=a,0>=k[0]&&(k[0]=-1,k[1]()))}this.Ka-=b;if(0>=this.Ka){this.Ka+=this.bb;15<=++this.Lb&&(this.i&&this.i.ha(),this.Lb=0);break}}while(this.j.Z)}catch(m){H(this);this.i&&this.i.stop(ra(),cc(this));b=m.stack||m.message;this.j.error=!0;this.C(b);return}if(this.j.Z){b=setTimeout;c=this.Mb;this.ka=ra();d=this.Jb;this.La&&(d=Math.round(d*this.La/ +this.bb));d-=this.ka-this.Va;if(e=this.ka-this.W)this.ja=Math.round(this.X/(10*e))/100,864E5<=e&&(this.M=0,ac(this));if(0>d||this.jad&&(this.W-=d),d=0;this.rb+=this.La;this.ka+=d;b(c,d)}}};function $b(a){var b;a.j.error?(a.R(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.Z)a.R(a.toString()+" busy");else{ac(a);a.j.Z=!0;a.j.xb=!0;if(b=a.m.run)b.textContent="Halt";a.i&&a.i.start(a.W,cc(a));setTimeout(a.Mb,0)}}h.Rb=function(){return 0}; +function H(a){var b=!1;if(a.j.Z){ec(a);a.M+=a.X;a.X=0;a.j.Z=!1;if(b=a.m.run)b.textContent="Run";a.i&&a.i.stop(ra(),cc(a));b=!0}a.j.complete=void 0;return b}function fc(a){this.Ra=+a.model||1170;this.Hb=a.addrReset||0;Tb.call(this,a,6666667);this.decode=1120==this.Ra?gc.bind(this):hc.bind(this);ic(this);this.sb=0;this.N=null;this.j.complete=!1}A(fc,Tb);h=fc.prototype;h.reset=function(){this.status("model "+this.Ra);this.j.Z&&H(this);ic(this);Yb(this);this.j.error=!1;this.parent.reset.call(this)}; +function ic(a){a.o=65536;a.g=32768;a.h=65535;a.u=32768;a.A=15;a.f=[0,0,0,0,0,0,0,a.Hb];a.Ca=[0,0,0,0,0,0];a.ga=[0,0,0,0];a.v=0;a.Ta=0;a.ac=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.cc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Pb=[0,0,0,0,0,0,0,0];a.Ob=0;a.s=0;a.B=a.F=0;a.c=a.b=a.nb=0;a.sa=-1;jc(a)}function jc(a){a.ya=255;a.J=0;a.wb=0;a.w=0;a.wa=0;a.vb=0;a.xa=0;a.Oa=0;a.Sa=0;a.pb=262143;a.Ua=253952;a.N=null;a.l&&Ab(a)}function Ab(a){a.Oa?(a.P=65536,a.K=a.$b,a.S=a.Lc,a.ib=a.yd,hb(a.l,a.xa&16?22:18)):(a.P=0,a.K=a.Zb,a.S=a.Kc,a.ib=a.xd,hb(a.l,16))}function kc(a,b,c){a.Hb=b;O(a,b);!c&&a.D&&(H(a)||a.D.ha())}h.Fb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.M,this.la]);a.set(2,rb(this.l));return a.data()};h.restore=function(a){var b=a[1];this.M=b[1];ac(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.A>>14&3;a.v!=c&&(a.ga[c]=a.f[6],a.f[6]=a.ga[a.v]);a.A=b;a.s|=2}function S(a,b){a.s&128||(a.u=a.h=b,a.g=0)}function nc(a,b,c){a.s&128||(a.u=a.h=a.o=b,a.g=c||0)}function oc(a,b,c,d){a.s&128||(a.u=a.h=a.o=b,a.g=(c^b)&(d^b))}function pc(a,b){a.s&128||(a.u=a.h=a.o=b,a.g=a.u^a.o>>1)}function qc(a,b,c,d){a.s&128||(a.u=a.h=a.o=b,a.g=(c^d)&(d^b))} +function K(a,b,c){if(!a.sb){var d=!1;0>a.sa?a.sa=Za(a):a.v||(b=4,d=!0);a.w&57344||(a.wa=63222,a.vb=b);a.v=0;var e=a.S(b|a.P),f=a.S(b+2&65535|a.P);Cb(a,f&-12289|a.sa>>2&12288);d&&(a.J|=4,a.f[6]=4);rc(a,a.sa);rc(a,a.f[7]);O(a,e);a.s&=-113;a.sa=-1;a.s|=8;if(26!=c)throw b;}}function sc(a){var b=tc(a),c=tc(a)&-1793;a.A&49152&&(c=c&-225|a.A&63712);O(a,b);Cb(a,c);a.s&=-17} +function uc(a,b,c){var d,e,f,g=0;d=b>>13;a.xa&a.ac[a.v]||(d&=7);e=a.H[a.v][d];f=(a.U[a.v][d]<<6)+(b&8191)&a.pb;if(ff){if(3932160<=f){f&=262143;var k=f>>13&31;31>k?a.xa&32&&(f=a.cc[k]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ua&&4186112>f&&(a.J|=32,K(a,4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: +128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Sa=a.v,a.Ta=d;g&&(g&57344&&(0<=a.sa&&(g|=128),a.w&57344||(a.w=a.w|g|a.Sa<<5|a.Ta<<1),K(a,168,16)),a.w&61440||!(4191360>f||4194239>>a.l].zb(b&a.i,c&255,b)}function tc(a){var b=a.S(a.f[6]|a.P);a.f[6]=a.f[6]+2&65535;return b} +function rc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.wa=a.wa<<8|246);!a.v&&c<=a.ya&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.S(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.S(e)|g;a.a-= +8;break;case 6:return e=a.S(mc(a,2)),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=a.S(mc(a,2)),e=e+a.f[c]&65535,e=a.S(e|a.P)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.w&57344||(a.wa=a.wa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.ya||65534<=a.f[6])&&(a.f[6]<=a.ya-32?(a.J|=4,a.f[6]=4,K(a,4,24)):(a.J|=8,a.s|=64));return e}h.Qa=function(a,b){this.Oa?(this.sb++,vc(this,uc(this,a,5),b),this.sb--):this.l.Qa(a,b)};h.Zb=function(a,b,c){return wc(this,a,b,c)}; +h.$b=function(a,b,c){return uc(this,wc(this,a,b,c),c)};h.Kc=function(a){return pb(this.l,a)};h.Lc=function(a){return pb(this.l,uc(this,a,2))};h.xd=function(a,b){qb(this.l,a,b&65535)};h.yd=function(a,b){qb(this.l,uc(this,a,4),b)};function xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=wc(a,b,d,2),c&65536||61440!==(a.A&61440)&&(d&=65535),a.v=a.A>>12&3,c=a.S(d|c&a.P),a.v=a.A>>14&3):c=6!=d||(a.A>>2&12288)===(a.A&12288)?a.f[d]:a.ga[a.A>>12&3];return c} +function yc(a,b,c,d){a.w&57344||(a.wa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=wc(a,b,e,4),c&65536||(e&=65535),a.v=a.A>>12&3,e=uc(a,e|c&65536,4),a.v=a.A>>14&3,qb(a.l,e,d)):6!=e||(a.A>>2&12288)===(a.A&12288)?a.f[e]=d:a.ga[a.A>>12&3]=d}function zc(a,b){b>>=6;var c=a.F=b&7;(b=a.B=(b&56)>>3)?(c=a.K(b,c,3),a=ob(a.l,c)):a=a.f[c]&255;return a}function Ac(a,b){b>>=6;var c=a.F=b&7;return(b=a.B=(b&56)>>3)?pb(a.l,a.K(b,c,2)):a.f[c]}function Bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return wc(a,b,c,8)} +function Cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.K(b,c,3),a=ob(a.l,c)):a=a.f[c]&255;return a}function Dc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?pb(a.l,a.K(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.nb=a.K(b,e,7),vc(a,e,d.call(a,c,ob(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.K(b,e,6),qb(a.l,e,d.call(a,c,pb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} +function Ec(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?vc(a,a.K(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Fc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?qb(a.l,a.K(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.Rb=function(a){this.j.complete=!0;var b=a?this.j.xb?0:1:-1;this.j.xb=!1;this.qa=this.a=a;do{if(this.s){this.s&112&&(this.s&32?K(this,168,28):this.s&64?K(this,4,30):this.s&16&&K(this,12,32),this.s&=-113);if(a=this.s&7){a=!1;if(this.s&2){this.s&=-3;var c=160,d=(this.wb&224)>>5,e=this.N&&this.N.Ea>d?this.N:null;e&&(c=e.Rc,d=e.Ea);d>(this.A&224)>>5?(this.s&4&&(mc(this,2),this.s&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.s&1&&this.s++;a=a&&0>b}if(a)break}this.s=this.s&7|this.A&16;this.decode(lc(this))}while(0>1|b<<16;pc(this,a);return a&65535}function Lc(a,b){a=b&2048|b>>1|b<<8;pc(this,a<<8);return a&255}function Mc(a,b){a=b&~a;S(this,a);return a}function Nc(a,b){a=b&~a;S(this,a<<8);return a}function Oc(a,b){a|=b;S(this,a);return a}function Pc(a,b){a|=b;S(this,a<<8);return a}function Qc(a,b){a=~b|65536;nc(this,a);return a&65535}function Rc(a,b){a=~b|256;nc(this,a<<8);return a&255} +function Sc(a,b){a=b-a;this.s&128||(this.u=this.h=a,this.g=b&(b^a));return a&65535}function Tc(a,b){a=b-a;var c=a<<8;b<<=8;this.s&128||(this.u=this.h=c,this.g=b&(b^c));return a&255}function Uc(a,b){a=b+a;this.s&128||(this.u=this.h=a,this.g=a&(b^a));return a&65535}function Vc(a,b){a=b+a;var c=a<<8;this.s&128||(this.u=this.h=c,this.g=c&(b<<8^c));return a&255}function Wc(a,b){a=-b;nc(this,a,a&b&32768);return a&65535}function Xc(a,b){a=-b;nc(this,a<<8,(a&b&128)<<8);return a&255} +function Yc(a,b){a=b<<1|this.o>>16&1;pc(this,a);return a&65535}function Zc(a,b){a=b<<1|this.o>>16&1;pc(this,a<<8);return a&255}function $c(a,b){a=(this.o&65536|b)>>1|b<<16;pc(this,a);return a&65535}function ad(a,b){a=((this.o&65536)>>8|b)>>1|b<<8;pc(this,a<<8);return a&255}function bd(a,b){var c=b-a;qc(this,c,a,b);return c&65535}function cd(a,b){var c=b-a;qc(this,c<<8,a<<8,b<<8);return c&255}function dd(a,b){this.s&128||(this.u=this.h=b&65280,this.g=this.o=0);return(b<<8|b>>8)&65535} +function ed(a,b){a^=b;S(this,a);return a&65535}function fd(a){U(this,a,Ac(this,a),Gc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function gd(a){var b=Dc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.o=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.u=this.h=c;this.a-=(this.c?6:7)+b} +function hd(a){var b=Dc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.o=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.u=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function id(a){V(this,a,!Q(this))}function jd(a){V(this,a,Q(this))} +function kd(a){U(this,a,Ac(this,a),Mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ld(a){T(this,a,zc(this,a),Nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function md(a){U(this,a,Ac(this,a),Oc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function nd(a){T(this,a,zc(this,a),Pc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function od(a){S(this,Ac(this,a)&Dc(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function pd(a){S(this,(zc(this,a)&Cc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function qd(a){V(this,a,this.h&65535?0:4)}function rd(a){V(this,a,!this.ua()==!(this.g&32768))}function sd(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))}function td(a){V(this,a,!Q(this)&&!!(this.h&65535))} +function ud(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))}function vd(a){V(this,a,Q(this)||(this.h&65535?0:4))}function wd(a){V(this,a,!this.ua()!=!(this.g&32768))}function xd(a){V(this,a,this.ua())}function yd(a){V(this,a,!!(this.h&65535))}function zd(a){V(this,a,!this.ua())}function Ad(){K(this,12,1);this.a-=5}function Bd(a){V(this,a,!0)}function Cd(a){V(this,a,!(this.g&32768))}function Dd(a){V(this,a,this.g&32768?2:0)} +function W(a){a&1&&(this.o=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.u=0);this.a-=5}function Ed(a){var b=Ac(this,a);a=Dc(this,a);qc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Fd(a){var b=zc(this,a)<<8;a=Cc(this,a)<<8;qc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} +function Gd(a){var b=Dc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.u=d>>16):(this.g=32768,this.h=d>>15|d,this.u=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.u=0,this.g=32768,this.o=65536,this.a-=7}function Hd(){K(this,24,2);this.a-=25} +function Id(){this.A&49152?(this.J|=128,K(this,4,3)):this.D?this.D.c():H(this);this.a-=7}function Jd(){K(this,16,4);this.a-=25}var Kd=[0,7,7,10,7,11,9,13];function Ld(a){this.G=this.a;O(this,Bc(this,a));this.a=this.G-Kd[this.c]}var Md=[0,14,14,17,14,18,16,20];function Nd(a){this.G=this.a;var b=Bc(this,a);a=a>>6&7;rc(this,this.f[a]);this.f[a]=this.f[7];O(this,b);this.a=this.G-Md[this.c]}var Od=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Pd(a){var b=Ac(this,a);this.G=this.a;S(this,Fc(this,a,b));this.a=this.G-Od[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Qd(a){var b=zc(this,a);S(this,Ec(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Rd=[7,13,13,17,14,18,17,21]; +function Sd(a){var b=Dc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.s&128||(this.u=b>>16,this.h=this.u|b,this.g=0,this.o=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)O(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Yd(a){U(this,a,Ac(this,a),bd);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} +function Zd(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)}function $d(){K(this,28,5);this.a-=5}function ae(){this.s&4||this.i.ha();this.s|=4;mc(this,-2);this.a-=3}function be(a){U(this,a,Ac(this,a),ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function gc(a){ce[a>>12].call(this,a)}function de(a){ee[a>>6&3].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)}function he(a){ie[a>>6&3].call(this,a)}function je(a){ke[a&15].call(this,a)}function le(a){me[a&15].call(this,a)} +function ne(a){oe[a>>6&3].call(this,a)}function pe(a){qe[a>>6&3].call(this,a)}function re(a){se[a>>6&3].call(this,a)} +var ce=[function(a){te[a>>8&15].call(this,a)},Pd,Ed,od,kd,md,fd,Y,function(a){ue[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,Yd,Y],te=[function(a){ve[a>>4&15].call(this,a)},Bd,yd,qd,rd,wd,sd,ud,Nd,Nd,de,fe,he,Y,Y,Y],ee=[function(a){nc(this,Fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Sc);this.a-=this.c?9:3+(7==this.b?2:0)}],ge=[function(a){U(this,a,0, +Wc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Dc(this,a);nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ie=[function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)}], +ve=[function(a){we[a&15].call(this,a)},Y,Y,Y,Ld,Ld,Ld,Ld,Wd,Y,je,le,Zd,Zd,Zd,Zd],we=[Id,ae,Vd,Ad,Jd,Ud,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ke=[Td,function(){this.o=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.u=0;this.a-=5},W,W,W,W,W,W,W],me=[Td,function(){this.o=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.u=32768;this.a-=5},X,X,X,X,X,X,X],ue=[zd,xd,td,vd,Cd,Dd,id,jd,Hd,$d,ne,pe,re,Y,Y,Y],oe=[function(a){nc(this, +Ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}],qe=[function(a){T(this,a,0,Xc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Cc(this,a);nc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],se=[function(a){T(this,a,0,ad);this.a-=this.c?9+(this.nb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Lc);this.a-=this.c?9+(this.nb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}];function hc(a){xe[a>>12].call(this,a)} +var xe=[function(a){ye[a>>8&15].call(this,a)},Pd,Ed,od,kd,md,fd,function(a){ze[a>>8&15].call(this,a)},function(a){Ae[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,Yd,Y],ye=[function(a){Be[a>>4&15].call(this,a)},Bd,yd,qd,rd,wd,sd,ud,Nd,Nd,de,fe,he,function(a){Ce[a>>6&3].call(this,a)},Y,Y],Ce=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.P);O(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=xc(this,a,0);rc(this,a);S(this,a);this.a-=11},function(a){var b=tc(this);this.G= +this.a;yc(this,a,0,b);S(this,b);this.a=this.G-Rd[this.c]},function(a){S(this,Fc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Be=[function(a){De[a&15].call(this,a)},Y,Y,Y,Ld,Ld,Ld,Ld,Wd,function(a){a&8?(this.A&49152||(this.A=this.A&-2017|(a&7)<<5,this.s|=1),this.a-=5):K(this,8,6)},je,le,Zd,Zd,Zd,Zd],De=[Id,ae,Vd,Ad,Jd,Ud,function(){sc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[Sd,Sd,Gd,Gd,gd,gd,hd,hd,be,be,Y,Y,Y,Y,Xd,Xd],Ae=[zd,xd,td,vd,Cd,Dd,id,jd,Hd,$d,ne,pe,re,function(a){Ee[a>>6& +3].call(this,a)},Y,Y],Ee=[Y,function(a){a=xc(this,a,65536);rc(this,a);S(this,a);this.a-=11},function(a){var b=tc(this);this.G=this.a;yc(this,a,65536,b);S(this,b);this.a=this.G-Rd[this.c]},Y]; +function Fe(a){y.call(this,"ROM",a,Fe);this.T=this.b=null;this.h=a.addr;this.c=a.size;this.g=a.alias;this.i=a.file;this.o=n(this.i);if(this.i){a=this.i;var b=la(this.o);"json"!=b&&"hex"!=b&&(a=u()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;q(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Qa(c.ia,a,b),(a=va(a,b))?(c.b=a.L,c.T=a.T):c.i=null,Ge(c))})}}A(Fe);Fe.prototype.ba=function(a,b,c,d){this.l=b;this.a=c;this.D=d;Ge(this)}; +Fe.prototype.ea=function(){this.T&&(this.D&&this.D.a(this.id,this.h,this.c,this.T),delete this.T);return!0};Fe.prototype.da=function(){return!0}; +function Ge(a){if(!Ta(a)){if(a.i){if(!a.b||!a.l)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+l(a.b.length,8,!0)+") does not match specified size ("+l(a.c,8,!0)+")";a.j.error=!0;a.C(b)}else{b=a.h;if(kb(a.l,b,a.c,Kb)){var c;for(c=0;c>>a.l;0=b.length)break;for(var k=k+2,p=b[k++]&255|(b[k++]&255)<<8,t=b[k++]&255|(b[k++]&255)<<8,m=m+((p&255)+(p>>8)+(t&255)+(t>>8)),w=k,F=p-=6;0=b.length)break;m+=b[k++]&255;if(m&255)break;if(F)for(;F--;)a.a.Qa(t++,b[w++]&255);else t&1?H(a.a):kc(a.a,t,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&xb(e.a,e.W))});this.X=zb(52,4);this.N=wb(this.a,function(){e.c|=128;e.c&64&&xb(e.a,e.X)});tb(b,this,Me);G(this)}; +h.Gb=function(){if(!this.v){var a=Vb(this.i,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Aa)return;b=pa(b[1]);if(this.v=Ra(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.B=d.receiveData){this.status(this.ia+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ea=function(a,b){if(!b)if(this.Gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.da=function(a){return a?this.save():!0};h.reset=function(){Ne(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Ne(this)};function Ne(a){a.w=0;a.b=0;a.c=128;a.h=[];return!0}h.ub=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.u%a,this.K&&(b=" ".slice(0,c)));this.G&&!this.u&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.u+=c}else if(null!=this.o){if(10==a||1024<=this.o.length)this.R(this.o), +this.o="";10!=a&&(this.o+=String.fromCharCode(a))}this.c&=-129;yb(this.a,this.N,1E3/Math.round(this.I/10))}};var Oe={},Me=(Oe[65392]=[null,null,Z.prototype.zc,Z.prototype.md,"RCSR"],Oe[65394]=[null,null,Z.prototype.yc,Z.prototype.ld,"RBUF"],Oe[65396]=[null,null,Z.prototype.Nc,Z.prototype.Ad,"XCSR"],Oe[65398]=[null,null,Z.prototype.Mc,Z.prototype.zd,"XBUF"],Oe);x(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.m[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.m[b]=c,c.onclick=function(){var a= +d.m.listTapes;a&&Re(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.I){c.parentNode.removeChild(c);break}this.m[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Re(d,n(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.m[b]=c,!0}return!1}; +h.ba=function(a,b,c,d){this.i=a;this.l=b;this.a=c;this.D=d;this.M=Se(a);var e=this;if((this.c=Vb(this.i,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){r("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.G=zb(56,4);this.P=wb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):u()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!q(f,null,!0,function(e,f,g){var k=0>g&&a.i&&!a.i.j.O;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Qa(a.ia,e,f),(e=va(e,f))&&af(a,b,c,d,e.L,e.aa,e.$)); +a.j.jb=!1;a.o&&(a.o--,a.o||G(a));Ye(a)})}function Ve(a,b,c,d){if((a=a.m.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.fa);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=u()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.mb?"":e)+"&format=json"));return!!q(f, +null,!0,function(b,c,d){hf(a,b,c,d)})} +function hf(a,b,c,d){var e=null;a.l=!1;var f=0>d&&a.i&&!a.i.j.O;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Qa(a.controller.ia,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)r(k[0]);else{a.fa=k.length;a.ca=k[0].length;a.Y=k[0][0].length;var m=k[0][0][0];a.ma=m&&m.length||512;for(d=c=0;d>2,t=m.pattern;void 0===t&&(t=m.pattern=0);var w=m.data;if(void 0===w){var F=m.bytes;if(void 0!==F&&F.length){for(var R=p<<2,ta=F.length;ta>2,e=Array(d),f=0;f>2,g=(k>((f&3)<<3)&255;f=g;if(0>f)break;d|=f<=this.a.length||m>=this.a[k].length||p>=this.a[k][m].length){c="sector (CHS="+k+":"+m+":"+p+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.l){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][m][p]){for(m=k.data.length;mb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.oa+": "+c);return b}; +cf.prototype.toJSON=function(){var a;a=0;for(var b;b=kf(this,a++);)mf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function mf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Eb(a){y.call(this,"RL11",a,Eb);this.c=a.autoMount||null;this.g=0;this.b=Array(1);this.h=!Ba("Mobi")&&window&&"FileReader"in window}A(Eb);h=Eb.prototype; +h.V=function(a,b,c){var d=this;switch(b){case "listDisks":return this.m[b]=c,c.onchange=function(){var a=d.m.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){r("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.m[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&nf(d,a)},!0;case "loadDrive":return this.m[b]= +c,c.onclick=function(){var a=d.m.listDisks;a&&of(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.h){c.parentNode.removeChild(c);break}this.m[b]=c;c.onclick=function(){var a=d.m.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ab){var b;b="";for(var c=0,k;k=kf(a,c++);)for(var m=0,p=k.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nf(this,0)}}return!0};h.da=function(a){return a?this.save():!0}; +h.reset=function(){for(var a=0;ae||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}tf(a,e,b,c,!1,d)}else sf(a,e)} +function tf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.za.toLowerCase()!=d.toLowerCase()&&(g++,sf(a,b,!0),k.lb?a.C("RL11 busy"):(k.lb=!0,e&&(k.kb=!0,a.g++),k.cb=!!f,gf(new cf(a,k,"preload"),c,d,f,a.Xb)&&g++));return g} +h.Xb=function(a,b,c,d,e){var f;a.lb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.fa||f[1]>a.ca)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.qb)),b=null);b?(a.ab=b,a.oa=c,a.za=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.qb),a.kb||e),this.i&&dc(this.i)):a.cb=!1;a.kb&&(a.kb=!1,--this.g||G(this));nf(this,a.qb)}; +function qf(a,b,c,d){if((a=a.m.listDisks)&&a.options){for(var e=0;e\nLicense: GPL version 3 or later ");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bwf){if(yf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");yf(this.h)&&(Df(this,d),a=2,Ef(this.h));this.h.set("timestamp",sa());Ff(this.h);var e=this.b&&!this.o;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Cf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?yf(d,g):("error"== +f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.R(f+": "+g),Ef(d),yf(d)?(c=Cf(d),e=!0):c=!1))}e&&Bf(this,c?d:null)}else 2==a&&d.clear()}else Bf(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.j.O=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.a&&(Gf(this,this.a,b,c,a),this.a.Ma());this.G&&(Df(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.i=0}; +function Df(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.N;d.user=c;d.type="bug";d.data=b;q("http://www.pcjs.org/api/v1/report",d,!0)}} +function Jf(a,b,c){var d,e="none";if(a.i)return null;a.i--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.da&&(c&&H(a.a),d=a.a.da(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=B(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=k[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Qf(a,b,c)}})}else c(a,null)} +function Rf(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Nf||Ha(!0));m=!1}var g,k,m=!0;Nf++;Pa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));t.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,k){k?Of(c,null,null,!1,e,function(d,m){m?(Qa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--Nf||Ha(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Nf||Ha(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Of(b,a,d,!0,e,p):Pf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(F){f(F.message)}return m}window.embedPDP11=function(a,b,c,d){Ha(!1);return Rf(a,b,c,d)};window.enableEvents=Ha;window.sendEvent=Ia;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From 04be27b47b7aea007eec35ffa39fa2d7394cf8d4 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 25 Oct 2016 14:40:33 -0700 Subject: [PATCH 02/30] Added some RL11 register definitions --- apps/pdp11/boot/test/BOOTTEST.mac | 6 +- devices/pdp11/rl11/default.xml | 4 +- modules/pdp11/lib/cpustate.js | 4 +- modules/pdp11/lib/defines.js | 80 +++++++++++- modules/pdp11/lib/rl11.js | 47 ++++--- versions/pdpjs/1.30.2/pdp11-dbg.js | 193 +++++++++++++++-------------- versions/pdpjs/1.30.2/pdp11.js | 79 ++++++------ 7 files changed, 249 insertions(+), 164 deletions(-) diff --git a/apps/pdp11/boot/test/BOOTTEST.mac b/apps/pdp11/boot/test/BOOTTEST.mac index fc808cbaa..5a32b52bb 100644 --- a/apps/pdp11/boot/test/BOOTTEST.mac +++ b/apps/pdp11/boot/test/BOOTTEST.mac @@ -369,9 +369,9 @@ BOOT: ; 142062 BIS R0,R3 ; PUT DIGIT INTO UNIT BR 7$ 9$: CLR R2 - MOV #137,(R2)+ - MOV #START,(R2)+ + MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 MOV #START,(R2)+ + MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 CLR (R2)+ CMPB R1,#'K BEQ BOOTRK @@ -385,7 +385,7 @@ BOOT: ; 142062 RTS PC RLCS=174400 -BOOTRL: ; 142234 +BOOTRL: ; 142326 RESET SWAB R3 ; UNIT NUMBER MOV #RLCS,R1 ; CSR diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml index 4cdd2817c..b70668bc1 100644 --- a/devices/pdp11/rl11/default.xml +++ b/devices/pdp11/rl11/default.xml @@ -1,10 +1,10 @@ - + Disk Drive Controls - + Load diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 869238cd0..344fb21f1 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -203,7 +203,7 @@ CPUStatePDP11.prototype.initRegs = function() 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; - this.regsControl = [ // various control registers we don't really care about + this.regsControl = [ // various control registers (177740-177756) we don't really care about 0, 0, 0, 0, 0, 0, 0, 0 ]; this.regMB = 0; @@ -1194,7 +1194,7 @@ CPUStatePDP11.prototype.trap = function(vector, reason) this.trapPSW = -1; // reset flag that we have a trap within a trap /* - * These next properties are purely for bookkeeping purposes; see getTrapStatus() + * These next properties are purely an aid for the Debugger; see getTrapStatus() */ this.opFlags |= PDP11.OPFLAG.TRAP; this.trapVector = vector; diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 27001524f..e1848f6f8 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -431,6 +431,11 @@ var PDP11 = { MMR3: 0o172516, // 772516 17772516 + RLCS: 0o174400, // RL11 Control Status + RLBA: 0o174402, // RL11 Bus Address + RLDA: 0o177404, // RL11 Disk Address + RLMP: 0o177406, // RL11 Multi-Purpose + LKS: 0o177546, // KW11-L Clock Status PRS: 0o177550, // PC11 (and PR11) Reader Status Register @@ -597,8 +602,79 @@ var PDP11 = { }, }, RL11: { // RL11 Disk Controller - PRI: 5, // TODO: Review controller defaults and their configurability - VEC: 0o160 + PRI: 5, + VEC: 0o160, + RLCS: { // Control Status Register (174400) + DRDY: 0x0001, // Drive Ready (R/O) + FUNC: 0x000E, // Function Code (F2,F1,F0) (R/W) + BAE: 0x0030, // Bus Address Extension bits (BA17,BA16) (R/W) + IE: 0x0040, // Interrupt Enable (R/W) + CRDY: 0x0080, // Controller Ready (R/W) + DS: 0x0300, // Drive Select (DS1,DS0) (R/W) + ERRC: 0x3C00, // Error Code (R/O) + DE: 0x4000, // Drive Error (R/O) + ERR: 0x8000, // Composite Error (R/O) + CLEAR: 0x3F7E, // bits cleared on INIT (bits 1-6 and 8-13 are cleared) + SET: 0x0080, // bits set on INIT (bit 7 is set) + RMASK: 0xFFFF, // no write-only bits + WMASK: 0x03FE, // bits writable + }, + RLBA: { // Bus Address Register (174402) + WMASK: 0xFFFE // bit 0 is effectively not writable (always zero) + }, + /* + * This register has 3 formats: one for Seek, another for Read/Write, and a third for Get Status + */ + RLDA: { // Disk Address Register (174404) + SEEK_CMD: 0x0001, // Seek: bit 0 must be set, bits 1 and 3 must be clear + SEEK_DIR: 0x0004, // Direction (clear to move heads away from spindle (lower cylinder), set to move to higher cylinder) + SEEK_HS: 0x0010, // Head Select (clear to select upper head, set to select lower head) + SEEK_CAD: 0xFF80, // Cylinder Address Difference + RW_SA: 0x003F, // Sector Address + RW_HS: 0x0040, // Head Select + RW_CA: 0xFF80, // Cylinder Address (RL01 has 256 cylinders, RL02 has 512) + GS_CMD: 0x0003, // Get Status: bit 0 must be set, bit 1 set, and bits 2 and 4-7 clear (bits 8-15 unused) + GS_RST: 0x0008 // Reset (when set, clears error register before sending status word to controller) + }, + /* + * This register has 3 formats: one for Read Header, another for Read/Write, and a third for Get Status + */ + RLMP: { + GS_ST: 0x0007, // Major State Code + GS_BH: 0x0008, // Brushes Home + GS_HO: 0x0010, // Heads Out + GS_CO: 0x0020, // Cover Open (or dust cover is not in place) + GS_HS: 0x0040, // Head Selected (0 for upper head, 1 for lower head) + GS_DT: 0x0080, // Drive Type (0 for RL01, 1 for RL02) + GS_DSE: 0x0100, // Drive Select Error + GS_VC: 0x0200, // Volume Check + GS_WGE: 0x0400, // Write Gate Error + GS_SPE: 0x0800, // Spin Error + GS_SKTO: 0x1000, // Seek Time-Out + GS_WL: 0x2000, // Write Lock + GS_CHE: 0x4000, // Current Head Error + GS_WDE: 0x8000 // Write Data Error + }, + FUNC: { // NOTE: These function codes are pre-shifted to write directly into RLCS.FUNC + NOP: 0b0000, // No-Op + WCHK: 0b0010, // Write Check + STATUS: 0b0100, // Get Status + SEEK: 0b0110, // Seek + RHDR: 0b1000, // Read Header + WDATA: 0b1010, // Write Data + RDATA: 0b1100, // Read Data + RDNC: 0b1110 // Read Data without Header Check + }, + ERRC: { // NOTE: These error codes are pre-shifted to read directly from RLCS.ERRC + OPI: 0x0400, // Operation Incomplete + DCRC: 0x0800, // Read Data CRC + WCE: 0x0800, // Write Check Error + HCRC: 0x0C00, // Header CRC + DLT: 0x1000, // Data Late + HNF: 0x1400, // Header Not Found + NXM: 0x2000, // Non-Existent Memory + MPE: 0x2400 // Memory Parity Error (RLV12 only) + } } }; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index 541201326..52482f566 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -273,6 +273,13 @@ RL11.prototype.initBus = function(cmp, bus, cpu, dbg) } } + /* + * If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification, + * at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need + * to do here is call setReady(). + */ + this.initController(); + this.triggerReaderInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI); bus.addIOTable(this, RL11.UNIBUS_IOTABLE); @@ -296,6 +303,23 @@ RL11.prototype.getDriveName = function(iDrive) return "RL" + iDrive; }; +/** + * getDriveNumber(sDrive) + * + * @this {RL11} + * @param {string} sDrive + * @return {number} (0-3, or -1 if error) + */ +RL11.prototype.getDriveNumber = function(sDrive) +{ + var iDrive = -1; + if (sDrive) { + iDrive = sDrive.charCodeAt(sDrive.length - 1) - 0x30; + if (iDrive < 0 || iDrive > 9) iDrive = -1; + } + return iDrive; +}; + /** * powerUp(data, fRepower) * @@ -332,11 +356,6 @@ RL11.prototype.powerUp = function(data, fRepower) for (var iDrive = 0; iDrive < this.nDrives; iDrive++) { var controlOption = document.createElement("option"); controlOption.value = iDrive; - /* - * TODO: This conversion of drive number to drive letter, starting with A:, is very simplistic - * and will NOT match the drive mappings that DOS ultimately uses. We'll need to spiff this up at - * some point. - */ controlOption.text = this.getDriveName(iDrive); controlDrives.appendChild(controlOption); } @@ -431,8 +450,7 @@ RL11.prototype.initController = function(data) */ RL11.prototype.saveController = function() { - var data = []; - return data; + return []; }; /** @@ -502,11 +520,7 @@ RL11.prototype.autoMount = function(fRemount) var sDiskPath = configDrive['path'] || ""; var sDiskName = configDrive['name'] || this.findDisk(sDiskPath); if (sDiskPath && sDiskName) { - /* - * WARNING: This conversion of drive letter to drive number, starting with A:, is very simplistic - * and is not guaranteed to match the drive mapping that DOS ultimately uses. - */ - var iDrive = sDrive.charCodeAt(0) - 0x41; + var iDrive = this.getDriveNumber(sDrive); if (iDrive >= 0 && iDrive < this.aDrives.length) { if (!this.loadDrive(iDrive, sDiskName, sDiskPath, true) && fRemount) { this.setReady(false); @@ -668,7 +682,7 @@ RL11.prototype.doneLoadDrive = function onLoadDrive(drive, disk, sDiskName, sDis * For a local disk (ie, one loaded via mountDrive()), the disk.restore() performed by addDiskHistory() * may have altered the disk geometry, so refresh the disk info. */ - aDiskInfo = disk.info(); + // aDiskInfo = disk.info(); /* * Clearly, a successful mount implies a disk change, and I suppose that, technically, an *unsuccessful* @@ -684,9 +698,6 @@ RL11.prototype.doneLoadDrive = function onLoadDrive(drive, disk, sDiskName, sDis /* * With the addition of notify(), users are now "alerted" whenever a disk has finished loading; * notify() is selective about its output, using print() if a print window is open, alert() otherwise. - * - * WARNING: This conversion of drive number to drive letter, starting with A:, is very simplistic - * and will not match the drive mappings that DOS ultimately uses (ie, for drives beyond B:). */ this.notice("Mounted disk \"" + sDiskName + "\" in drive " + this.getDriveName(drive.iDrive), drive.fAutoMount || fAutoMount); @@ -832,10 +843,6 @@ RL11.prototype.unloadDrive = function(iDrive, fLoading) // this.regInput |= FDC.REG_INPUT.DISK_CHANGE; - /* - * WARNING: This conversion of drive number to drive letter, starting with A:, is very simplistic - * and is not guaranteed to match the drive mapping that DOS ultimately uses. - */ if (!fLoading) { this.notice("Drive " + this.getDriveName(iDrive) + " unloaded", fLoading); this.sDiskSource = RL11.SOURCE.NONE; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index 21a9571dc..12bb5fd22 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -161,11 +161,11 @@ function cg(a){r.call(this,"ROM",a,cg);this.ga=this.f=null;this.C=a.addr;this.g= cg.prototype.za=function(){this.ga&&(this.i&&eg(this.i,this.id,this.C,this.g,this.ga),delete this.ga);return!0};cg.prototype.ya=function(){return!0}; function dg(a){if(!sb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)ub(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(ac(a.w,b,a.g,Hc)){var c;for(c=0;c>>a.ka;0>>a.ka;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,q=b[h++]&255|(b[h++]&255)<<8,m=m+((n&255)+(n>>8)+(q&255)+(q>>8)),w=h,v=n-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(v)for(;v--;)a.b.fb(q++,b[w++]&255);else q&1?a.b.ia():kd(a.b,q,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&lc(e.b,e.la))});this.ma=nc(52,4);this.Z=kc(this.b,function(){e.g|=128;e.g&64&&lc(e.b,e.ma)});hc(b,this,Dg);G(this)}; @@ -204,105 +204,106 @@ function ch(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f k.qa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.F[b]=c,c.onchange=function(){var a=d.F.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){p("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.F[b]=c,c.onchange=function(){var a=pa(c.value,10);null!=a&&dh(d,a)},!0;case "loadDrive":return this.F[b]= c,c.onclick=function(){var a=d.F.listDisks;a&&eh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.C){c.parentNode.removeChild(c);break}this.F[b]=c;c.onclick=function(){var a=d.F.listDrives;if(a&&a.options&&d.f)if(a=d.f[pa(a.value,10)||0])if(a=a.Hb){var b;b="";for(var c=0,h;h=ah(a,c++);)for(var m=0,n=h.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";dh(this,0)}}return!0};k.ya=function(a){return a?this.save():!0}; -k.reset=function(){for(var a=0;ae||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}jh(a,e,b,c,!1,d)}else ih(a,e)} -function jh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.Xa.toLowerCase()!=d.toLowerCase()&&(g++,ih(a,b,!0),h.Yb?a.O("RL11 busy"):(h.Yb=!0,e&&(h.Xb=!0,a.A++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ib=!!f,Yg(new Ug(a,h,"preload"),c,d,f,a.Jc)&&g++));return g} +c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;eh(d,ra(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.wa=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.g=Uc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(e){p("RL11 auto-mount error: "+e.message+" ("+this.g+")"),this.g=null}fh(this);this.P=nc(112,5);hc(b,this,gh);hh(this,"None","",!0);this.C&&hh(this,"Local Disk","?");hh(this,"Remote Disk","??");ih(this)||G(this)}; +k.za=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.lc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";dh(this,0)}}return!0};k.ya=function(a){return a?this.save():!0};k.reset=function(){fh(this)};k.save=function(){return(new O(this)).data()}; +k.restore=function(){return!0};function fh(a){for(var b=0;bg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}kh(a,e,b,c,!1,d)}else jh(a,e)} +function kh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.Xa.toLowerCase()!=d.toLowerCase()&&(g++,jh(a,b,!0),h.Yb?a.O("RL11 busy"):(h.Yb=!0,e&&(h.Xb=!0,a.A++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ib=!!f,Yg(new Ug(a,h,"preload"),c,d,f,a.Jc)&&g++));return g} k.Jc=function(a,b,c,d,e){var f;a.Yb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.Ha||f[1]>a.Da)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.$b)),b=null);b?(a.Hb=b,a.Oa=c,a.Xa=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.$b),a.Xb||e),this.B&&this.B.gb()):a.Ib=!1;a.Xb&&(a.Xb=!1,--this.A||G(this));dh(this,a.$b)}; -function gh(a,b,c,d){if((a=a.F.listDisks)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};kh.prototype.oc=function(){return-1};kh.prototype.pc=function(){}; -function mh(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} -function nh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +function hh(a,b,c,d){if((a=a.F.listDisks)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};lh.prototype.oc=function(){return-1};lh.prototype.pc=function(){}; +function nh(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} +function oh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function oh(a,b,c){var d;if(b){b=ph(a,b);for(var e=0,f=!1,g=b,h=[],m=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function sh(a,b){if(b)return rh(a,b,a.S[b]);var c=0;for(b in a.S)rh(a,b,a.S[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function th(a,b){if(b)return sh(a,b,a.S[b]);var c=0;for(b in a.S)sh(a,b,a.S[b]),c++;return 0this.b.mb?Bh:[];Ch(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.aa(Dh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var q=b[e];q.type==c?n++||d.j("..."):(c=q.type,n=ec[c],q&&d.j(l(q.id,8)+" %"+l(e<this.b.mb?Ch:[];Dh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.aa(Eh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var q=b[e];q.type==c?n++||d.j("..."):(c=q.type,n=ec[c],q&&d.j(l(q.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Na[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Bb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Db).D));this.na&1073741824?this.ra.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ra=0,a.B.da()))};function vh(a){var b;if(!ae(a))a.G&&a.G.length&&a.j("instruction history buffer freed"),a.Y=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Y(this.b.u[7]);a&&1!=this.R?Kh(this):Lh(this)}};function Jh(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.v.ha?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.fa?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.za=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.ya=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){vh(this);this.sa=0;this.ba=null;this.J=0;this.K=Y(this.b.u[7]);this.v.fa=!1;Mh(this);a||this.da()};k.save=function(){var a=new O(this);a.set(0,Fh(this.K));a.set(1,Fh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Gh(a[b++]),this.N=Gh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.v.fa=!0;this.xb=a;this.yb=b}; -k.stop=function(a,b){if(this.v.fa){this.v.fa=!1;this.J=b-this.yb;if(!this.R){b="stopped";if(this.J){a-=this.xb;var c=0d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Na[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Bb(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Db).D));this.na&1073741824?this.ra.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ra=0,a.B.da()))};function wh(a){var b;if(!ae(a))a.G&&a.G.length&&a.j("instruction history buffer freed"),a.Y=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Y(this.b.u[7]);a&&1!=this.R?Lh(this):Mh(this)}};function Kh(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.v.ha?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.fa?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.za=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.ya=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wh(this);this.sa=0;this.ba=null;this.J=0;this.K=Y(this.b.u[7]);this.v.fa=!1;Nh(this);a||this.da()};k.save=function(){var a=new O(this);a.set(0,Gh(this.K));a.set(1,Gh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Hh(a[b++]),this.N=Hh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.v.fa=!0;this.xb=a;this.yb=b}; +k.stop=function(a,b){if(this.v.fa){this.v.fa=!1;this.J=b-this.yb;if(!this.R){b="stopped";if(this.J){a-=this.xb;var c=0d&&(d=a.b.lb(b)),65535!=(d&65535)&&(c=a.G[a.Y],c.D=b,c.Ga=!1,++a.Y==a.G.length&&(a.Y=0)));return!1}function cc(a){var b=a.b;if(b.v.fa)throw N(b,a.b.Db),a.ia(),-1;return!1} -function uh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.Ya=0}k.cb=function(a,b,c){var d=!0;c||Nh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].cb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Ga=!0:(Oh(this,a,a.length-1,"set"),vh(this)));return d}; -function Nh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.Ga||vh(a);break}}return f}function Ph(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), -z&63)switch(z=B&7,B&56){case 0:y=Ih(z);break;case 8:y="@"+Ih(z);break;case 16:7>z?y="("+Ih(z)+")+":(B=x.oa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Ih(z)+")+":(B=x.oa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Ih(z)+")";break;case 40:y="@-("+Ih(z)+")";break;case 48:B=x.oa(v,2);y=J(x,B,0,!0)+"("+Ih(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.oa(v,2),y="@"+J(x,B)+"("+Ih(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); -0b?(c=Ih(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Na[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Aa[b-16]):20==b&&(c="PS="+J(a,Bb(d)));c&&(c+=" ");return c}function Uh(a){var b,c="";for(b=0;6>b;b++)c+=Th(a,b);c=c+"\n"+(Th(a,6)+Th(a,7)+Th(a,20));return c+=Sh(a,"T")+Sh(a,"N")+Sh(a,"Z")+Sh(a,"V")+Sh(a,"C")}k.ic=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],w=za(q,m,a.ic);0>w&&q.splice(-(w+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({we:b,D:c,Pc:d,ga:e,gc:f})}function Vh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Pc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Uh(a));c&&(a.K=Y(d.u[7]),Lh(a,J(a,a.K.D)))}}function Zh(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Rh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} -function Qh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(sb(a)&&0q||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);ea-=Z;0>ea&&(null==ma[ma.length-1].D?(Z=ea+Z,ea=0):ea+=ma.length);var xd=[];"call"==kg&&(Db=1E5,xd=["CALL"]);for(void 0!==jg&&a.j(Z+" instructions earlier:");0=ma.length&&(ea=0);a.bb=Z;mg++;Db--}}mg||(a.j("no "+lg+"history available"),a.bb=void 0)}else{var Fb=Dh(a,la);if(Fb){var vc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||si),vc=qh(a,La)>>>0,65536>4||1;ui--&&0zc?String.fromCharCode(zc):".";wc-=yc}Gb&&(Gb+="\n");Gb+=la+" "+yd+(0==Ib?" "+pg:"")}Gb&&a.j(Gb);a.$a=Fb}}}}break;case "e":if("else"==g[0])break;var gb,zd,Ad,Bd,Cd=g[0],Dd=g[1];"eb"==Cd?(gb=1,zd=255,Ad=a.zb,Bd=a.Qb):"e"==Cd||"ew"==Cd?(gb=2,zd=65535,Ad=a.oa,Bd=a.hb):Dd=null;if(null==Dd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ac=Dh(a,Dd);if(Ac)for(var Bc=2;BcGd;){for(var Ma=null,yi=256;65536>Lb.D>>>0;){Hd.D=a.oa(Lb,2);if(null==Lb.D||!yi--)break;if(!(Hd.D&1)){for(var zi=a,Cc=Hd,rg=null,Mb=Cc.D,sg=Mb,Id=1;6>=Id&&Mb;Id++){if(2>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.Ya=0}k.cb=function(a,b,c){var d=!0;c||Oh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].cb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Ga=!0:(Ph(this,a,a.length-1,"set"),wh(this)));return d}; +function Oh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.Ga||wh(a);break}}return f}function Qh(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), +z&63)switch(z=B&7,B&56){case 0:y=Jh(z);break;case 8:y="@"+Jh(z);break;case 16:7>z?y="("+Jh(z)+")+":(B=x.oa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Jh(z)+")+":(B=x.oa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Jh(z)+")";break;case 40:y="@-("+Jh(z)+")";break;case 48:B=x.oa(v,2);y=J(x,B,0,!0)+"("+Jh(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.oa(v,2),y="@"+J(x,B)+"("+Jh(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); +0b?(c=Jh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Na[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Aa[b-16]):20==b&&(c="PS="+J(a,Bb(d)));c&&(c+=" ");return c}function Vh(a){var b,c="";for(b=0;6>b;b++)c+=Uh(a,b);c=c+"\n"+(Uh(a,6)+Uh(a,7)+Uh(a,20));return c+=Th(a,"T")+Th(a,"N")+Th(a,"Z")+Th(a,"V")+Th(a,"C")}k.ic=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],w=za(q,m,a.ic);0>w&&q.splice(-(w+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({we:b,D:c,Pc:d,ga:e,gc:f})}function Wh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Pc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Vh(a));c&&(a.K=Y(d.u[7]),Mh(a,J(a,a.K.D)))}}function $h(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Sh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} +function Rh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(sb(a)&&0q||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);ea-=Z;0>ea&&(null==ma[ma.length-1].D?(Z=ea+Z,ea=0):ea+=ma.length);var xd=[];"call"==lg&&(Db=1E5,xd=["CALL"]);for(void 0!==kg&&a.j(Z+" instructions earlier:");0=ma.length&&(ea=0);a.bb=Z;ng++;Db--}}ng||(a.j("no "+mg+"history available"),a.bb=void 0)}else{var Fb=Eh(a,la);if(Fb){var vc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||ti),vc=rh(a,La)>>>0,65536>4||1;vi--&&0zc?String.fromCharCode(zc):".";wc-=yc}Gb&&(Gb+="\n");Gb+=la+" "+yd+(0==Ib?" "+qg:"")}Gb&&a.j(Gb);a.$a=Fb}}}}break;case "e":if("else"==g[0])break;var gb,zd,Ad,Bd,Cd=g[0],Dd=g[1];"eb"==Cd?(gb=1,zd=255,Ad=a.zb,Bd=a.Qb):"e"==Cd||"ew"==Cd?(gb=2,zd=65535,Ad=a.oa,Bd=a.hb):Dd=null;if(null==Dd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ac=Eh(a,Dd);if(Ac)for(var Bc=2;BcGd;){for(var Ma=null,zi=256;65536>Lb.D>>>0;){Hd.D=a.oa(Lb,2);if(null==Lb.D||!zi--)break;if(!(Hd.D&1)){for(var Ai=a,Cc=Hd,sg=null,Mb=Cc.D,tg=Mb,Id=1;6>=Id&&Mb;Id++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bdi){if(fi(d,this.J)){this.C=new O(this,"1.30.2","failsafe");fi(this.C)&&(ki(this,d),a=2,li(this.C));this.C.set("timestamp",Ba());mi(this.C);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ji(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fi(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.g=null)):this.j(f+": "+g),li(d),fi(d)?(c=ji(d),e=!0):c=!1))}e&&ii(this,c?d:null)}else 2==a&&d.clear()}else ii(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.v.ha=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(ni(this,this.b,b,c,a),this.b.ib());this.P&&(ki(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; -function ki(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function ai(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.2"),g=new O(a,"1.30.2","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ya&&(c&&a.b.ia(),d=a.b.ya(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var h=nb(a.id),m=0;m\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bei){if(gi(d,this.J)){this.C=new O(this,"1.30.2","failsafe");gi(this.C)&&(li(this,d),a=2,mi(this.C));this.C.set("timestamp",Ba());ni(this.C);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ki(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.g=null)):this.j(f+": "+g),mi(d),gi(d)?(c=ki(d),e=!0):c=!1))}e&&ji(this,c?d:null)}else 2==a&&d.clear()}else ji(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.v.ha=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(oi(this,this.b,b,c,a),this.b.ib());this.P&&(li(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; +function li(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function bi(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.2"),g=new O(a,"1.30.2","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ya&&(c&&a.b.ia(),d=a.b.ya(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var h=nb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(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 m=h[0],n,q=/( [a-z]+=)(['"])(.*?)\2/g;n=q.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Fi(a,b,c)}})}else c(a,null)} -function Gi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);m&&(--ri||Ya(!0));m=!1}var g,h,m=!0;ri++;lb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=n:w.appendChild(document.createTextNode(n));q.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Di(c,null,null,!1,e,function(d,m){m?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--ri||Ya(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--ri||Ya(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Di(b,a,d,!0,e,n):Ei(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Ya(!1);return Gi(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=Za;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +Wa(function(){for(var a=D(document,"pdp11-machine"),b=0;bf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(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 m=h[0],n,q=/( [a-z]+=)(['"])(.*?)\2/g;n=q.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Gi(a,b,c)}})}else c(a,null)} +function Hi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);m&&(--si||Ya(!0));m=!1}var g,h,m=!0;si++;lb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=n:w.appendChild(document.createTextNode(n));q.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Ei(c,null,null,!1,e,function(d,m){m?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--si||Ya(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--si||Ya(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ei(b,a,d,!0,e,n):Fi(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Ya(!1);return Hi(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=Za;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index b2aef6efe..7e44c9bd7 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -172,8 +172,8 @@ function Te(a,b){b|=0;if(b!==a.K){var c=a.m.readProgress;c&&(c=(c=E(c,"pcjs-prog function Ze(a,b){if(a.h||!1===b)a.F="",a.h="",b||(a.g&&a.status(1==a.g?"tape detached":"tape unloaded"),a.u=Pe,a.g=Qe,Ye(a))}h.save=function(){return(new P(this)).data()};h.restore=function(){return!0};h.sc=function(){return this.b&65534};h.ed=function(a){a&1&&(this.b&32768?(a&=-2,this.b&64&&xb(this.a,this.G)):(this.b&=-129,this.b|=2048,this.B=0,yb(this.a,this.P,1E3/Math.round(this.N/10))));this.b=this.b&-66|a&65};h.rc=function(){this.b&=-129;this.b|=2048;return this.B};h.dd=function(){}; var bf={},Ue=(bf[65384]=[null,null,Db.prototype.sc,Db.prototype.ed,"PRS"],bf[65386]=[null,null,Db.prototype.rc,Db.prototype.dd,"PRB"],bf);function cf(a,b,c){y.call(this,"Disk",{id:a.ia+".disk"+l(++df,4)},cf);this.controller=a;this.i=a.i;this.D=a.D;this.g=b;this.oa=b.name;this.mb=b.mb;ef(this,c,b.fa,b.ca,b.Y,b.ma);G(this)}var df=0;A(cf);cf.prototype.ba=function(a,b,c,d){this.D=d}; function ef(a,b,c,d,e,f){a.mode=b;a.fa=c;a.ca=d;a.Y=e;a.ma=f;a.a=[];if("preload"!=a.mode){b=Array(a.fa);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.fa);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=u()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.mb?"":e)+"&format=json"));return!!q(f, +function gf(a,b,c,d,e){var f=c;if(a.b)return!0;a.oa=b;a.za=c;a.Qb=n(c);a.b=e;a.h=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.fa=e[0];a.ca=e[1];a.Y=e[2];a.ma=e[3]||512;c=a.ma>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.fa);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=u()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.mb?"":e)+"&format=json"));return!!q(f, null,!0,function(b,c,d){hf(a,b,c,d)})} function hf(a,b,c,d){var e=null;a.l=!1;var f=0>d&&a.i&&!a.i.j.O;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Qa(a.controller.ia,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(k.length)if(1==k.length)r(k[0]);else{a.fa=k.length;a.ca=k[0].length;a.Y=k[0][0].length;var m=k[0][0][0];a.ma=m&&m.length||512;for(d=c=0;d>2,t=m.pattern;void 0===t&&(t=m.pattern=0);var w=m.data;if(void 0===w){var F=m.bytes;if(void 0!==F&&F.length){for(var R=p<<2,ta=F.length;ta'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.m[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&nf(d,a)},!0;case "loadDrive":return this.m[b]= c,c.onclick=function(){var a=d.m.listDisks;a&&of(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.h){c.parentNode.removeChild(c);break}this.m[b]=c;c.onclick=function(){var a=d.m.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ab){var b;b="";for(var c=0,k;k=kf(a,c++);)for(var m=0,p=k.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nf(this,0)}}return!0};h.da=function(a){return a?this.save():!0}; -h.reset=function(){for(var a=0;ae||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}tf(a,e,b,c,!1,d)}else sf(a,e)} -function tf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.za.toLowerCase()!=d.toLowerCase()&&(g++,sf(a,b,!0),k.lb?a.C("RL11 busy"):(k.lb=!0,e&&(k.kb=!0,a.g++),k.cb=!!f,gf(new cf(a,k,"preload"),c,d,f,a.Xb)&&g++));return g} +c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;of(d,n(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +h.ba=function(a,b,c,d){this.i=a;this.l=b;this.a=c;this.D=d;if((this.c=Vb(this.i,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(e){r("RL11 auto-mount error: "+e.message+" ("+this.c+")"),this.c=null}pf(this);this.G=zb(112,5);tb(b,this,qf);rf(this,"None","",!0);this.h&&rf(this,"Local Disk","?");rf(this,"Remote Disk","??");sf(this)||G(this)}; +h.ea=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.i.Eb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nf(this,0)}}return!0};h.da=function(a){return a?this.save():!0};h.reset=function(){pf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(){return!0};function pf(a){for(var b=0;bg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}uf(a,e,b,c,!1,d)}else tf(a,e)} +function uf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.za.toLowerCase()!=d.toLowerCase()&&(g++,tf(a,b,!0),k.lb?a.C("RL11 busy"):(k.lb=!0,e&&(k.kb=!0,a.g++),k.cb=!!f,gf(new cf(a,k,"preload"),c,d,f,a.Xb)&&g++));return g} h.Xb=function(a,b,c,d,e){var f;a.lb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.fa||f[1]>a.ca)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.qb)),b=null);b?(a.ab=b,a.oa=c,a.za=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.qb),a.kb||e),this.i&&dc(this.i)):a.cb=!1;a.kb&&(a.kb=!1,--this.g||G(this));nf(this,a.qb)}; -function qf(a,b,c,d){if((a=a.m.listDisks)&&a.options){for(var e=0;e\nLicense: GPL version 3 or later ");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bwf){if(yf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");yf(this.h)&&(Df(this,d),a=2,Ef(this.h));this.h.set("timestamp",sa());Ff(this.h);var e=this.b&&!this.o;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Cf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?yf(d,g):("error"== -f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.R(f+": "+g),Ef(d),yf(d)?(c=Cf(d),e=!0):c=!1))}e&&Bf(this,c?d:null)}else 2==a&&d.clear()}else Bf(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.j.O=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.a&&(Gf(this,this.a,b,c,a),this.a.Ma());this.G&&(Df(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.i=0}; -function Df(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.N;d.user=c;d.type="bug";d.data=b;q("http://www.pcjs.org/api/v1/report",d,!0)}} -function Jf(a,b,c){var d,e="none";if(a.i)return null;a.i--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.da&&(c&&H(a.a),d=a.a.da(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=B(a.id),m=0;m\nLicense: GPL version 3 or later ");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bxf){if(zf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");zf(this.h)&&(Ef(this,d),a=2,Ff(this.h));this.h.set("timestamp",sa());Gf(this.h);var e=this.b&&!this.o;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Df(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?zf(d,g):("error"== +f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.R(f+": "+g),Ff(d),zf(d)?(c=Df(d),e=!0):c=!1))}e&&Cf(this,c?d:null)}else 2==a&&d.clear()}else Cf(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.j.O=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.a&&(Hf(this,this.a,b,c,a),this.a.Ma());this.G&&(Ef(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.i=0}; +function Ef(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.N;d.user=c;d.type="bug";d.data=b;q("http://www.pcjs.org/api/v1/report",d,!0)}} +function Kf(a,b,c){var d,e="none";if(a.i)return null;a.i--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.da&&(c&&H(a.a),d=a.a.da(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=B(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=k[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Qf(a,b,c)}})}else c(a,null)} -function Rf(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Nf||Ha(!0));m=!1}var g,k,m=!0;Nf++;Pa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));t.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,k){k?Of(c,null,null,!1,e,function(d,m){m?(Qa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--Nf||Ha(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Nf||Ha(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Of(b,a,d,!0,e,p):Pf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(F){f(F.message)}return m}window.embedPDP11=function(a,b,c,d){Ha(!1);return Rf(a,b,c,d)};window.enableEvents=Ha;window.sendEvent=Ia;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +x(function(){for(var a=E(document,"pdp11-machine"),b=0;bf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=k[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Rf(a,b,c)}})}else c(a,null)} +function Sf(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Of||Ha(!0));m=!1}var g,k,m=!0;Of++;Pa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));t.appendChild(w)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,k){k?Pf(c,null,null,!1,e,function(d,m){m?(Qa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--Of||Ha(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Of||Ha(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pf(b,a,d,!0,e,p):Qf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(F){f(F.message)}return m}window.embedPDP11=function(a,b,c,d){Ha(!1);return Sf(a,b,c,d)};window.enableEvents=Ha;window.sendEvent=Ia;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From 8e1dd595eca107e8c590fa157e269dd5c32a5423 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 26 Oct 2016 13:25:02 -0700 Subject: [PATCH 03/30] Noticed some more problems in older (albeit unsupported) browsers --- modules/pcx86/lib/chipset.js | 5 ++++- modules/pcx86/lib/fdc.js | 9 ++++++++- modules/shared/lib/component.js | 9 +++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/pcx86/lib/chipset.js b/modules/pcx86/lib/chipset.js index da46f30cb..5d796a9c1 100644 --- a/modules/pcx86/lib/chipset.js +++ b/modules/pcx86/lib/chipset.js @@ -3461,7 +3461,10 @@ ChipSet.prototype.advanceDMA = function(channel, fInit) } if (!channel.masked) { chipset.bus.setByte(addrCur, b); - if (BACKTRACK) { + /* + * WARNING: Do NOT assume that obj is valid; if the sector data was not found, there will be no obj. + */ + if (BACKTRACK && obj) { if (!off && obj.file) { if (chipset.messageEnabled(Messages.DISK)) { chipset.printMessage("loading " + obj.file.sPath + '[' + obj.offFile + "] at %" + str.toHex(addrCur), true); diff --git a/modules/pcx86/lib/fdc.js b/modules/pcx86/lib/fdc.js index c4aafc8fb..88a200338 100644 --- a/modules/pcx86/lib/fdc.js +++ b/modules/pcx86/lib/fdc.js @@ -470,7 +470,14 @@ FDC.prototype.setBinding = function(sHTMLType, sBinding, control, sValue) } }); for (i = 0; i < aOptions.length; i++) { - control.options[i] = aOptions[i]; + try { + /* + * TODO: Determine why this line blows up in IE8; are the properties of an options object not settable in IE8? + */ + control.options[i] = aOptions[i]; + } catch(e) { + break; + } } } diff --git a/modules/shared/lib/component.js b/modules/shared/lib/component.js index f2ab6865e..da0b718c6 100644 --- a/modules/shared/lib/component.js +++ b/modules/shared/lib/component.js @@ -1077,6 +1077,15 @@ if (!Array.prototype.indexOf) { } } +/* + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray + */ +if (!Array.isArray) { + Array.isArray = function (arg) { + return Object.prototype.toString.call(arg) === '[object Array]'; + }; +} + /* * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind */ From 4132668bb28fa5dbb68d4e0925179321bb3be760 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 26 Oct 2016 13:26:46 -0700 Subject: [PATCH 04/30] Added missing @param --- modules/shared/lib/weblib.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index 435405d0e..0c683b730 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -286,6 +286,7 @@ web.getResource = function(sURL, dataPost, fAsync, done) /** * parseMemoryResource(sURL, sData) * + * @param {string} sURL * @param {string} sData * @return {Object|null} (resource) */ From 88b485d0941936eb76afade91147051af1775d22 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 27 Oct 2016 17:59:20 -0700 Subject: [PATCH 05/30] Added a variety of checks and automatic repairs to DiskDump, aimed primarily at issues I've come across with pre-DOS 2.0 diskettes (eg, diskettes without BPBs, like 160Kb diskettes from DOS 1.0 and 320Kb diskettes from DOS 1.1) --- modules/diskdump/lib/diskdump.js | 221 +++++++++++++++++++++++-------- modules/shared/lib/diskapi.js | 18 +-- versions/c1pjs/1.30.2/c1p-dbg.js | 5 +- versions/c1pjs/1.30.2/c1p.js | 2 +- 4 files changed, 182 insertions(+), 64 deletions(-) diff --git a/modules/diskdump/lib/diskdump.js b/modules/diskdump/lib/diskdump.js index 8530ee0ff..e7f5ada2d 100644 --- a/modules/diskdump/lib/diskdump.js +++ b/modules/diskdump/lib/diskdump.js @@ -414,10 +414,11 @@ DiskDump.PCJS_OEM = "PCJS.ORG"; * The BPBs that buildImage() currently supports; these BPBs should be in order of smallest to largest capacity, * to help ensure we don't select a disk format larger than necessary. * - * TODO: For now, the code that chooses a default BPB is starting with #1 instead of #0, because Windows 95 (at least + * TODO: For now, the code that chooses a default BPB is starting with #3 instead of #0, because Windows 95 (at least * when running under VMware) fails to read the contents of such disks correctly. Whether that's my fault or Windows 95's * fault is still TBD (although it's probably mine -- perhaps 160Kb diskettes aren't supposed to have BPBs?) The simple - * work-around is to avoid creating 160Kb diskette images. + * work-around is to avoid creating 160Kb diskette images (and, to play it safe, I skip 180Kb and 320Kb as well, since + * 360Kb was the most commonly used format after DOS 2.0 introduced it). */ DiskDump.aDefaultBPBs = [ [ // define BPB for 160Kb diskette @@ -433,7 +434,39 @@ DiskDump.aDefaultBPBs = [ 0xFE, // 0x15: media type (eg, 0xFF: 320Kb, 0xFE: 160Kb, 0xFD: 360Kb, 0xFC: 180Kb) 0x01, 0x00, // 0x16: sectors per FAT (1) 0x08, 0x00, // 0x18: sectors per track (8) - 0x01, 0x00, // 0x1A: number of heads (2) + 0x01, 0x00, // 0x1A: number of heads (1) + 0x00, 0x00, 0x00, 0x00 // 0x1C: number of hidden sectors (always 0 for non-partitioned media) + ], + [ // define BPB for 180Kb diskette + 0xEB, 0xFE, 0x90, // 0x00: JMP instruction, following by 8-byte OEM signature + 0x50, 0x43, 0x4A, 0x53, 0x2E, 0x4F, 0x52, 0x47, // PCJS_OEM + // 0x49, 0x42, 0x4D, 0x20, 0x20, 0x31, 0x2E, 0x30, // "IBM 1.0" (this is a fake OEM signature) + 0x00, 0x02, // 0x0B: bytes per sector (0x200 or 512) + 0x01, // 0x0D: sectors per cluster (1) + 0x01, 0x00, // 0x0E: reserved sectors; ie, # sectors preceding the first FAT--usually just the boot sector (1) + 0x02, // 0x10: FAT copies (2) + 0x40, 0x00, // 0x11: root directory entries (0x40 or 64) 0x40 * 0x20 = 0x800 (1 sector is 0x200 bytes, total of 4 sectors) + 0x68, 0x01, // 0x13: number of sectors (0x168 or 360) + 0xFC, // 0x15: media type (eg, 0xFF: 320Kb, 0xFE: 160Kb, 0xFD: 360Kb, 0xFC: 180Kb) + 0x02, 0x00, // 0x16: sectors per FAT (2) + 0x09, 0x00, // 0x18: sectors per track (9) + 0x01, 0x00, // 0x1A: number of heads (1) + 0x00, 0x00, 0x00, 0x00 // 0x1C: number of hidden sectors (always 0 for non-partitioned media) + ], + [ // define BPB for 320Kb diskette + 0xEB, 0xFE, 0x90, // 0x00: JMP instruction, following by 8-byte OEM signature + 0x50, 0x43, 0x4A, 0x53, 0x2E, 0x4F, 0x52, 0x47, // PCJS_OEM + // 0x49, 0x42, 0x4D, 0x20, 0x20, 0x32, 0x2E, 0x30, // "IBM 2.0" (this is a real OEM signature) + 0x00, 0x02, // 0x0B: bytes per sector (0x200 or 512) + 0x02, // 0x0D: sectors per cluster (2) + 0x01, 0x00, // 0x0E: reserved sectors; ie, # sectors preceding the first FAT--usually just the boot sector (1) + 0x02, // 0x10: FAT copies (2) + 0x70, 0x00, // 0x11: root directory entries (0x70 or 112) 0x70 * 0x20 = 0xE00 (1 sector is 0x200 bytes, total of 7 sectors) + 0x80, 0x02, // 0x13: number of sectors (0x280 or 640) + 0xFF, // 0x15: media type (eg, 0xFF: 320Kb, 0xFE: 160Kb, 0xFD: 360Kb, 0xFC: 180Kb) + 0x01, 0x00, // 0x16: sectors per FAT (1) + 0x08, 0x00, // 0x18: sectors per track (8) + 0x02, 0x00, // 0x1A: number of heads (2) 0x00, 0x00, 0x00, 0x00 // 0x1C: number of hidden sectors (always 0 for non-partitioned media) ], [ // define BPB for 360Kb diskette @@ -1032,7 +1065,7 @@ DiskDump.logWarning = function(s) { var sWarning = ""; if (s) { - sWarning = "diskdump warning: " + s; + sWarning = "DiskDump warning: " + s; DiskDump.logConsole(sWarning); } return sWarning; @@ -1911,8 +1944,7 @@ DiskDump.prototype.buildFATEntry = function(abFAT, iFAT, v) else { if (abFAT[iByte] === undefined) abFAT[iByte] = 0; abFAT[iByte] = (abFAT[iByte] & 0x0F) | ((v & 0xF) << 4); - iByte++; - abFAT[iByte] = (v >> 4); + abFAT[iByte + 1] = (v >> 4); } }; @@ -2300,7 +2332,7 @@ DiskDump.prototype.buildImageFromFiles = function(aFiles, done) * Find or build a BPB with enough capacity, and at the same time, calculate all * the other values we'll need, including total number of data sectors (cDataSectors). */ - for (var iBPB = 1; iBPB < DiskDump.aDefaultBPBs.length; iBPB++) { + for (var iBPB = 3; iBPB < DiskDump.aDefaultBPBs.length; iBPB++) { /* * If this BPB is for a hard drive but a disk size was not specified, skip it. */ @@ -2369,6 +2401,9 @@ DiskDump.prototype.buildImageFromFiles = function(aFiles, done) /* * Build the FAT, noting the starting cluster number that each file will use along the way. + * + * Also, notice that the first byte of the FAT is the "media type" byte that's replicated in the + * BPB at offset 0x15. For old BPB-less diskettes, this is where you must look for the media type. */ var abFAT = []; this.buildFATEntry(abFAT, 0, abBoot[0x15] | 0xF00); @@ -2457,6 +2492,7 @@ DiskDump.prototype.convertToJSON = function() var aTracks = []; // track array (used only for disk images with track tables) var iTrack, cbTrack, offTrack, bufTrack, bufSector; var cbSector = 512; // default sector size + var bMediaType = 0; var offBootSector = 0; var cbDiskData = this.bufDisk.length; @@ -2484,6 +2520,7 @@ DiskDump.prototype.convertToJSON = function() } var bByte0 = this.bufDisk.readUInt8(offBootSector + DiskAPI.BOOT.JMP_OPCODE); + var bByte1 = this.bufDisk.readUInt8(offBootSector + DiskAPI.BOOT.JMP_OPCODE + 1); var cbSectorBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.SECTOR_BYTES); /* @@ -2505,58 +2542,130 @@ DiskDump.prototype.convertToJSON = function() nHeads = diskFormat[1]; nSectorsPerTrack = diskFormat[2]; cbSector = diskFormat[3] || cbSector; + bMediaType = diskFormat[4] || bMediaType; } - else { - /* - * See if the first sector of the image contains a valid DOS BPB. That begs the question: what IS a valid - * DOS BPB? For starters, the first word (at offset 0x0B) is invariably 0x0200, indicating a 512-byte sector - * size. I also check the first byte for an Intel JMP opcode (0xEB is JMP with a 1-byte displacement, and - * 0xE9 is JMP with a 2-byte displacement). What else? - */ - if ((bByte0 == X86.OPCODE.JMP || bByte0 == X86.OPCODE.JMPS) && cbSectorBPB == cbSector) { - var nHeadsBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.TOTAL_HEADS); + /* + * I used to do these BPB tests only if diskFormat was undefined, but now I always do them, because I + * want to make sure they're in agreement (and if not, then figure out why not). + * + * See if the first sector of the image contains a valid DOS BPB. That begs the question: what IS a valid + * DOS BPB? For starters, the first word (at offset 0x0B) is invariably 0x0200, indicating a 512-byte sector + * size. I also check the first byte for an Intel JMP opcode (0xEB is JMP with a 1-byte displacement, and + * 0xE9 is JMP with a 2-byte displacement). What else? + */ + var fBPBExists = false; + if ((bByte0 == X86.OPCODE.JMP || bByte0 == X86.OPCODE.JMPS) && cbSectorBPB == cbSector) { + + var nHeadsBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.TOTAL_HEADS); + var nSectorsPerTrackBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.TRACK_SECS); + + if (nHeadsBPB && nSectorsPerTrackBPB) { + + fBPBExists = true; + var bMediaTypeBPB = this.bufDisk.readUInt8(offBootSector + DiskAPI.BPB.MEDIA_TYPE); var nSectorsTotalBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.TOTAL_SECS); - var nSectorsPerTrackBPB = this.bufDisk.readUInt16LE(offBootSector + DiskAPI.BPB.TRACK_SECS); - if (nSectorsPerTrackBPB && nHeadsBPB) { + var nSectorsPerCylinderBPB = nSectorsPerTrackBPB * nHeadsBPB; + var nCylindersBPB = Math.floor(nSectorsTotalBPB / nSectorsPerCylinderBPB); - var nSectorsPerCylinderBPB = nSectorsPerTrackBPB * nHeadsBPB; - nHeads = nHeadsBPB; - nCylinders = Math.floor(nSectorsTotalBPB / nSectorsPerCylinderBPB); - nSectorsPerTrack = nSectorsPerTrackBPB; - - /* - * OK, great, the disk appears to contain a valid BPB. But so do XDF disk images, which are - * diskette images with tracks containing: - * - * 1 8Kb sector (equivalent of 16 512-byte sectors) - * 1 2Kb sector (equivalent of 4 512-byte sectors) - * 1 1Kb sector (equivalent of 2 512-byte sectors) - * 1 512-byte sector (equivalent of, um, 1 512-byte sector) - * - * for a total of the equivalent of 23 512-byte sectors, or 11776 (0x2E00) bytes per track. - * For an 80-track diskette with 2 sides, that works out to a total of 3680 512-byte sectors, - * or 1884160 bytes, or 1.84Mb, which is the exact size of the (only) XDF diskette images we - * currently (try to) support. - * - * Moreover, the first two tracks (ie, the first cylinder) contain only 19 sectors each, - * rather than 23, but XDF disk images still pads those tracks with 4 unused sectors. - * - * So, data for the first track contains 1 boot sector ending at 512 (0x200), 11 FAT sectors - * ending at 6144 (0x1800), and 7 "micro-disk" sectors ending at 9728 (0x2600). Then there's - * 4 (useless?) sectors that end at 11776 (0x2E00). - * - * Data for the second track contains 7 root directory sectors ending at 15360 (0x3C00), followed - * by disk data. - * - * For more details, check out this helpful article: http://www.os2museum.com/wp/the-xdf-diskette-format/ - */ - if (nSectorsTotalBPB == 3680 && this.fXDFSupport) { - DiskDump.logWarning("XDF diskette detected, experimental XDF output enabled"); - fXDFOutput = true; + if (diskFormat) { + if (nCylinders != nCylindersBPB) { + DiskDump.logWarning("BPB cylinders (" + nCylindersBPB + ") do not match actual cylinders: " + nCylinders); + } + if (nHeads != nHeadsBPB) { + DiskDump.logWarning("BPB heads (" + nHeadsBPB + ") do not match actual heads: " + nHeads); + } + if (nSectorsPerTrack != nSectorsPerTrackBPB) { + DiskDump.logWarning("BPB sectors/track (" + nSectorsPerTrackBPB + ") do not match actual sectors/track: " + nSectorsPerTrack); + } + if (bMediaType && bMediaType != bMediaTypeBPB) { + DiskDump.logWarning("BPB media type (" + bMediaTypeBPB + ") do not match actual media type: " + bMediaType); } } + else { + nCylinders = nCylindersBPB; + nHeads = nHeadsBPB; + nSectorsPerTrack = nSectorsPerTrackBPB; + bMediaType = bMediaTypeBPB; + } + + /* + * OK, great, the disk appears to contain a valid BPB. But so do XDF disk images, which are + * diskette images with tracks containing: + * + * 1 8Kb sector (equivalent of 16 512-byte sectors) + * 1 2Kb sector (equivalent of 4 512-byte sectors) + * 1 1Kb sector (equivalent of 2 512-byte sectors) + * 1 512-byte sector (equivalent of, um, 1 512-byte sector) + * + * for a total of the equivalent of 23 512-byte sectors, or 11776 (0x2E00) bytes per track. + * For an 80-track diskette with 2 sides, that works out to a total of 3680 512-byte sectors, + * or 1884160 bytes, or 1.84Mb, which is the exact size of the (only) XDF diskette images we + * currently (try to) support. + * + * Moreover, the first two tracks (ie, the first cylinder) contain only 19 sectors each, + * rather than 23, but XDF disk images still pads those tracks with 4 unused sectors. + * + * So, data for the first track contains 1 boot sector ending at 512 (0x200), 11 FAT sectors + * ending at 6144 (0x1800), and 7 "micro-disk" sectors ending at 9728 (0x2600). Then there's + * 4 (useless?) sectors that end at 11776 (0x2E00). + * + * Data for the second track contains 7 root directory sectors ending at 15360 (0x3C00), followed + * by disk data. + * + * For more details, check out this helpful article: http://www.os2museum.com/wp/the-xdf-diskette-format/ + */ + if (nSectorsTotalBPB == 3680 && this.fXDFSupport) { + DiskDump.logWarning("XDF diskette detected, experimental XDF output enabled"); + fXDFOutput = true; + } + } + } + + /* + * Let's see if we can find a corresponding BPB in our table of default BPBs. + */ + var i, iBPB = -1; + if (bMediaType) { + for (i = 0; i < DiskDump.aDefaultBPBs.length; i++) { + if (DiskDump.aDefaultBPBs[i][DiskAPI.BPB.MEDIA_TYPE] == bMediaType) { + iBPB = i; + break; + } + } + } + if (iBPB >= 0) { + if (fBPBExists) { + for (i = DiskAPI.BPB.SECTOR_BYTES; i < DiskAPI.BPB.LARGE_SECS; i++) { + var bDefault = DiskDump.aDefaultBPBs[iBPB][i]; + var bActual = this.bufDisk.readUInt8(offBootSector + i); + if (bDefault != bActual) { + DiskDump.logWarning("BPB byte " + str.toHexByte(i) + " default (" + str.toHexByte(bDefault) + ") does not match actual byte: " + str.toHexByte(bActual)); + } + } + } + else if (bByte0 == X86.OPCODE.JMPS && bByte1 >= 0x22) { + /* + * I'm going to stick my neck out here and slam a BPB into this disk image, since it doesn't appear + * to have one, which should make it more "mountable" on modern operating systems. + */ + for (i = DiskAPI.BPB.SECTOR_BYTES; i < DiskAPI.BPB.LARGE_SECS+4; i++) { + this.bufDisk.writeUInt8(DiskDump.aDefaultBPBs[iBPB][i] || 0, offBootSector + i); + } + } + else if (bByte0 == 0xF6 && bByte1 == 0xF6) { + /* + * WARNING: I've added this "0xF6" hack expressly to fix boot sectors that may have been zapped by an + * inadvertent reformat, or...? + */ + DiskDump.logWarning("repairing damaged boot sector with BPB for media type " + str.toHexByte(bMediaType)); + for (i = 0; i < DiskAPI.BPB.LARGE_SECS+4; i++) { + this.bufDisk.writeUInt8(DiskDump.aDefaultBPBs[iBPB][i] || 0, offBootSector + i); + } + } + else { + DiskDump.logWarning("unrecognized boot sector: " + str.toHexByte(bByte0) + "," + str.toHexByte(bByte1)); } } @@ -2712,6 +2821,14 @@ DiskDump.prototype.convertToJSON = function() bufSector = bufTrack.slice(offSector, offSector + cbSectorThisTrack); + if (bMediaType && !iCylinder && !iHead && iSector == 2) { + var bFATType = bufSector.readUInt8(0); + if (bMediaType != bFATType) { + DiskDump.logWarning("wrong media type (" + str.toHexByte(bFATType) + ") in FAT, expected " + str.toHexByte(bMediaType)); + } + bMediaType = 0; + } + if (this.fJSONNative) { sector['sector'] = nSector; sector['length'] = cbSectorThisTrack; diff --git a/modules/shared/lib/diskapi.js b/modules/shared/lib/diskapi.js index e42cf05a9..29449e98a 100644 --- a/modules/shared/lib/diskapi.js +++ b/modules/shared/lib/diskapi.js @@ -73,21 +73,21 @@ var DiskAPI = { * * For no particular reason that I can recall, each entry in DISK_FORMATS is an array of values in "CHS" order: * - * [# cylinders, # heads, # sectors/track, # bytes/sector] + * [# cylinders, # heads, # sectors/track, # bytes/sector, media type] * * If the 4th value is omitted, the sector size is assumed to be 512. The order of these "geometric" values mirrors * the structure of our JSON-encoded disk images, which consist of an array of cylinders, each of which is an array of * heads, each of which is an array of sector objects. */ DiskAPI.DISK_FORMATS = { - 163840: [40,1,8], // media type 0xFE: 40 cylinders, 1 head (single-sided), 8 sectors/track, ( 320 total sectors x 512 bytes/sector == 163840) - 184320: [40,1,9], // media type 0xFC: 40 cylinders, 1 head (single-sided), 9 sectors/track, ( 360 total sectors x 512 bytes/sector == 184320) - 327680: [40,2,8], // media type 0xFF: 40 cylinders, 2 heads (double-sided), 8 sectors/track, ( 640 total sectors x 512 bytes/sector == 327680) - 368640: [40,2,9], // media type 0xFD: 40 cylinders, 2 heads (double-sided), 9 sectors/track, ( 720 total sectors x 512 bytes/sector == 368640) - 737280: [80,2,9], // media type 0xF9: 80 cylinders, 2 heads (double-sided), 9 sectors/track, (1440 total sectors x 512 bytes/sector == 737280) - 1228800: [80,2,15], // media type 0xF9: 80 cylinders, 2 heads (double-sided), 15 sectors/track, (2400 total sectors x 512 bytes/sector == 1228800) - 1474560: [80,2,18], // media type 0xF0: 80 cylinders, 2 heads (double-sided), 18 sectors/track, (2880 total sectors x 512 bytes/sector == 1474560) - 2949120: [80,2,36], // media type 0xF0: 80 cylinders, 2 heads (double-sided), 36 sectors/track, (5760 total sectors x 512 bytes/sector == 2949120) + 163840: [40,1,8,,0xFE], // media type 0xFE: 40 cylinders, 1 head (single-sided), 8 sectors/track, ( 320 total sectors x 512 bytes/sector == 163840) + 184320: [40,1,9,,0xFC], // media type 0xFC: 40 cylinders, 1 head (single-sided), 9 sectors/track, ( 360 total sectors x 512 bytes/sector == 184320) + 327680: [40,2,8,,0xFF], // media type 0xFF: 40 cylinders, 2 heads (double-sided), 8 sectors/track, ( 640 total sectors x 512 bytes/sector == 327680) + 368640: [40,2,9,,0xFD], // media type 0xFD: 40 cylinders, 2 heads (double-sided), 9 sectors/track, ( 720 total sectors x 512 bytes/sector == 368640) + 737280: [80,2,9,,0xF9], // media type 0xF9: 80 cylinders, 2 heads (double-sided), 9 sectors/track, (1440 total sectors x 512 bytes/sector == 737280) + 1228800: [80,2,15,,0xF9], // media type 0xF9: 80 cylinders, 2 heads (double-sided), 15 sectors/track, (2400 total sectors x 512 bytes/sector == 1228800) + 1474560: [80,2,18,,0xF0], // media type 0xF0: 80 cylinders, 2 heads (double-sided), 18 sectors/track, (2880 total sectors x 512 bytes/sector == 1474560) + 2949120: [80,2,36,,0xF0], // media type 0xF0: 80 cylinders, 2 heads (double-sided), 36 sectors/track, (5760 total sectors x 512 bytes/sector == 2949120) /* * The following are common early hard drive sizes, which we explicitly map to CHS values, since the BPB can mislead us when attempting to calculate total cylinders */ diff --git a/versions/c1pjs/1.30.2/c1p-dbg.js b/versions/c1pjs/1.30.2/c1p-dbg.js index 2f5ca7b6c..e2a0ccaf7 100644 --- a/versions/c1pjs/1.30.2/c1p-dbg.js +++ b/versions/c1pjs/1.30.2/c1p-dbg.js @@ -33,8 +33,9 @@ function G(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.g z.prototype={constructor:z,parent:null,toString:function(){return this.name?this.name:this.id||this.type},T:function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.gb=this.H[b]=c,c.value="",this.l=function(a){return function(b,c){8192 Date: Fri, 28 Oct 2016 09:46:29 -0700 Subject: [PATCH 06/30] Fixed a tiny oversight in buildFileTable() when using a 320Kb diskette formatted by DOS 1.10 --- docs/pcx86/examples/pcx86-dbg.js | 260 +++++++++++++-------------- docs/pcx86/examples/pcx86.js | 14 +- modules/pcx86/lib/disk.js | 2 + versions/pc8080/1.30.2/pc8080-dbg.js | 2 +- versions/pc8080/1.30.2/pc8080.js | 2 +- versions/pcx86/1.30.2/pcx86-dbg.js | 260 +++++++++++++-------------- versions/pcx86/1.30.2/pcx86.js | 14 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 4 +- versions/pdpjs/1.30.2/pdp11.js | 4 +- 9 files changed, 282 insertions(+), 280 deletions(-) diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 7b88797de..5a7c9859f 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -43,9 +43,9 @@ http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 */ -var l,aa,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74, -Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"]; -ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +var l,aa,ba={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67, +Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,og:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["]; +ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} @@ -60,7 +60,7 @@ function Ha(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}re function Na(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=La("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a} function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.yg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; +Va(La("Opera")||La("iOS")?"onunload":"onbeforeunload",function(){Ya(Ra.exit)});function bb(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.al=b.comment;this.Ok=b;b=this.id.indexOf(".");0>b?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.zg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function jb(a,b){b||(b=bb);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),cb=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},cb=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bd&&(f=d);c=f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.Ca)){b=c;if(a.context&&a.ia&&a.ka){e=a.ia.width;a.ka.fillStyle="black";a.ka.fillRect(0,360,e,360);Ob(a,378,a.ia,a.ka);a.pa=a.Da.width/24|0;if(null==b)Pb(a,"Mouse over memory to dump");else for(Pb(a,r(b,8,!0),null,0,1),f=1;16>=f;f++){d="";for(g=1;8>=g;g++){var h;h=a.ga;var k=b++;h=h.sa[(k&h.Gb)>>>h.La].re(k&h.A,k);Pb(a,r(h,2),null,1);d+=32<=h&&128>h?String.fromCharCode(h):"."}Pb(a,d,null,0,1)}a.context.drawImage(a.ia,0,360,e,360,a.qb,a.Db,a.Pa,a.cb)}a.Ca= c}}}l.pd=function(){};function Qb(a,b,c,d){a.A.Bf[a.A.fj++]={El:b,Td:c,type:d};return wa(Nb,b,c,0,d)}function Ob(a,b,c,d){var e,f=null.style.color,g=a.Oa=10;a.C=g;a.U=b;a.W=a.va=18;e||(e=a.ua||a.va+"px Monaco, Lucida Console, Courier New");a.fa=a.ua=e;c&&(a.Da=c);d&&(a.N=d,a.Ea=f||"white")} function Pb(a,b,c,d,e){a.N.font=a.fa;a.N.fillStyle=a.Ea;a.N.fillText(b,a.C,a.U);a.C+=a.pa;null!=c&&(16!=a.Tb?b=c.toString():(b=8>a.Ka?"0x":"",b+=r(c,a.Ka)),a.N.fillText(b,a.C,a.U),a.C+=a.pa);d&&(a.C+=a.pa*d);e&&(a.C=a.Oa,a.U+=(a.W+2)*(e||1))}function Kb(){for(var a=!1,b=tb(document,"pcx86","panel"),c=0;c=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b>>a.La;0g&&(n=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.Fa)return k.Qe+=k.Fa-f,k.Fa=f,!0;if(f>=k.Fa+k.Qe){n=k.size-(f-m);n>g&&(n=g);k.Qe=f-k.Fa+n;f=m+a.Sb;g-=n;h++;continue}}return Wb(a,1,f,g)}f=new B(f,n,a.Sb,d,e);Sb(f,a.ha,k);a.sa[h++]=f;f=m+a.Sb;g-=n}return 0>=g?(Xb(a.F),a.F.la.Ib||a.status(Math.floor(c/1024)+"Kb "+Yb[d]+" at "+r(b)),!0):Wb(a,2,b,c)} var Nb,$b={Hk:20,count:8,Ko:1,type:3},ac=0,bc;for(bc in $b){var cc=$b[bc];$b[bc]={vh:(1<>>this.La;0>>a.La;0>>=a.La;0>>a.La;0>>this.La].pc(a&this.A,a)}; -l.na=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].fg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].gg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La].sc(a&this.A,b&255,a)};l.jb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;c!=this.A?this.sa[d].zf(c,b&65535,a):(this.sa[d++].sc(c,b&255,a),this.sa[d&this.ga].sc(0,b>>8&255,a+1))};function nc(a,b,c){var d=b&a.A,e=(b&a.Gb)>>>a.La;d!=a.A?a.sa[e].zi(d,c&65535,b):(a.sa[e++].xf(d,c&255,b),a.sa[e&a.ga].xf(0,c>>8&255,b+1))} l.nb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;if(c>>=8};l.xj=function(){return null}; -function oc(a,b){var c=0,d=[],e=!a.X&&a.Dg==a.Gb;e||Tb(a,!0);for(var f=0;f>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ha&&a.V!=g[1]&&Ac(a.ha,b,k)}else a.ha&&(ub(a.ha,a,b,k,e),a.V&&Ac(a.ha,b,k));f+=h<<3;b+=h;c-=h}}function Wb(a,b,c,d,e){b="Memory block error ("+b+": "+r(c)+","+r(d)+")";e?a.ha?a.ha.message(b):a.log(b):w(b);return!1}var Bc;if(Ab){var Cc=new ArrayBuffer(2);(new DataView(Cc)).setUint16(0,256,!0);Bc=256===(new Uint16Array(Cc))[0]}else Bc=!1;var ic=Bc; @@ -108,70 +108,70 @@ function B(a,b,c,d,e,f){this.id=Dc+=2;this.da=null;this.C=0;this.Fa=a;this.Qe=b; B.prototype={constructor:B,parent:null,qh:function(a){this.Fa=a},save:function(){var a,b;if(this.controller)a=null;else if(Ab)for(a=Array(this.size>>2),b=0;b>8,c)},U:function(a,b,c){this.sc(a++,b&255,c++); this.sc(a++,b>>8&255,c++);this.sc(a++,b>>16&255,c++);this.sc(a,b>>>24,c)},Ea:function(a){return this.da[a>>2]>>>((a&3)<<3)&255},sb:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b]>>a;return 24>a?c&65535:c&255|(this.da[b+1]&255)<<8},Ya:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b];a&&(c=c>>>a|this.da[b+1]<<32-a);return c},tc:function(a,b){var c=a>>2;a=(a&3)<<3;this.da[c]=this.da[c]&~(255<>2;a=(a&3)<<3;24>a?this.da[c]=this.da[c]&~(65535<>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,b,2,!1);return this.fg(a,b)},Pa:function(a,b){this.ha&&null!=this.Fa&& +(this.da[c]=this.da[c]&16777215|b<<24,c++,this.da[c]=this.da[c]&-256|b>>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,b,2,!1);return this.gg(a,b)},Pa:function(a,b){this.ha&&null!=this.Fa&& Kc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,b,4,!1);return this.si(a,b)},bc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a)||this.F&&Lc(this.F,c,1,!0);this.N?this.L(a,b,c):this.xf(a,b,c)},sd:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,c,2,!0);this.N?this.L(a,b,c):this.zi(a,b,c)},Vc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,c,4,!0);this.N?this.L(a,b,c):this.ua(a,b,c)},Ja:function(a,b){this.yb.da[this.A]|=this.ga; this.zb.da[this.B]|=this.ga;return this.Bd.pc(a,b)},Jb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.sf(a,b)},fb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.Md(a,b)},Cc:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.sc(a,b,c)},Gd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.zf(a,b,c)},hd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V; this.Bd.yf(a,b,c)},Ka:function(a,b){return Nc(this.F,b,!1).pc(a,b)},xd:function(a,b){return Nc(this.F,b,!1).sf(a,b)},gb:function(a,b){return Nc(this.F,b,!1).Md(a,b)},Uc:function(a,b,c){Nc(this.F,c,!0).sc(a,b,c)},Hd:function(a,b,c){Nc(this.F,c,!0).zf(a,b,c)},jd:function(a,b,c){Nc(this.F,c,!0).yf(a,b,c)},Ca:function(a){return this.Za[a]},aa:function(a){return this.Za[a]},Ga:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.pc=this.aa;return this.Za[a]},Tb:function(a){return this.qa.getUint16(a, !0)},pa:function(a){return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Db:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.sf=this.pa;return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Oa:function(a){return this.qa.getInt32(a,!0)},fa:function(a){return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>>2]},cb:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.Md=this.fa;return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>> 2]},Ub:function(a,b){this.Za[a]=b;this.Wa=!0},ra:function(a,b){this.Za[a]=b;this.Wa=!0},uc:function(a,b){this.Za[a]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.sc=this.ra;this.Bd.Wa=!0},qd:function(a,b){this.qa.setUint16(a,b,!0);this.Wa=!0},ya:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.Wa=!0},Fd:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.zf=this.ya;this.Bd.Wa=!0},ce:function(a,b){this.qa.setInt32(a, b,!0);this.Wa=!0},va:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.Wa=!0},Xc:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.yf=this.va;this.Bd.Wa=!0}};function Sb(a,b,c){a.ha=b;a.ze=a.Ae=0;c&&(c.F&&(a.F=c.F),(a.ze=c.ze)&&Hc(a,Ic,!1),(a.Ae=c.Ae)&&Jc(a,Ic,!1))} -function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.fg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.fg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} +function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.gg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.gg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} var Tc=[],lc=[B.prototype.Ea,B.prototype.tc,B.prototype.sb,B.prototype.Cd,B.prototype.Ya,B.prototype.Wc],Ic=[B.prototype.Da,B.prototype.bc,B.prototype.qb,B.prototype.sd,B.prototype.Pa,B.prototype.Vc],Sc=[B.prototype.Ja,B.prototype.Cc,B.prototype.Jb,B.prototype.Gd,B.prototype.fb,B.prototype.hd],Qc=[B.prototype.Ka,B.prototype.Uc,B.prototype.xd,B.prototype.Hd,B.prototype.gb,B.prototype.jd]; if(Ab)var kc=[B.prototype.Ca,B.prototype.Ub,B.prototype.Tb,B.prototype.qd,B.prototype.Oa,B.prototype.ce],jc=[B.prototype.aa,B.prototype.ra,B.prototype.pa,B.prototype.ya,B.prototype.fa,B.prototype.va],Vc=[B.prototype.Ga,B.prototype.uc,B.prototype.Db,B.prototype.Fd,B.prototype.cb,B.prototype.Xc]; -function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Ag=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Ag*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Mf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; +function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Bg=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Bg*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Nf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.ha=d;for(b=0;b=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} -l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;c=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} +l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;cc&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Ag&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} -function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Ag*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} -l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Pf=0;this.Y.Bg=ta();this.Y.Ie&&(a=this.Y.Bg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Bg&&(this.Y.oe=this.Y.Bg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= -(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Pf+=n;fd(this,0,!0);bd(this,n);this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Fj,this.X&&jd(this.X));this.Y.Nf-=n;0>=this.Y.Nf&&(this.Y.Nf+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; -break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Pf&&(e=Math.round(e*this.Y.Pf/this.Y.Ah));e-=this.Y.Ie-this.Y.Bg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Pf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), +function gd(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Bg&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} +function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Bg*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} +l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Qf=0;this.Y.Cg=ta();this.Y.Ie&&(a=this.Y.Cg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Cg&&(this.Y.oe=this.Y.Cg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= +(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Qf+=n;fd(this,0,!0);bd(this,n);this.Y.Pf-=n;0>=this.Y.Pf&&(this.Y.Pf+=this.Y.Fj,this.X&&jd(this.X));this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; +break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Qf&&(e=Math.round(e*this.Y.Qf/this.Y.Ah));e-=this.Y.Ie-this.Y.Cg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Qf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), cd(this))};l.wf=function(){return 0};l.Wb=function(a){wb(this,!0);this.fb-=this.A;this.A=0;fd(this,this.Ub);this.Ub=0;if(this.la.Ib){this.la.Ib=!1;this.N&&this.N.stop();var b=this.qa.run;b&&(b.textContent="Run")}this.la.complete=a};function ad(a,b){a.X&&(jd(a.X,b),a.X.pd(b))} -function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.$f=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; -l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.zg=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; -l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.$f),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.tg()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.tg()};l.tg=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()}; -l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} -function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.$f-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& +function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.ag=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; +l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.Ag=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; +l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.ag),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.vg()}; +l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.vg()};l.vg=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} +function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.ag-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& b=a.Lb&&(F>a.Lb&&(A=H(e),ud(e,H(e),!0),I(e,A),a.df=!0),A=0);else{if(256==h||2304==h)return vd(a,c,q)?a.Aa:-1;if(1024==h)A=2,L=0,Fh||2048==(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,11,c&65532),-1}break;case 3:if(!n||4096>h||512!=(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,12,c&65532),-1;break; case 4:q=h&-513;if(!n||256!=q&&2304!=q)return E.call(e,13,c&65532),-1;2304==q&&(a.Zi=k+e.na(k+102)|0,a.ml=k+a.Ta|0);break;case 6:if(!(h&4096)&&768>>0)+1,a.wb=g,a.type=h,a.ext=m,a.Xb=b,ld(a,!0,!0,!1));return k} function vd(a,b,c){var d=a.F,e=a.Lb,f=d.Sa.Z,g=d.Sa.Aa;if(!c){if(!(d.Sa.type&512))return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb&=-513)}if(-1===d.Sa.load(b))return!1;var h=d.Sa.Aa;if(!1!==c){if(d.Sa.type&512)return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb|=512)}d.Sa.type=d.Sa.type&-513|d.Sa.wb&512;256==d.Sa.type||768==d.Sa.type?(d.jb(g+14,M(d)),d.jb(g+16,Cd(d)),d.jb(g+18,d.G),d.jb(g+20,d.I),d.jb(g+22,d.M),d.jb(g+24,d.H),d.jb(g+26,J(d)),d.jb(g+28,d.P),d.jb(g+30,d.K),d.jb(g+32,d.J),d.jb(g+ 34,d.Xa.Z),d.jb(g+36,d.wa.Z),d.jb(g+38,d.ta.Z),d.jb(g+40,d.vb.Z),d.Bc.load(d.na(h+42)),Dd(d,d.na(h+16)|(c?16384:0)),d.G=d.na(h+18),d.I=d.na(h+20),d.M=d.na(h+22),d.H=d.na(h+24),d.P=d.na(h+28),d.K=d.na(h+30),d.J=d.na(h+32),d.Xa.load(d.na(h+34)),d.vb.load(d.na(h+40)),Ed(d,d.na(h+14),d.na(h+36)),b=38,g=26,a.Lb>>0)+1)}; -function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.zg,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.tg,a.nc=a.ug;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.tg);if(a.type&2048||!(a.type&512))a.nc=a.ug;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= +function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.Ag,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.ug,a.nc=a.vg;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.ug);if(a.type&2048||!(a.type&512))a.nc=a.vg;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= a.Xb+5,d=a.F.Qa(c),d&1||a.F.qc(c,d|1))}b&&(a.Lb=a.Z&3,a.Gc=(a.wb&24576)>>13,80386>a.F.ja||!(a.ext&64)?(a.ba=2,a.R=65535):(a.ba=4,a.R=-1),a.Tc=a.ba,a.Ba=a.R)}else a.load=a.uh,a.Cj=a.Xm,a.mc=a.ij,a.nc=a.kj,a.Lb=a.Gc=0,a.Xb=-1,a.df=!1} -function Gd(a){this.ja=+a.model||8088;var b=a.stepping;this.Uc=this.ja+(b?ea(b,16):0);switch(this.ja){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}Wc.call(this,a,b);this.ag=61442;this.Cc=1792;this.Zf=28672;this.Cd=4;this.ra=255;this.B=80286<=this.ja?Cb:Bb;this.W=Hd;this.eg=Id;this.kg=Jd;this.lg=Kd;if(80186<=this.ja&&(this.W=Hd.slice(),this.eg=Id.slice(),this.kg=Jd.slice(),this.ra=31,this.W[15]=Ld,this.W[96]=Md,this.W[97]=Nd,this.W[98]=Od,this.W[99]=Ld,this.W[100]=Ld,this.W[101]= -Ld,this.W[102]=Ld,this.W[103]=Ld,this.W[104]=Pd,this.W[105]=Qd,this.W[106]=Rd,this.W[107]=Sd,this.W[108]=Td,this.W[109]=Xd,this.W[110]=Yd,this.W[111]=Zd,this.W[192]=ee,this.W[193]=fe,this.W[200]=ge,this.W[201]=he,this.W[241]=ie,this.eg[7]=je,this.kg[7]=je,80286<=this.ja)){this.ag=2;this.Cc|=28672;this.Cd=0;this.W[15]=ke;this.tc=le.slice();for(a=0;a=this.Uc&&(this.tc[166]=te,this.tc[167]=ue)}}this.Hd=[];this.je=[];this.le=0;Zc(this);this.la.complete=this.la.nj=!1;this.Wg=0;this.kd=this.sa=[];this.La=this.Sb=this.Ea=this.Fd=this.hd=this.Gb=this.Db=0;ve(this)}jb(Gd,Wc);function we(a,b,c,d){b=(d?a.kd:a.sa)[b>>>a.La];c?--b.Ae||Oc(b):--b.ze||Pc(b);d&&Xb(a)} -function xe(a){var b;if(a.sa===a.kd){a.sa=Array(a.Fd);a.ke=new B(null,0,0,5,null,a);Sb(a.ke,a.ha);for(b=0;ba.me&&(a.dg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} -function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0a.me&&(a.eg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} +function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0>2;b.zb=g;b.B=h>>2;Ab&&ic&&c.da&&!c.controller&&!c.ze&&!c.Ae?(b.Za=c.Za,b.de=c.de,b.da=c.da,fc(b,Vc)):(b.ga=c?Gc(32):0,b.V=c?Gc(96):0,fc(b,Sc));Sb(b,a.ha,k);a.sa[d]=b;a.Gd.push(d);return b}function ze(a){a.sa!==a.kd&&(a.sa=a.kd,a.ke=null,a.Gd=null,a.jd=null)}l=Gd.prototype;l.reset=function(){this.la.Ib&&this.Wb();ve(this);Zc(this);this.la.error=!1}; function Ae(a,b){var c;switch(b){case 0:c=a.G;break;case 1:c=a.I;break;case 2:c=a.M;break;case 3:c=a.H;break;case 4:c=J(a);break;case 5:c=a.P;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Be(a,b,c){switch(b){case 0:a.G=c;break;case 1:a.I=c;break;case 2:a.M=c;break;case 3:a.H=c;break;case 4:I(a,c);break;case 5:a.P=c;break;case 6:a.K=c;break;case 7:a.J=c}} -function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.mg=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, +function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.ng=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, 0];a.Ee=[null,null,null,null,null,null,0,0];a.Nb=new kd(a,2,"FS");a.Ob=new kd(a,2,"GS");ze(a)}a.rf=new kd(a,0,"NULL");a.ka=a.vb;a.Ka=a.ta;a.S=a.Ia=0;a.D=a.C=-1;a.$b=a.rf;a.ua=0;if(80286>a.ja)Ed(a,0,65535);else{a.Ec=0;a.zd=65535;a.Bc=new kd(a,5,"LDT",!0);a.Sa=new kd(a,4,"TSS",!0);a.Da=new kd(a,6,"VER",!0);Ed(a,65520,61440);var b,c=M(a);b=a.wa;var d=-65536;80386>b.F.ja&&(d&=16777215);b=b.Aa=d;a.Ha=b+c|0;a.hf=(b>>>0)+(a.wa.Ta>>>0)+1}Dd(a,0);wd(a)} function Ce(a){2==a.Tc?(a.cc=a.na,a.Oa=De,a.Ya=Ee,a.Jb=Fe,2==a.ba?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=Le,a.ea=Me,a.ya=Ne)):(a.cc=a.oa,a.Oa=Oe,a.Ya=Pe,a.Jb=Qe,2==a.ba?(a.V=cf,a.ea=df,a.ya=ef):(a.V=ff,a.ea=gf,a.ya=hf))}function xd(a,b){a.ba!=b&&(a.Ia|=1024,a.ba=b,a.R=2==b?65535:-1,jf(a))}function jf(a){2==a.ba?(a.Ga=32768,a.tb=a.na,a.rc=a.jb,2==a.Tc?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=cf,a.ea=df,a.ya=ef)):(a.Ga=-2147483648,a.tb=a.oa,a.rc=a.nb,2==a.Tc?(a.V=Le,a.ea=Me,a.ya=Ne):(a.V=ff,a.ea=gf,a.ya=hf))} function kf(a){a.Tc=a.wa.Tc;a.Ba=a.wa.Ba;Ce(a);a.ba=a.wa.ba;a.R=a.wa.R;jf(a);a.Ia&=-3073}l.vj=function(){var a=this.G+this.H+this.I+this.M+J(this)+this.P+this.K+this.J|0;return a=a+M(this)+this.wa.Z+this.vb.Z+this.ta.Z+this.Xa.Z+Cd(this)|0};function lf(a,b,c){void 0===a.Hd[b]&&(a.Hd[b]=[]);a.Hd[b].push(c)}function mf(a,b,c){c&&(null==a.je[b]&&a.le++,a.je[b]=c)}function nf(a,b){var c=a.je[b];null!=c&&(c(--a.le),delete a.je[b])} function of(a,b){for(var c=a.Ja[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Ja[e],g=g&~(d>>2&3);b?a.sa[g>>>a.La].Rd(g&a.Ea,f,a):(g=a.sa[g>>>a.La],f?--g.Ae||Oc(g):--g.ze||Pc(g))}c>>=2;d>>=4}}function Lc(a,b,c,d){if(!(a.S&8192)&&a.Ja[7]&255){c--;var e=a.Ja[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Ja[g]&&b<=a.Ja[g]+h){a.Ja[6]|=1<>=2;f>>=4}}} -function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.lg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} +function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.mg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} l.save=function(){var a=new qf(this);a.set(0,[this.G,this.H,this.I,this.M,J(this),this.P,this.K,this.J]);var b=M(this),c=this.wa.save(),d=this.vb.save(),e=this.ta.save(),f=this.Xa.save(),g;null!=this.Ec?(g=[this.$a,this.Ec,this.zd,this.Mc,this.Sd,this.Bc.save(),this.Sa.save(),this.Pa],80386<=this.ja&&(g.push(this.ti),g.push(this.se),g.push(this.Od),g.push(this.Ja),g.push(this.Ee))):g=null;b=[b,c,d,e,f,g,Cd(this)];80386<=this.ja&&(b.push(this.Nb.save()),b.push(this.Ob.save()));a.set(1,b);a.set(2,[this.ka.kc, this.Ka.kc,this.S,this.Ia,this.ua,this.D,this.C]);a.set(3,[0,this.uc,this.Y.Wd]);a.set(4,oc(this.ga,!!(this.$a&-2147483648)));return a.data()}; l.restore=function(a){var b=a[0];this.G=b[0];this.H=b[1];this.I=b[2];this.M=b[3];var c=b[4];this.P=b[5];this.K=b[6];this.J=b[7];b=a[1];this.wa.restore(b[1]);this.vb.restore(b[2]);this.ta.restore(b[3]);this.Xa.restore(b[4]);var d=b[5];d&&d.length&&(this.$a=d[0],this.Ec=d[1],this.zd=d[2],this.Mc=d[3],this.Sd=d[4],this.Bc.restore(d[5]),this.Sa.restore(d[6]),this.Pa=d[7],80386<=this.ja&&(this.ti=d[8],this.se=d[9],this.Od=d[10],this.Ja=d[11],this.Ee=d[12]),wd(this));Dd(this,b[6]);var d=!1,e;a:{e=this.ga; var f=a[4],g;for(g=0;g>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.$f=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.$f&a.wa.R)),a.wa.df):null} +function ud(a,b,c){var d=J(a);-1!==a.ta.load(b)&&(I(a,d),a.ta.bd?(a.Sg=a.ta.Aa+a.ta.Ba|0,a.qd=a.ta.Aa+a.ta.Ta|0):(a.Sg=a.ta.Aa+a.ta.Ta|0,a.qd=a.ta.Aa),c||(a.S|=4))}function Bd(a,b){-1!==a.Xa.load(b)&&(a.S|=a.Cd)}function M(a){return a.Ha-a.wa.Aa|0}function O(a,b){a.Ha=a.wa.Aa+(b&a.R)|0}function tf(a,b){a.Ha=b;a.hf=(a.wa.Aa>>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.ag=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.ag&a.wa.R)),a.wa.df):null} function uf(a,b){b=(a.Ha>>>0)+b;b>a.hf&&(8088>=a.ja||a.wa.Ta==a.wa.Ba?b=a.wa.Aa+(b-a.hf&a.R):E.call(a,13,0));return b|0}function vf(a){a.Ha=a.qe}function J(a){return a.gb&~a.ta.Ba|a.fa-a.ta.Aa}function I(a,b){a.gb=b;a.fa=a.ta.Aa+(b&a.ta.Ba)|0}function wf(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&xf(a),g&2&&yf(a),g&4&&zf(a),g&8&&Af(a),g&16&&Bf(a),g&32&&Cf(a))}f?(a.Wc=d,a.Vc=b):(a.Wc=b,a.Vc=d);a.sd=c;a.Xc=d;a.resultType=e} function Df(a,b,c,d,e){a.resultType=c|26;a.Xc=b;d?Ef(a):Ff(a);e?Gf(a):Hf(a);return b}function If(a,b,c,d){c&d?Ef(a):Ff(a);(b^c)&d?Gf(a):Hf(a)}function Jf(a){return xf(a)?1:0}function xf(a){a.resultType&1&&(a.ca&=-2,(a.Wc^(a.Wc^a.sd)&(a.sd^a.Vc))&a.resultType&-2147450752&&(a.ca|=1),a.resultType&=-2);return a.ca&1}function yf(a){a.resultType&2&&(a.ca&=-5,38505>>((a.Xc^a.Xc>>4)&15)&1&&(a.ca|=4),a.resultType&=-3);return a.ca&4} function zf(a){a.resultType&4&&(a.ca&=-17,(a.Vc^a.Wc^a.sd)&16&&(a.ca|=16),a.resultType&=-5);return a.ca&16}function Af(a){a.resultType&8&&(a.ca&=-65,a.Xc&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.ca|=64),a.resultType&=-9);return a.ca&64}function Bf(a){a.resultType&16&&(a.ca&=-129,a.Xc&a.resultType&-2147450752&&(a.ca|=128),a.resultType&=-17);return a.ca&128} function Cf(a){a.resultType&32&&(a.ca&=-2049,(a.Wc^a.Vc)&(a.sd^a.Vc)&a.resultType&-2147450752&&(a.ca|=2048),a.resultType&=-33);return a.ca&2048}function Ff(a){a.resultType&=-2;a.ca&=-2}function Kf(a){a.resultType&=-5;a.ca&=-17}function Lf(a){a.resultType&=-9;a.ca&=-65}function Hf(a){a.resultType&=-33;a.ca&=-2049}function Ef(a){a.resultType&=-2;a.ca|=1}function Mf(a){a.resultType&=-5;a.ca|=16}function Nf(a){a.resultType&=-9;a.ca|=64}function Gf(a){a.resultType&=-33;a.ca|=2048} -function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.Zf);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.ag;a.ca&256&&(a.ua|=2,a.S|=4)} +function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.$f);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.bg;a.ca&256&&(a.ua|=2,a.S|=4)} function Pf(a,b,c,d){var e=0;if(a.$a&1&&(a.pa>a.Pa||a.ca&131072)&&a.Sa.Zi)for(var f=a.Sa.Zi+(b>>>3),e=(1<>>=8,f++;return e?(z(a,256)&&y(a,"checkIOPM("+v(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),E.call(a,13,0),!1):!0} l.Pb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.qa[b]=c;this.Wg++;a=!0;break;default:a=this.parent.Pb.call(this,a,b,c)}return a}; -function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ea;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Ea,a)}; +function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ea;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Ea,a)}; l.na=function(a){var b=a&this.Ea,c=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(b>>this.La;if(b>>this.La].sc(a&this.Ea,b&255,a)}; l.jb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;c>8&255,a+1))};l.nb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(c>>=8}}; function Rf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,1);return a.S&1?0:a.Qa(a.D)}function P(a,b){return Rf(a,a.ka,b)}function Sf(a,b){return Rf(a,a.Ka,b)}function Tf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,a.ba);return a.S&1?0:a.tb(a.D)}function Q(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function Uf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function R(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)} @@ -218,7 +218,7 @@ function Hh(a,b){a&1<<(b&(2==this.ba?15:31))?Ef(this):Ff(this);this.A-=-1===this function Lh(a,b){if(-1===this.D)return Hh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=6;this.S|=2;return a}function Mh(a,b){if(-1===this.D)return Ih.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a^b} function Nh(a,b){if(-1===this.D)return Jh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a&~b}function Oh(a,b){if(-1===this.D)return Kh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a|b} function Ph(a,b){wf(this,a,b,a-b|0,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a}function Qh(a,b){wf(this,a,b,a-b|0,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a} -function Rh(a){if(this.Tb){var b=this.Tb,c=this.mg,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} +function Rh(a){if(this.Tb){var b=this.Tb,c=this.ng,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} function W(a){me.call(this);return a}function Th(a,b){a=Uh.call(this,this.T(),b);80386>this.ja&&(this.A-=12);return a}function Vh(a,b){a=this.Ma();a=2==this.ba?Uh.call(this,a,b):Wh.call(this,a,b);80386>this.ja&&(this.A-=12);return a}function Xh(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Yh.call(this,a,b);c&&(this.ia=~this.ia+1|0,this.va=~this.va+(this.ia?0:1)|0)} function Uh(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return a&65535}function Wh(a,b){Xh.call(this,a,b);this.va!=this.ia>>31?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return this.ia}function Zh(a,b){this.A-=14+(-1===this.D?0:2);Lf(this);-1!==this.Da.load(b)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(b&3)&&(Nf(this),a=this.Da.wb&-256,2>>=16;var d=a&65535;a>>> function Ei(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255}function Fi(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function Gi(){return Cf(this)?1:0}function Hi(){return xf(this)?1:0}function Ii(){return xf(this)?0:1}function Ji(){return Af(this)?1:0}function Ki(){return Af(this)?0:1}function Li(){return xf(this)||Af(this)?1:0} function Mi(){return xf(this)||Af(this)?0:1}function Ni(){return Bf(this)?1:0}function Oi(){return Bf(this)?0:1}function Pi(){return yf(this)?1:0}function Qi(){return yf(this)?0:1}function Ri(){return!Bf(this)!=!Cf(this)?1:0}function Si(){return!Bf(this)!=!Cf(this)?0:1}function Ti(){return Af(this)||!Bf(this)!=!Cf(this)?1:0}function Ui(){return Af(this)||!Bf(this)!=!Cf(this)?0:1}function Vi(a,b){return Wi.call(this,a,b,this.xa())}function Xi(a,b){return Yi.call(this,a,b,this.xa())} function Zi(a,b){return Wi.call(this,a,b,this.I&31)}function $i(a,b){return Yi.call(this,a,b,this.I&31)}function aj(a,b){return bj.call(this,a,b,this.xa())}function cj(a,b){return dj.call(this,a,b,this.xa())}function ej(a,b){return bj.call(this,a,b,this.I&31)}function fj(a,b){return dj.call(this,a,b,this.I&31)}function gj(a,b){var c=a-b|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255} -function hj(a,b){var c=a-b|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function ij(a,b){Df(this,a&b,128);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function jj(a,b){Df(this,a&b,this.Ga);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function kj(a,b){var c=this.G&this.R,d=(1<<(this.I&31))-1;return a&~(d<>(this.G&this.R)&(1<<(this.I&31))-1&this.R}function mj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.li}else this.C=this.D,Wf(this,a),this.A-=this.B.ki;return b} function nj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.M=this.M&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:I(this,J(this)&~this.R|a);break;case 5:this.P=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.li}else this.C=this.D,this.S&2||this.rc(this.$b.nc(this.Ca,this.ba),a),this.A-=this.B.ki;return b} function oj(a,b){a^=b;Df(this,a,128);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return a}function pj(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a^b,this.Ga)&this.R}function qj(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function rj(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=2;return a&~this.R|b&this.R} @@ -340,7 +340,7 @@ function Nj(){var a=this.T();xf(this)||Af(this)?(O(this,M(this)+a),this.A-=this. function Sj(){var a=this.T();yf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}function Tj(){var a=this.T();!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}function Uj(){var a=this.T();!Bf(this)==!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}function Vj(){var a=this.T();Af(this)||!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb} function Wj(){var a=this.T();Af(this)||!Bf(this)!=!Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}function Xj(){this.Jb.call(this,Yj,this.xa);this.A-=-1===this.C?1:this.B.Jg}function Zj(){this.S|=1;this.Ya.call(this,gi)}function ak(){this.S|=1;this.ea.call(this,gi)}function bk(){this.Oa.call(this,gi)}function ck(){this.V.call(this,gi)}function ee(){this.Jb.call(this,dk,yj)}function fe(){this.ya.call(this,2==this.ba?ek:fk,yj)} function gk(){var a=Zf(this),b=H(this);O(this,b);a&&I(this,J(this)+a);this.A-=this.B.Ek}function hk(){var a=H(this);O(this,a);this.A-=this.B.Bk}function ge(){this.U=this.fa;var a=Zf(this),b=this.xa()&31;this.A-=11;K(this,this.P);var c=J(this)&this.R;if(0>9- (b=9),b=a<<24>>24>>b-1,a=b>>1&255,Df(this,a,128,b&1);return a}],ek=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<>16-b)&65535):d=a<<15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=17)?(c=(a<>17-b)&65535,d=a<>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;16>>b-1,a=b>>>1&65535,Df(this,a,32768,b&1,a&32768);return a},W,function(a,b){if(b&=this.ra)17>16>>b-1,a=b>>1&65535,Df(this,a,32768,b&1);return a}],fk=[function(a,b){var c=a;if(b&=this.ra)c=a<>>32-b,If(this,c,a<>>b|d;If(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.ra)c=Jf(this),c=a<>>32-b>>>1,If(this,c,a<>>b|c<<32-b|a<<32-b<<1,If(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.ra)a<<=b-1,c=a<<1,Df(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.ra)b=a>>>b-1,a=b>>>1,Df(this,a,-2147483648, -b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= +b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= -1===this.D?this.B.uk:this.B.tk;this.S|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24)|0;this.ia=b&65535;127b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.Zj:this.B.Yj;this.S|=2;return a},function(a,b){if(!a)return Fj.call(this),a;var c=(b=this.G&65535)/a;if(255>24,d= -(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&this.R},function(a,b){2==this.ba? +(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&this.R},function(a,b){2==this.ba? (b=this.G&65535,b=b*a|0,this.ia=b&65535,this.va=b>>16&65535):(Yh.call(this,a,this.G),80563==this.Uc&&68657152==this.G&&129==a&&(this.va=0));this.va?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.wk:this.B.vk;this.S|=2;return a},function(a,b){2==this.ba?(b=this.G&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.ia=b&65535,this.va=b>>16&65535,b=32767b):(Xh.call(this,a,this.G),b=this.va!=this.ia>>31);b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D? this.B.ak:this.B.$j;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;b=65536*(this.M&65535)+(this.G&65535);var c=b/a;if(65536<=c)return Fj.call(this),a;this.ia=c&65535;this.va=b%a&65535}else{if(!sj.call(this,this.G,this.M,a))return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Tj:this.B.Sj;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;var c=a<<16>>16,d=(b=this.M<<16|this.G&65535)/c|0;if(d!=d<<16>>16||8086== -this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Tf:this.B.Sf; -return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= +this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Uf:this.B.Tf; +return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= this.fa;Bj.call(this,a,this.na(this.D+this.ba));this.A-=this.B.Mj;this.S|=2;this.U=-1;return a},function(a){O(this,a);this.A-=-1===this.D?this.B.jk:this.B.ik;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);Ed(this,a,this.na(this.D+this.ba));this.A-=this.B.gk;this.S|=2;return a},function(a){var b=a;this.S&512&&(a=a-2&65535,80286>this.ja&&(b=a));K(this,b);this.A-=-1===this.D?this.B.Rc:this.B.Ak;this.S|=2;return a},W];function te(){this.V.call(this,lj);this.A-=-1===this.D?6:13} -function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.lg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; +function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.mg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; le[5]=function(){this.pa?E.call(this,13,0,0,!0):(Of(this,this.na(2054)),this.J=this.na(2086),this.K=this.na(2088),this.P=this.na(2090),this.H=this.na(2094),this.M=this.na(2096),this.I=this.na(2098),this.G=this.na(2100),td(this.Xa,2102,this.na(2084)),td(this.wa,2108,this.na(2082)),td(this.ta,2114,this.na(2080)),td(this.vb,2120,this.na(2078)),Dd(this,this.na(2072)),O(this,this.na(2074)),I(this,this.na(2092)),this.Ec=this.na(2126)|this.Qa(2128)<<16,this.zd=this.Ec+this.na(2130),this.Mc=this.na(2138)| this.Qa(2140)<<16,this.Sd=this.Mc+this.na(2142),td(this.Bc,2132,this.na(2076)),td(this.Sa,2144,this.na(2070)),this.A-=195)};le[6]=function(){this.pa?E.call(this,13,0):(this.$a&=-9,this.A-=2)};le[11]=Ld;le[166]=Ld;le[255]=Ld;var N=[];N[5]=Ld; N[7]=function(){if(this.pa)E.call(this,13,0,0,!0);else{var a=this.Xa.mc(this.J&this.Ba,204);if(-1!==a){uj.call(this,this.oa(a));var b=this.oa(a+168),c=(b&24576)>>13;Dd(this,this.oa(a+4),c);this.Ec=this.oa(a+112);this.zd=this.Ec+this.oa(a+116);this.Mc=this.oa(a+100);this.Sd=this.Mc+this.oa(a+104);sd(this.Bc,this.oa(a+56),this.oa(a+120),this.oa(a+124),this.oa(a+128));sd(this.Sa,this.oa(a+52),this.oa(a+84),this.oa(a+88),this.oa(a+92));this.J=this.oa(a+12);this.K=this.oa(a+16);this.P=this.oa(a+20);this.H= @@ -426,32 +426,32 @@ l.reset=function(a){var b;Tk(this);this.L=Array(this.cb);for(b=0;b=a;a++)this.A[a]=0;for(a=14;46>a;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+Yk(this,Ak,void 0)<b){var d=!1;4!=b&&5!=b||a.A[11]&2||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[11]&4||(d&&128c;c++)b+=a.A[c];a.A[47]=b&255;a.A[46]=b>>8} -l.save=function(){var a=new qf(this);a.set(0,[this.C]);for(var b=[],c=0;c=kg&&(a.set(5,[this.N,this.ea,this.aa,this.Ja,this.fa,this.Ka]),a.set(6,[this.ra[7],this.ra,this.pa,this.A,this.Ga,this.ua]));return a.data()}; l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Tk(this);b=a[1];for(c=0;c=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='
'+f+"
\n"}e.innerHTML=d;jl(a,b,c,!0)}function kl(a,b,c){if(b=(a=Ek[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.vg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} -function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.wg=!1);for(var d=!1;0<=b.count&&(c=b.qg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.vg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.vg,b.Lg,c)&&(b.wg=!0)):0!=b.type&&(b.wg=!0)),!d&&!El(b););} -function El(a){if(!a.wg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.wg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} +function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.xg=!1);for(var d=!1;0<=b.count&&(c=b.rg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.wg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.wg,b.Lg,c)&&(b.xg=!0)):0!=b.type&&(b.xg=!0)),!d&&!El(b););} +function El(a){if(!a.xg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>3];b=1<<(b&7);d.lc&b||(d.lc|=b,d.nf=c||0,Hl(a))}function lg(a,b){var c=a.vc[b>>3];b=1<<(b&7);c.lc&b&&(c.lc&=~b,Hl(a))}function Hl(a,b){var c,d=-1;1>=1),ed(a.F,e))),b||2!=c||cl(a))}function Ol(a,b,c,d){x(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.Pa:a.Oa} -function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.ig=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= -b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.ig?1:0;a.md=48==a.ig?2:1} +function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.jg=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= +b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.jg?1:0;a.md=48==a.jg?2:1} function Rk(a,b,c){var d=a.V[b];if(d.De&&(2!=b||a.W&1)){var e=cd(a.F,a.ka),f=(e-d.vd)/a.gb|0;0>f&&(d.vd=e,f=0);var g=Nl(a,b),h=id(a,b)-f;0==d.mode?(0>=h&&(h=0),h||(d.td=!0,d.De=!1,b||mg(a,0))):4==d.mode?(d.td=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0))):6==d.mode&&(h-=f,0>=h&&(d.td=!d.td,h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0)));d.Ab[0]=h&255;d.Ab[1]=h>>8&255;c&&(a.vd=0)}return d} function hd(a,b){for(var c=0;c=kg){b=a.F.Y.Id;c=cd(a.F,a.ka);null==a.fb&&(a.Ga=cd(a.F,a.ka),a.Jb=1024,a.fb=Math.floor(a.F.Y.Id/a.Jb),bl(a));c>=a.ua&&(a.A[12]|=64,a.A[11]&64&&(a.A[12]|=128,mg(a,8)),a.ua=c+a.fb);a.A[0]==a.A[1]&&a.A[2]==a.A[3]&&a.A[4]==a.A[5]&&(a.A[12]|=32,a.A[11]&32&&(a.A[12]|=128,mg(a,8)));var d=c-a.Ga,e=Math.floor(d/b);if(e&&!(a.A[11]&128)){for(;e--;)if(60<=++a.A[0]&&(a.A[0]=0,60<=++a.A[2]&&(a.A[2]=0,24<=++a.A[4]))){a.A[4]=0;a.A[6]=a.A[6]%7+1;var f; f=a.A[9];var g=va[a.A[8]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[7]>f&&(a.A[7]=1,12<++a.A[8]&&(a.A[8]=1,a.A[9]=(a.A[9]+1)%100))}a.A[12]|=16;a.A[11]&16&&(a.A[12]|=128,mg(a,8))}a.Ga=c-d%b}}l=X.prototype;l.ym=function(a,b){var c=this.Ya;this.Ca&16&&(this.W&128?c=this.C[0][1]:this.B&&(c=Rl(this.B)));x(this,a,null,b,"PPI_A",c);return c};l.Yn=function(a,b,c){x(this,a,b,c,"PPI_A");this.Ya=b};l.zm=function(a,b){var c=this.W;x(this,a,null,b,"PPI_B",c);return c}; @@ -490,10 +490,10 @@ l.save=function(){var a=new qf(this);this.controller&&a.set(0,this.controller.sa l.restore=function(a){this.qc(0,a[0]&255);this.qc(2,a[1]&255);return!0};l.Qa=function(a){var b=255;2>a?b=a&1?this.ha>>8:this.ha&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};l.qc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.N.ga;if(b&1)this.A&&(dc(a,917504,131072,this.A),this.A=null);else{this.A||(this.A=ec(a,917504,131072));var c=ec(a,16646144,131072);dc(a,917504,131072,c,b&2?1:hc)}this.C=this.C&-256|b}};l.wj=function(){return om};l.nh=function(){return pm}; Xa(function(){for(var a=tb(document,"pcx86","ram"),b=0;b"]]=10804;Y[p["/"]]=53;Y[p["?"]]=10805;Y[3016]=54;Y[1044]=55;Y[1018]=56;Y[1032]=57;Y[1020]=58;Y[1112]=59;Y[1113]=60;Y[1114]=61;Y[1115]=62;Y[1116]=63;Y[1117]=64;Y[1118]=65;Y[1119]=66;Y[1120]=67;Y[1121]=68;Y[1144]=69;Y[1145]=70;Y[1036]=71;Y[1038]=72;Y[1033]=73;Y[1109]=74;Y[1037]=75;Y[1101]=76;Y[1039]=77;Y[1107]=78;Y[1035]=79;Y[1040]=80;Y[1034]=81;Y[1045]=82;Y[1046]=83;Y[4027]=84;Y[1122]=87;Y[1123]=88;Y[1091]=91;Y[1093]=93;Y[1224]=91;Y[tm]=7470;Y[4008]=7494;Y[4046]=3677523; Y[4045]=3677522;Y[4013]=3677468;l=qm.prototype; l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]= @@ -506,22 +506,22 @@ function Cm(a,b){if(0>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.xc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in xm)d="led-"+g,e=xm[g],c&&c!=e||!(f=a.qa[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.xc&=~b,d&&(a.xc|=b);return!0}}return!1} function zm(a,b,c){if(Y[b]&&a.F&&a.F.la.Ib){um[b]&&a.B.length&&0e||(e==a.B.length&&(d={},d.Pe=b,d.xc=a.xc,Dm(a,b,!0),e++),0b.Kd){if(!b.Hf){Bm(a,b.Pe);return}b.Hf=!1;c=a.ua}else c=1==b.Kd++?500:100;b.Zk=setTimeout(function(a){return function(){Fm(a,b)}}(a),c)}} -function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.ng)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; +function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.og)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; function ym(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Hm(a,g,!0);a.kh&&h==p["`"]&&(g=h=27);if(Y[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Am(a,h,!1,c)){if(20==g||144==g||145==g)a.pa||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k=p.ue&&b<=p.ng||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), +function Gm(a,b,c){var d=!1;Am(a,b,!0,c);var e=Y[b]||Y[b+1E3];if(void 0!==e){14==e&&40==(a.xc&40)&&(e=83);var d=[],f=e&255;if(83=p.ue&&b<=p.og||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), 1==e.A.length&&e.N&&$l(e.N,f)):(20==e.A.length&&e.A.push(255),y(e,"scan code buffer overflow")));d=!0}return d}Xa(function(){for(var a=tb(document,"pcx86","keyboard"),b=0;bc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.pg=an;if(5<=b){this.wh=$m;this.pg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? -0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.hg=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.lengthc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.qg=an;if(5<=b){this.wh=$m;this.qg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? +0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.ig=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.length>this.controller.cd|b<<8-this.controller.cd& gn[16]=function(a,b){a+=this.C;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb|this.controller.Fb&~this.controller.Mb;a=this.controller.rb&(c==a?16711935:-16711936);b=b&a|this.da[c]&~a;this.da[c]!=b&&(this.da[c]=b,this.Wa=!0)};gn[1]=function(a){a+=this.C;var b=this.da[a]&~this.controller.rb|this.controller.Fb&this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; gn[17]=function(a){a+=this.C;var b=a&-2;a=this.controller.rb&(b==a?16711935:-16711936);a=this.da[b]&~a|this.controller.Fb&a;this.da[b]!=a&&(this.da[b]=a,this.Wa=!0)};gn[2]=function(a,b){a+=this.C;b=Vm[b&15];b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; gn[98]=function(a,b){a+=this.C;b=Vm[b&15];b&=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[162]=function(a,b){a+=this.C;b=Vm[b&15];b|=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; -gn[226]=function(a,b){a+=this.C;b=Vm[b&15];b^=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[3]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Xf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; -function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.hg;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Yf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.ig;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>3;for(c=0;c=d&&(A=d,g=!0);break; -case "p":0<=d&&3>=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.pg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, -b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.hg),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Cg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.qg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, +b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.ig),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Dg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0c&&(a=Math.round(c/b*100)+"%")}this.rf?(this.ka.style.width=a,this.ka.style.width=a,this.ka.style.display="block",this.ka.style.margin="auto"):(this.ia.style.width=a,this.ia.style.height="auto");this.ia.style.backgroundColor="black";this.ia.Ye();a=!0}this.X&&this.X.focus()}return a}; -function Lm(a,b){!b&&a.ia&&(a.rf?a.ka.style.width=a.ka.style.height="":a.ia.style.width=a.ia.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.kh=b)}l.Fe=function(a){var b=!1;this.X&&(a?this.X.Fe&&(this.X.Fe(),this.V&&this.V.Yf(!0),b=!0):this.X.$k&&(this.X.$k(),this.V&&this.V.Yf(!1),b=!0),this.X&&this.X.focus());return b};l.Yf=function(a){this.V&&(this.V.Yf(a),this.B&&(this.B.kh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.bl)}; -function tn(a,b){var c=a.X;c&&!a.ke&&(c.addEventListener("touchstart",function(b){vn(a,b,!0)},!1),c.addEventListener("touchmove",function(b){vn(a,b)},!0),c.addEventListener("touchend",function(b){vn(a,b,!1)},!1),a.ke=b,a.uc=a.Cc=a.lg=-1,a.Hd=!1,a.Xc=null,a.Gd=!1,a.so=function(){a.Gd=!0;a.V.he(wn,!0)})}l.Mg=function(a){this.B&&this.B.Mg(a)}; -function vn(a,b,c){var d,e,f=0,g=0;e=a.ka;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.ra/a.ka.offsetWidth,k=a.Da/a.ka.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.ke)d=d/(a.ra/3)|0,e=e/(a.Da/3)|0,1!=e?e?zm(a.B,1040,!0):zm(a.B,1038,!0):1!=d&&(d?zm(a.B,1039,!0):zm(a.B,1037,!0));else if(a.V){g=a.Hd;f=b.timeStamp-a.lg;!0===c?(a.Hd=500f){a.V.he(wn,!0);a.V.he(wn,!1);return}}if(c||0>a.uc||0>a.Cc)a.uc=d,a.Cc=e;c=Math.round(d-a.uc);b=Math.round(e-a.Cc);a.uc=d;a.Cc=e;a.V.Kf(c,b,a.uc,a.Cc)}}l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; l.reset=function(){var a=!0,b=0;this.N&&(b=+Yk(this.N,Ak,void 0));this.ja||(this.Ua=3==b?1:3);this.va=3;switch(this.Ua){case hm:b=7;break;case 5:var c=Om[this.Vc];c&&(b=c[0]);b||(b=4);break;case 1:b=3;this.va=7;break;default:b=2}this.ya!==b&&(this.ya=b,a=!0);this.C=null;this.pa=this.qd=new Xm(this,1);this.aa=this.Wc=new Xm(this,3);5>this.Ua?this.A=new Xm:(this.A=new Xm(this,this.Ua,null,this.Dd),xn(this));Xn(this);this.Ga=null;this.cb=this.ua=-1;this.Pa=0;Yn(this,this.va);if(this.C.ob&&a){a=this.C.ob+ this.Ub;for(b=this.C.ob;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);nc(this.ga,b,c|d<<8)}un(this,!0)}};function xn(a){a.A.vf&1?(a.pa=a.qd,a.aa=a.A):(a.pa=a.A,a.aa=a.Wc)}l.save=function(){var a=new qf(this);a.set(0,hn(this.qd));a.set(1,hn(this.Wc));a.set(2,[this.ya,this.va,this.Ga]);a.set(3,hn(this.A));return a.data()}; @@ -559,34 +559,34 @@ function ao(a,b){if(1==b)return a.Ca[0]=Rm[0],a.Ca[1]=Rm[7],a.Ca;if(2==b){var c= function Xn(a,b){var c=!1;if(window&&a.Uc&&(!b||a.U)){b=0;var d=a.Tb?a.Tb:8,e=ao(a);null!=a.Jb[0]&&bo(a,3,a.Jb[0],b,d,8,a.Uc,e)&&(c=!0);b=a.Tb?0:2048;d=a.Tb?a.Tb:9;null!=a.Jb[1]&&(bo(a,1,a.Jb[1],b,d,14,a.Uc,Pm,Qm)&&(c=!0),a.Tb&&bo(a,a.Ua,a.Jb[1],0,a.Tb,14,a.Uc,e)&&(c=!0))}return c}function bo(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(co(a,b,c,d,e,f,g,h,k)&&(m=!0),a.ro&&co(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} function co(a,b,c,d,e,f,g,h,k){var m=!1,n=b&1?0:1,t=a.Oa[b],q=16>h.length?h.length:16;t||(t={Pc:e<ga||!L?ga:8,Pa=Ja.createImageData(m.Pc,m.Qc);for(Da=0;256>Da;Da++){for(Ka=0;Ka=ga-2,Rc=S[Ka>(8<=Wa&&192<=Da&&223>=Da?7:Wa)?A:ab;eo(Pa,Ge,Wd,He);C&&eo(Pa,Ge+1,Wd,He)}Ja.putImageData(Pa,(Da&15)*m.Pc,(Da>>4)*m.Qc)}m.Re[F]="#"+r(A[0],2)+r(A[1],2)+r(A[2],2);m.Yi[F]=A;m.Zg[F]=la;m=!0}}a.Oa[b]=t;return m}function fo(a){0a.cb&&(a.cb=0):a.cb=-1} -function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.mg!=b||a.Ee!=d)a.mg=b,a.Ee=d;a.Ya=e+1;fo(a)}}} +function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.ng!=b||a.Ee!=d)a.ng=b,a.Ee=d;a.Ya=e+1;fo(a)}}} function go(a){if(0<=a.ua){if(void 0!==a.fa){var b=a.fa[a.ua];if(b&131072){var b=b&-131073,c=a.ua%a.L,d=a.ua/a.L|0;a.U&&a.Oa[a.U]&&(a.gb&&ho(a,c,d,b,a.gb),ho(a,c,d,b));a.fa[a.ua]=b}}a.ua=-1}} function io(a){var b,c=a.C;a.hf=!1;var d=c.Zd[5];if(null!=d){b=1024;var e=0,f=c.Zd[3]&31;switch(d&3){case 0:if(f){e=32;switch(f&24){case 8:e=96;break;case 16:e=160;break;case 24:e=224}c.cd=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ua==hm&&(e=3,c.cd=f&7)}d&8&&(b=1280);c=c.Me[4];null!=c&&(c&4||(b|=4096,e|=16),d&64&&(c&8&&(b|=16384,e|=4),a.hf=!0));b|=e}return b} -function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Cg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} +function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Dg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} function Zn(a,b){var c,d=a.Ga,e=a.C;if(e)if(1==e.Ua)d=7;else if(5<=e.Ua){var d=null,f=e.Dd>>2,g=32768=e.mb[18]?19:20:21:g&128||350>f?d= m?13:14:480<=f&&(d=3==a.ya?17:18):d=m?7-d:6:d-=m?2:0);c=io(a)}}else e.fd&8&&(e.fd&2?(d=e.fd&16?6:5,e.fd&4||--d):(d=e.fd&1?3:1,e.fd&4&&--d));else a.Ga=null,null==d&&(d=a.va);if(!Yn(a,d,b))return!1;jo(a,c);return!0} -function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.dg=a.L*a.W|0;a.ag=a.dg/ -a.hd|0;a.Ub=a.ag;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.Zf&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.Zf||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= -0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Ea=!1;var b=a.ag;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} -function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.mg,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], +function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.eg=a.L*a.W|0;a.bg=a.eg/ +a.hd|0;a.Ub=a.bg;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.$f&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.$f||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= +0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Ea=!1;var b=a.bg;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} +function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.ng,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], e.fillRect(b,c+f,h.Pc,g)):(a.Ya&&a.Ya!==a.Ka&&(f=f*a.Ka/a.Ya|0,g=g*a.Ka/a.Ya|0),a.ea.fillStyle=h.Re[d],a.ea.fillRect(b,c+f,a.Ja,g)))} -function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.dg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= +function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.eg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= 1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.Ea){b=a.ga;for(var n=!0,t=c>>>b.La;0f)return;g=f+1}}if(a.U){if(a.Oa[a.U]){d=f;f=0;e=a.Pa=0;h=1048575;m=a.C.fd&32;5<=a.Ua&&(m=a.C.Sc[16]&8);b=a.ua-a.C.Ld;m&&(e=32768,h&=~e,a.cb&2||(h&=-65537));for(c+=d<<1;c>8|(q&255)<<8;var D=e,L=16;m>=h))>>(L-=h);eo(a.sb,m++,n,b[ga])}m>A&&(A=m);n=C&&(C=n+1)}k+=2;d++;if(m>=a.L){m=0;n+=2;if(n>a.W)break;n==a.W&&(n=1,k=c+a.sd)}}a.Ea= !0;ta.L?a.Db-a.L-q>>3:0;c>=8;b>t&&(t=b);m=F&&(F=m+1)}c+=C;if(b>=a.L){b=0;if(++m>a.W)break;c+=D}}q||(a.Ea=!0);na.L?a.Db-a.L-F>>3:0;cD&&(L=D)):(q<<=F,L-=F,a.Ea=!1):(a.Ea&&q===a.fa[d]?(h+=L,L=0):a.fa[d]=q,d++);if(L){hn&&(n=h);b=A&&(A=b+1)}if(h>=a.L){h=0;if(++b>a.W)break;c+=C}}F||(a.Ea=!0);ma&&(b.Eh=a,a=-a|0);a%b.zh>b.an&&(c|=1);a%b.Ch>b.cn&&(c|=9);b.ni=a/b.Ch|0;return c}l.um=function(a,b){return no(this,this.pa,a,b)};l.Vn=function(a,b,c){var d=this.pa;d.Qg=d.Ac;d.Ac=b&31;x(this,a,b,c,"CRTC.INDX")};l.tm=function(a,b){return oo(this,this.pa,a,b)};l.Un=function(a,b,c){po(this,this.pa,a,b,c)};l.vm=function(a,b){return qo(this,this.pa,b)};l.Wn=function(a,b,c){a=this.pa;x(this,a.port+4,b,c,"MODE");a.fd=b;Zn(this,!1)}; -l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.hg=this.A.hg&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; +l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.ig=this.A.ig&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; l.Lk=function(a,b,c){var d=this.A,e=d.Nd&32;if(d.Ze){d.Ze=!1;var f=d.Nd&31;if(16<=f||!e)c&&!z(this)||x(this,a,b,c,"ATC."+d.$g[f]),d.Sc[f]=b,ko(this,!1)}else d.Nd=b,x(this,a,b,c,"ATC.INDX"),d.Ze=!0,b&32&&!e&&Xn(this,!0)&&un(this,!0),a=(d.mb[12]<<8)+d.mb[13]|0,d.Ld!=a&&(d.Ld=a,ko(this)),d.qf=0}; l.Gm=function(a,b){a=0;if(5==this.Ua)a=3-((this.A.vf&12)>>2),a=(this.Vc&1<>this.A.Kc&63;b&&!z(this)||x(this,969,null,b,"DAC.DATA["+u(this.A.od)+"]["+u(this.A.Kc)+"]",a);this.A.Kc+=6;12Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ca().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= @@ -596,40 +596,40 @@ l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet");qc(b, function wo(a,b){var c=0;b||(b=[0,0,0]);a.L=b[c++];a.Yb=b[c++];a.Df=b[c];return!0}l.hm=function(a,b){var c=this.L;x(this,a,null,b,"DATA",c);return c};l.Fm=function(a,b){var c=this.Yb;x(this,a,null,b,"STAT",c);return c};l.dm=function(a,b){var c=this.Df;x(this,a,null,b,"CTRL",c);return c}; l.Hn=function(a,b,c){x(this,a,b,c,"DATA");this.L=b;this.Yb|=64;a=!1;y(this,"transmitByte("+u(b)+")");this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Yb&=-65);xo(this)};l.Cn=function(a,b,c){x(this,a,b,c,"CTRL");this.Df=b;xo(this)}; function xo(a){a.N&&a.C&&(a.Df&16&&!(a.Yb&64)?mg(a.N,a.C):lg(a.N,a.C))}var uo={0:so.prototype.hm,1:so.prototype.Fm,2:so.prototype.dm},vo={0:so.prototype.Hn,2:so.prototype.Cn};Xa(function(){for(var a=tb(document,"pcx86","parallel"),b=0;b=b)a.preventDefault&&a.preventDefault(),64=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.xd)return;b=qa(b[1]);if(this.ia=ob(b)){var d=this.ia.exports;if(d){var e=d.connect;e&&e.call(this.ia);if(this.ra=d.receiveData){this.status(this.ce+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}}; l.hc=function(a,b){if(!b)if(this.zj(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){Co(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.va;c[b++]=this.Da;c[b++]=this.fa;c[b++]=this.pa;c[b++]=this.U;c[b++]=this.B;c[b++]=this.C;c[b++]=this.A;c[b++]=this.Ca;c[b]=this.aa;a.set(0,c);return a.data()};l.restore=function(a){return Co(this,a[0])}; -function Co(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,48,[]]);a.va=b[c++];a.Da=b[c++];a.fa=b[c++];a.pa=b[c++];a.U=b[c++];a.B=b[c++];a.C=b[c++];a.A=b[c++];a.Ca=b[c++];a.aa=b[c];return!0}l.gg=function(a){if("number"==typeof a)this.aa.push(a);else if("string"==typeof a)for(var b=0;b>8:this.pa;x(this,a,null,b,this.B&128?"DLM":"IER",c);return c};l.pm=function(a,b){var c=this.U;x(this,a,null,b,"IIR",c);return c}; l.qm=function(a,b){var c=this.B;x(this,a,null,b,"LCR",c);return c};l.sm=function(a,b){var c=this.C;x(this,a,null,b,"MCR",c);return c};l.rm=function(a,b){var c=this.A;x(this,a,null,b,"LSR",c);return c};l.xm=function(a,b){var c=this.Ca;x(this,a,null,b,"MSR",c);return c}; l.eo=function(a,b,c){x(this,a,b,c,this.B&128?"DLL":"THR");if(this.B&128)this.fa=this.fa&-256|b;else{this.Da=b;this.A&=-97;a=!1;y(this,"transmitByte("+u(b)+")");this.ra&&this.ra.call(this.ia,b)&&(a=!0);if(this.L)13==b?this.ea=0:8==b?(this.L.value=this.L.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,32>b&&1==c&&(c=0),9==b&&(b=this.Ga||8,c=b-this.ea%b,this.Ga&&(a=pa("",c))),this.Ea&&!this.ea&&c&&(a=String.fromCharCode(this.Ea)+a),this.L.value+=a,this.L.scrollTop= this.L.scrollHeight,this.ea+=c),a=!0;else if(null!=this.W){if(10==b||1024<=this.W.length)this.O(this.W),this.W="";10!=b&&(this.W+=String.fromCharCode(b));a=!0}a&&(this.A|=96)}};l.Rn=function(a,b,c){x(this,a,b,c,this.B&128?"DLM":"IER");this.B&128?this.fa=this.fa&255|b<<8:this.pa=b};l.Sn=function(a,b,c){x(this,a,b,c,"LCR");this.B=b}; -l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.gg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; +l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.hg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; var Ao={0:yo.prototype.Cm,1:yo.prototype.om,2:yo.prototype.pm,3:yo.prototype.qm,4:yo.prototype.sm,5:yo.prototype.rm,6:yo.prototype.xm},Bo={0:yo.prototype.eo,1:yo.prototype.Rn,3:yo.prototype.Sn,4:yo.prototype.Tn};Xa(function(){for(var a=tb(document,"pcx86","serial"),b=0;ba.L||0>a.V)a.L=b.clientX,a.V=b.clientY;a.fa?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.L,d=b.clientY-a.V);a.L=b.clientX;a.V=b.clientY;a.Kf(c,d,a.L,a.V)}} l.he=function(a,b){if(this.Hc&&this.F&&this.F.la.Ib){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case wn:if(this.aa!=b){this.aa=b;Ko(this,c);return}break;case 2:if(this.ea!=b){this.ea=b;Ko(this,c);return}}y(this,c+": ignored")}};l.Kf=function(a,b,c,d){this.Hc&&this.F&&this.F.la.Ib&&(a||b)&&(this.U=a,this.W=b,Ko(this,null,c,d))}; -function Ko(a,b,c,d){var e=64|(a.aa?32:0)|(a.ea?16:0)|(a.W&192)>>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.gg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.jg+"!"+h[1];break}b&&0>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.hg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.kg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, +b;ga++,e+=4)var S=G[ga]=a.getInt32(e,!0),d=d+S&-1;L.Zc=b;C[D]=L}g.aa=d;b=g}else g.Na("Unrecognized disk format ("+c+" bytes)");g.W&&(g.W.call(g.controller,g.B,b,g.ga,g.V),g.W=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.yg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, "/")&&(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; -function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.xg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0d&&a.X&&!a.X.la.ic;if(a.yg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= m<<2,F=q.length;Fb;b++){if(128==cp(a,e,c+0,1)){d.bg=cp(a,e,c+8,4);(e=bp(a,d.bg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Eg=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Eg|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} -function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Eg,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} +function jp(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;cb;b++){if(128==cp(a,e,c+0,1)){d.cg=cp(a,e,c+8,4);(e=bp(a,d.cg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Mf=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Mf|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} +function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Mf,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} function bp(a,b){var c=a.ub*a.lb,d=b/c|0;return dg)break;e|=g<=f)break;e+=String.fromCharCode(f)}return e}function gp(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Hl=b;a.Il=c;a.ud=a.Zc=0;a.Wa=!1;return a} function hp(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;b+="&machine="+a.controller.gf();b+="&user="+a.controller.ie();return Ba()+"/api/v1/disk?"+b} function op(a,b,c,d,e,f,g){if(a.N){var h;h="action=read&volume="+a.V;h+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.controller.gf());h+="&user="+a.controller.ie();Aa(Ba()+"/api/v1/disk?"+h,null,f,function(h,m,n){h=[b,c,d,e,f,g];var k=!1,q=h[0],A=h[1],F=h[2],C=h[3];if(!n){m=JSON.parse(m);for(k=0;C--;){var D=a.seek(q,A,F,!0);if(!D)break;kp(D,m,k);k+=D.length;F++}k=h[4]}(h=h[5])&&h(n,k)})}else g&&g(-1,!1)} @@ -645,32 +645,32 @@ b+" changes applied)";b=-1;break}if(this.ff){c="unable to modify write-protected l.toJSON=function(){var a;a=0;for(var b;b=bp(this,a++);)up(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function up(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function vp(a){bb.call(this,"FDC",a,vp,524288);this.dmaRead=this.el;this.dmaWrite=this.fl;this.dmaFormat=this.vl;this.U=a.autoMount||null;this.fa=a.sortBy||"name";"none"==this.fa&&(this.fa=null);this.B=[];this.ia=!La("Mobi")&&window&&"FileReader"in window}jb(vp);aa={}; var wp={3:{Ud:3,ge:0,name:aa.Fo},4:{Ud:2,ge:1,name:aa.Do},5:{Ud:9,ge:7,name:aa.Jo},6:{Ud:9,ge:7,name:aa.zo},7:{Ud:2,ge:0,name:aa.Bo},8:{Ud:1,ge:2,name:aa.Eo},10:{Ud:2,ge:7,name:aa.Ao},13:{Ud:6,ge:7,name:aa.wo},15:{Ud:3,ge:0,name:aa.Co}};l=vp.prototype; -l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)|| -0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&& +((a=d.A[ea(a.value,10)||0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;ag.za.restore(A)&&(h=!1);h&&g.za&&void 0!==g.eb&&(g.pb=g.za.seek(g.Qb,g.kb,g.xb));h||(e=!1)}a.W=b[c++]||0;a.jc=b[c]||0;return e} -function Fp(a){var b=0,c=[];c[b++]=a.hb;c[b++]=0;c[b++]=a.ma;c[b++]=a.V;c[b++]=a.L;c[b++]=a.C;c[b++]=a.aa;for(var d=b++,e=0,f=[],g=0;gGp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){var f=a,g=c,h;for(h=0;ha.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Qf=f[1],a.Rf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; +l.pj=function(a,b,c,d,e){var f;a.$e=!1;b&&(f=b.info(),b&&f[0]>a.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Rf=f[1],a.Sf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; function Cp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e=this.C&&(this.ma&=-81,this.L=this.C=0);return c}; l.Jn=function(a,b,c){z(this)&&x(this,a,b,c,"DATA["+this.C+"]");this.C=wp[a].Ud){b=!1;this.L=0;a=Jp(this);var d,e,f,g,h=a&31;switch(h){case 3:Jp(this);Jp(this);Kp(this);break;case 4:c=Jp(this);this.hb=c&3;d=this.A[this.hb];Kp(this);Lp(this,(d.Cb&-16777216)>>>24);break;case 5:case 6:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];d.kb=b;c=d.Qb=Jp(this);e=Jp(this);f=d.xb=Jp(this);g=Jp(this);d.Hb=128<>2&1;this.hb=c&3;d= -this.A[this.hb];c=d.Qb;e=d.kb=b;f=d.xb=1;g=0;d.Cb=0;d.za&&(d.pb=d.za.seek(d.Qb,d.kb,d.xb))?g=d.pb.length>>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>2&1,c=Jp(this),d.Qb+=c-d.ee,0>d.Qb&&(d.Qb=0),d.Qb>=d.Bb&&(d.Qb=d.Bb-1),d.ee=c,d.Cb=32,d.Qb||(d.Cb|=268435456),Kp(this),b=!0}0>>8);Lp(a,(b.Cb&16711680)>>>16);var k=0;if(e!=b.Qb||f!=b.kb)k=g=1;c&128&&(f^=k,d||(k=0));Lp(a,e+k);Lp(a,f);Lp(a,g);Lp(a,h)}function Jp(a){var b=a.V[a.L];a.L++;return b}function Kp(a){a.L=a.C=0}function Lp(a,b){a.V[a.C++]=b}l.el=function(a,b,c){void 0===b||0>b?this.Le(a,c):c(-1,!1)};l.fl=function(a,b){return void 0!==b&&0<=b?Np(a,b):-1}; -l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; -function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Rf+1&&(a.xb=1,a.kb++,a.kb>=a.Qf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; +l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; +function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Sf+1&&(a.xb=1,a.kb++,a.kb>=a.Rf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; Xa(function(){for(var a=tb(document,"pcx86","fdc"),b=0;bk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.rg)));A||(e=!1);null!=a.pa&& +for(d=0;dk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.sg)));A||(e=!1);null!=a.pa&& 1>=d&&(a.pa|=(f.type&3)<<(1-d<<1))}0<=a.hb&&(a.B=a.A[a.hb]);return e} function Yp(a){var b=0,c=[];a.ia?(c[b++]=a.W,c[b++]=a.Pa,c[b++]=a.aa,c[b++]=a.Ca,c[b++]=a.ya,c[b++]=a.va,c[b++]=a.ra,c[b++]=a.ma,c[b++]=a.Da,c[b++]=[a.fa,a.hb]):(c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.V,c[b++]=a.L,c[b++]=a.C,c[b++]=a.Oa,c[b++]=a.Ka,c[b++]=a.Ja,c[b++]=a.ka);for(var d=0,e=[],f=0;f=this.C&&(this.L=this.C=0,this.ma&=-15);return c};l.ho=function(a,b,c){x(this,a,b,c,"DATA["+this.C+"]");this.C=a&&(this.ma|=2,this.ma&=-2,$p(this))};l.Mm=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.L>5,f=c&31,g=fq(a),h=fq(a),k=g<<2&768|h,m=g&63,n=fq(a),t=fq(a),q=a.A[e];q&&(q.be=k,q.kb=f,q.xb=m,q.Hb=n*q.Va);switch(b){case 3:gq(a,q?q.errorCode:4);hq(a,c);hq(a,g);hq(a,h);hq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=fq(a));)q&&cb?this.Le(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?dq(a,b):-1}; -l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a}; +l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a}; function iq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaRead",b);ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function jq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaWrite",b);ul(a.N,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)} function kq(a,b,c){b.errorCode=4;b.Ue&&b.Ue.length==b.Hb||(b.Ue=Array(b.Hb));b.eb=0;a.N?(b.errorCode=0,Cl(a.N,3,a,"dmaWriteBuffer",b),ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)} -l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.rg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; -function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.rg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.rg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; +l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.sg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; +function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.sg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.sg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; var Tp={800:Pp.prototype.Lm,801:Pp.prototype.Mm,802:Pp.prototype.Km},Sp={496:Pp.prototype.il,497:Pp.prototype.Sl,498:Pp.prototype.Ul,499:Pp.prototype.Vl,500:Pp.prototype.Ql,501:Pp.prototype.Pl,502:Pp.prototype.Rl,503:Pp.prototype.Wl},Vp={800:Pp.prototype.ho,801:Pp.prototype.ko,802:Pp.prototype.jo,803:Pp.prototype.io,807:Pp.prototype.pi,811:Pp.prototype.pi,815:Pp.prototype.pi},Up={496:Pp.prototype.qn,497:Pp.prototype.vn,498:Pp.prototype.tn,499:Pp.prototype.un,500:Pp.prototype.pn,501:Pp.prototype.on, 502:Pp.prototype.rn,503:Pp.prototype.nn,1014:Pp.prototype.sn};Xa(function(){for(var a=tb(document,"pcx86","hdc"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};mq.prototype.oh=function(){return-1};mq.prototype.ph=function(){}; mq.prototype.Pk=function(a,b){return a.replace("["+b+"]","unimplemented")};mq.prototype.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.va?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; @@ -730,7 +730,7 @@ Gq=["VALID","ZERO ","SPEC ","EMPTY"],Hq=[8086,80186,80286,80386],Iq=["AL","CL"," 45188,4097],[109,45188,4097],[110,45188,4097],[140,45188,4097],[142,45188,4097],Kq,[119,45188,4097]],[[115,12417,4113],[116,12417,4113],[109,12417,4113],[110,12417,4113],[140,12417,4113],[142,12417,4113],Kq,[119,12417,4113]],[[115,12420,4113],[116,12420,4113],[109,12420,4113],[110,12420,4113],[140,12420,4113],[142,12420,4113],Kq,[119,12420,4113]],[[115,12417,4449],[116,12417,4449],[109,12417,4449],[110,12417,4449],[140,12417,4449],[142,12417,4449],Kq,[119,12417,4449]],[[115,12420,4449],[116,12420, 4449],[109,12420,4449],[110,12420,4449],[140,12420,4449],[142,12420,4449],Kq,[119,12420,4449]],[[155,4225,4097],Kq,[98,12417],[96,12417],[95,4225],[42,12417],[32,4225],[41,12417]],[[155,4228,4100],Kq,[98,12420],[96,12420],[95,4228],[42,12420],[32,4228],[41,12420]],[[44,12417],[31,12417],Kq,Kq,Kq,Kq,Kq,Kq],[[44,12420],[31,12420],[17,4228],[17,4231],[57,4228],[57,4231],[108,4228],Kq],[],[[145,41091],[153,41091],[78,36995],[89,36995],[156,36995],[157,36995],Kq,Kq],[[139,41091],[144,41091],[75,36995], [77,36995],[146,41091],Kq,[79,36995],Kq],[Kq,Kq,Kq,Kq,[13,53380,4097],[16,57476,4097],[15,57476,4097],[14,57476,4097]]];l=vq.prototype; -l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.X=a;this.tc=Jb(a,"FDC");this.Jb=Jb(a,"HDC");this.Tb=Jb(a,"FPU");this.V=Jb(a,"Mouse");(a=Yc(a,"messages"))&&zq(this,a);this.Da=b.N>>2;this.Ba=b.Dg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.X=a;this.tc=Jb(a,"FDC");this.Jb=Jb(a,"HDC");this.Tb=Jb(a,"FPU");this.V=Jb(a,"Mouse");(a=Yc(a,"messages"))&&zq(this,a);this.Da=b.N>>2;this.Ba=b.Eg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, b,2),d.O("dumpSel("+v(a?a.Z:b)+"): %"+r(a?a.Xb:null,d.Da)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Sq[a.type];e&&(c=e[0],b=e[1])}!c||a.wb&32768||(c+=",not present");d.O((b?"seg="+v(a.Aa&65535)+" off="+v(a.Ta):"base="+r(a.Aa,d.Da)+" limit="+Tq(a.Ta))+" type="+u(a.type>>8)+" ("+c+") ext="+v(a.ext&-65296)+ " dpl="+u(a.Gc))}}else d.O("no selector")});Qk(this,134217728,function(a){var b;(a=a[0])&&(b=rq(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+v(b)+")");b;){a=wq(d,0,b);var c=d.Qa(a,1),e=d.na(a,2),k=d.na(a,5);if(77!=c&&90!=c)break;d.O(Uq(0,b)+": '"+String.fromCharCode(c)+"' PID="+v(e)+" LEN="+v(k)+' "'+Vq(d,a,8)+'"');b+=1+k}});Qk(this,128,function(a){Qq(d,d.F.sa,a[0],d.F.sa!==d.F.kd)});Qk(this,8,function(a){a:{if(a=a[0]){var b=rq(d,a);if(void 0===b){d.O("invalid task selector: "+a); break a}a=Rq(d,b,2)}else a=d.F.Sa;d.O("dumpTSS("+v(a?a.Z:b)+"): %"+r(a?a.Aa:null,d.Da));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Wq:Xq,m,n,t,q;for(q in k)m=k[q],n=a.Aa+m,t=Qf(d.F,n,2),2304==c&&(t|=Qf(d.F,n+2,2)<<16),b&&(b+="\n"),b+=v(m)+" "+pa(q+":",11)+r(t,e);if(2304==c)for(q=0,m=t>>>16;mq;)n=a.Aa+m,t=Qf(d.F,n,2),b+="\n"+v(m)+" ports "+v(q)+"-"+v(q+15)+": "+ha(t,2),q+=16,m+=2;d.O(b)}}});this.L=null;this.sb=0;this.fb=!1;lf(this.F,48,this.Qm.bind(this));lf(this.F,65,this.Rm.bind(this)); @@ -756,7 +756,7 @@ function Qq(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.cc(kr(a,c));if(-1===e){a.O h),c!=Ec&&5!=c&&(c=-1),h=0),e+=a.F.Sb,f++}function mr(a,b,c){a=r(a)+" "+r(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"} var Sq={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Wq={PREV_TSS:0,CPL0_SP:2,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},Xq={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}; -function Zq(a,b,c){var d=[],e;for(e=null;e=Jb(a.X,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;kc&&(c=ya(Iq,a.substr(b,2))));return c}; function nr(a,b){var c=0,d=a.ph(b);if(null!=d)switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 22:case 16:case 17:case 18:case 19:case 20:case 21:c=4;break;case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 56:c=8;break;case 23:c=a.Ja}return c?r(d,c):"??"} l.ph=function(a){var b;if(0<=a){var c=this.F;switch(a){case 0:b=c.G&255;break;case 1:b=c.I&255;break;case 2:b=c.M&255;break;case 3:b=c.H&255;break;case 4:b=c.G>>8&255;break;case 5:b=c.I>>8&255;break;case 6:b=c.M>>8&255;break;case 7:b=c.H>>8&255;break;case 8:b=c.G&65535;break;case 9:b=c.I&65535;break;case 10:b=c.M&65535;break;case 11:b=c.H&65535;break;case 12:b=J(c)&65535;break;case 13:b=c.P&65535;break;case 14:b=c.K&65535;break;case 15:b=c.J&65535;break;case 22:b=M(c)&65535;break;case 23:b=Cd(c); @@ -785,10 +785,10 @@ break;case 5:G="DWORD";break;case 11:if(L){G="INT32";break}case 11:G="REAL32";br function zr(a,b,c,d){var e=c&240;if(192==e){if(5a.F.ja)return"??";b+=16}else if(208==e)b+=32;else if(224==e)b+=40;else if(240==e)b+=48;else if(a=c&15,3<=a&&(8>b&&(b+=8),5==a||4==a&&d.Rb))b+=16;return Iq[b]} function Cr(a,b){switch(b){case "V":a=Cf(a.F);break;case "D":a=a.F.ca&1024;break;case "I":a=a.F.ca&512;break;case "T":a=a.F.ca&256;break;case "S":a=Bf(a.F);break;case "Z":a=Af(a.F);break;case "A":a=zf(a.F);break;case "P":a=yf(a.F);break;case "C":a=xf(a.F);break;default:a=0}return b+(a?"1":"0")+" "}function Tq(a){return r(a,a&-65536?8:4)}function Dr(a,b){8<=b&&15>=b&&4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", +function Gr(a,b){var c;void 0===b&&(b=er(a));c=Dr(a,8)+Dr(a,11)+Dr(a,9)+Dr(a,10)+(4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", null,a.F.Mc,a.F.Sd)+" ";c=c+(d+" "+e)+Dr(a,32);80386<=a.F.ja&&(c+=Dr(a,34)+Dr(a,35))}else 80386<=a.F.ja&&(c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+" ");return c+=Dr(a,23)+Cr(a,"V")+Cr(a,"D")+Cr(a,"I")+Cr(a,"T")+Cr(a,"S")+Cr(a,"Z")+Cr(a,"A")+Cr(a,"P")+Cr(a,"C")}l.lj=function(a,b){return a[0]>b[0]?1:a[0]>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({jg:b,dn:c,Z:d,Ra:e,Fa:f,Vm:g,Qd:h,Xi:m})} -function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Fa;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&f>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({kg:b,dn:c,Z:d,Ra:e,Fa:f,Vm:g,Qd:h,Xi:m})} +function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Fa;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&f\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.2","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +l.dg=function(a){void 0===a&&(a=this.A||(this.aa?1:Tr));if(!this.N){this.N++;var b=!1,c=!1;this.ka=!1;var d=this.ea||new qf(this,"1.30.2");if(-1==a)b=!0;else if(a>Tr){if(d.load(this.aa)){this.X=new qf(this,"1.30.2","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): ("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; @@ -841,7 +841,7 @@ function Zr(a,b){if(Ea("There may be a problem with your PCx86 machine.\n\nTo he function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.2"),g=new qf(a,"1.30.2","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad>1,b.U+=(b.W>>1)-2,Pb(b,e),b.ra&&(b.N.restore(),b.ra=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.aa,0,0,a.aa.width,a.aa.height,a.sb,a.Jb,a.Ya,a.fb);a.Ja=!1}} -Xa(function(){for(var a=tb(document,"pcx86-machine"),b=0;b":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74, -Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"]; -da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; +var l,ba,ca={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67, +yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["]; +da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} @@ -66,7 +66,7 @@ function $a(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=Ya(d,a.id))&&(b=d.la[b]) function bb(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)||0])? -(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.la[b]=c;if(this.W){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value, +10)||0])?(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.S=mb(a,"ChipSet");if((this.K=nc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){r("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}xm(this);Sb(b,this,ym);Ub(b,this,zm);Am(this,"None","",!0);this.Y&&Am(this,"Local Disk","?");Am(this,"Remote Disk","??");Bm(this)||t(this)}; l.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.pg){this.C=[];for(a=0;a":62,"?":63,"@":64,ue:65,Bi:66,Ci:67,Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74, -Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,ng:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["];ca[220]=p["\\"];ca[221]=p["]"]; -ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +var l,aa,ba={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67, +Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,og:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["]; +ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} @@ -60,7 +60,7 @@ function Ha(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}re function Na(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=La("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a} function Oa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.yg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; +Va(La("Opera")||La("iOS")?"onunload":"onbeforeunload",function(){Ya(Ra.exit)});function bb(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.al=b.comment;this.Ok=b;b=this.id.indexOf(".");0>b?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.zg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function jb(a,b){b||(b=bb);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),cb=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},cb=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bd&&(f=d);c=f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.Ca)){b=c;if(a.context&&a.ia&&a.ka){e=a.ia.width;a.ka.fillStyle="black";a.ka.fillRect(0,360,e,360);Ob(a,378,a.ia,a.ka);a.pa=a.Da.width/24|0;if(null==b)Pb(a,"Mouse over memory to dump");else for(Pb(a,r(b,8,!0),null,0,1),f=1;16>=f;f++){d="";for(g=1;8>=g;g++){var h;h=a.ga;var k=b++;h=h.sa[(k&h.Gb)>>>h.La].re(k&h.A,k);Pb(a,r(h,2),null,1);d+=32<=h&&128>h?String.fromCharCode(h):"."}Pb(a,d,null,0,1)}a.context.drawImage(a.ia,0,360,e,360,a.qb,a.Db,a.Pa,a.cb)}a.Ca= c}}}l.pd=function(){};function Qb(a,b,c,d){a.A.Bf[a.A.fj++]={El:b,Td:c,type:d};return wa(Nb,b,c,0,d)}function Ob(a,b,c,d){var e,f=null.style.color,g=a.Oa=10;a.C=g;a.U=b;a.W=a.va=18;e||(e=a.ua||a.va+"px Monaco, Lucida Console, Courier New");a.fa=a.ua=e;c&&(a.Da=c);d&&(a.N=d,a.Ea=f||"white")} function Pb(a,b,c,d,e){a.N.font=a.fa;a.N.fillStyle=a.Ea;a.N.fillText(b,a.C,a.U);a.C+=a.pa;null!=c&&(16!=a.Tb?b=c.toString():(b=8>a.Ka?"0x":"",b+=r(c,a.Ka)),a.N.fillText(b,a.C,a.U),a.C+=a.pa);d&&(a.C+=a.pa*d);e&&(a.C=a.Oa,a.U+=(a.W+2)*(e||1))}function Kb(){for(var a=!1,b=tb(document,"pcx86","panel"),c=0;c=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b>>a.La;0g&&(n=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.Fa)return k.Qe+=k.Fa-f,k.Fa=f,!0;if(f>=k.Fa+k.Qe){n=k.size-(f-m);n>g&&(n=g);k.Qe=f-k.Fa+n;f=m+a.Sb;g-=n;h++;continue}}return Wb(a,1,f,g)}f=new B(f,n,a.Sb,d,e);Sb(f,a.ha,k);a.sa[h++]=f;f=m+a.Sb;g-=n}return 0>=g?(Xb(a.F),a.F.la.Ib||a.status(Math.floor(c/1024)+"Kb "+Yb[d]+" at "+r(b)),!0):Wb(a,2,b,c)} var Nb,$b={Hk:20,count:8,Ko:1,type:3},ac=0,bc;for(bc in $b){var cc=$b[bc];$b[bc]={vh:(1<>>this.La;0>>a.La;0>>=a.La;0>>a.La;0>>this.La].pc(a&this.A,a)}; -l.na=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].fg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].gg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La].sc(a&this.A,b&255,a)};l.jb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;c!=this.A?this.sa[d].zf(c,b&65535,a):(this.sa[d++].sc(c,b&255,a),this.sa[d&this.ga].sc(0,b>>8&255,a+1))};function nc(a,b,c){var d=b&a.A,e=(b&a.Gb)>>>a.La;d!=a.A?a.sa[e].zi(d,c&65535,b):(a.sa[e++].xf(d,c&255,b),a.sa[e&a.ga].xf(0,c>>8&255,b+1))} l.nb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;if(c>>=8};l.xj=function(){return null}; -function oc(a,b){var c=0,d=[],e=!a.X&&a.Dg==a.Gb;e||Tb(a,!0);for(var f=0;f>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ha&&a.V!=g[1]&&Ac(a.ha,b,k)}else a.ha&&(ub(a.ha,a,b,k,e),a.V&&Ac(a.ha,b,k));f+=h<<3;b+=h;c-=h}}function Wb(a,b,c,d,e){b="Memory block error ("+b+": "+r(c)+","+r(d)+")";e?a.ha?a.ha.message(b):a.log(b):w(b);return!1}var Bc;if(Ab){var Cc=new ArrayBuffer(2);(new DataView(Cc)).setUint16(0,256,!0);Bc=256===(new Uint16Array(Cc))[0]}else Bc=!1;var ic=Bc; @@ -108,70 +108,70 @@ function B(a,b,c,d,e,f){this.id=Dc+=2;this.da=null;this.C=0;this.Fa=a;this.Qe=b; B.prototype={constructor:B,parent:null,qh:function(a){this.Fa=a},save:function(){var a,b;if(this.controller)a=null;else if(Ab)for(a=Array(this.size>>2),b=0;b>8,c)},U:function(a,b,c){this.sc(a++,b&255,c++); this.sc(a++,b>>8&255,c++);this.sc(a++,b>>16&255,c++);this.sc(a,b>>>24,c)},Ea:function(a){return this.da[a>>2]>>>((a&3)<<3)&255},sb:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b]>>a;return 24>a?c&65535:c&255|(this.da[b+1]&255)<<8},Ya:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b];a&&(c=c>>>a|this.da[b+1]<<32-a);return c},tc:function(a,b){var c=a>>2;a=(a&3)<<3;this.da[c]=this.da[c]&~(255<>2;a=(a&3)<<3;24>a?this.da[c]=this.da[c]&~(65535<>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,b,2,!1);return this.fg(a,b)},Pa:function(a,b){this.ha&&null!=this.Fa&& +(this.da[c]=this.da[c]&16777215|b<<24,c++,this.da[c]=this.da[c]&-256|b>>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,b,2,!1);return this.gg(a,b)},Pa:function(a,b){this.ha&&null!=this.Fa&& Kc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,b,4,!1);return this.si(a,b)},bc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a)||this.F&&Lc(this.F,c,1,!0);this.N?this.L(a,b,c):this.xf(a,b,c)},sd:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,c,2,!0);this.N?this.L(a,b,c):this.zi(a,b,c)},Vc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,c,4,!0);this.N?this.L(a,b,c):this.ua(a,b,c)},Ja:function(a,b){this.yb.da[this.A]|=this.ga; this.zb.da[this.B]|=this.ga;return this.Bd.pc(a,b)},Jb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.sf(a,b)},fb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.Md(a,b)},Cc:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.sc(a,b,c)},Gd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.zf(a,b,c)},hd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V; this.Bd.yf(a,b,c)},Ka:function(a,b){return Nc(this.F,b,!1).pc(a,b)},xd:function(a,b){return Nc(this.F,b,!1).sf(a,b)},gb:function(a,b){return Nc(this.F,b,!1).Md(a,b)},Uc:function(a,b,c){Nc(this.F,c,!0).sc(a,b,c)},Hd:function(a,b,c){Nc(this.F,c,!0).zf(a,b,c)},jd:function(a,b,c){Nc(this.F,c,!0).yf(a,b,c)},Ca:function(a){return this.Za[a]},aa:function(a){return this.Za[a]},Ga:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.pc=this.aa;return this.Za[a]},Tb:function(a){return this.qa.getUint16(a, !0)},pa:function(a){return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Db:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.sf=this.pa;return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Oa:function(a){return this.qa.getInt32(a,!0)},fa:function(a){return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>>2]},cb:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.Md=this.fa;return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>> 2]},Ub:function(a,b){this.Za[a]=b;this.Wa=!0},ra:function(a,b){this.Za[a]=b;this.Wa=!0},uc:function(a,b){this.Za[a]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.sc=this.ra;this.Bd.Wa=!0},qd:function(a,b){this.qa.setUint16(a,b,!0);this.Wa=!0},ya:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.Wa=!0},Fd:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.zf=this.ya;this.Bd.Wa=!0},ce:function(a,b){this.qa.setInt32(a, b,!0);this.Wa=!0},va:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.Wa=!0},Xc:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.yf=this.va;this.Bd.Wa=!0}};function Sb(a,b,c){a.ha=b;a.ze=a.Ae=0;c&&(c.F&&(a.F=c.F),(a.ze=c.ze)&&Hc(a,Ic,!1),(a.Ae=c.Ae)&&Jc(a,Ic,!1))} -function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.fg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.fg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} +function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.gg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.gg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} var Tc=[],lc=[B.prototype.Ea,B.prototype.tc,B.prototype.sb,B.prototype.Cd,B.prototype.Ya,B.prototype.Wc],Ic=[B.prototype.Da,B.prototype.bc,B.prototype.qb,B.prototype.sd,B.prototype.Pa,B.prototype.Vc],Sc=[B.prototype.Ja,B.prototype.Cc,B.prototype.Jb,B.prototype.Gd,B.prototype.fb,B.prototype.hd],Qc=[B.prototype.Ka,B.prototype.Uc,B.prototype.xd,B.prototype.Hd,B.prototype.gb,B.prototype.jd]; if(Ab)var kc=[B.prototype.Ca,B.prototype.Ub,B.prototype.Tb,B.prototype.qd,B.prototype.Oa,B.prototype.ce],jc=[B.prototype.aa,B.prototype.ra,B.prototype.pa,B.prototype.ya,B.prototype.fa,B.prototype.va],Vc=[B.prototype.Ga,B.prototype.uc,B.prototype.Db,B.prototype.Fd,B.prototype.cb,B.prototype.Xc]; -function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Ag=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Ag*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Mf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; +function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Bg=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Bg*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Nf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.ha=d;for(b=0;b=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} -l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;c=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} +l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;cc&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Ag&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} -function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Ag*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} -l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Pf=0;this.Y.Bg=ta();this.Y.Ie&&(a=this.Y.Bg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Bg&&(this.Y.oe=this.Y.Bg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= -(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Pf+=n;fd(this,0,!0);bd(this,n);this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Fj,this.X&&jd(this.X));this.Y.Nf-=n;0>=this.Y.Nf&&(this.Y.Nf+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; -break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Pf&&(e=Math.round(e*this.Y.Pf/this.Y.Ah));e-=this.Y.Ie-this.Y.Bg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Pf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), +function gd(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Bg&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} +function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Bg*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} +l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Qf=0;this.Y.Cg=ta();this.Y.Ie&&(a=this.Y.Cg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Cg&&(this.Y.oe=this.Y.Cg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= +(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Qf+=n;fd(this,0,!0);bd(this,n);this.Y.Pf-=n;0>=this.Y.Pf&&(this.Y.Pf+=this.Y.Fj,this.X&&jd(this.X));this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; +break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Qf&&(e=Math.round(e*this.Y.Qf/this.Y.Ah));e-=this.Y.Ie-this.Y.Cg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Qf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), cd(this))};l.wf=function(){return 0};l.Wb=function(a){wb(this,!0);this.fb-=this.A;this.A=0;fd(this,this.Ub);this.Ub=0;if(this.la.Ib){this.la.Ib=!1;this.N&&this.N.stop();var b=this.qa.run;b&&(b.textContent="Run")}this.la.complete=a};function ad(a,b){a.X&&(jd(a.X,b),a.X.pd(b))} -function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.$f=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; -l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.zg=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; -l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.$f),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.tg()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.tg()};l.tg=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()}; -l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} -function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.$f-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& +function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.ag=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; +l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.Ag=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; +l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.ag),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.vg()}; +l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.vg()};l.vg=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} +function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.ag-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& b=a.Lb&&(F>a.Lb&&(A=H(e),ud(e,H(e),!0),I(e,A),a.df=!0),A=0);else{if(256==h||2304==h)return vd(a,c,q)?a.Aa:-1;if(1024==h)A=2,L=0,Fh||2048==(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,11,c&65532),-1}break;case 3:if(!n||4096>h||512!=(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,12,c&65532),-1;break; case 4:q=h&-513;if(!n||256!=q&&2304!=q)return E.call(e,13,c&65532),-1;2304==q&&(a.Zi=k+e.na(k+102)|0,a.ml=k+a.Ta|0);break;case 6:if(!(h&4096)&&768>>0)+1,a.wb=g,a.type=h,a.ext=m,a.Xb=b,ld(a,!0,!0,!1));return k} function vd(a,b,c){var d=a.F,e=a.Lb,f=d.Sa.Z,g=d.Sa.Aa;if(!c){if(!(d.Sa.type&512))return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb&=-513)}if(-1===d.Sa.load(b))return!1;var h=d.Sa.Aa;if(!1!==c){if(d.Sa.type&512)return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb|=512)}d.Sa.type=d.Sa.type&-513|d.Sa.wb&512;256==d.Sa.type||768==d.Sa.type?(d.jb(g+14,M(d)),d.jb(g+16,Cd(d)),d.jb(g+18,d.G),d.jb(g+20,d.I),d.jb(g+22,d.M),d.jb(g+24,d.H),d.jb(g+26,J(d)),d.jb(g+28,d.P),d.jb(g+30,d.K),d.jb(g+32,d.J),d.jb(g+ 34,d.Xa.Z),d.jb(g+36,d.wa.Z),d.jb(g+38,d.ta.Z),d.jb(g+40,d.vb.Z),d.Bc.load(d.na(h+42)),Dd(d,d.na(h+16)|(c?16384:0)),d.G=d.na(h+18),d.I=d.na(h+20),d.M=d.na(h+22),d.H=d.na(h+24),d.P=d.na(h+28),d.K=d.na(h+30),d.J=d.na(h+32),d.Xa.load(d.na(h+34)),d.vb.load(d.na(h+40)),Ed(d,d.na(h+14),d.na(h+36)),b=38,g=26,a.Lb>>0)+1)}; -function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.zg,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.tg,a.nc=a.ug;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.tg);if(a.type&2048||!(a.type&512))a.nc=a.ug;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= +function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.Ag,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.ug,a.nc=a.vg;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.ug);if(a.type&2048||!(a.type&512))a.nc=a.vg;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= a.Xb+5,d=a.F.Qa(c),d&1||a.F.qc(c,d|1))}b&&(a.Lb=a.Z&3,a.Gc=(a.wb&24576)>>13,80386>a.F.ja||!(a.ext&64)?(a.ba=2,a.R=65535):(a.ba=4,a.R=-1),a.Tc=a.ba,a.Ba=a.R)}else a.load=a.uh,a.Cj=a.Xm,a.mc=a.ij,a.nc=a.kj,a.Lb=a.Gc=0,a.Xb=-1,a.df=!1} -function Gd(a){this.ja=+a.model||8088;var b=a.stepping;this.Uc=this.ja+(b?ea(b,16):0);switch(this.ja){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}Wc.call(this,a,b);this.ag=61442;this.Cc=1792;this.Zf=28672;this.Cd=4;this.ra=255;this.B=80286<=this.ja?Cb:Bb;this.W=Hd;this.eg=Id;this.kg=Jd;this.lg=Kd;if(80186<=this.ja&&(this.W=Hd.slice(),this.eg=Id.slice(),this.kg=Jd.slice(),this.ra=31,this.W[15]=Ld,this.W[96]=Md,this.W[97]=Nd,this.W[98]=Od,this.W[99]=Ld,this.W[100]=Ld,this.W[101]= -Ld,this.W[102]=Ld,this.W[103]=Ld,this.W[104]=Pd,this.W[105]=Qd,this.W[106]=Rd,this.W[107]=Sd,this.W[108]=Td,this.W[109]=Xd,this.W[110]=Yd,this.W[111]=Zd,this.W[192]=ee,this.W[193]=fe,this.W[200]=ge,this.W[201]=he,this.W[241]=ie,this.eg[7]=je,this.kg[7]=je,80286<=this.ja)){this.ag=2;this.Cc|=28672;this.Cd=0;this.W[15]=ke;this.tc=le.slice();for(a=0;a=this.Uc&&(this.tc[166]=te,this.tc[167]=ue)}}this.Hd=[];this.je=[];this.le=0;Zc(this);this.la.complete=this.la.nj=!1;this.Wg=0;this.kd=this.sa=[];this.La=this.Sb=this.Ea=this.Fd=this.hd=this.Gb=this.Db=0;ve(this)}jb(Gd,Wc);function we(a,b,c,d){b=(d?a.kd:a.sa)[b>>>a.La];c?--b.Ae||Oc(b):--b.ze||Pc(b);d&&Xb(a)} -function xe(a){var b;if(a.sa===a.kd){a.sa=Array(a.Fd);a.ke=new B(null,0,0,5,null,a);Sb(a.ke,a.ha);for(b=0;ba.me&&(a.dg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} -function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0a.me&&(a.eg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} +function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0>2;b.zb=g;b.B=h>>2;Ab&&ic&&c.da&&!c.controller&&!c.ze&&!c.Ae?(b.Za=c.Za,b.de=c.de,b.da=c.da,fc(b,Vc)):(b.ga=c?Gc(32):0,b.V=c?Gc(96):0,fc(b,Sc));Sb(b,a.ha,k);a.sa[d]=b;a.Gd.push(d);return b}function ze(a){a.sa!==a.kd&&(a.sa=a.kd,a.ke=null,a.Gd=null,a.jd=null)}l=Gd.prototype;l.reset=function(){this.la.Ib&&this.Wb();ve(this);Zc(this);this.la.error=!1}; function Ae(a,b){var c;switch(b){case 0:c=a.G;break;case 1:c=a.I;break;case 2:c=a.M;break;case 3:c=a.H;break;case 4:c=J(a);break;case 5:c=a.P;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Be(a,b,c){switch(b){case 0:a.G=c;break;case 1:a.I=c;break;case 2:a.M=c;break;case 3:a.H=c;break;case 4:I(a,c);break;case 5:a.P=c;break;case 6:a.K=c;break;case 7:a.J=c}} -function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.mg=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, +function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.ng=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, 0];a.Ee=[null,null,null,null,null,null,0,0];a.Nb=new kd(a,2,"FS");a.Ob=new kd(a,2,"GS");ze(a)}a.rf=new kd(a,0,"NULL");a.ka=a.vb;a.Ka=a.ta;a.S=a.Ia=0;a.D=a.C=-1;a.$b=a.rf;a.ua=0;if(80286>a.ja)Ed(a,0,65535);else{a.Ec=0;a.zd=65535;a.Bc=new kd(a,5,"LDT",!0);a.Sa=new kd(a,4,"TSS",!0);a.Da=new kd(a,6,"VER",!0);Ed(a,65520,61440);var b,c=M(a);b=a.wa;var d=-65536;80386>b.F.ja&&(d&=16777215);b=b.Aa=d;a.Ha=b+c|0;a.hf=(b>>>0)+(a.wa.Ta>>>0)+1}Dd(a,0);wd(a)} function Ce(a){2==a.Tc?(a.cc=a.na,a.Oa=De,a.Ya=Ee,a.Jb=Fe,2==a.ba?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=Le,a.ea=Me,a.ya=Ne)):(a.cc=a.oa,a.Oa=Oe,a.Ya=Pe,a.Jb=Qe,2==a.ba?(a.V=cf,a.ea=df,a.ya=ef):(a.V=ff,a.ea=gf,a.ya=hf))}function xd(a,b){a.ba!=b&&(a.Ia|=1024,a.ba=b,a.R=2==b?65535:-1,jf(a))}function jf(a){2==a.ba?(a.Ga=32768,a.tb=a.na,a.rc=a.jb,2==a.Tc?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=cf,a.ea=df,a.ya=ef)):(a.Ga=-2147483648,a.tb=a.oa,a.rc=a.nb,2==a.Tc?(a.V=Le,a.ea=Me,a.ya=Ne):(a.V=ff,a.ea=gf,a.ya=hf))} function kf(a){a.Tc=a.wa.Tc;a.Ba=a.wa.Ba;Ce(a);a.ba=a.wa.ba;a.R=a.wa.R;jf(a);a.Ia&=-3073}l.vj=function(){var a=this.G+this.H+this.I+this.M+J(this)+this.P+this.K+this.J|0;return a=a+M(this)+this.wa.Z+this.vb.Z+this.ta.Z+this.Xa.Z+Cd(this)|0};function lf(a,b,c){void 0===a.Hd[b]&&(a.Hd[b]=[]);a.Hd[b].push(c)}function mf(a,b,c){c&&(null==a.je[b]&&a.le++,a.je[b]=c)}function nf(a,b){var c=a.je[b];null!=c&&(c(--a.le),delete a.je[b])} function of(a,b){for(var c=a.Ja[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Ja[e],g=g&~(d>>2&3);b?a.sa[g>>>a.La].Rd(g&a.Ea,f,a):(g=a.sa[g>>>a.La],f?--g.Ae||Oc(g):--g.ze||Pc(g))}c>>=2;d>>=4}}function Lc(a,b,c,d){if(!(a.S&8192)&&a.Ja[7]&255){c--;var e=a.Ja[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Ja[g]&&b<=a.Ja[g]+h){a.Ja[6]|=1<>=2;f>>=4}}} -function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.lg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} +function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.mg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} l.save=function(){var a=new qf(this);a.set(0,[this.G,this.H,this.I,this.M,J(this),this.P,this.K,this.J]);var b=M(this),c=this.wa.save(),d=this.vb.save(),e=this.ta.save(),f=this.Xa.save(),g;null!=this.Ec?(g=[this.$a,this.Ec,this.zd,this.Mc,this.Sd,this.Bc.save(),this.Sa.save(),this.Pa],80386<=this.ja&&(g.push(this.ti),g.push(this.se),g.push(this.Od),g.push(this.Ja),g.push(this.Ee))):g=null;b=[b,c,d,e,f,g,Cd(this)];80386<=this.ja&&(b.push(this.Nb.save()),b.push(this.Ob.save()));a.set(1,b);a.set(2,[this.ka.kc, this.Ka.kc,this.S,this.Ia,this.ua,this.D,this.C]);a.set(3,[0,this.uc,this.Y.Wd]);a.set(4,oc(this.ga,!!(this.$a&-2147483648)));return a.data()}; l.restore=function(a){var b=a[0];this.G=b[0];this.H=b[1];this.I=b[2];this.M=b[3];var c=b[4];this.P=b[5];this.K=b[6];this.J=b[7];b=a[1];this.wa.restore(b[1]);this.vb.restore(b[2]);this.ta.restore(b[3]);this.Xa.restore(b[4]);var d=b[5];d&&d.length&&(this.$a=d[0],this.Ec=d[1],this.zd=d[2],this.Mc=d[3],this.Sd=d[4],this.Bc.restore(d[5]),this.Sa.restore(d[6]),this.Pa=d[7],80386<=this.ja&&(this.ti=d[8],this.se=d[9],this.Od=d[10],this.Ja=d[11],this.Ee=d[12]),wd(this));Dd(this,b[6]);var d=!1,e;a:{e=this.ga; var f=a[4],g;for(g=0;g>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.$f=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.$f&a.wa.R)),a.wa.df):null} +function ud(a,b,c){var d=J(a);-1!==a.ta.load(b)&&(I(a,d),a.ta.bd?(a.Sg=a.ta.Aa+a.ta.Ba|0,a.qd=a.ta.Aa+a.ta.Ta|0):(a.Sg=a.ta.Aa+a.ta.Ta|0,a.qd=a.ta.Aa),c||(a.S|=4))}function Bd(a,b){-1!==a.Xa.load(b)&&(a.S|=a.Cd)}function M(a){return a.Ha-a.wa.Aa|0}function O(a,b){a.Ha=a.wa.Aa+(b&a.R)|0}function tf(a,b){a.Ha=b;a.hf=(a.wa.Aa>>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.ag=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.ag&a.wa.R)),a.wa.df):null} function uf(a,b){b=(a.Ha>>>0)+b;b>a.hf&&(8088>=a.ja||a.wa.Ta==a.wa.Ba?b=a.wa.Aa+(b-a.hf&a.R):E.call(a,13,0));return b|0}function vf(a){a.Ha=a.qe}function J(a){return a.gb&~a.ta.Ba|a.fa-a.ta.Aa}function I(a,b){a.gb=b;a.fa=a.ta.Aa+(b&a.ta.Ba)|0}function wf(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&xf(a),g&2&&yf(a),g&4&&zf(a),g&8&&Af(a),g&16&&Bf(a),g&32&&Cf(a))}f?(a.Wc=d,a.Vc=b):(a.Wc=b,a.Vc=d);a.sd=c;a.Xc=d;a.resultType=e} function Df(a,b,c,d,e){a.resultType=c|26;a.Xc=b;d?Ef(a):Ff(a);e?Gf(a):Hf(a);return b}function If(a,b,c,d){c&d?Ef(a):Ff(a);(b^c)&d?Gf(a):Hf(a)}function Jf(a){return xf(a)?1:0}function xf(a){a.resultType&1&&(a.ca&=-2,(a.Wc^(a.Wc^a.sd)&(a.sd^a.Vc))&a.resultType&-2147450752&&(a.ca|=1),a.resultType&=-2);return a.ca&1}function yf(a){a.resultType&2&&(a.ca&=-5,38505>>((a.Xc^a.Xc>>4)&15)&1&&(a.ca|=4),a.resultType&=-3);return a.ca&4} function zf(a){a.resultType&4&&(a.ca&=-17,(a.Vc^a.Wc^a.sd)&16&&(a.ca|=16),a.resultType&=-5);return a.ca&16}function Af(a){a.resultType&8&&(a.ca&=-65,a.Xc&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.ca|=64),a.resultType&=-9);return a.ca&64}function Bf(a){a.resultType&16&&(a.ca&=-129,a.Xc&a.resultType&-2147450752&&(a.ca|=128),a.resultType&=-17);return a.ca&128} function Cf(a){a.resultType&32&&(a.ca&=-2049,(a.Wc^a.Vc)&(a.sd^a.Vc)&a.resultType&-2147450752&&(a.ca|=2048),a.resultType&=-33);return a.ca&2048}function Ff(a){a.resultType&=-2;a.ca&=-2}function Kf(a){a.resultType&=-5;a.ca&=-17}function Lf(a){a.resultType&=-9;a.ca&=-65}function Hf(a){a.resultType&=-33;a.ca&=-2049}function Ef(a){a.resultType&=-2;a.ca|=1}function Mf(a){a.resultType&=-5;a.ca|=16}function Nf(a){a.resultType&=-9;a.ca|=64}function Gf(a){a.resultType&=-33;a.ca|=2048} -function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.Zf);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.ag;a.ca&256&&(a.ua|=2,a.S|=4)} +function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.$f);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.bg;a.ca&256&&(a.ua|=2,a.S|=4)} function Pf(a,b,c,d){var e=0;if(a.$a&1&&(a.pa>a.Pa||a.ca&131072)&&a.Sa.Zi)for(var f=a.Sa.Zi+(b>>>3),e=(1<>>=8,f++;return e?(z(a,256)&&y(a,"checkIOPM("+v(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),E.call(a,13,0),!1):!0} l.Pb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.qa[b]=c;this.Wg++;a=!0;break;default:a=this.parent.Pb.call(this,a,b,c)}return a}; -function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ea;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Ea,a)}; +function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ea;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Ea,a)}; l.na=function(a){var b=a&this.Ea,c=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(b>>this.La;if(b>>this.La].sc(a&this.Ea,b&255,a)}; l.jb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;c>8&255,a+1))};l.nb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(c>>=8}}; function Rf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,1);return a.S&1?0:a.Qa(a.D)}function P(a,b){return Rf(a,a.ka,b)}function Sf(a,b){return Rf(a,a.Ka,b)}function Tf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,a.ba);return a.S&1?0:a.tb(a.D)}function Q(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function Uf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function R(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)} @@ -218,7 +218,7 @@ function Hh(a,b){a&1<<(b&(2==this.ba?15:31))?Ef(this):Ff(this);this.A-=-1===this function Lh(a,b){if(-1===this.D)return Hh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=6;this.S|=2;return a}function Mh(a,b){if(-1===this.D)return Ih.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a^b} function Nh(a,b){if(-1===this.D)return Jh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a&~b}function Oh(a,b){if(-1===this.D)return Kh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a|b} function Ph(a,b){wf(this,a,b,a-b|0,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a}function Qh(a,b){wf(this,a,b,a-b|0,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a} -function Rh(a){if(this.Tb){var b=this.Tb,c=this.mg,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} +function Rh(a){if(this.Tb){var b=this.Tb,c=this.ng,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} function W(a){me.call(this);return a}function Th(a,b){a=Uh.call(this,this.T(),b);80386>this.ja&&(this.A-=12);return a}function Vh(a,b){a=this.Ma();a=2==this.ba?Uh.call(this,a,b):Wh.call(this,a,b);80386>this.ja&&(this.A-=12);return a}function Xh(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Yh.call(this,a,b);c&&(this.ia=~this.ia+1|0,this.va=~this.va+(this.ia?0:1)|0)} function Uh(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return a&65535}function Wh(a,b){Xh.call(this,a,b);this.va!=this.ia>>31?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return this.ia}function Zh(a,b){this.A-=14+(-1===this.D?0:2);Lf(this);-1!==this.Da.load(b)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(b&3)&&(Nf(this),a=this.Da.wb&-256,2>>=16;var d=a&65535;a>>> function Ei(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255}function Fi(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function Gi(){return Cf(this)?1:0}function Hi(){return xf(this)?1:0}function Ii(){return xf(this)?0:1}function Ji(){return Af(this)?1:0}function Ki(){return Af(this)?0:1}function Li(){return xf(this)||Af(this)?1:0} function Mi(){return xf(this)||Af(this)?0:1}function Ni(){return Bf(this)?1:0}function Oi(){return Bf(this)?0:1}function Pi(){return yf(this)?1:0}function Qi(){return yf(this)?0:1}function Ri(){return!Bf(this)!=!Cf(this)?1:0}function Si(){return!Bf(this)!=!Cf(this)?0:1}function Ti(){return Af(this)||!Bf(this)!=!Cf(this)?1:0}function Ui(){return Af(this)||!Bf(this)!=!Cf(this)?0:1}function Vi(a,b){return Wi.call(this,a,b,this.xa())}function Xi(a,b){return Yi.call(this,a,b,this.xa())} function Zi(a,b){return Wi.call(this,a,b,this.I&31)}function $i(a,b){return Yi.call(this,a,b,this.I&31)}function aj(a,b){return bj.call(this,a,b,this.xa())}function cj(a,b){return dj.call(this,a,b,this.xa())}function ej(a,b){return bj.call(this,a,b,this.I&31)}function fj(a,b){return dj.call(this,a,b,this.I&31)}function gj(a,b){var c=a-b|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255} -function hj(a,b){var c=a-b|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function ij(a,b){Df(this,a&b,128);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function jj(a,b){Df(this,a&b,this.Ga);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Wf:this.B.Wf;this.S|=2;return a}function kj(a,b){var c=this.G&this.R,d=(1<<(this.I&31))-1;return a&~(d<>(this.G&this.R)&(1<<(this.I&31))-1&this.R}function mj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.li}else this.C=this.D,Wf(this,a),this.A-=this.B.ki;return b} function nj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.M=this.M&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:I(this,J(this)&~this.R|a);break;case 5:this.P=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.li}else this.C=this.D,this.S&2||this.rc(this.$b.nc(this.Ca,this.ba),a),this.A-=this.B.ki;return b} function oj(a,b){a^=b;Df(this,a,128);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return a}function pj(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a^b,this.Ga)&this.R}function qj(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function rj(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=2;return a&~this.R|b&this.R} @@ -340,7 +340,7 @@ function Nj(){var a=this.T();xf(this)||Af(this)?(O(this,M(this)+a),this.A-=this. function Sj(){var a=this.T();yf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}function Tj(){var a=this.T();!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}function Uj(){var a=this.T();!Bf(this)==!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}function Vj(){var a=this.T();Af(this)||!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb} function Wj(){var a=this.T();Af(this)||!Bf(this)!=!Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}function Xj(){this.Jb.call(this,Yj,this.xa);this.A-=-1===this.C?1:this.B.Jg}function Zj(){this.S|=1;this.Ya.call(this,gi)}function ak(){this.S|=1;this.ea.call(this,gi)}function bk(){this.Oa.call(this,gi)}function ck(){this.V.call(this,gi)}function ee(){this.Jb.call(this,dk,yj)}function fe(){this.ya.call(this,2==this.ba?ek:fk,yj)} function gk(){var a=Zf(this),b=H(this);O(this,b);a&&I(this,J(this)+a);this.A-=this.B.Ek}function hk(){var a=H(this);O(this,a);this.A-=this.B.Bk}function ge(){this.U=this.fa;var a=Zf(this),b=this.xa()&31;this.A-=11;K(this,this.P);var c=J(this)&this.R;if(0>9- (b=9),b=a<<24>>24>>b-1,a=b>>1&255,Df(this,a,128,b&1);return a}],ek=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<>16-b)&65535):d=a<<15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=17)?(c=(a<>17-b)&65535,d=a<>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;16>>b-1,a=b>>>1&65535,Df(this,a,32768,b&1,a&32768);return a},W,function(a,b){if(b&=this.ra)17>16>>b-1,a=b>>1&65535,Df(this,a,32768,b&1);return a}],fk=[function(a,b){var c=a;if(b&=this.ra)c=a<>>32-b,If(this,c,a<>>b|d;If(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.ra)c=Jf(this),c=a<>>32-b>>>1,If(this,c,a<>>b|c<<32-b|a<<32-b<<1,If(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.ra)a<<=b-1,c=a<<1,Df(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.ra)b=a>>>b-1,a=b>>>1,Df(this,a,-2147483648, -b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= +b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= -1===this.D?this.B.uk:this.B.tk;this.S|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24)|0;this.ia=b&65535;127b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.Zj:this.B.Yj;this.S|=2;return a},function(a,b){if(!a)return Fj.call(this),a;var c=(b=this.G&65535)/a;if(255>24,d= -(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Vf:this.B.Uf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Vf:this.B.Uf;return b&this.R},function(a,b){2==this.ba? +(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&this.R},function(a,b){2==this.ba? (b=this.G&65535,b=b*a|0,this.ia=b&65535,this.va=b>>16&65535):(Yh.call(this,a,this.G),80563==this.Uc&&68657152==this.G&&129==a&&(this.va=0));this.va?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.wk:this.B.vk;this.S|=2;return a},function(a,b){2==this.ba?(b=this.G&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.ia=b&65535,this.va=b>>16&65535,b=32767b):(Xh.call(this,a,this.G),b=this.va!=this.ia>>31);b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D? this.B.ak:this.B.$j;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;b=65536*(this.M&65535)+(this.G&65535);var c=b/a;if(65536<=c)return Fj.call(this),a;this.ia=c&65535;this.va=b%a&65535}else{if(!sj.call(this,this.G,this.M,a))return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Tj:this.B.Sj;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;var c=a<<16>>16,d=(b=this.M<<16|this.G&65535)/c|0;if(d!=d<<16>>16||8086== -this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Tf:this.B.Sf; -return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Tf:this.B.Sf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= +this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Uf:this.B.Tf; +return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= this.fa;Bj.call(this,a,this.na(this.D+this.ba));this.A-=this.B.Mj;this.S|=2;this.U=-1;return a},function(a){O(this,a);this.A-=-1===this.D?this.B.jk:this.B.ik;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);Ed(this,a,this.na(this.D+this.ba));this.A-=this.B.gk;this.S|=2;return a},function(a){var b=a;this.S&512&&(a=a-2&65535,80286>this.ja&&(b=a));K(this,b);this.A-=-1===this.D?this.B.Rc:this.B.Ak;this.S|=2;return a},W];function te(){this.V.call(this,lj);this.A-=-1===this.D?6:13} -function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.lg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; +function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.mg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; le[5]=function(){this.pa?E.call(this,13,0,0,!0):(Of(this,this.na(2054)),this.J=this.na(2086),this.K=this.na(2088),this.P=this.na(2090),this.H=this.na(2094),this.M=this.na(2096),this.I=this.na(2098),this.G=this.na(2100),td(this.Xa,2102,this.na(2084)),td(this.wa,2108,this.na(2082)),td(this.ta,2114,this.na(2080)),td(this.vb,2120,this.na(2078)),Dd(this,this.na(2072)),O(this,this.na(2074)),I(this,this.na(2092)),this.Ec=this.na(2126)|this.Qa(2128)<<16,this.zd=this.Ec+this.na(2130),this.Mc=this.na(2138)| this.Qa(2140)<<16,this.Sd=this.Mc+this.na(2142),td(this.Bc,2132,this.na(2076)),td(this.Sa,2144,this.na(2070)),this.A-=195)};le[6]=function(){this.pa?E.call(this,13,0):(this.$a&=-9,this.A-=2)};le[11]=Ld;le[166]=Ld;le[255]=Ld;var N=[];N[5]=Ld; N[7]=function(){if(this.pa)E.call(this,13,0,0,!0);else{var a=this.Xa.mc(this.J&this.Ba,204);if(-1!==a){uj.call(this,this.oa(a));var b=this.oa(a+168),c=(b&24576)>>13;Dd(this,this.oa(a+4),c);this.Ec=this.oa(a+112);this.zd=this.Ec+this.oa(a+116);this.Mc=this.oa(a+100);this.Sd=this.Mc+this.oa(a+104);sd(this.Bc,this.oa(a+56),this.oa(a+120),this.oa(a+124),this.oa(a+128));sd(this.Sa,this.oa(a+52),this.oa(a+84),this.oa(a+88),this.oa(a+92));this.J=this.oa(a+12);this.K=this.oa(a+16);this.P=this.oa(a+20);this.H= @@ -426,32 +426,32 @@ l.reset=function(a){var b;Tk(this);this.L=Array(this.cb);for(b=0;b=a;a++)this.A[a]=0;for(a=14;46>a;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+Yk(this,Ak,void 0)<b){var d=!1;4!=b&&5!=b||a.A[11]&2||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[11]&4||(d&&128c;c++)b+=a.A[c];a.A[47]=b&255;a.A[46]=b>>8} -l.save=function(){var a=new qf(this);a.set(0,[this.C]);for(var b=[],c=0;c=kg&&(a.set(5,[this.N,this.ea,this.aa,this.Ja,this.fa,this.Ka]),a.set(6,[this.ra[7],this.ra,this.pa,this.A,this.Ga,this.ua]));return a.data()}; l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Tk(this);b=a[1];for(c=0;c=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='
'+f+"
\n"}e.innerHTML=d;jl(a,b,c,!0)}function kl(a,b,c){if(b=(a=Ek[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.vg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} -function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.wg=!1);for(var d=!1;0<=b.count&&(c=b.qg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.vg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.vg,b.Lg,c)&&(b.wg=!0)):0!=b.type&&(b.wg=!0)),!d&&!El(b););} -function El(a){if(!a.wg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.wg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} +function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.xg=!1);for(var d=!1;0<=b.count&&(c=b.rg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.wg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.wg,b.Lg,c)&&(b.xg=!0)):0!=b.type&&(b.xg=!0)),!d&&!El(b););} +function El(a){if(!a.xg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>3];b=1<<(b&7);d.lc&b||(d.lc|=b,d.nf=c||0,Hl(a))}function lg(a,b){var c=a.vc[b>>3];b=1<<(b&7);c.lc&b&&(c.lc&=~b,Hl(a))}function Hl(a,b){var c,d=-1;1>=1),ed(a.F,e))),b||2!=c||cl(a))}function Ol(a,b,c,d){x(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.Pa:a.Oa} -function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.ig=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= -b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.ig?1:0;a.md=48==a.ig?2:1} +function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.jg=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= +b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.jg?1:0;a.md=48==a.jg?2:1} function Rk(a,b,c){var d=a.V[b];if(d.De&&(2!=b||a.W&1)){var e=cd(a.F,a.ka),f=(e-d.vd)/a.gb|0;0>f&&(d.vd=e,f=0);var g=Nl(a,b),h=id(a,b)-f;0==d.mode?(0>=h&&(h=0),h||(d.td=!0,d.De=!1,b||mg(a,0))):4==d.mode?(d.td=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0))):6==d.mode&&(h-=f,0>=h&&(d.td=!d.td,h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0)));d.Ab[0]=h&255;d.Ab[1]=h>>8&255;c&&(a.vd=0)}return d} function hd(a,b){for(var c=0;c=kg){b=a.F.Y.Id;c=cd(a.F,a.ka);null==a.fb&&(a.Ga=cd(a.F,a.ka),a.Jb=1024,a.fb=Math.floor(a.F.Y.Id/a.Jb),bl(a));c>=a.ua&&(a.A[12]|=64,a.A[11]&64&&(a.A[12]|=128,mg(a,8)),a.ua=c+a.fb);a.A[0]==a.A[1]&&a.A[2]==a.A[3]&&a.A[4]==a.A[5]&&(a.A[12]|=32,a.A[11]&32&&(a.A[12]|=128,mg(a,8)));var d=c-a.Ga,e=Math.floor(d/b);if(e&&!(a.A[11]&128)){for(;e--;)if(60<=++a.A[0]&&(a.A[0]=0,60<=++a.A[2]&&(a.A[2]=0,24<=++a.A[4]))){a.A[4]=0;a.A[6]=a.A[6]%7+1;var f; f=a.A[9];var g=va[a.A[8]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[7]>f&&(a.A[7]=1,12<++a.A[8]&&(a.A[8]=1,a.A[9]=(a.A[9]+1)%100))}a.A[12]|=16;a.A[11]&16&&(a.A[12]|=128,mg(a,8))}a.Ga=c-d%b}}l=X.prototype;l.ym=function(a,b){var c=this.Ya;this.Ca&16&&(this.W&128?c=this.C[0][1]:this.B&&(c=Rl(this.B)));x(this,a,null,b,"PPI_A",c);return c};l.Yn=function(a,b,c){x(this,a,b,c,"PPI_A");this.Ya=b};l.zm=function(a,b){var c=this.W;x(this,a,null,b,"PPI_B",c);return c}; @@ -490,10 +490,10 @@ l.save=function(){var a=new qf(this);this.controller&&a.set(0,this.controller.sa l.restore=function(a){this.qc(0,a[0]&255);this.qc(2,a[1]&255);return!0};l.Qa=function(a){var b=255;2>a?b=a&1?this.ha>>8:this.ha&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};l.qc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.N.ga;if(b&1)this.A&&(dc(a,917504,131072,this.A),this.A=null);else{this.A||(this.A=ec(a,917504,131072));var c=ec(a,16646144,131072);dc(a,917504,131072,c,b&2?1:hc)}this.C=this.C&-256|b}};l.wj=function(){return om};l.nh=function(){return pm}; Xa(function(){for(var a=tb(document,"pcx86","ram"),b=0;b"]]=10804;Y[p["/"]]=53;Y[p["?"]]=10805;Y[3016]=54;Y[1044]=55;Y[1018]=56;Y[1032]=57;Y[1020]=58;Y[1112]=59;Y[1113]=60;Y[1114]=61;Y[1115]=62;Y[1116]=63;Y[1117]=64;Y[1118]=65;Y[1119]=66;Y[1120]=67;Y[1121]=68;Y[1144]=69;Y[1145]=70;Y[1036]=71;Y[1038]=72;Y[1033]=73;Y[1109]=74;Y[1037]=75;Y[1101]=76;Y[1039]=77;Y[1107]=78;Y[1035]=79;Y[1040]=80;Y[1034]=81;Y[1045]=82;Y[1046]=83;Y[4027]=84;Y[1122]=87;Y[1123]=88;Y[1091]=91;Y[1093]=93;Y[1224]=91;Y[tm]=7470;Y[4008]=7494;Y[4046]=3677523; Y[4045]=3677522;Y[4013]=3677468;l=qm.prototype; l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]= @@ -506,22 +506,22 @@ function Cm(a,b){if(0>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.xc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in xm)d="led-"+g,e=xm[g],c&&c!=e||!(f=a.qa[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.xc&=~b,d&&(a.xc|=b);return!0}}return!1} function zm(a,b,c){if(Y[b]&&a.F&&a.F.la.Ib){um[b]&&a.B.length&&0e||(e==a.B.length&&(d={},d.Pe=b,d.xc=a.xc,Dm(a,b,!0),e++),0b.Kd){if(!b.Hf){Bm(a,b.Pe);return}b.Hf=!1;c=a.ua}else c=1==b.Kd++?500:100;b.Zk=setTimeout(function(a){return function(){Fm(a,b)}}(a),c)}} -function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.ng)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; +function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.og)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; function ym(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Hm(a,g,!0);a.kh&&h==p["`"]&&(g=h=27);if(Y[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Am(a,h,!1,c)){if(20==g||144==g||145==g)a.pa||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k=p.ue&&b<=p.ng||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), +function Gm(a,b,c){var d=!1;Am(a,b,!0,c);var e=Y[b]||Y[b+1E3];if(void 0!==e){14==e&&40==(a.xc&40)&&(e=83);var d=[],f=e&255;if(83=p.ue&&b<=p.og||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), 1==e.A.length&&e.N&&$l(e.N,f)):(20==e.A.length&&e.A.push(255),y(e,"scan code buffer overflow")));d=!0}return d}Xa(function(){for(var a=tb(document,"pcx86","keyboard"),b=0;bc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.pg=an;if(5<=b){this.wh=$m;this.pg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? -0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.hg=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.lengthc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.qg=an;if(5<=b){this.wh=$m;this.qg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? +0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.ig=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.length>this.controller.cd|b<<8-this.controller.cd& gn[16]=function(a,b){a+=this.C;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb|this.controller.Fb&~this.controller.Mb;a=this.controller.rb&(c==a?16711935:-16711936);b=b&a|this.da[c]&~a;this.da[c]!=b&&(this.da[c]=b,this.Wa=!0)};gn[1]=function(a){a+=this.C;var b=this.da[a]&~this.controller.rb|this.controller.Fb&this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; gn[17]=function(a){a+=this.C;var b=a&-2;a=this.controller.rb&(b==a?16711935:-16711936);a=this.da[b]&~a|this.controller.Fb&a;this.da[b]!=a&&(this.da[b]=a,this.Wa=!0)};gn[2]=function(a,b){a+=this.C;b=Vm[b&15];b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; gn[98]=function(a,b){a+=this.C;b=Vm[b&15];b&=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[162]=function(a,b){a+=this.C;b=Vm[b&15];b|=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; -gn[226]=function(a,b){a+=this.C;b=Vm[b&15];b^=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[3]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Xf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; -function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.hg;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Yf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.ig;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>3;for(c=0;c=d&&(A=d,g=!0);break; -case "p":0<=d&&3>=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.pg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, -b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.hg),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Cg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.qg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, +b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.ig),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Dg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0c&&(a=Math.round(c/b*100)+"%")}this.rf?(this.ka.style.width=a,this.ka.style.width=a,this.ka.style.display="block",this.ka.style.margin="auto"):(this.ia.style.width=a,this.ia.style.height="auto");this.ia.style.backgroundColor="black";this.ia.Ye();a=!0}this.X&&this.X.focus()}return a}; -function Lm(a,b){!b&&a.ia&&(a.rf?a.ka.style.width=a.ka.style.height="":a.ia.style.width=a.ia.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.kh=b)}l.Fe=function(a){var b=!1;this.X&&(a?this.X.Fe&&(this.X.Fe(),this.V&&this.V.Yf(!0),b=!0):this.X.$k&&(this.X.$k(),this.V&&this.V.Yf(!1),b=!0),this.X&&this.X.focus());return b};l.Yf=function(a){this.V&&(this.V.Yf(a),this.B&&(this.B.kh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.bl)}; -function tn(a,b){var c=a.X;c&&!a.ke&&(c.addEventListener("touchstart",function(b){vn(a,b,!0)},!1),c.addEventListener("touchmove",function(b){vn(a,b)},!0),c.addEventListener("touchend",function(b){vn(a,b,!1)},!1),a.ke=b,a.uc=a.Cc=a.lg=-1,a.Hd=!1,a.Xc=null,a.Gd=!1,a.so=function(){a.Gd=!0;a.V.he(wn,!0)})}l.Mg=function(a){this.B&&this.B.Mg(a)}; -function vn(a,b,c){var d,e,f=0,g=0;e=a.ka;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.ra/a.ka.offsetWidth,k=a.Da/a.ka.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.ke)d=d/(a.ra/3)|0,e=e/(a.Da/3)|0,1!=e?e?zm(a.B,1040,!0):zm(a.B,1038,!0):1!=d&&(d?zm(a.B,1039,!0):zm(a.B,1037,!0));else if(a.V){g=a.Hd;f=b.timeStamp-a.lg;!0===c?(a.Hd=500f){a.V.he(wn,!0);a.V.he(wn,!1);return}}if(c||0>a.uc||0>a.Cc)a.uc=d,a.Cc=e;c=Math.round(d-a.uc);b=Math.round(e-a.Cc);a.uc=d;a.Cc=e;a.V.Kf(c,b,a.uc,a.Cc)}}l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; l.reset=function(){var a=!0,b=0;this.N&&(b=+Yk(this.N,Ak,void 0));this.ja||(this.Ua=3==b?1:3);this.va=3;switch(this.Ua){case hm:b=7;break;case 5:var c=Om[this.Vc];c&&(b=c[0]);b||(b=4);break;case 1:b=3;this.va=7;break;default:b=2}this.ya!==b&&(this.ya=b,a=!0);this.C=null;this.pa=this.qd=new Xm(this,1);this.aa=this.Wc=new Xm(this,3);5>this.Ua?this.A=new Xm:(this.A=new Xm(this,this.Ua,null,this.Dd),xn(this));Xn(this);this.Ga=null;this.cb=this.ua=-1;this.Pa=0;Yn(this,this.va);if(this.C.ob&&a){a=this.C.ob+ this.Ub;for(b=this.C.ob;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);nc(this.ga,b,c|d<<8)}un(this,!0)}};function xn(a){a.A.vf&1?(a.pa=a.qd,a.aa=a.A):(a.pa=a.A,a.aa=a.Wc)}l.save=function(){var a=new qf(this);a.set(0,hn(this.qd));a.set(1,hn(this.Wc));a.set(2,[this.ya,this.va,this.Ga]);a.set(3,hn(this.A));return a.data()}; @@ -559,34 +559,34 @@ function ao(a,b){if(1==b)return a.Ca[0]=Rm[0],a.Ca[1]=Rm[7],a.Ca;if(2==b){var c= function Xn(a,b){var c=!1;if(window&&a.Uc&&(!b||a.U)){b=0;var d=a.Tb?a.Tb:8,e=ao(a);null!=a.Jb[0]&&bo(a,3,a.Jb[0],b,d,8,a.Uc,e)&&(c=!0);b=a.Tb?0:2048;d=a.Tb?a.Tb:9;null!=a.Jb[1]&&(bo(a,1,a.Jb[1],b,d,14,a.Uc,Pm,Qm)&&(c=!0),a.Tb&&bo(a,a.Ua,a.Jb[1],0,a.Tb,14,a.Uc,e)&&(c=!0))}return c}function bo(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(co(a,b,c,d,e,f,g,h,k)&&(m=!0),a.ro&&co(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} function co(a,b,c,d,e,f,g,h,k){var m=!1,n=b&1?0:1,t=a.Oa[b],q=16>h.length?h.length:16;t||(t={Pc:e<ga||!L?ga:8,Pa=Ja.createImageData(m.Pc,m.Qc);for(Da=0;256>Da;Da++){for(Ka=0;Ka=ga-2,Rc=S[Ka>(8<=Wa&&192<=Da&&223>=Da?7:Wa)?A:ab;eo(Pa,Ge,Wd,He);C&&eo(Pa,Ge+1,Wd,He)}Ja.putImageData(Pa,(Da&15)*m.Pc,(Da>>4)*m.Qc)}m.Re[F]="#"+r(A[0],2)+r(A[1],2)+r(A[2],2);m.Yi[F]=A;m.Zg[F]=la;m=!0}}a.Oa[b]=t;return m}function fo(a){0a.cb&&(a.cb=0):a.cb=-1} -function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.mg!=b||a.Ee!=d)a.mg=b,a.Ee=d;a.Ya=e+1;fo(a)}}} +function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.ng!=b||a.Ee!=d)a.ng=b,a.Ee=d;a.Ya=e+1;fo(a)}}} function go(a){if(0<=a.ua){if(void 0!==a.fa){var b=a.fa[a.ua];if(b&131072){var b=b&-131073,c=a.ua%a.L,d=a.ua/a.L|0;a.U&&a.Oa[a.U]&&(a.gb&&ho(a,c,d,b,a.gb),ho(a,c,d,b));a.fa[a.ua]=b}}a.ua=-1}} function io(a){var b,c=a.C;a.hf=!1;var d=c.Zd[5];if(null!=d){b=1024;var e=0,f=c.Zd[3]&31;switch(d&3){case 0:if(f){e=32;switch(f&24){case 8:e=96;break;case 16:e=160;break;case 24:e=224}c.cd=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ua==hm&&(e=3,c.cd=f&7)}d&8&&(b=1280);c=c.Me[4];null!=c&&(c&4||(b|=4096,e|=16),d&64&&(c&8&&(b|=16384,e|=4),a.hf=!0));b|=e}return b} -function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Cg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} +function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Dg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} function Zn(a,b){var c,d=a.Ga,e=a.C;if(e)if(1==e.Ua)d=7;else if(5<=e.Ua){var d=null,f=e.Dd>>2,g=32768=e.mb[18]?19:20:21:g&128||350>f?d= m?13:14:480<=f&&(d=3==a.ya?17:18):d=m?7-d:6:d-=m?2:0);c=io(a)}}else e.fd&8&&(e.fd&2?(d=e.fd&16?6:5,e.fd&4||--d):(d=e.fd&1?3:1,e.fd&4&&--d));else a.Ga=null,null==d&&(d=a.va);if(!Yn(a,d,b))return!1;jo(a,c);return!0} -function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.dg=a.L*a.W|0;a.ag=a.dg/ -a.hd|0;a.Ub=a.ag;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.Zf&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.Zf||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= -0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Ea=!1;var b=a.ag;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} -function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.mg,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], +function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.eg=a.L*a.W|0;a.bg=a.eg/ +a.hd|0;a.Ub=a.bg;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.$f&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.$f||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= +0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Ea=!1;var b=a.bg;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} +function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.ng,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], e.fillRect(b,c+f,h.Pc,g)):(a.Ya&&a.Ya!==a.Ka&&(f=f*a.Ka/a.Ya|0,g=g*a.Ka/a.Ya|0),a.ea.fillStyle=h.Re[d],a.ea.fillRect(b,c+f,a.Ja,g)))} -function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.dg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= +function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.eg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= 1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.Ea){b=a.ga;for(var n=!0,t=c>>>b.La;0f)return;g=f+1}}if(a.U){if(a.Oa[a.U]){d=f;f=0;e=a.Pa=0;h=1048575;m=a.C.fd&32;5<=a.Ua&&(m=a.C.Sc[16]&8);b=a.ua-a.C.Ld;m&&(e=32768,h&=~e,a.cb&2||(h&=-65537));for(c+=d<<1;c>8|(q&255)<<8;var D=e,L=16;m>=h))>>(L-=h);eo(a.sb,m++,n,b[ga])}m>A&&(A=m);n=C&&(C=n+1)}k+=2;d++;if(m>=a.L){m=0;n+=2;if(n>a.W)break;n==a.W&&(n=1,k=c+a.sd)}}a.Ea= !0;ta.L?a.Db-a.L-q>>3:0;c>=8;b>t&&(t=b);m=F&&(F=m+1)}c+=C;if(b>=a.L){b=0;if(++m>a.W)break;c+=D}}q||(a.Ea=!0);na.L?a.Db-a.L-F>>3:0;cD&&(L=D)):(q<<=F,L-=F,a.Ea=!1):(a.Ea&&q===a.fa[d]?(h+=L,L=0):a.fa[d]=q,d++);if(L){hn&&(n=h);b=A&&(A=b+1)}if(h>=a.L){h=0;if(++b>a.W)break;c+=C}}F||(a.Ea=!0);ma&&(b.Eh=a,a=-a|0);a%b.zh>b.an&&(c|=1);a%b.Ch>b.cn&&(c|=9);b.ni=a/b.Ch|0;return c}l.um=function(a,b){return no(this,this.pa,a,b)};l.Vn=function(a,b,c){var d=this.pa;d.Qg=d.Ac;d.Ac=b&31;x(this,a,b,c,"CRTC.INDX")};l.tm=function(a,b){return oo(this,this.pa,a,b)};l.Un=function(a,b,c){po(this,this.pa,a,b,c)};l.vm=function(a,b){return qo(this,this.pa,b)};l.Wn=function(a,b,c){a=this.pa;x(this,a.port+4,b,c,"MODE");a.fd=b;Zn(this,!1)}; -l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.hg=this.A.hg&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; +l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.ig=this.A.ig&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; l.Lk=function(a,b,c){var d=this.A,e=d.Nd&32;if(d.Ze){d.Ze=!1;var f=d.Nd&31;if(16<=f||!e)c&&!z(this)||x(this,a,b,c,"ATC."+d.$g[f]),d.Sc[f]=b,ko(this,!1)}else d.Nd=b,x(this,a,b,c,"ATC.INDX"),d.Ze=!0,b&32&&!e&&Xn(this,!0)&&un(this,!0),a=(d.mb[12]<<8)+d.mb[13]|0,d.Ld!=a&&(d.Ld=a,ko(this)),d.qf=0}; l.Gm=function(a,b){a=0;if(5==this.Ua)a=3-((this.A.vf&12)>>2),a=(this.Vc&1<>this.A.Kc&63;b&&!z(this)||x(this,969,null,b,"DAC.DATA["+u(this.A.od)+"]["+u(this.A.Kc)+"]",a);this.A.Kc+=6;12Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ca().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= @@ -596,40 +596,40 @@ l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet");qc(b, function wo(a,b){var c=0;b||(b=[0,0,0]);a.L=b[c++];a.Yb=b[c++];a.Df=b[c];return!0}l.hm=function(a,b){var c=this.L;x(this,a,null,b,"DATA",c);return c};l.Fm=function(a,b){var c=this.Yb;x(this,a,null,b,"STAT",c);return c};l.dm=function(a,b){var c=this.Df;x(this,a,null,b,"CTRL",c);return c}; l.Hn=function(a,b,c){x(this,a,b,c,"DATA");this.L=b;this.Yb|=64;a=!1;y(this,"transmitByte("+u(b)+")");this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Yb&=-65);xo(this)};l.Cn=function(a,b,c){x(this,a,b,c,"CTRL");this.Df=b;xo(this)}; function xo(a){a.N&&a.C&&(a.Df&16&&!(a.Yb&64)?mg(a.N,a.C):lg(a.N,a.C))}var uo={0:so.prototype.hm,1:so.prototype.Fm,2:so.prototype.dm},vo={0:so.prototype.Hn,2:so.prototype.Cn};Xa(function(){for(var a=tb(document,"pcx86","parallel"),b=0;b=b)a.preventDefault&&a.preventDefault(),64=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.xd)return;b=qa(b[1]);if(this.ia=ob(b)){var d=this.ia.exports;if(d){var e=d.connect;e&&e.call(this.ia);if(this.ra=d.receiveData){this.status(this.ce+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}}; l.hc=function(a,b){if(!b)if(this.zj(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){Co(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.va;c[b++]=this.Da;c[b++]=this.fa;c[b++]=this.pa;c[b++]=this.U;c[b++]=this.B;c[b++]=this.C;c[b++]=this.A;c[b++]=this.Ca;c[b]=this.aa;a.set(0,c);return a.data()};l.restore=function(a){return Co(this,a[0])}; -function Co(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,48,[]]);a.va=b[c++];a.Da=b[c++];a.fa=b[c++];a.pa=b[c++];a.U=b[c++];a.B=b[c++];a.C=b[c++];a.A=b[c++];a.Ca=b[c++];a.aa=b[c];return!0}l.gg=function(a){if("number"==typeof a)this.aa.push(a);else if("string"==typeof a)for(var b=0;b>8:this.pa;x(this,a,null,b,this.B&128?"DLM":"IER",c);return c};l.pm=function(a,b){var c=this.U;x(this,a,null,b,"IIR",c);return c}; l.qm=function(a,b){var c=this.B;x(this,a,null,b,"LCR",c);return c};l.sm=function(a,b){var c=this.C;x(this,a,null,b,"MCR",c);return c};l.rm=function(a,b){var c=this.A;x(this,a,null,b,"LSR",c);return c};l.xm=function(a,b){var c=this.Ca;x(this,a,null,b,"MSR",c);return c}; l.eo=function(a,b,c){x(this,a,b,c,this.B&128?"DLL":"THR");if(this.B&128)this.fa=this.fa&-256|b;else{this.Da=b;this.A&=-97;a=!1;y(this,"transmitByte("+u(b)+")");this.ra&&this.ra.call(this.ia,b)&&(a=!0);if(this.L)13==b?this.ea=0:8==b?(this.L.value=this.L.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,32>b&&1==c&&(c=0),9==b&&(b=this.Ga||8,c=b-this.ea%b,this.Ga&&(a=pa("",c))),this.Ea&&!this.ea&&c&&(a=String.fromCharCode(this.Ea)+a),this.L.value+=a,this.L.scrollTop= this.L.scrollHeight,this.ea+=c),a=!0;else if(null!=this.W){if(10==b||1024<=this.W.length)this.O(this.W),this.W="";10!=b&&(this.W+=String.fromCharCode(b));a=!0}a&&(this.A|=96)}};l.Rn=function(a,b,c){x(this,a,b,c,this.B&128?"DLM":"IER");this.B&128?this.fa=this.fa&255|b<<8:this.pa=b};l.Sn=function(a,b,c){x(this,a,b,c,"LCR");this.B=b}; -l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.gg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; +l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.hg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; var Ao={0:yo.prototype.Cm,1:yo.prototype.om,2:yo.prototype.pm,3:yo.prototype.qm,4:yo.prototype.sm,5:yo.prototype.rm,6:yo.prototype.xm},Bo={0:yo.prototype.eo,1:yo.prototype.Rn,3:yo.prototype.Sn,4:yo.prototype.Tn};Xa(function(){for(var a=tb(document,"pcx86","serial"),b=0;ba.L||0>a.V)a.L=b.clientX,a.V=b.clientY;a.fa?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.L,d=b.clientY-a.V);a.L=b.clientX;a.V=b.clientY;a.Kf(c,d,a.L,a.V)}} l.he=function(a,b){if(this.Hc&&this.F&&this.F.la.Ib){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case wn:if(this.aa!=b){this.aa=b;Ko(this,c);return}break;case 2:if(this.ea!=b){this.ea=b;Ko(this,c);return}}y(this,c+": ignored")}};l.Kf=function(a,b,c,d){this.Hc&&this.F&&this.F.la.Ib&&(a||b)&&(this.U=a,this.W=b,Ko(this,null,c,d))}; -function Ko(a,b,c,d){var e=64|(a.aa?32:0)|(a.ea?16:0)|(a.W&192)>>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.gg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.jg+"!"+h[1];break}b&&0>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.hg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.kg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.xg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, +b;ga++,e+=4)var S=G[ga]=a.getInt32(e,!0),d=d+S&-1;L.Zc=b;C[D]=L}g.aa=d;b=g}else g.Na("Unrecognized disk format ("+c+" bytes)");g.W&&(g.W.call(g.controller,g.B,b,g.ga,g.V),g.W=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.yg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, "/")&&(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; -function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.xg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0d&&a.X&&!a.X.la.ic;if(a.yg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= m<<2,F=q.length;Fb;b++){if(128==cp(a,e,c+0,1)){d.bg=cp(a,e,c+8,4);(e=bp(a,d.bg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Eg=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Eg|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} -function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Eg,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} +function jp(a){var b,c,d={},e;if(a.C&&a.C.length)for(b=a.A,c=0;cb;b++){if(128==cp(a,e,c+0,1)){d.cg=cp(a,e,c+8,4);(e=bp(a,d.cg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Mf=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Mf|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} +function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Mf,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} function bp(a,b){var c=a.ub*a.lb,d=b/c|0;return dg)break;e|=g<=f)break;e+=String.fromCharCode(f)}return e}function gp(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Hl=b;a.Il=c;a.ud=a.Zc=0;a.Wa=!1;return a} function hp(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;b+="&machine="+a.controller.gf();b+="&user="+a.controller.ie();return Ba()+"/api/v1/disk?"+b} function op(a,b,c,d,e,f,g){if(a.N){var h;h="action=read&volume="+a.V;h+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.controller.gf());h+="&user="+a.controller.ie();Aa(Ba()+"/api/v1/disk?"+h,null,f,function(h,m,n){h=[b,c,d,e,f,g];var k=!1,q=h[0],A=h[1],F=h[2],C=h[3];if(!n){m=JSON.parse(m);for(k=0;C--;){var D=a.seek(q,A,F,!0);if(!D)break;kp(D,m,k);k+=D.length;F++}k=h[4]}(h=h[5])&&h(n,k)})}else g&&g(-1,!1)} @@ -645,32 +645,32 @@ b+" changes applied)";b=-1;break}if(this.ff){c="unable to modify write-protected l.toJSON=function(){var a;a=0;for(var b;b=bp(this,a++);)up(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function up(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function vp(a){bb.call(this,"FDC",a,vp,524288);this.dmaRead=this.el;this.dmaWrite=this.fl;this.dmaFormat=this.vl;this.U=a.autoMount||null;this.fa=a.sortBy||"name";"none"==this.fa&&(this.fa=null);this.B=[];this.ia=!La("Mobi")&&window&&"FileReader"in window}jb(vp);aa={}; var wp={3:{Ud:3,ge:0,name:aa.Fo},4:{Ud:2,ge:1,name:aa.Do},5:{Ud:9,ge:7,name:aa.Jo},6:{Ud:9,ge:7,name:aa.zo},7:{Ud:2,ge:0,name:aa.Bo},8:{Ud:1,ge:2,name:aa.Eo},10:{Ud:2,ge:7,name:aa.Ao},13:{Ud:6,ge:7,name:aa.wo},15:{Ud:3,ge:0,name:aa.Co}};l=vp.prototype; -l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&((a=d.A[ea(a.value,10)|| -0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&& +((a=d.A[ea(a.value,10)||0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;ag.za.restore(A)&&(h=!1);h&&g.za&&void 0!==g.eb&&(g.pb=g.za.seek(g.Qb,g.kb,g.xb));h||(e=!1)}a.W=b[c++]||0;a.jc=b[c]||0;return e} -function Fp(a){var b=0,c=[];c[b++]=a.hb;c[b++]=0;c[b++]=a.ma;c[b++]=a.V;c[b++]=a.L;c[b++]=a.C;c[b++]=a.aa;for(var d=b++,e=0,f=[],g=0;gGp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){var f=a,g=c,h;for(h=0;ha.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Qf=f[1],a.Rf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; +l.pj=function(a,b,c,d,e){var f;a.$e=!1;b&&(f=b.info(),b&&f[0]>a.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Rf=f[1],a.Sf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; function Cp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e=this.C&&(this.ma&=-81,this.L=this.C=0);return c}; l.Jn=function(a,b,c){z(this)&&x(this,a,b,c,"DATA["+this.C+"]");this.C=wp[a].Ud){b=!1;this.L=0;a=Jp(this);var d,e,f,g,h=a&31;switch(h){case 3:Jp(this);Jp(this);Kp(this);break;case 4:c=Jp(this);this.hb=c&3;d=this.A[this.hb];Kp(this);Lp(this,(d.Cb&-16777216)>>>24);break;case 5:case 6:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];d.kb=b;c=d.Qb=Jp(this);e=Jp(this);f=d.xb=Jp(this);g=Jp(this);d.Hb=128<>2&1;this.hb=c&3;d= -this.A[this.hb];c=d.Qb;e=d.kb=b;f=d.xb=1;g=0;d.Cb=0;d.za&&(d.pb=d.za.seek(d.Qb,d.kb,d.xb))?g=d.pb.length>>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>2&1,c=Jp(this),d.Qb+=c-d.ee,0>d.Qb&&(d.Qb=0),d.Qb>=d.Bb&&(d.Qb=d.Bb-1),d.ee=c,d.Cb=32,d.Qb||(d.Cb|=268435456),Kp(this),b=!0}0>>8);Lp(a,(b.Cb&16711680)>>>16);var k=0;if(e!=b.Qb||f!=b.kb)k=g=1;c&128&&(f^=k,d||(k=0));Lp(a,e+k);Lp(a,f);Lp(a,g);Lp(a,h)}function Jp(a){var b=a.V[a.L];a.L++;return b}function Kp(a){a.L=a.C=0}function Lp(a,b){a.V[a.C++]=b}l.el=function(a,b,c){void 0===b||0>b?this.Le(a,c):c(-1,!1)};l.fl=function(a,b){return void 0!==b&&0<=b?Np(a,b):-1}; -l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; -function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Rf+1&&(a.xb=1,a.kb++,a.kb>=a.Qf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; +l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; +function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Sf+1&&(a.xb=1,a.kb++,a.kb>=a.Rf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; Xa(function(){for(var a=tb(document,"pcx86","fdc"),b=0;bk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.rg)));A||(e=!1);null!=a.pa&& +for(d=0;dk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.sg)));A||(e=!1);null!=a.pa&& 1>=d&&(a.pa|=(f.type&3)<<(1-d<<1))}0<=a.hb&&(a.B=a.A[a.hb]);return e} function Yp(a){var b=0,c=[];a.ia?(c[b++]=a.W,c[b++]=a.Pa,c[b++]=a.aa,c[b++]=a.Ca,c[b++]=a.ya,c[b++]=a.va,c[b++]=a.ra,c[b++]=a.ma,c[b++]=a.Da,c[b++]=[a.fa,a.hb]):(c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.V,c[b++]=a.L,c[b++]=a.C,c[b++]=a.Oa,c[b++]=a.Ka,c[b++]=a.Ja,c[b++]=a.ka);for(var d=0,e=[],f=0;f=this.C&&(this.L=this.C=0,this.ma&=-15);return c};l.ho=function(a,b,c){x(this,a,b,c,"DATA["+this.C+"]");this.C=a&&(this.ma|=2,this.ma&=-2,$p(this))};l.Mm=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.L>5,f=c&31,g=fq(a),h=fq(a),k=g<<2&768|h,m=g&63,n=fq(a),t=fq(a),q=a.A[e];q&&(q.be=k,q.kb=f,q.xb=m,q.Hb=n*q.Va);switch(b){case 3:gq(a,q?q.errorCode:4);hq(a,c);hq(a,g);hq(a,h);hq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=fq(a));)q&&cb?this.Le(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?dq(a,b):-1}; -l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.sg++}a.sg>=a.fe&&(b=-1);a=b}else a=-1;return a}; +l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a}; function iq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaRead",b);ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function jq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaWrite",b);ul(a.N,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)} function kq(a,b,c){b.errorCode=4;b.Ue&&b.Ue.length==b.Hb||(b.Ue=Array(b.Hb));b.eb=0;a.N?(b.errorCode=0,Cl(a.N,3,a,"dmaWriteBuffer",b),ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)} -l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.rg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; -function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.rg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.rg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; +l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.sg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; +function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.sg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.sg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; var Tp={800:Pp.prototype.Lm,801:Pp.prototype.Mm,802:Pp.prototype.Km},Sp={496:Pp.prototype.il,497:Pp.prototype.Sl,498:Pp.prototype.Ul,499:Pp.prototype.Vl,500:Pp.prototype.Ql,501:Pp.prototype.Pl,502:Pp.prototype.Rl,503:Pp.prototype.Wl},Vp={800:Pp.prototype.ho,801:Pp.prototype.ko,802:Pp.prototype.jo,803:Pp.prototype.io,807:Pp.prototype.pi,811:Pp.prototype.pi,815:Pp.prototype.pi},Up={496:Pp.prototype.qn,497:Pp.prototype.vn,498:Pp.prototype.tn,499:Pp.prototype.un,500:Pp.prototype.pn,501:Pp.prototype.on, 502:Pp.prototype.rn,503:Pp.prototype.nn,1014:Pp.prototype.sn};Xa(function(){for(var a=tb(document,"pcx86","hdc"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};mq.prototype.oh=function(){return-1};mq.prototype.ph=function(){}; mq.prototype.Pk=function(a,b){return a.replace("["+b+"]","unimplemented")};mq.prototype.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.va?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; @@ -730,7 +730,7 @@ Gq=["VALID","ZERO ","SPEC ","EMPTY"],Hq=[8086,80186,80286,80386],Iq=["AL","CL"," 45188,4097],[109,45188,4097],[110,45188,4097],[140,45188,4097],[142,45188,4097],Kq,[119,45188,4097]],[[115,12417,4113],[116,12417,4113],[109,12417,4113],[110,12417,4113],[140,12417,4113],[142,12417,4113],Kq,[119,12417,4113]],[[115,12420,4113],[116,12420,4113],[109,12420,4113],[110,12420,4113],[140,12420,4113],[142,12420,4113],Kq,[119,12420,4113]],[[115,12417,4449],[116,12417,4449],[109,12417,4449],[110,12417,4449],[140,12417,4449],[142,12417,4449],Kq,[119,12417,4449]],[[115,12420,4449],[116,12420, 4449],[109,12420,4449],[110,12420,4449],[140,12420,4449],[142,12420,4449],Kq,[119,12420,4449]],[[155,4225,4097],Kq,[98,12417],[96,12417],[95,4225],[42,12417],[32,4225],[41,12417]],[[155,4228,4100],Kq,[98,12420],[96,12420],[95,4228],[42,12420],[32,4228],[41,12420]],[[44,12417],[31,12417],Kq,Kq,Kq,Kq,Kq,Kq],[[44,12420],[31,12420],[17,4228],[17,4231],[57,4228],[57,4231],[108,4228],Kq],[],[[145,41091],[153,41091],[78,36995],[89,36995],[156,36995],[157,36995],Kq,Kq],[[139,41091],[144,41091],[75,36995], [77,36995],[146,41091],Kq,[79,36995],Kq],[Kq,Kq,Kq,Kq,[13,53380,4097],[16,57476,4097],[15,57476,4097],[14,57476,4097]]];l=vq.prototype; -l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.X=a;this.tc=Jb(a,"FDC");this.Jb=Jb(a,"HDC");this.Tb=Jb(a,"FPU");this.V=Jb(a,"Mouse");(a=Yc(a,"messages"))&&zq(this,a);this.Da=b.N>>2;this.Ba=b.Dg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.X=a;this.tc=Jb(a,"FDC");this.Jb=Jb(a,"HDC");this.Tb=Jb(a,"FPU");this.V=Jb(a,"Mouse");(a=Yc(a,"messages"))&&zq(this,a);this.Da=b.N>>2;this.Ba=b.Eg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, b,2),d.O("dumpSel("+v(a?a.Z:b)+"): %"+r(a?a.Xb:null,d.Da)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Sq[a.type];e&&(c=e[0],b=e[1])}!c||a.wb&32768||(c+=",not present");d.O((b?"seg="+v(a.Aa&65535)+" off="+v(a.Ta):"base="+r(a.Aa,d.Da)+" limit="+Tq(a.Ta))+" type="+u(a.type>>8)+" ("+c+") ext="+v(a.ext&-65296)+ " dpl="+u(a.Gc))}}else d.O("no selector")});Qk(this,134217728,function(a){var b;(a=a[0])&&(b=rq(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+v(b)+")");b;){a=wq(d,0,b);var c=d.Qa(a,1),e=d.na(a,2),k=d.na(a,5);if(77!=c&&90!=c)break;d.O(Uq(0,b)+": '"+String.fromCharCode(c)+"' PID="+v(e)+" LEN="+v(k)+' "'+Vq(d,a,8)+'"');b+=1+k}});Qk(this,128,function(a){Qq(d,d.F.sa,a[0],d.F.sa!==d.F.kd)});Qk(this,8,function(a){a:{if(a=a[0]){var b=rq(d,a);if(void 0===b){d.O("invalid task selector: "+a); break a}a=Rq(d,b,2)}else a=d.F.Sa;d.O("dumpTSS("+v(a?a.Z:b)+"): %"+r(a?a.Aa:null,d.Da));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Wq:Xq,m,n,t,q;for(q in k)m=k[q],n=a.Aa+m,t=Qf(d.F,n,2),2304==c&&(t|=Qf(d.F,n+2,2)<<16),b&&(b+="\n"),b+=v(m)+" "+pa(q+":",11)+r(t,e);if(2304==c)for(q=0,m=t>>>16;mq;)n=a.Aa+m,t=Qf(d.F,n,2),b+="\n"+v(m)+" ports "+v(q)+"-"+v(q+15)+": "+ha(t,2),q+=16,m+=2;d.O(b)}}});this.L=null;this.sb=0;this.fb=!1;lf(this.F,48,this.Qm.bind(this));lf(this.F,65,this.Rm.bind(this)); @@ -756,7 +756,7 @@ function Qq(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.cc(kr(a,c));if(-1===e){a.O h),c!=Ec&&5!=c&&(c=-1),h=0),e+=a.F.Sb,f++}function mr(a,b,c){a=r(a)+" "+r(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"} var Sq={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Wq={PREV_TSS:0,CPL0_SP:2,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},Xq={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}; -function Zq(a,b,c){var d=[],e;for(e=null;e=Jb(a.X,"Disk",e);){var f=e,g=b,h=c,d={};if(f.C)for(var k=0;kc&&(c=ya(Iq,a.substr(b,2))));return c}; function nr(a,b){var c=0,d=a.ph(b);if(null!=d)switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 22:case 16:case 17:case 18:case 19:case 20:case 21:c=4;break;case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 56:c=8;break;case 23:c=a.Ja}return c?r(d,c):"??"} l.ph=function(a){var b;if(0<=a){var c=this.F;switch(a){case 0:b=c.G&255;break;case 1:b=c.I&255;break;case 2:b=c.M&255;break;case 3:b=c.H&255;break;case 4:b=c.G>>8&255;break;case 5:b=c.I>>8&255;break;case 6:b=c.M>>8&255;break;case 7:b=c.H>>8&255;break;case 8:b=c.G&65535;break;case 9:b=c.I&65535;break;case 10:b=c.M&65535;break;case 11:b=c.H&65535;break;case 12:b=J(c)&65535;break;case 13:b=c.P&65535;break;case 14:b=c.K&65535;break;case 15:b=c.J&65535;break;case 22:b=M(c)&65535;break;case 23:b=Cd(c); @@ -785,10 +785,10 @@ break;case 5:G="DWORD";break;case 11:if(L){G="INT32";break}case 11:G="REAL32";br function zr(a,b,c,d){var e=c&240;if(192==e){if(5a.F.ja)return"??";b+=16}else if(208==e)b+=32;else if(224==e)b+=40;else if(240==e)b+=48;else if(a=c&15,3<=a&&(8>b&&(b+=8),5==a||4==a&&d.Rb))b+=16;return Iq[b]} function Cr(a,b){switch(b){case "V":a=Cf(a.F);break;case "D":a=a.F.ca&1024;break;case "I":a=a.F.ca&512;break;case "T":a=a.F.ca&256;break;case "S":a=Bf(a.F);break;case "Z":a=Af(a.F);break;case "A":a=zf(a.F);break;case "P":a=yf(a.F);break;case "C":a=xf(a.F);break;default:a=0}return b+(a?"1":"0")+" "}function Tq(a){return r(a,a&-65536?8:4)}function Dr(a,b){8<=b&&15>=b&&4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", +function Gr(a,b){var c;void 0===b&&(b=er(a));c=Dr(a,8)+Dr(a,11)+Dr(a,9)+Dr(a,10)+(4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", null,a.F.Mc,a.F.Sd)+" ";c=c+(d+" "+e)+Dr(a,32);80386<=a.F.ja&&(c+=Dr(a,34)+Dr(a,35))}else 80386<=a.F.ja&&(c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+" ");return c+=Dr(a,23)+Cr(a,"V")+Cr(a,"D")+Cr(a,"I")+Cr(a,"T")+Cr(a,"S")+Cr(a,"Z")+Cr(a,"A")+Cr(a,"P")+Cr(a,"C")}l.lj=function(a,b){return a[0]>b[0]?1:a[0]>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({jg:b,dn:c,Z:d,Ra:e,Fa:f,Vm:g,Qd:h,Xi:m})} -function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Fa;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&f>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({kg:b,dn:c,Z:d,Ra:e,Fa:f,Vm:g,Qd:h,Xi:m})} +function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Fa;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&f\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.2","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +l.dg=function(a){void 0===a&&(a=this.A||(this.aa?1:Tr));if(!this.N){this.N++;var b=!1,c=!1;this.ka=!1;var d=this.ea||new qf(this,"1.30.2");if(-1==a)b=!0;else if(a>Tr){if(d.load(this.aa)){this.X=new qf(this,"1.30.2","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): ("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; @@ -841,7 +841,7 @@ function Zr(a,b){if(Ea("There may be a problem with your PCx86 machine.\n\nTo he function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.2"),g=new qf(a,"1.30.2","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad>1,b.U+=(b.W>>1)-2,Pb(b,e),b.ra&&(b.N.restore(),b.ra=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.aa,0,0,a.aa.width,a.aa.height,a.sb,a.Jb,a.Ya,a.fb);a.Ja=!1}} -Xa(function(){for(var a=tb(document,"pcx86-machine"),b=0;b":62,"?":63,"@":64,Jd:65,wh:66,xh:67,yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74, -Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["];da[220]=n["\\"];da[221]=n["]"]; -da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; +var l,ba,ca={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tm:1,Sj:3,Um:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Jd:65,wh:66,xh:67, +yh:68,E:69,zh:70,Ah:71,Bh:72,Ch:73,Dh:74,Eh:75,Fh:76,Gh:77,Ih:78,Kh:79,Mh:80,Q:81,Ph:82,Rh:83,Th:84,Vh:85,Xh:86,Zh:87,ai:88,ci:89,vf:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ld:97,bk:98,ck:99,d:100,e:101,mk:102,nk:103,pk:104,qk:105,Bl:106,k:107,Cl:108,Fl:109,n:110,Kl:111,p:112,q:113,r:114,Mm:115,t:116,Pm:117,Qm:118,Rm:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},da={};da[186]=n[";"];da[187]=n["="];da[188]=n[","];da[189]=n["-"];da[190]=n["."];da[191]=n["/"];da[192]=n["`"];da[219]=n["["]; +da[220]=n["\\"];da[221]=n["]"];da[222]=n["'"];da[173]=n["-"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"];p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ga(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} @@ -66,7 +66,7 @@ function $a(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=Ya(d,a.id))&&(b=d.la[b]) function bb(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value,10)||0])? -(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.la[b]=c;if(this.W){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.la[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&vm(d,a)},!0;case "loadDrive":return this.la[b]=c,c.onclick=function(){var a=d.la.listDisks;a&&wm(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.la[b]=c;c.onclick=function(){var a=d.la.listDrives;a&&a.options&&d.B&&((a=d.B[ea(a.value, +10)||0])?(a=a.ta)?(a=Aa(rm(a),"octet-stream",!0,a.th.replace(".json",".img")),r(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(this.Y)return this.la[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;wm(d,ga(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;this.ba=a;this.S=mb(a,"ChipSet");if((this.K=nc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){r("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}xm(this);Sb(b,this,ym);Ub(b,this,zm);Am(this,"None","",!0);this.Y&&Am(this,"Local Disk","?");Am(this,"Remote Disk","??");Bm(this)||t(this)}; l.Ub=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.pg){this.C=[];for(a=0;a>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function ra(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function va(a){return a.replace(/[&<>"']/g,function(a){return ua[a]})} @@ -55,7 +55,7 @@ function D(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.g r.prototype={constructor:r,parent:null,toString:function(){return this.name?this.name:this.id||this.type},qa:function(a,b,c){switch(b){case "clear":return this.F[b]||(this.F[b]=c,c.onclick=function(a){return function(){a.F.print&&(a.F.print.value="")}}(this)),!0;case "print":return this.F[b]||(this.Ka=this.F[b]=c,c.value="",this.j=function(a){return function(b,c){8192>=3;return""+c}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function n(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} @@ -53,7 +53,7 @@ function D(a,b){b=E(b.parentNode,"pdp11-control");for(var c=0;c Date: Sat, 29 Oct 2016 11:32:31 -0700 Subject: [PATCH 07/30] Lots of work to try to bring the new RL11 component up to snuff --- modules/pdp11/lib/bus.js | 25 +- modules/pdp11/lib/defines.js | 57 ++- modules/pdp11/lib/disk.js | 4 +- modules/pdp11/lib/rl11.js | 519 ++++++++++++++++++++++----- versions/pdpjs/1.30.2/pdp11-dbg.js | 542 +++++++++++++++-------------- versions/pdpjs/1.30.2/pdp11.js | 389 +++++++++++---------- 6 files changed, 978 insertions(+), 558 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index df5da97ce..3986084b0 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -152,6 +152,7 @@ function BusPDP11(parmsBus, cpu, dbg) this.aIOHandlers = []; this.fIOBreakAll = false; this.nDisableFaults = 0; + this.fFault = false; /* * Array of RESET notification handlers registered by Device components. @@ -552,13 +553,11 @@ BusPDP11.prototype.reset = function() BusPDP11.prototype.unknownAccess = function(addr, fByte, data) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { - /* - * TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits) - */ this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true); this.dbg.stopInstruction(); } if (!this.nDisableFaults) { + this.cpu.regErr |= PDP11.CPUERR.TIMEOUT; this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); } return 0; @@ -925,6 +924,7 @@ BusPDP11.prototype.getByte = function(addr) */ BusPDP11.prototype.getByteDirect = function(addr) { + this.fFault = false; this.nDisableFaults++; var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); this.nDisableFaults--; @@ -962,6 +962,7 @@ BusPDP11.prototype.getWordDirect = function(addr) var w; var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; + this.fFault = false; this.nDisableFaults++; if (!PDP11.WORDBUS && off == this.nBlockLimit) { w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8); @@ -996,6 +997,7 @@ BusPDP11.prototype.setByte = function(addr, b) */ BusPDP11.prototype.setByteDirect = function(addr, b) { + this.fFault = false; this.nDisableFaults++; this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr); this.nDisableFaults--; @@ -1034,6 +1036,7 @@ BusPDP11.prototype.setWordDirect = function(addr, w) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; + this.fFault = false; this.nDisableFaults++; if (!PDP11.WORDBUS && off == this.nBlockLimit) { this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr); @@ -1272,6 +1275,22 @@ BusPDP11.prototype.fault = function(addr, access) } this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); } + this.fFault = true; +}; + +/** + * checkFault() + * + * This also serves as a clearFault() function. + * + * @this {BusPDP11} + * @return {boolean} + */ +BusPDP11.prototype.checkFault= function() +{ + var f = this.fFault; + this.fFault = false; + return f; }; /** diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index e1848f6f8..86302edb3 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -431,10 +431,11 @@ var PDP11 = { MMR3: 0o172516, // 772516 17772516 - RLCS: 0o174400, // RL11 Control Status - RLBA: 0o174402, // RL11 Bus Address - RLDA: 0o177404, // RL11 Disk Address - RLMP: 0o177406, // RL11 Multi-Purpose + RLCS: 0o174400, // RL11 Control Status Register + RLBA: 0o174402, // RL11 Bus Address Register + RLDA: 0o177404, // RL11 Disk Address Register + RLMP: 0o177406, // RL11 Multi-Purpose Register + RLBE: 0o177410, // RL11 Bus (Address) Extension Register (RLV12 controller only) LKS: 0o177546, // KW11-L Clock Status @@ -618,6 +619,10 @@ var PDP11 = { SET: 0x0080, // bits set on INIT (bit 7 is set) RMASK: 0xFFFF, // no write-only bits WMASK: 0x03FE, // bits writable + SHIFT: { + FUNC: 1, + DS: 8 + } }, RLBA: { // Bus Address Register (174402) WMASK: 0xFFFE // bit 0 is effectively not writable (always zero) @@ -634,20 +639,33 @@ var PDP11 = { RW_HS: 0x0040, // Head Select RW_CA: 0xFF80, // Cylinder Address (RL01 has 256 cylinders, RL02 has 512) GS_CMD: 0x0003, // Get Status: bit 0 must be set, bit 1 set, and bits 2 and 4-7 clear (bits 8-15 unused) - GS_RST: 0x0008 // Reset (when set, clears error register before sending status word to controller) + GS_RST: 0x0008, // Reset (when set, clears error register before sending status word to controller) + SHIFT: { + RW_HS: 6, + RW_CA: 7 + } }, /* * This register has 3 formats: one for Read Header, another for Read/Write, and a third for Get Status */ - RLMP: { - GS_ST: 0x0007, // Major State Code + RLMP: { // Multi-Purpose Register (177406) + GS_ST: { // Major State Code (of the drive) + LOADC: 0x0, // Load Cartridge + SPINUP: 0x1, // Spin-Up + BRUSHC: 0x2, // Brush Cycle + LOADH: 0x3, // Load Heads + SEEK: 0x4, // Seek + LOCKON: 0x5, // Lock On + UNLOADH:0x6, // Unload Heads + SPINDN: 0x7 // Spin-Down + }, GS_BH: 0x0008, // Brushes Home GS_HO: 0x0010, // Heads Out GS_CO: 0x0020, // Cover Open (or dust cover is not in place) GS_HS: 0x0040, // Head Selected (0 for upper head, 1 for lower head) GS_DT: 0x0080, // Drive Type (0 for RL01, 1 for RL02) GS_DSE: 0x0100, // Drive Select Error - GS_VC: 0x0200, // Volume Check + GS_VC: 0x0200, // Volume Check (Set during transition from a head load state to a head-on-track state; cleared by execution of a Get Status command with Bit 3 asserted) GS_WGE: 0x0400, // Write Gate Error GS_SPE: 0x0800, // Spin Error GS_SKTO: 0x1000, // Seek Time-Out @@ -655,17 +673,10 @@ var PDP11 = { GS_CHE: 0x4000, // Current Head Error GS_WDE: 0x8000 // Write Data Error }, - FUNC: { // NOTE: These function codes are pre-shifted to write directly into RLCS.FUNC - NOP: 0b0000, // No-Op - WCHK: 0b0010, // Write Check - STATUS: 0b0100, // Get Status - SEEK: 0b0110, // Seek - RHDR: 0b1000, // Read Header - WDATA: 0b1010, // Write Data - RDATA: 0b1100, // Read Data - RDNC: 0b1110 // Read Data without Header Check + RLBE: { // Bus (Address) Extension Register (174410) + MASK: 0x003F // bits 5-0 correspond to bus address bits 21-16 }, - ERRC: { // NOTE: These error codes are pre-shifted to read directly from RLCS.ERRC + ERRC: { // NOTE: These error codes are pre-shifted to read/write directly from/to RLCS.ERRC OPI: 0x0400, // Operation Incomplete DCRC: 0x0800, // Read Data CRC WCE: 0x0800, // Write Check Error @@ -674,6 +685,16 @@ var PDP11 = { HNF: 0x1400, // Header Not Found NXM: 0x2000, // Non-Existent Memory MPE: 0x2400 // Memory Parity Error (RLV12 only) + }, + FUNC: { // NOTE: These function codes are pre-shifted to read/write directly from/to RLCS.FUNC + NOP: 0b0000, // No-Op + WCHK: 0b0010, // Write Check + STATUS: 0b0100, // Get Status + SEEK: 0b0110, // Seek + RHDR: 0b1000, // Read Header + WDATA: 0b1010, // Write Data + RDATA: 0b1100, // Read Data + RDNC: 0b1110 // Read Data without Header Check } } }; diff --git a/modules/pdp11/lib/disk.js b/modules/pdp11/lib/disk.js index 9df2ec0ff..663b9693c 100644 --- a/modules/pdp11/lib/disk.js +++ b/modules/pdp11/lib/disk.js @@ -93,7 +93,7 @@ function DiskPDP11(controller, drive, mode) this.drive = drive; /* - * We pull out a number of drive properties that we may or may not need as defaults + * We pull out a number of drive properties that we may or may not need as defaults. */ this.sDiskName = drive.name; this.fRemovable = drive.fRemovable; @@ -1230,4 +1230,4 @@ DiskPDP11.prototype.dumpSector = function(sector, pba, sDesc) return sDump; }; -if (NODE) module.exports = Disk; +if (NODE) module.exports = DiskPDP11; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index 52482f566..bbea2da15 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -274,13 +274,13 @@ RL11.prototype.initBus = function(cmp, bus, cpu, dbg) } /* - * If we didn't need auto-mount support, we could defer controller initialization until we received a powerUp() notification, - * at which point reset() would call initController(), or restore() would restore the controller; in that case, all we'd need - * to do here is call setReady(). + * If we didn't need auto-mount support, we could defer controller initialization until we received + * a powerUp() notification, at which point reset() would call initController(), or restore() would restore + * the controller; in that case, all we'd need to do here is call setReady(). */ this.initController(); - this.triggerReaderInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI); + this.triggerInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI); bus.addIOTable(this, RL11.UNIBUS_IOTABLE); @@ -417,29 +417,7 @@ RL11.prototype.save = function() */ RL11.prototype.restore = function(data) { - return true; // this.initController(data[0]); -}; - -/** - * initController(data) - * - * @this {RL11} - * @param {Array} [data] - * @return {boolean} true if successful, false if failure - */ -RL11.prototype.initController = function(data) -{ - var fSuccess = true; - for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { - var drive = this.aDrives[iDrive]; - if (drive === undefined) { - drive = this.aDrives[iDrive] = {}; - } - if (!this.initDrive(drive, iDrive)) { - fSuccess = false; - } - } - return true; + return this.initController(data[0]); }; /** @@ -453,57 +431,6 @@ RL11.prototype.saveController = function() return []; }; -/** - * initDrive(drive, iDrive, data) - * - * TODO: Consider a separate Drive class that any drive controller can use, since there's a lot of commonality - * between the drive objects created by disk controllers. This will clean up overall drive management and allow - * us to factor out some common Drive methods. - * - * @this {RL11} - * @param {Object} drive - * @param {number} iDrive - * @param {Array|undefined} [data] - * @return {boolean} true if successful, false if failure - */ -RL11.prototype.initDrive = function(drive, iDrive, data) -{ - var i = 0; - var fSuccess = true; - - drive.iDrive = iDrive; - drive.fBusy = drive.fLocal = false; - - drive.name = this.idComponent; - drive.nCylinders = 512; - drive.nHeads = 2; - drive.nSectors = 40; - drive.cbSector = 256; - drive.fRemovable = true; - - /* - * The next group of properties are set by various controller command sequences. - */ - drive.bHead = 0; - drive.bCylinderSeek = 0; - drive.bCylinder = 0; - drive.bSector = 1; - drive.bSectorEnd = drive.nSectors; // aka EOT - drive.nBytes = drive.cbSector; - - /* - * The next group of properties are managed by worker functions (eg, doRead()) to maintain state across DMA requests. - */ - drive.ibSector = 0; - drive.sector = null; - - if (!drive.disk) { - drive.sDiskPath = ""; // ensure this is initialized to a default that displayDisk() can deal with - } - - return fSuccess; -}; - /** * autoMount(fRemount) * @@ -866,10 +793,446 @@ RL11.prototype.unloadAllDrives = function(fDiscard) } }; +/** + * initController(data) + * + * @this {RL11} + * @param {Array} [data] + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.initController = function(data) +{ + var i = 0; + if (!data) data = []; + this.csr = data[i++] || 0; + this.bar = data[i++] || 0; + this.dar = data[i++] || 0; + this.darInternal = data[i++] || 0; + this.mpr = data[i++] || 0; + this.ber = data[i] || 0; + + var fSuccess = true; + for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { + var drive = this.aDrives[iDrive]; + if (drive === undefined) { + drive = this.aDrives[iDrive] = {}; + } + if (!this.initDrive(drive, iDrive)) { + fSuccess = false; + } + } + return fSuccess; +}; + +/** + * initDrive(drive, iDrive, data) + * + * TODO: Consider a separate Drive class that any drive controller can use, since there's a lot of commonality + * between the drive objects created by disk controllers. This will clean up overall drive management and allow + * us to factor out some common Drive methods. + * + * @this {RL11} + * @param {Object} drive + * @param {number} iDrive + * @param {Array|undefined} [data] + * @return {boolean} true if successful, false if failure + */ +RL11.prototype.initDrive = function(drive, iDrive, data) +{ + var i = 0; + var fSuccess = true; + + drive.iDrive = iDrive; + drive.fBusy = drive.fLocal = false; + + drive.name = this.idComponent; + drive.nCylinders = 512; + drive.nHeads = 2; + drive.nSectors = 40; + drive.cbSector = 256; + drive.fRemovable = true; + + /* + * The next group of properties are set by various controller command sequences. + */ + drive.bHead = 0; + drive.bCylinderSeek = 0; + drive.bCylinder = 0; + drive.bSector = 1; + drive.bSectorEnd = drive.nSectors; // aka EOT + drive.nBytes = drive.cbSector; + + /* + * The next group of properties are managed by worker functions (eg, doRead()) to maintain state across DMA requests. + */ + drive.ibSector = 0; + drive.sector = null; + + if (!drive.disk) { + drive.sDiskPath = ""; // ensure this is initialized to a default that displayDisk() can deal with + } + + /* + * Default drive status bits returned via the controller's Get Status command via the RLMP register + */ + drive.status = PDP11.RL11.RLMP.GS_ST.LOCKON | PDP11.RL11.RLMP.GS_BH | PDP11.RL11.RLMP.GS_HO | (drive.nCylinders == 512? PDP11.RL11.RLMP.GS_DT : 0); + + return fSuccess; +}; + +/** + * processCommand() + * + * @this {RL11} + */ +RL11.prototype.processCommand = function() +{ + var fnReadWrite; + var fInterrupt = true; + var iDrive = (this.csr & PDP11.RL11.RLCS.DS) >> PDP11.RL11.RLCS.SHIFT.DS; + var drive = this.aDrives[iDrive]; + var iCylinder, iHead, iSector, nWords, addr; + + /* + * The typical pattern of DRDY and CRDY: + * + * 1) Normally both set + * 2) CRDY is cleared to process a command + * 3) DRDY is cleared to command is in process + */ + this.csr &= ~PDP11.RL11.RLCS.DRDY; + + switch(this.csr & PDP11.RL11.RLCS.FUNC) { + + case PDP11.RL11.FUNC.NOP: + case PDP11.RL11.FUNC.WCHK: + case PDP11.RL11.FUNC.RDNC: + break; + + case PDP11.RL11.FUNC.STATUS: + if (this.dar & PDP11.RL11.RLDA.GS_RST) { + this.csr &= 0x3F; // TODO: Review + } + this.mpr = drive.status | (this.darInternal & PDP11.RL11.RLDA.RW_HS); // bit 6: Head Select, bit 7: Drive Type (1=RL02) + break; + + case PDP11.RL11.FUNC.SEEK: + if ((this.dar & PDP11.RL11.RLDA.GS_CMD) == PDP11.RL11.RLDA.SEEK_CMD) { + var darCA = (this.dar & PDP11.RL11.RLDA.RW_CA); + var darHS = (this.dar & PDP11.RL11.RLDA.SEEK_HS) << 2; + if (this.dar & PDP11.RL11.RLDA.SEEK_DIR) { + this.darInternal += darCA; + } else { + this.darInternal -= darCA; + } + this.dar = this.darInternal = (this.darInternal & PDP11.RL11.RLDA.RW_CA) | darHS; + } + break; + + case PDP11.RL11.FUNC.RHDR: + this.mpr = this.darInternal; + break; + + case PDP11.RL11.FUNC.RDATA: + fnReadWrite = this.readData; + /* falls through */ + + case PDP11.RL11.FUNC.WDATA: + if (!fnReadWrite) fnReadWrite = this.writeData; + iCylinder = this.dar >> PDP11.RL11.RLDA.SHIFT.RW_CA; + iHead = (this.dar & PDP11.RL11.RLDA.RW_HS)? 0 : 1; + iSector = this.dar & PDP11.RL11.RLDA.RW_SA; + if (iCylinder >= drive.nCylinders || iSector >= drive.nSectors) { + this.csr |= PDP11.RL11.ERRC.HNF | PDP11.RL11.RLCS.ERR; + break; + } + addr = (((this.ber & PDP11.RL11.RLBE.MASK)) << 16) | this.bar; // 22 bit mode + nWords = (0x10000 - this.mpr) & 0xffff; + fInterrupt = fnReadWrite.call(this, drive, iCylinder, iHead, iSector, nWords, addr, this.endReadWrite.bind(this)); + break; + + default: + break; + } + + if (fInterrupt) { + this.csr |= PDP11.RL11.RLCS.DRDY | PDP11.RL11.RLCS.CRDY; + if (this.csr & PDP11.RL11.RLCS.IE) { + this.cpu.setTrigger(this.triggerInterrupt); + } + } +}; + +/** + * endReadWrite(err, iCylinder, iHead, iSector, nWords, addr) + * + * @this {RL11} + * @param {number} err + * @param {number} iCylinder + * @param {number} iHead + * @param {number} iSector + * @param {number} nWords + * @param {number} addr + * @return {boolean} + */ +RL11.prototype.endReadWrite = function(err, iCylinder, iHead, iSector, nWords, addr) +{ + this.bar = addr & 0xffff; + this.csr = (this.csr & ~PDP11.RL11.RLCS.BAE) | ((addr >> 12) & PDP11.RL11.RLCS.BAE); + this.ber = (addr >> 16) & PDP11.RL11.RLBE.MASK; // 22 bit mode + this.dar = (iCylinder << PDP11.RL11.RLDA.SHIFT.RW_CA) | (iHead? PDP11.RL11.RLDA.RW_HS : 0) | (iSector & PDP11.RL11.RLDA.RW_SA); + this.darInternal = this.dar; + this.mpr = (0x10000 - nWords) & 0xffff; + if (err) { + this.csr |= err | PDP11.RL11.RLCS.ERR; + } + return true; +}; + +/** + * readData(drive, iCylinder, iHead, iSector, nWords, addr, done) + * + * @this {RL11} + * @param {Object} drive + * @param {number} iCylinder + * @param {number} iHead + * @param {number} iSector + * @param {number} nWords + * @param {number} addr + * @param {function(...)} done + * @return {boolean} true if complete, false if queued + */ +RL11.prototype.readData = function(drive, iCylinder, iHead, iSector, nWords, addr, done) +{ + var err = 0; + var disk = drive.disk; + var sector = null, ibSector; + + while (nWords--) { + if (!sector) { + sector = drive.disk.seek(iCylinder, iHead, iSector, true); + if (!sector) { + err = PDP11.RL11.ERRC.HNF; + break; + } + ibSector = 0; + } + var b0, b1; + if ((b0 = drive.disk.read(sector, ibSector++)) < 0 || (b1 = drive.disk.read(sector, ibSector++)) < 0) { + err = PDP11.RL11.ERRC.HNF; + break; + } + var data = this.bus.setWordDirect(this.cpu.mapUnibus(addr), b0 | (b1 << 8)); + if (this.bus.checkFault()) { + err = PDP11.RL11.ERRC.NXM; + break; + } + addr += 2; + if (ibSector >= disk.cbSector) { + sector = null; + if (++iSector >= disk.nSectors) { + iSector = 0; + if (++iHead >= disk.nHeads) { + iHead = 0; + if (++iCylinder >= disk.nCylinders) { + err = PDP11.RL11.ERRC.HNF; + break; + } + } + } + } + } + return done(err, iCylinder, iHead, iSector, nWords, addr); +}; + +/** + * writeData(drive, iCylinder, iHead, iSector, nWords, addr, done) + * + * @this {RL11} + * @param {Object} drive + * @param {number} iCylinder + * @param {number} iHead + * @param {number} iSector + * @param {number} nWords + * @param {number} addr + * @param {function(...)} done + * @return {boolean} true if complete, false if queued + */ +RL11.prototype.writeData = function(drive, iCylinder, iHead, iSector, nWords, addr, done) +{ + var err = 0; + var disk = drive.disk; + var sector = null, ibSector; + + while (nWords--) { + var data = this.bus.getWordDirect(this.cpu.mapUnibus(addr)); + if (this.bus.checkFault()) { + err = PDP11.RL11.ERRC.NXM; + break; + } + addr += 2; + if (!sector) { + sector = drive.disk.seek(iCylinder, iHead, iSector, true); + if (!sector) { + err = PDP11.RL11.ERRC.HNF; + break; + } + ibSector = 0; + } + if (!drive.disk.write(sector, ibSector++, data & 0xff) || !drive.disk.write(sector, ibSector++, data >> 8)) { + err = PDP11.RL11.ERRC.HNF; + break; + } + if (ibSector >= disk.cbSector) { + sector = null; + if (++iSector >= disk.nSectors) { + iSector = 0; + if (++iHead >= disk.nHeads) { + iHead = 0; + if (++iCylinder >= disk.nCylinders) { + err = PDP11.RL11.ERRC.HNF; + break; + } + } + } + } + } + return done(err, iCylinder, iHead, iSector, nWords, addr); +}; + +/** + * readRLCS(addr) + * + * @this {RL11} + * @param {number} addr (eg, PDP11.UNIBUS.RLCS or 174400) + * @return {number} + */ +RL11.prototype.readRLCS = function(addr) +{ + return this.csr & PDP11.RL11.RLCS.RMASK; +}; + +/** + * writeRLCS(data, addr) + * + * @this {RL11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.RLCS or 174400) + */ +RL11.prototype.writeRLCS = function(data, addr) +{ + this.csr = (this.csr & ~PDP11.RL11.RLCS.WMASK) | (data & PDP11.RL11.RLCS.WMASK); + + this.bae = (this.bae & ~0x3) | ((data & PDP11.RL11.RLCS.BAE) >> 4); + + if (!(this.csr & PDP11.RL11.RLCS.CRDY)) this.processCommand(); +}; + +/** + * readRLBA(addr) + * + * @this {RL11} + * @param {number} addr (eg, PDP11.UNIBUS.RLBA or 174402) + * @return {number} + */ +RL11.prototype.readRLBA = function(addr) +{ + return this.bar; +}; + +/** + * writeRLBA(data, addr) + * + * @this {RL11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.RLBA or 174402) + */ +RL11.prototype.writeRLBA = function(data, addr) +{ + this.bar = data & PDP11.RL11.RLBA.WMASK; +}; + +/** + * readRLDA(addr) + * + * @this {RL11} + * @param {number} addr (eg, PDP11.UNIBUS.RLDA or 174404) + * @return {number} + */ +RL11.prototype.readRLDA = function(addr) +{ + return this.dar; +}; + +/** + * writeRLDA(data, addr) + * + * @this {RL11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.RLDA or 174404) + */ +RL11.prototype.writeRLDA = function(data, addr) +{ + this.dar = data; +}; + +/** + * readRLMP(addr) + * + * @this {RL11} + * @param {number} addr (eg, PDP11.UNIBUS.RLMP or 174406) + * @return {number} + */ +RL11.prototype.readRLMP = function(addr) +{ + return this.mpr; +}; + +/** + * writeRLMP(data, addr) + * + * @this {RL11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.RLMP or 174406) + */ +RL11.prototype.writeRLMP = function(data, addr) +{ + this.mpr = data; +}; + +/** + * readRLBE(addr) + * + * @this {RL11} + * @param {number} addr (eg, PDP11.UNIBUS.RLBE or 174410) + * @return {number} + */ +RL11.prototype.readRLBE = function(addr) +{ + return this.ber; +}; + +/** + * writeRLBE(data, addr) + * + * @this {RL11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.RLBE or 174410) + */ +RL11.prototype.writeRLBE = function(data, addr) +{ + this.ber = data & PDP11.RL11.RLBE.MASK; +}; + /* * ES6 ALERT: As you can see below, I've finally started using computed property names. */ RL11.UNIBUS_IOTABLE = { + [PDP11.UNIBUS.RLCS]: /* 174400 */ [null, null, RL11.prototype.readRLCS, RL11.prototype.writeRLCS, "RLCS"], + [PDP11.UNIBUS.RLBA]: /* 174402 */ [null, null, RL11.prototype.readRLBA, RL11.prototype.writeRLBA, "RLBA"], + [PDP11.UNIBUS.RLDA]: /* 174404 */ [null, null, RL11.prototype.readRLDA, RL11.prototype.writeRLDA, "RLDA"], + [PDP11.UNIBUS.RLMP]: /* 174406 */ [null, null, RL11.prototype.readRLMP, RL11.prototype.writeRLMP, "RLMP"], + [PDP11.UNIBUS.RLBE]: /* 174410 */ [null, null, RL11.prototype.readRLBE, RL11.prototype.writeRLBE, "RLBE"] }; if (NODE) module.exports = RL11; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index 825ab7db0..f08225f4b 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -31,279 +31,287 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function ra(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function va(a){return a.replace(/[&<>"']/g,function(a){return ua[a]})} -function wa(a,b){return(a+" ").slice(0,b)}function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ya={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} +function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ea(a,b){var c,d={ea:null,ga:null,Ca:null,Ba:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ca=g.load;d.Ba=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ga=g.symbols;d.ea.length?1==d.ea.length&&(p(d.ea[0]),d=null):(p("Empty resource: "+a),d=null)}catch(h){p("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Za=this.id:(this.Ia=this.id.substr(0,b),this.Za=this.id.substr(b+1));this[a]=c;this.v={ready:!1,Qa:!1,Vb:!1,ha:!1,error:!1};this.Lb=null;this.v.error=!1;this.F={};this.i=null;this.na=d||0;t.push(this)}var $a=void 0,ab={}; -if(window){$a||($a=window.location.search.substr(1));for(var hb,ib=/\+/g,jb=/([^&=]+)=?([^&]*)/g;hb=jb.exec($a);)ab[decodeURIComponent(hb[1].replace(ib," "))]=decodeURIComponent(hb[2].replace(ib," "))}function kb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function u(a,b){b||(b=r);a.prototype=kb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},t=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ha=g.load;d.Ga=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ha=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.cb=this.id:(this.Na=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Ua:!1,Wb:!1,ia:!1,error:!1};this.Ob=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;t.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function w(a,b){b||(b=r);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},t=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.ua-1;this.C=this.I/this.ua|0;this.Pa=[];this.f=0;this.A=[];this.Fc=[Rb,Sb,Tb,Ub];a=new I(this);Vb(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Pa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Xb(d,b,!0);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Sb(a,b,c){var d=!1,e=this.controller,f=e.Pa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Pa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Xb(e,c,!0,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Tb(a,b){var c=-1,d=this.controller;(a=d.Pa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Xb(d,b,!1);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Ub(a,b,c){var d=!1,e=this.controller;if(a=e.Pa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Xb(e,c,!1,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Yb(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.D)return m.Eb+=m.D-f,m.D=f,!0;if(f>=m.D+m.Eb){q=m.size-(f-n);q>g&&(q=g);m.Eb=f-m.D+q;f=n+a.ua;g-=q;h++;continue}}return dc(1,f,g)}f=new I(a,f,q,a.ua,d,e);Vb(f,a.i,m);a.W[h++]=f;f=n+a.ua;g-=q}if(0>=g){c/=1024;var w;e="";w?10>>=a.ka;0>>=a.ka;0>>this.ka].Pb(a&this.w,a)};k.Mb=function(a){this.f++;a=this.W[(a&this.g)>>>this.ka].ac(a&this.w,a);this.f--;return a};k.oa=function(a){return this.W[(a&this.g)>>>this.ka].pa(a&this.w,a)}; -k.lb=function(a){var b=a&this.w,c=(a&this.g)>>>this.ka;this.f++;a=this.W[c].bc(b,a);this.f--;return a};k.Qb=function(a,b){this.W[(a&this.g)>>>this.ka].Tb(a&this.w,b&255,a)};k.fb=function(a,b){this.f++;this.W[(a&this.g)>>>this.ka].Ub(a&this.w,b&255,a);this.f--};k.hb=function(a,b){this.W[(a&this.g)>>>this.ka].Fb(a&this.w,b&65535,a)};k.Rb=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.ka;this.f++;this.W[d].fc(c,b&65535,a);this.f--}; -function fc(a){for(var b=0,c=[],d=0;da.b.mb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));gc(a,e,e,g,h,m,n,f[4])}}}function ic(a,b){a.A.push(b)} -function jc(a,b,c){a.f||(a.i&&F(a.i,64)&&(E(a.i,"memory fault ("+c+") on address "+J(a.i,b),!0,!0),cc(a.i)),a.b.ja(4,b))}function dc(a,b,c){p("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,oe:0,Ob:20,Ed:0};this.f={se:0,ec:-1}}u(K);k=K.prototype; -k.wa=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.ec=kc(c,function(){e.f.Ra|=128;e.f.Ra&64&&(lc(e.b,e.f.Fd),mc(e.b,e.f.ec,1E3/60))});this.f.Fd=nc(64,6);hc(b,this,L);ic(b,this.reset.bind(this));G(this)};k.reset=function(){this.g.Ob=this.g.Ob&-120|20;this.f.Ra=0};k.$c=function(){var a=this.f.Ra;this.f.Ra&=-129;return a};k.Od=function(a){this.f.Ra=a;a&64&&mc(this.b,this.f.ec,1E3/60);this.f.Ra=a&-129};k.Tc=function(a){return(a?this.g.Ed:this.g.data)&65535}; -k.Hd=function(a){this.g.data=a};k.bd=function(){var a=this.b;return a.C&62337|a.Ea<<5|a.Fa<<1};k.Qd=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ea=a>>5&3;b.Fa=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Sa!=c&&(b.Sa=c,oc(b))}pc(this)};k.cd=function(){var a=this.b.Ua;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.dd=function(){return this.b.Db};k.ed=function(){return this.b.Va}; -k.Rd=function(a){var b=this.b;1170>b.mb&&(a&=-49);b.Va!=a&&(b.Va=a,a&16?(b.xb=4194303,b.$a=3915776):(b.xb=262143,b.$a=253952),oc(b));pc(this)};function pc(a){a.g.Ob=a.g.Ob&-8|(a.b.Sa?a.b.Va&16?1:2:4)}k.td=function(a){return this.b.V[1][a>>1&7]};k.ee=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.rd=function(a){return this.b.V[1][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.sd=function(a){return this.b.ta[1][a>>1&7]}; -k.de=function(a,b){b=b>>1&7;this.b.ta[1][b]=a;this.b.V[1][b]&=65295};k.qd=function(a){return this.b.ta[1][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.ta[1][b]=a;this.b.V[1][b]&=65295};k.Zc=function(a){return this.b.V[0][a>>1&7]};k.Nd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.Xc=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ld=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.Yc=function(a){return this.b.ta[0][a>>1&7]};k.Md=function(a,b){b=b>>1&7;this.b.ta[0][b]=a;this.b.V[0][b]&=65295}; -k.Wc=function(a){return this.b.ta[0][(a>>1&7)+8]};k.Kd=function(a,b){b=(b>>1&7)+8;this.b.ta[0][b]=a;this.b.V[0][b]&=65295};k.zd=function(a){return this.b.V[3][a>>1&7]};k.ke=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.xd=function(a){return this.b.V[3][(a>>1&7)+8]};k.ie=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.yd=function(a){return this.b.ta[3][a>>1&7]};k.je=function(a,b){b=b>>1&7;this.b.ta[3][b]=a;this.b.V[3][b]&=65295};k.wd=function(a){return this.b.ta[3][(a>>1&7)+8]}; -k.he=function(a,b){b=(b>>1&7)+8;this.b.ta[3][b]=a;this.b.V[3][b]&=65295};k.qb=function(a){a&=7;return this.b.M&2048?this.b.Na[a]:this.b.u[a]};k.ub=function(a,b){b&=7;this.b.M&2048?this.b.Na[b]=a:this.b.u[b]=a};k.kd=function(){return this.b.M&49152?this.b.Aa[0]:this.b.u[6]};k.Wd=function(a){this.b.M&49152?this.b.Aa[0]=a:this.b.u[6]=a};k.nd=function(){return this.b.u[7]};k.Zd=function(a){this.b.u[7]=a};k.rb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Na[a]}; -k.vb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Na[b]=a};k.ld=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Aa[1]};k.Xd=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Aa[1]=a};k.md=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Aa[3]};k.Yd=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Aa[3]=a};k.Vc=function(a){return this.b.yc[a-65504>>1]};k.Jd=function(a,b){this.b.yc[b-65504>>1]=a};k.vc=function(a){return 65520==a?61183:0};k.Cc=function(){}; -k.vd=function(){return 1};k.ge=function(){};k.Uc=function(){return this.b.ca};k.Id=function(){this.b.ca=0};k.ad=function(){return this.b.xc};k.Pd=function(a,b){b&1||(a&=255);this.b.xc=a};k.fd=function(a){return a?this.b.dc:0};k.Sd=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.dc=a;b.H|=2};k.ud=function(a){return a?this.b.Wa&65280:0};k.fe=function(a){this.b.Wa=a|255};k.jd=function(){return Bb(this.b)};k.Vd=function(a){qc(this.b,a&-1809|Bb(this.b)&1808);this.b.H|=128}; -k.Bc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; -var M={},L=(M[62592]=[null,null,K.prototype.td,K.prototype.ee,"SISDR",1145],M[62608]=[null,null,K.prototype.rd,K.prototype.ce,"SDSDR",1145],M[62624]=[null,null,K.prototype.sd,K.prototype.de,"SISAR",1145],M[62640]=[null,null,K.prototype.qd,K.prototype.be,"SDSAR",1145],M[62656]=[null,null,K.prototype.Zc,K.prototype.Nd,"KISDR",1145],M[62672]=[null,null,K.prototype.Xc,K.prototype.Ld,"KDSDR",1145],M[62688]=[null,null,K.prototype.Yc,K.prototype.Md,"KISAR",1145],M[62704]=[null,null,K.prototype.Wc,K.prototype.Kd, -"KDSAR",1145],M[62798]=[null,null,K.prototype.ed,K.prototype.Rd,"MMR3",1145],M[65382]=[null,null,K.prototype.$c,K.prototype.Od,"LKS"],M[65400]=[null,null,K.prototype.Tc,K.prototype.Hd,"CNSL"],M[65402]=[null,null,K.prototype.bd,K.prototype.Qd,"MMR0",1145],M[65404]=[null,null,K.prototype.cd,K.prototype.Bc,"MMR1",1145],M[65406]=[null,null,K.prototype.dd,K.prototype.Bc,"MMR2",1145],M[65408]=[null,null,K.prototype.zd,K.prototype.ke,"UISDR",1145],M[65424]=[null,null,K.prototype.xd,K.prototype.ie,"UDSDR", -1145],M[65440]=[null,null,K.prototype.yd,K.prototype.je,"UISAR",1145],M[65456]=[null,null,K.prototype.wd,K.prototype.he,"UDSAR",1145],M[65472]=[null,null,K.prototype.qb,K.prototype.ub,"R0SET0"],M[65473]=[null,null,K.prototype.qb,K.prototype.ub,"R1SET0"],M[65474]=[null,null,K.prototype.qb,K.prototype.ub,"R2SET0"],M[65475]=[null,null,K.prototype.qb,K.prototype.ub,"R3SET0"],M[65476]=[null,null,K.prototype.qb,K.prototype.ub,"R4SET0"],M[65477]=[null,null,K.prototype.qb,K.prototype.ub,"R5SET0"],M[65478]= -[null,null,K.prototype.kd,K.prototype.Wd,"R6KERNEL"],M[65479]=[null,null,K.prototype.nd,K.prototype.Zd,"R7KERNEL"],M[65480]=[null,null,K.prototype.rb,K.prototype.vb,"R0SET1",1145],M[65481]=[null,null,K.prototype.rb,K.prototype.vb,"R1SET1",1145],M[65482]=[null,null,K.prototype.rb,K.prototype.vb,"R2SET1",1145],M[65483]=[null,null,K.prototype.rb,K.prototype.vb,"R3SET1",1145],M[65484]=[null,null,K.prototype.rb,K.prototype.vb,"R4SET1",1145],M[65485]=[null,null,K.prototype.rb,K.prototype.vb,"R5SET1",1145], -M[65486]=[null,null,K.prototype.ld,K.prototype.Xd,"R6SUPER",1145],M[65487]=[null,null,K.prototype.md,K.prototype.Yd,"R6USER",1145],M[65504]=[null,null,K.prototype.Vc,K.prototype.Jd,"CTRL",1170],M[65520]=[null,null,K.prototype.vc,K.prototype.Cc,"LSIZE",1170],M[65522]=[null,null,K.prototype.vc,K.prototype.Cc,"HSIZE",1170],M[65524]=[null,null,K.prototype.vd,K.prototype.ge,"SYSID",1170],M[65526]=[null,null,K.prototype.Uc,K.prototype.Id,"CPUERR",1170],M[65528]=[null,null,K.prototype.ad,K.prototype.Pd, -"MB",1170],M[65530]=[null,null,K.prototype.fd,K.prototype.Sd,"PIR"],M[65532]=[null,null,K.prototype.ud,K.prototype.fe,"SL"],M[65534]=[null,null,K.prototype.jd,K.prototype.Vd,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648};function yb(a){r.call(this,"Panel",a,yb);this.f=0;this.A.kc=!0}w(yb);k=yb.prototype; +k.sa=function(a,b,c,d){if(this.B&&this.B.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.f++,!0;default:return"rled"==a?(this.G[b]=c,this.f++,!0):this.parent.sa.call(this,a,b,c,d)}};k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d};k.Ea=function(a,b){b||zb();return!0};k.Da=function(){return!0}; +function Ab(a,b,c,d){if(a.G[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ja());var e=a.i&&a.i.$||8;c=!a.b.A.ga||a.A.kc?8==e?ra(c,d):l(c,d):"--------".substr(0,d||4);a.G[b].textContent!=c&&(a.G[b].textContent=c)}}function Bb(a,b,c,d){for(var e=0;e>2;this.w=this.xa-1;this.F=this.J/this.xa|0;this.Ta=[];this.f=0;this.B=!1;this.C=[];this.Gc=[Sb,Tb,Ub,Vb];a=new I(this);Wb(a,this.i);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Yb(d,b,!0);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Tb(a,b,c){var d=!1,e=this.controller,f=e.Ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Yb(e,c,!0,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Ub(a,b){var c=-1,d=this.controller;(a=d.Ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Yb(d,b,!1);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Vb(a,b,c){var d=!1,e=this.controller;if(a=e.Ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Yb(e,c,!1,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Zb(a,b){if(b!=a.v){var c;a.v&&(c=(1<>>a.la;0g&&(p=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.D)return m.Jb+=m.D-f,m.D=f,!0;if(f>=m.D+m.Jb){p=m.size-(f-n);p>g&&(p=g);m.Jb=f-m.D+p;f=n+a.xa;g-=p;h++;continue}}return ec(1,f,g)}f=new I(a,f,p,a.xa,d,e);Wb(f,a.i,m);a.W[h++]=f;f=n+a.xa;g-=p}if(0>=g){c/=1024;var u;e="";u?10>>=a.la;0>>=a.la;0>>this.la].Rb(a&this.w,a)};k.Pb=function(a){this.B=!1;this.f++;a=this.W[(a&this.g)>>>this.la].bc(a&this.w,a);this.f--;return a}; +k.pa=function(a){return this.W[(a&this.g)>>>this.la].ra(a&this.w,a)};k.ib=function(a){var b=a&this.w,c=(a&this.g)>>>this.la;this.B=!1;this.f++;a=this.W[c].cc(b,a);this.f--;return a};k.Sb=function(a,b){this.W[(a&this.g)>>>this.la].Ub(a&this.w,b&255,a)};k.kb=function(a,b){this.B=!1;this.f++;this.W[(a&this.g)>>>this.la].Vb(a&this.w,b&255,a);this.f--};k.mb=function(a,b){this.W[(a&this.g)>>>this.la].Kb(a&this.w,b&65535,a)}; +k.Ib=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.la;this.B=!1;this.f++;this.W[d].gc(c,b&65535,a);this.f--};function gc(a){for(var b=0,c=[],d=0;da.b.qb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));hc(a,e,e,g,h,m,n,f[4])}}}function jc(a,b){a.C.push(b)} +function kc(a,b,c){a.f||(a.i&&F(a.i,64)&&(E(a.i,"memory fault ("+c+") on address "+J(a.i,b),!0,!0),dc(a.i)),a.b.ka(4,b));a.B=!0}function lc(a){var b=a.B;a.B=!1;return b}function ec(a,b,c){q("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Ce:0,Qb:20,Md:0};this.f={fa:0,fc:-1}}w(K);k=K.prototype; +k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.fc=mc(c,function(){e.f.Va|=128;e.f.Va&64&&(nc(e.b,e.f.Nd),oc(e.b,e.f.fc,1E3/60))});this.f.Nd=pc(64,6);ic(b,this,L);jc(b,this.reset.bind(this));G(this)};k.reset=function(){this.g.Qb=this.g.Qb&-120|20;this.f.Va=0};k.cd=function(){var a=this.f.Va;this.f.Va&=-129;return a};k.Xd=function(a){this.f.Va=a;a&64&&oc(this.b,this.f.fc,1E3/60);this.f.Va=a&-129};k.Vc=function(a){return(a?this.g.Md:this.g.data)&65535}; +k.Pd=function(a){this.g.data=a};k.ed=function(){var a=this.b;return a.C&62337|a.Ja<<5|a.Ka<<1};k.Zd=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ja=a>>5&3;b.Ka=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Wa!=c&&(b.Wa=c,qc(b))}rc(this)};k.fd=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.gd=function(){return this.b.Hb};k.hd=function(){return this.b.Za}; +k.$d=function(a){var b=this.b;1170>b.qb&&(a&=-49);b.Za!=a&&(b.Za=a,a&16?(b.Bb=4194303,b.eb=3915776):(b.Bb=262143,b.eb=253952),qc(b));rc(this)};function rc(a){a.g.Qb=a.g.Qb&-8|(a.b.Wa?a.b.Za&16?1:2:4)}k.Bd=function(a){return this.b.V[1][a>>1&7]};k.se=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.zd=function(a){return this.b.V[1][(a>>1&7)+8]};k.qe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ad=function(a){return this.b.wa[1][a>>1&7]}; +k.re=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.yd=function(a){return this.b.wa[1][(a>>1&7)+8]};k.pe=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.bd=function(a){return this.b.V[0][a>>1&7]};k.Wd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.$c=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ud=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ad=function(a){return this.b.wa[0][a>>1&7]};k.Vd=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; +k.Zc=function(a){return this.b.wa[0][(a>>1&7)+8]};k.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.Hd=function(a){return this.b.V[3][a>>1&7]};k.ye=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Fd=function(a){return this.b.V[3][(a>>1&7)+8]};k.we=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Gd=function(a){return this.b.wa[3][a>>1&7]};k.xe=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ed=function(a){return this.b.wa[3][(a>>1&7)+8]}; +k.ve=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.ub=function(a){a&=7;return this.b.M&2048?this.b.Ra[a]:this.b.u[a]};k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Ra[b]=a:this.b.u[b]=a};k.nd=function(){return this.b.M&49152?this.b.Fa[0]:this.b.u[6]};k.ee=function(a){this.b.M&49152?this.b.Fa[0]=a:this.b.u[6]=a};k.qd=function(){return this.b.u[7]};k.he=function(a){this.b.u[7]=a};k.vb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ra[a]}; +k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ra[b]=a};k.od=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[1]};k.fe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[1]=a};k.pd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[3]};k.ge=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[3]=a};k.Xc=function(a){return this.b.zc[a-65504>>1]};k.Rd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){}; +k.Dd=function(){return 1};k.ue=function(){};k.Wc=function(){return this.b.Z};k.Qd=function(){this.b.Z=0};k.dd=function(){return this.b.yc};k.Yd=function(a,b){b&1||(a&=255);this.b.yc=a};k.jd=function(a){return a?this.b.ec:0};k.ae=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ec=a;b.H|=2};k.Cd=function(a){return a?this.b.$a&65280:0};k.te=function(a){this.b.$a=a|255};k.md=function(){return Cb(this.b)};k.de=function(a){sc(this.b,a&-1809|Cb(this.b)&1808);this.b.H|=128}; +k.Cc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[62592]=[null,null,K.prototype.Bd,K.prototype.se,"SISDR",1145],M[62608]=[null,null,K.prototype.zd,K.prototype.qe,"SDSDR",1145],M[62624]=[null,null,K.prototype.Ad,K.prototype.re,"SISAR",1145],M[62640]=[null,null,K.prototype.yd,K.prototype.pe,"SDSAR",1145],M[62656]=[null,null,K.prototype.bd,K.prototype.Wd,"KISDR",1145],M[62672]=[null,null,K.prototype.$c,K.prototype.Ud,"KDSDR",1145],M[62688]=[null,null,K.prototype.ad,K.prototype.Vd,"KISAR",1145],M[62704]=[null,null,K.prototype.Zc,K.prototype.Td, +"KDSAR",1145],M[62798]=[null,null,K.prototype.hd,K.prototype.$d,"MMR3",1145],M[65382]=[null,null,K.prototype.cd,K.prototype.Xd,"LKS"],M[65400]=[null,null,K.prototype.Vc,K.prototype.Pd,"CNSL"],M[65402]=[null,null,K.prototype.ed,K.prototype.Zd,"MMR0",1145],M[65404]=[null,null,K.prototype.fd,K.prototype.Cc,"MMR1",1145],M[65406]=[null,null,K.prototype.gd,K.prototype.Cc,"MMR2",1145],M[65408]=[null,null,K.prototype.Hd,K.prototype.ye,"UISDR",1145],M[65424]=[null,null,K.prototype.Fd,K.prototype.we,"UDSDR", +1145],M[65440]=[null,null,K.prototype.Gd,K.prototype.xe,"UISAR",1145],M[65456]=[null,null,K.prototype.Ed,K.prototype.ve,"UDSAR",1145],M[65472]=[null,null,K.prototype.ub,K.prototype.yb,"R0SET0"],M[65473]=[null,null,K.prototype.ub,K.prototype.yb,"R1SET0"],M[65474]=[null,null,K.prototype.ub,K.prototype.yb,"R2SET0"],M[65475]=[null,null,K.prototype.ub,K.prototype.yb,"R3SET0"],M[65476]=[null,null,K.prototype.ub,K.prototype.yb,"R4SET0"],M[65477]=[null,null,K.prototype.ub,K.prototype.yb,"R5SET0"],M[65478]= +[null,null,K.prototype.nd,K.prototype.ee,"R6KERNEL"],M[65479]=[null,null,K.prototype.qd,K.prototype.he,"R7KERNEL"],M[65480]=[null,null,K.prototype.vb,K.prototype.zb,"R0SET1",1145],M[65481]=[null,null,K.prototype.vb,K.prototype.zb,"R1SET1",1145],M[65482]=[null,null,K.prototype.vb,K.prototype.zb,"R2SET1",1145],M[65483]=[null,null,K.prototype.vb,K.prototype.zb,"R3SET1",1145],M[65484]=[null,null,K.prototype.vb,K.prototype.zb,"R4SET1",1145],M[65485]=[null,null,K.prototype.vb,K.prototype.zb,"R5SET1",1145], +M[65486]=[null,null,K.prototype.od,K.prototype.fe,"R6SUPER",1145],M[65487]=[null,null,K.prototype.pd,K.prototype.ge,"R6USER",1145],M[65504]=[null,null,K.prototype.Xc,K.prototype.Rd,"CTRL",1170],M[65520]=[null,null,K.prototype.wc,K.prototype.Dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.wc,K.prototype.Dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Dd,K.prototype.ue,"SYSID",1170],M[65526]=[null,null,K.prototype.Wc,K.prototype.Qd,"CPUERR",1170],M[65528]=[null,null,K.prototype.dd,K.prototype.Yd, +"MB",1170],M[65530]=[null,null,K.prototype.jd,K.prototype.ae,"PIR"],M[65532]=[null,null,K.prototype.Cd,K.prototype.te,"SL"],M[65534]=[null,null,K.prototype.md,K.prototype.de,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Wa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Ic(this,Ec?Jc:Kc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&jc(this.w,b,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535: -c&255|(this.b[b+1]&255)<<8},sa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.La=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,1,c.L)&&c.ia(!0)}return this.ac(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,2,c.L)&&c.ia(!0)}return this.bc(a, -b)},ma:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,1,d.C)&&d.ia(!0)}this.f?this.A(a,b,c):this.Ub(a,b,c)},va:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,2,d.C)&&d.ia(!0)}this.f?this.A(a,b,c):this.fc(a,b,c)},N:function(a){return this.F[a]},R:function(a,b){a=this.F[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Ia:function(a,b){a&1&&jc(this.w,b,2);return this.G.getUint16(a,!0)},Z:function(a,b){a&1&&jc(this.w, -b,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.F[a]=b;this.La=!0},ra:function(a,b,c){this.F[a]=b;this.La=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},Za:function(a,b,c){a&1&&jc(this.w,c,4);this.G.setUint16(a,b,!0);this.La=!0},Ea:function(a,b,c){a&1&&jc(this.w,c,4);this.J[a>>1]=b;this.La=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function Vb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Oc(a,Nc,!1),(a.B=c.B)&&Mc(a,Nc,!1))}function Qc(a,b){b?--a.B||(a.Tb=a.f?a.A:a.Ub,a.Fb=a.f?a.I:a.fc):--a.g||(a.Pb=a.ac,a.pa=a.bc)}function Mc(a,b,c){c&&a.B||(a.Tb=!a.f&&b[1]||a.A,a.Fb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Ub=b[1]||a.A,a.fc=b[3]||a.I}function Oc(a,b,c){c&&a.g||(a.Pb=b[0]||a.K,a.pa=b[2]||a.L);if(c||void 0===c)a.ac=b[0]||a.K,a.bc=b[2]||a.L}function Ic(a,b){b||(b=Rc);Oc(a,b,void 0);Mc(a,b,void 0)} -var Rc=[],Lc=[I.prototype.S,I.prototype.sa,I.prototype.ba,I.prototype.Fa],Nc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.va];if(vb)var Kc=[I.prototype.N,I.prototype.la,I.prototype.Ia,I.prototype.Za],Jc=[I.prototype.R,I.prototype.ra,I.prototype.Z,I.prototype.Ea]; -function Sc(a,b){r.call(this,"CPU",a,Sc,1);var c=a.multiplier||1;this.Ya=a.cycles||b;this.Ta=c;this.wb=Math.round(this.Ya/1E4)/100;this.eb=this.wb*this.Ta;this.v.fa=!1;this.v.Sb=!1;this.v.ib=a.autoStart;this.v.kb=!1;this.Ab=this.ma=0;this.Bb=a.csStart;this.nb=a.csInterval;this.ob=a.csStop;this.K=[];this.tc=this.Dd.bind(this);G(this)}u(Sc);var Tc=["power","reset"];k=Sc.prototype; -k.wa=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.nb,c=!0);0<=a.ob&&a.ob<=Zc(a)&&(a.nb=a.ob=-1,Wc(a),a.ia(),c=!0);c&&a.j(Zc(a)+" cycles: checksum="+l(a.Ab))}} -k.qa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.F[b]=c,!0;case "run":return this.F[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.v.ha)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Y/a.eb?b=1:d=!0;a.Ta=b;b=a.wb*a.Ta;if(a.eb!=b){a.eb=b;b=a.eb.toFixed(2)+"Mhz";var e=a.F.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.gb()}ad(a,a.S);a.S=0;a.R=Aa();a.Z=0;bd(a);return d}function kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.Ya*a.Ta/1E3*c|0,a.K[b][0]=c+cd(a))} -function dd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function cd(a,b){var c=a.ba-=a.b;a.b=a.J=0;b&&(a.ba=0);return c} -k.Dd=function(){if(this.v.fa){this.yb>=this.Ya&&bd(this,!0);this.va=0;this.ab=Aa();if(this.Z){var a=this.ab-this.Z;a>this.qc&&(this.R+=a,this.R>this.ab&&(this.R=this.ab))}try{do{var b=dd(this,this.v.kb?1:this.bb);try{this.tb(b)}catch(e){if("number"!=typeof e)throw e;}b=cd(this,!0);this.va+=b;this.S+=b;Yc(this,b);ed(this,b);this.ra-=b;if(0>=this.ra){this.ra+=this.bb;15<=++this.rc&&(this.B&&this.B.da(),this.rc=0);break}}while(this.v.fa)}catch(e){this.ia();this.B&&this.B.stop(Aa(),Zc(this));ub(this, -e.stack||e.message);return}if(this.v.fa){a=setTimeout;b=this.tc;this.Z=Aa();var c=this.qc;this.va&&(c=Math.round(c*this.va/this.bb));var c=c-(this.Z-this.ab),d=this.Z-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.la=0,$c(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.yb+=this.va;this.Z+=c;a(b,c)}}}; -k.sb=function(a){if(tb(this))return!1;if(this.v.fa)return this.j(this.toString()+" busy"),!1;$c(this);this.v.fa=!0;this.v.Sb=!0;var b=this.F.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.gb(!0),this.B.start(this.R,Zc(this)));setTimeout(this.tc,0);return!0};k.tb=function(){return 0};k.ia=function(a){var b=!1;if(this.v.fa){cd(this);ad(this,this.S);this.S=0;this.v.fa=!1;if(b=this.F.run)b.textContent="Run";this.B&&this.B.stop(Aa(),Zc(this));b=!0}this.v.complete=a;return b}; -function fd(a){this.mb=+a.model||1170;this.Kb=a.addrReset||0;Sc.call(this,a,6666667);this.decode=1120==this.mb?gd.bind(this):hd.bind(this);id(this);this.L=0;this.N=null;this.v.complete=!1}u(fd,Sc);k=fd.prototype;k.reset=function(){this.status("model "+this.mb);this.v.fa&&this.ia();id(this);Vc(this);this.v.error=!1;this.parent.reset.call(this)}; -function id(a){a.T=65536;a.U=32768;a.$=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Kb];a.Na=[0,0,0,0,0,0];a.Aa=[0,0,0,0];a.A=0;a.Fa=0;a.Nc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ta=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Sc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.yc=[0,0,0,0,0,0,0,0];a.xc=0;a.H=0;a.G=a.I=0;a.g=a.f=a.jb=0;a.sa=-1;jd(a)}function jd(a){a.Wa=255;a.ca=0;a.dc=0;a.C=0;a.Ua=0;a.Db=0;a.Va=0;a.Sa=0;a.Ea=0;a.xb=262143;a.$a=253952;a.N=null;a.w&&oc(a)}function oc(a){a.Sa?(a.P=65536,a.aa=a.Mc,a.pa=a.Ad,a.Fb=a.le,Yb(a.w,a.Va&16?22:18)):(a.P=0,a.aa=a.Lc,a.pa=a.wc,a.Fb=a.Dc,Yb(a.w,16))}function kd(a,b,c){a.Kb=b;N(a,b);!c&&a.i&&(a.ia()||a.i.da())}k.nc=function(){return 0}; -k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.la,this.Ta]);a.set(2,fc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];$c(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.A!=c&&(a.Aa[c]=a.u[6],a.u[6]=a.Aa[a.A]);a.M=b;a.H|=2}function Q(a,b){a.H&128||(a.X=a.$=b,a.U=0)}function qd(a,b,c){a.H&128||(a.X=a.$=a.T=b,a.U=c||0)}function rd(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^b)&(d^b))}function sd(a,b){a.H&128||(a.X=a.$=a.T=b,a.U=a.X^a.T>>1)} -function td(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^d)&(d^b))}k.ja=function(a,b){if(!this.L){var c=!1;0>this.sa?this.sa=Bb(this):this.A||(a=4,c=!0);this.C&57344||(this.Ua=63222,this.Db=a);this.A=0;var d=this.pa(a|this.P),e=this.pa(a+2&65535|this.P);qc(this,e&-12289|this.sa>>2&12288);c&&(this.ca|=4,this.u[6]=4);ud(this,this.sa);ud(this,this.u[7]);N(this,d);this.H&=-113;this.sa=-1;this.H|=8;this.Rc=a;this.Qc=b;if(26!=b)throw a;}}; -function Md(a){var b=Nd(a),c=Nd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);N(a,b);qc(a,c);a.H&=-17} -function Od(a,b,c){var d,e,f,g=0;d=b>>13;a.Va&a.Nc[a.A]||(d&=7);e=a.V[a.A][d];f=(a.ta[a.A][d]<<6)+(b&8191)&a.xb;if(ff){if(3932160<=f){f&=262143;var h=f>>13&31;31>h?a.Va&32&&(f=a.Sc[h]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.$a&&4186112>f&&(a.ca|=32,a.ja(4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c& -4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.A][d]=e;if(4194170!==f||a.A)a.Ea=a.A,a.Fa=d;g&&(g&57344&&(0<=a.sa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ea<<5|a.Fa<<1),a.ja(168,16)),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.pa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.pa(e)| -g;a.b-=8;break;case 6:return e=a.pa(pd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.pa(pd(a,2)),e=e+a.u[c]&65535,e=a.pa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ua=a.Ua<<8|f<<3&248|c);6==c&&!a.A&&d&4&&0>=f&&(a.u[6]<=a.Wa||65534<=a.u[6])&&(a.u[6]<=a.Wa-32?(a.ca|=4,a.u[6]=4,a.ja(4,24)):(a.ca|=8,a.H|=64));return e}k.Mb=function(a){if(!this.Sa)return this.w.Mb(a);this.L++;a=Pd(this,Od(this,a,3));this.L--;return a}; -k.lb=function(a){if(!this.Sa)return this.w.lb(a);this.L++;a=this.wc(Od(this,a,2));this.L--;return a};k.fb=function(a,b){this.Sa?(this.L++,Qd(this,Od(this,a,5),b),this.L--):this.w.fb(a,b)};k.Rb=function(a,b){this.Sa?(this.L++,this.Dc(Od(this,a,4),b),this.L--):this.w.Rb(a,b)};k.Lc=function(a,b,c){return Rd(this,a,b,c)};k.Mc=function(a,b,c){return Od(this,Rd(this,a,b,c),c)};k.wc=function(a){return this.w.oa(a)};k.Ad=function(a){return this.w.oa(Od(this,a,2))};k.Dc=function(a,b){this.w.hb(a,b&65535)}; -k.le=function(a,b){this.w.hb(Od(this,a,4),b)};function Sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Rd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.A=a.M>>12&3,c=a.pa(d|c&a.P),a.A=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Aa[a.M>>12&3];return c}function Td(a,b,c,d){a.C&57344||(a.Ua=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Rd(a,b,e,4),c&65536||(e&=65535),a.A=a.M>>12&3,e=Od(a,e|c&65536,4),a.A=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Aa[a.M>>12&3]=d} -function Ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.G=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.G=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]}function Wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Rd(a,b,c,8)}function Xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]} -function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.jb=a.aa(b,e,7),Qd(a,e,d.call(a,c,Pd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function Zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Qd(a,a.aa(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function $d(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.aa(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.tb=function(a){this.v.complete=!0;var b=this.i&&ae(this.i)?1:this.v.Sb?-1:0,c=a?this.v.Sb?0:1:-1;this.v.Sb=!1;this.ba=this.b=a;do{if(b){if(this.i&&be(this.i,this.u[7],c)){this.ia();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.ja(168,28):this.H&64?this.ja(4,30):this.H&16&&this.ja(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.dc&224)>>5,f=this.N&&this.N.pb>e?this.N:null;f&&(d=f.Gd,e=f.pb);e>(this.M&224)>>5?(this.H&4&&(pd(this,2),this.H&=-5),this.ja(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function he(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function ie(a,b){a=b&~a;Q(this,a);return a}function je(a,b){a=b&~a;Q(this,a<<8);return a}function ke(a,b){a|=b;Q(this,a);return a}function le(a,b){a|=b;Q(this,a<<8);return a} -function me(a,b){a=~b|65536;qd(this,a);return a&65535}function ne(a,b){a=~b|256;qd(this,a<<8);return a&255}function oe(a,b){a=b-a;this.H&128||(this.X=this.$=a,this.U=b&(b^a));return a&65535}function pe(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.$=c,this.U=b&(b^c));return a&255}function qe(a,b){a=b+a;this.H&128||(this.X=this.$=a,this.U=a&(b^a));return a&65535}function re(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.$=c,this.U=c&(b<<8^c));return a&255} -function se(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function te(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function ue(a,b){a=b<<1|this.T>>16&1;sd(this,a);return a&65535}function ve(a,b){a=b<<1|this.T>>16&1;sd(this,a<<8);return a&255}function we(a,b){a=(this.T&65536|b)>>1|b<<16;sd(this,a);return a&65535}function xe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function ye(a,b){var c=b-a;td(this,c,a,b);return c&65535} -function ze(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function Ae(a,b){this.H&128||(this.X=this.$=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Be(a,b){a^=b;Q(this,a);return a&65535}function Ce(a){S(this,a,Vd(this,a),ce);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} -function De(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.$=c;this.b-=(this.g?6:7)+b} -function Ee(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.$=d>>16|d;this.b-=(this.g?6:7)+b}function Fe(a){T(this,a,!ld(this))}function Ge(a){T(this,a,ld(this))} -function He(a){S(this,a,Vd(this,a),ie);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Ie(a){R(this,a,Ud(this,a),je);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Je(a){S(this,a,Vd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}function Ke(a){R(this,a,Ud(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} -function Le(a){Q(this,Vd(this,a)&Yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function Me(a){Q(this,(Ud(this,a)&Xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function Ne(a){T(this,a,nd(this))}function Oe(a){T(this,a,!this.Ma()==!md(this))}function Pe(a){T(this,a,!nd(this)&&!this.Ma()==!md(this))}function Qe(a){T(this,a,!ld(this)&&!nd(this))}function Re(a){T(this,a,nd(this)||!this.Ma()!=!md(this))} -function Se(a){T(this,a,ld(this)||nd(this))}function Te(a){T(this,a,!this.Ma()!=!md(this))}function Ue(a){T(this,a,this.Ma())}function Ve(a){T(this,a,!nd(this))}function We(a){T(this,a,!this.Ma())}function Xe(){this.ja(12,1);this.b-=5}function Ye(a){T(this,a,!0)}function Ze(a){T(this,a,!md(this))}function $e(a){T(this,a,md(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.$=1);a&8&&(this.X=0);this.b-=5} -function af(a){var b=Vd(this,a);a=Yd(this,a);td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)}function bf(a){var b=Ud(this,a)<<8;a=Xd(this,a)<<8;td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.G?4:3)+(7==this.f?2:0)} -function cf(a){var b=Yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.$=d>>16|d,this.X=d>>16):(this.U=32768,this.$=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.$=this.X=0,this.U=32768,this.T=65536,this.b-=7}function df(){this.ja(24,2);this.b-=25} -function ef(){this.M&49152?(this.ca|=128,this.ja(4,3)):this.i?cc(this.i):this.ia();this.b-=7}function ff(){this.ja(16,4);this.b-=25}var gf=[0,7,7,10,7,11,9,13];function hf(a){this.J=this.b;N(this,Wd(this,a));this.b=this.J-gf[this.g]}var jf=[0,14,14,17,14,18,16,20];function kf(a){this.J=this.b;var b=Wd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-jf[this.g]}var lf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function mf(a){var b=Vd(this,a);this.J=this.b;Q(this,$d(this,a,b));this.b=this.J-lf[(this.G?8:0)+this.g]+(7!=this.f||this.g?0:2)}function nf(a){var b=Ud(this,a);Q(this,Zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)}var of=[7,13,13,17,14,18,17,21]; -function pf(a){var b=Yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.$=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function vf(a){S(this,a,Vd(this,a),ye);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.G?5:3)+(7==this.f?2:0)} -function wf(a){S(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}function xf(){this.ja(28,5);this.b-=5}function yf(){this.H&4||this.B.da();this.H|=4;pd(this,-2);this.b-=3}function zf(a){S(this,a,Vd(this,a),Be);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=cc(b);b||this.ja(8,6)}function gd(a){Af[a>>12].call(this,a)}function Bf(a){Cf[a>>6&3].call(this,a)}function Df(a){Ef[a>>6&3].call(this,a)} -function Ff(a){Gf[a>>6&3].call(this,a)}function Hf(a){If[a&15].call(this,a)}function Jf(a){Kf[a&15].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)} -var Af=[function(a){Rf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,V,function(a){Sf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,vf,V],Rf=[function(a){Tf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Bf,Df,Ff,V,V,V],Cf=[function(a){qd(this,$d(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)}],Ef=[function(a){S(this,a,0, -se);this.b-=this.g?11:6},function(a){S(this,a,ld(this)?1:0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ld(this)?1:0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Yd(this,a);qd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Gf=[function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)}], -Tf=[function(a){Uf[a&15].call(this,a)},V,V,V,hf,hf,hf,hf,tf,V,Hf,Jf,wf,wf,wf,wf],Uf=[ef,yf,sf,Xe,ff,rf,V,V,V,V,V,V,V,V,V,V],If=[qf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.$=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],Kf=[qf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.$=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],Sf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,xf,Lf,Nf,Pf,V,V,V],Mf=[function(a){qd(this, -Zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,pe);this.b-=this.g?9:3+(7==this.f?2:0)}],Of=[function(a){R(this,a,0,te);this.b-=this.g?11:6},function(a){R(this,a,ld(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,ld(this)?1:0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Xd(this,a);qd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],Qf=[function(a){R(this,a,0,xe);this.b-=this.g?9+(this.jb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,he);this.b-=this.g?9+(this.jb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}];function hd(a){Vf[a>>12].call(this,a)} -var Vf=[function(a){Wf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,function(a){Xf[a>>8&15].call(this,a)},function(a){Yf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,vf,V],Wf=[function(a){Zf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Bf,Df,Ff,function(a){$f[a>>6&3].call(this,a)},V,V],$f=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.pa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Sd(this,a,0);ud(this,a);Q(this,a);this.b-=11},function(a){var b=Nd(this);this.J= -this.b;Td(this,a,0,b);Q(this,b);this.b=this.J-of[this.g]},function(a){Q(this,$d(this,a,this.Ma?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){ag[a&15].call(this,a)},V,V,V,hf,hf,hf,hf,tf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):V.call(this,a)},Hf,Jf,wf,wf,wf,wf],ag=[ef,yf,sf,Xe,ff,rf,function(){Md(this);this.b-=13},V,V,V,V,V,V,V,V,V],Xf=[pf,pf,cf,cf,De,De,Ee,Ee,zf,zf,V,V,V,V,uf,uf],Yf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,xf,Lf,Nf,Pf,function(a){bg[a>> -6&3].call(this,a)},V,V],bg=[V,function(a){a=Sd(this,a,65536);ud(this,a);Q(this,a);this.b-=11},function(a){var b=Nd(this);this.J=this.b;Td(this,a,65536,b);Q(this,b);this.b=this.J-of[this.g]},V]; -function cg(a){r.call(this,"ROM",a,cg);this.ga=this.f=null;this.C=a.addr;this.g=a.size;this.A=a.alias;this.B=a.file;this.G=ra(this.B);if(this.B){a=this.B;var b=sa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(mb(c.Ia,a,b),(a=Ea(a,b))?(c.f=a.ea,c.ga=a.ga):c.B=null,dg(c))})}}u(cg);cg.prototype.wa=function(a,b,c,d){this.w=b;this.b=c;this.i=d;dg(this)}; -cg.prototype.za=function(){this.ga&&(this.i&&eg(this.i,this.id,this.C,this.g,this.ga),delete this.ga);return!0};cg.prototype.ya=function(){return!0}; -function dg(a){if(!sb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)ub(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(ac(a.w,b,a.g,Hc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,q=b[h++]&255|(b[h++]&255)<<8,m=m+((n&255)+(n>>8)+(q&255)+(q>>8)),w=h,v=n-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(v)for(;v--;)a.b.fb(q++,b[w++]&255);else q&1?a.b.ia():kd(a.b,q,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&lc(e.b,e.la))});this.ma=nc(52,4);this.Z=kc(this.b,function(){e.g|=128;e.g&64&&lc(e.b,e.ma)});hc(b,this,Dg);G(this)}; -k.sc=function(){if(!this.J){var a=Uc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Za)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Ia+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.za=function(a,b){if(!b)if(this.sc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ya=function(a){return a?this.save():!0};k.reset=function(){Eg(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Eg(this)};function Eg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.cc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=wa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.A.value+=b;this.A.scrollTop=this.A.scrollHeight;this.I+=c}else if(null!=this.G){if(10==a||1024<=this.G.length)this.j(this.G), -this.G="";10!=a&&(this.G+=String.fromCharCode(a))}this.g&=-129;mc(this.b,this.Z,1E3/Math.round(this.R/10))}};var Fg={},Dg=(Fg[65392]=[null,null,X.prototype.pd,X.prototype.ae,"RCSR"],Fg[65394]=[null,null,X.prototype.od,X.prototype.$d,"RBUF"],Fg[65396]=[null,null,X.prototype.Cd,X.prototype.ne,"XCSR"],Fg[65398]=[null,null,X.prototype.Bd,X.prototype.me,"XBUF"],Fg);Wa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.F[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.F[b]=c,c.onclick= -function(){var a=d.F.listTapes;a&&Ig(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.F[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ig(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.F[b]=c,!0}return!1}; -k.wa=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.Y=Jg(a);var e=this;if((this.g=Uc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){p("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.P=nc(56,4);this.ba=kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.v.ha;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.Ia,e,f),(e=Ea(e,f))&&Sg(a,b,c,d,e.ea,e.Ca, -e.Ba));a.v.Qa=!1;a.G&&(a.G--,a.G||G(a));Pg(a)})}function Mg(a,b,c,d){if((a=a.F.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.Ha);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Zb?"":e)+"&format=json"));return!!Da(f, -null,!0,function(b,c,d){Zg(a,b,c,d)})} -function Zg(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.v.ha;if(d)a.controller.O('Unable to load disk "'+a.Oa+'" (error '+d+": "+b+")",f);else{mb(a.controller.Ia,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)p(h[0]);else{a.Ha=h.length;a.Da=h[0].length;a.xa=h[0][0].length;var m=h[0][0][0];a.Ja=m&&m.length||512;for(d=c=0;d>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var w=m.data;if(void 0===w){var v=m.bytes;if(void 0!==v&&v.length){for(var x=n<<2,z=v.length;z>2,e=Array(d),f=0;f>2,g=(h>((f&3)<<3)&255;f=g;if(0>f)break;d|=f<=this.b.length||m>=this.b[h].length||n>=this.b[h][m].length){c="sector (CHS="+h+":"+m+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][m][n]){for(m=h.data.length;mb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Oa+": "+c);return b}; -Ug.prototype.toJSON=function(){var a;a=0;for(var b;b=ah(this,a++);)ch(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function ch(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function sc(a){r.call(this,"RL11",a,sc,2097152);this.g=a.autoMount||null;this.A=0;this.f=Array(1);this.C=!Oa("Mobi")&&window&&"FileReader"in window}u(sc);k=sc.prototype; -k.qa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.F[b]=c,c.onchange=function(){var a=d.F.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){p("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.F[b]=c,c.onchange=function(){var a=pa(c.value,10);null!=a&&dh(d,a)},!0;case "loadDrive":return this.F[b]= -c,c.onclick=function(){var a=d.F.listDisks;a&&eh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.C){c.parentNode.removeChild(c);break}this.F[b]=c;c.onclick=function(){var a=d.F.listDrives;if(a&&a.options&&d.f)if(a=d.f[pa(a.value,10)||0])if(a=a.Hb){var b;b="";for(var c=0,h;h=ah(a,c++);)for(var m=0,n=h.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";dh(this,0)}}return!0};k.ya=function(a){return a?this.save():!0};k.reset=function(){fh(this)};k.save=function(){return(new O(this)).data()}; -k.restore=function(){return!0};function fh(a){for(var b=0;bg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}kh(a,e,b,c,!1,d)}else jh(a,e)} -function kh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.Xa.toLowerCase()!=d.toLowerCase()&&(g++,jh(a,b,!0),h.Yb?a.O("RL11 busy"):(h.Yb=!0,e&&(h.Xb=!0,a.A++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ib=!!f,Yg(new Ug(a,h,"preload"),c,d,f,a.Jc)&&g++));return g} -k.Jc=function(a,b,c,d,e){var f;a.Yb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.Ha||f[1]>a.Da)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.$b)),b=null);b?(a.Hb=b,a.Oa=c,a.Xa=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.$b),a.Xb||e),this.B&&this.B.gb()):a.Ib=!1;a.Xb&&(a.Xb=!1,--this.A||G(this));dh(this,a.$b)}; -function hh(a,b,c,d){if((a=a.F.listDisks)&&a.options){for(var e=0;e=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};lh.prototype.oc=function(){return-1};lh.prototype.pc=function(){}; -function nh(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.P?b="end":b=a.g[a.A+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} -function oh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Jc(this,Fc?Kc:Lc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&kc(this.w,b,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535: +c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Qc(c,this.D+a,1,c.L)&&c.ja(!0)}return this.bc(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Qc(c,this.D+a,2,c.L)&&c.ja(!0)}return this.cc(a, +b)},na:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Qc(d,this.D+a,1,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.Vb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Qc(d,this.D+a,2,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.gc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Na:function(a,b){a&1&&kc(this.w,b,2);return this.F.getUint16(a,!0)},$:function(a,b){a&1&&kc(this.w, +b,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ma:function(a,b){this.G[a]=b;this.Pa=!0},ua:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},cb:function(a,b,c){a&1&&kc(this.w,c,4);this.F.setUint16(a,b,!0);this.Pa=!0},Ja:function(a,b,c){a&1&&kc(this.w,c,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function Wb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Pc(a,Oc,!1),(a.B=c.B)&&Nc(a,Oc,!1))}function Rc(a,b){b?--a.B||(a.Ub=a.f?a.v:a.Vb,a.Kb=a.f?a.I:a.gc):--a.g||(a.Rb=a.bc,a.ra=a.cc)}function Nc(a,b,c){c&&a.B||(a.Ub=!a.f&&b[1]||a.v,a.Kb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Vb=b[1]||a.v,a.gc=b[3]||a.I}function Pc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.bc=b[0]||a.K,a.cc=b[2]||a.L}function Jc(a,b){b||(b=Sc);Pc(a,b,void 0);Nc(a,b,void 0)} +var Sc=[],Mc=[I.prototype.S,I.prototype.va,I.prototype.ca,I.prototype.Ka],Oc=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.za];if(wb)var Lc=[I.prototype.N,I.prototype.ma,I.prototype.Na,I.prototype.cb],Kc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; +function Tc(a,b){r.call(this,"CPU",a,Tc,1);var c=a.multiplier||1;this.bb=a.cycles||b;this.Xa=c;this.Ab=Math.round(this.bb/1E4)/100;this.jb=this.Ab*this.Xa;this.A.ga=!1;this.A.Tb=!1;this.A.nb=a.autoStart;this.A.pb=!1;this.Eb=this.na=0;this.Fb=a.csStart;this.rb=a.csInterval;this.sb=a.csStop;this.K=[];this.uc=this.Ld.bind(this);G(this)}w(Tc);var Uc=["power","reset"];k=Tc.prototype; +k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.rb,c=!0);0<=a.sb&&a.sb<=$c(a)&&(a.rb=a.sb=-1,Xc(a),a.ja(),c=!0);c&&a.j($c(a)+" cycles: checksum="+l(a.Eb))}} +k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.jb?b=1:d=!0;a.Xa=b;b=a.Ab*a.Xa;if(a.jb!=b){a.jb=b;b=a.jb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.lb()}bd(a,a.S);a.S=0;a.R=Ba();a.$=0;cd(a);return d}function mc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function oc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.bb*a.Xa/1E3*c|0,a.K[b][0]=c+dd(a))} +function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function fd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function dd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} +k.Ld=function(){if(this.A.ga){this.Cb>=this.bb&&cd(this,!0);this.za=0;this.fb=Ba();if(this.$){var a=this.fb-this.$;a>this.rc&&(this.R+=a,this.R>this.fb&&(this.R=this.fb))}try{do{var b=ed(this,this.A.pb?1:this.gb);try{this.xb(b)}catch(e){if("number"!=typeof e)throw e;}b=dd(this,!0);this.za+=b;this.S+=b;Zc(this,b);fd(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.gb;15<=++this.sc&&(this.B&&this.B.da(),this.sc=0);break}}while(this.A.ga)}catch(e){this.ja();this.B&&this.B.stop(Ba(),$c(this));vb(this, +e.stack||e.message);return}if(this.A.ga){a=setTimeout;b=this.uc;this.$=Ba();var c=this.rc;this.za&&(c=Math.round(c*this.za/this.gb));var c=c-(this.$-this.fb),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ma=0,ad(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Cb+=this.za;this.$+=c;a(b,c)}}}; +k.wb=function(a){if(ub(this))return!1;if(this.A.ga)return this.j(this.toString()+" busy"),!1;ad(this);this.A.ga=!0;this.A.Tb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.lb(!0),this.B.start(this.R,$c(this)));setTimeout(this.uc,0);return!0};k.xb=function(){return 0};k.ja=function(a){var b=!1;if(this.A.ga){dd(this);bd(this,this.S);this.S=0;this.A.ga=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),$c(this));b=!0}this.A.complete=a;return b}; +function gd(a){this.qb=+a.model||1170;this.Nb=a.addrReset||0;Tc.call(this,a,6666667);this.decode=1120==this.qb?hd.bind(this):id.bind(this);jd(this);this.L=0;this.N=null;this.A.complete=!1}w(gd,Tc);k=gd.prototype;k.reset=function(){this.status("model "+this.qb);this.A.ga&&this.ja();jd(this);Wc(this);this.A.error=!1;this.parent.reset.call(this)}; +function jd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Ra=[0,0,0,0,0,0];a.Fa=[0,0,0,0];a.v=0;a.Ka=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Uc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.F=a.I=0;a.g=a.f=a.ob=0;a.va=-1;kd(a)}function kd(a){a.$a=255;a.Z=0;a.ec=0;a.C=0;a.Ya=0;a.Hb=0;a.Za=0;a.Wa=0;a.Ja=0;a.Bb=262143;a.eb=253952;a.N=null;a.w&&qc(a)}function qc(a){a.Wa?(a.P=65536,a.ba=a.Oc,a.ra=a.Id,a.Kb=a.ze,Zb(a.w,a.Za&16?22:18)):(a.P=0,a.ba=a.Nc,a.ra=a.xc,a.Kb=a.Ec,Zb(a.w,16))}function ld(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ja()||a.i.da())}k.oc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ma,this.Xa]);a.set(2,gc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ma=b[1];ad(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Fa[c]=a.u[6],a.u[6]=a.Fa[a.v]);a.M=b;a.H|=2}function R(a,b){a.H&128||(a.X=a.aa=b,a.U=0)}function rd(a,b,c){a.H&128||(a.X=a.aa=a.T=b,a.U=c||0)}function sd(a,b,c,d){a.H&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function td(a,b){a.H&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function ud(a,b,c,d){a.H&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.ka=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=Cb(this):this.v||(a=4,c=!0);this.C&57344||(this.Ya=63222,this.Hb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);sc(this,e&-12289|this.va>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.va);vd(this,this.u[7]);O(this,d);this.H&=-113;this.va=-1;this.H|=8;this.Tc=a;this.Sc=b;if(26!=b)throw a;}}; +function wd(a){var b=xd(a),c=xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);sc(a,c);a.H&=-17}function Pd(a,b){var c=b>>13&31;31>c?a.Za&32&&(b=a.Uc[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function Qd(a,b,c){var d,e,f,g=0;d=b>>13;a.Za&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Bb;ff&&(3932160<=f&&(f=Pd(a,f&262143)),f>=a.eb&&4186112>f&&(a.Z|=32,a.ka(4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= +16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Ka=d;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Ka<<1),a.ka(168,16)),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)|g; +a.b-=8;break;case 6:return e=a.ra(qd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(qd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.$a||65534<=a.u[6])&&(a.u[6]<=a.$a-32?(a.Z|=4,a.u[6]=4,a.ka(4,24)):(a.Z|=8,a.H|=64));return e}k.Pb=function(a){if(!this.Wa)return this.w.Pb(a);this.L++;a=Rd(this,Qd(this,a,3));this.L--;return a}; +k.ib=function(a){if(!this.Wa)return this.w.ib(a);this.L++;a=this.xc(Qd(this,a,2));this.L--;return a};k.kb=function(a,b){this.Wa?(this.L++,Sd(this,Qd(this,a,5),b),this.L--):this.w.kb(a,b)};k.Ib=function(a,b){this.Wa?(this.L++,this.Ec(Qd(this,a,4),b),this.L--):this.w.Ib(a,b)};k.Nc=function(a,b,c){return Td(this,a,b,c)};k.Oc=function(a,b,c){return Qd(this,Td(this,a,b,c),c)};k.xc=function(a){return this.w.pa(a)};k.Id=function(a){return this.w.pa(Qd(this,a,2))};k.Ec=function(a,b){this.w.mb(a,b&65535)}; +k.ze=function(a,b){this.w.mb(Qd(this,a,4),b)};function Ud(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Td(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Fa[a.M>>12&3];return c}function Vd(a,b,c,d){a.C&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Td(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Qd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.mb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Fa[a.M>>12&3]=d} +function Wd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?Rd(a,a.ba(b,c,3)):a.u[c]&255}function Xd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]}function Yd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Td(a,b,c,8)}function Zd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Rd(a,a.ba(b,c,3)):a.u[c]&255}function $d(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ob=a.ba(b,e,7),Sd(a,e,d.call(a,c,Rd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.mb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ae(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Sd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.mb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.xb=function(a){this.A.complete=!0;var b=this.i&&ce(this.i)?1:this.A.Tb?-1:0,c=a?this.A.Tb?0:1:-1;this.A.Tb=!1;this.ca=this.b=a;do{if(b){if(this.i&&de(this.i,this.u[7],c)){this.ja();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.ka(168,28):this.H&64?this.ka(4,30):this.H&16&&this.ka(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.ec&224)>>5,f=this.N&&this.N.tb>e?this.N:null;f&&(d=f.Od,e=f.tb);e>(this.M&224)>>5?(this.H&4&&(qd(this,2),this.H&=-5),this.ka(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function je(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function ke(a,b){a=b&~a;R(this,a);return a}function le(a,b){a=b&~a;R(this,a<<8);return a}function me(a,b){a|=b;R(this,a);return a}function ne(a,b){a|=b;R(this,a<<8);return a} +function oe(a,b){a=~b|65536;rd(this,a);return a&65535}function pe(a,b){a=~b|256;rd(this,a<<8);return a&255}function qe(a,b){a=b-a;this.H&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function re(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function se(a,b){a=b+a;this.H&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function te(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function ue(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function ve(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function we(a,b){a=b<<1|this.T>>16&1;td(this,a);return a&65535}function xe(a,b){a=b<<1|this.T>>16&1;td(this,a<<8);return a&255}function ye(a,b){a=(this.T&65536|b)>>1|b<<16;td(this,a);return a&65535}function ze(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function Ae(a,b){var c=b-a;ud(this,c,a,b);return c&65535} +function Be(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function Ce(a,b){this.H&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function De(a,b){a^=b;R(this,a);return a&65535}function Ee(a){T(this,a,Xd(this,a),ee);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function Fe(a){var b=$d(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Ge(a){var b=$d(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function He(a){U(this,a,!md(this))}function Ie(a){U(this,a,md(this))} +function Je(a){T(this,a,Xd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ke(a){S(this,a,Wd(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Le(a){T(this,a,Xd(this,a),me);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Me(a){S(this,a,Wd(this,a),ne);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function Ne(a){R(this,Xd(this,a)&$d(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Oe(a){R(this,(Wd(this,a)&Zd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Pe(a){U(this,a,od(this))}function Qe(a){U(this,a,!this.Qa()==!nd(this))}function Re(a){U(this,a,!od(this)&&!this.Qa()==!nd(this))}function Se(a){U(this,a,!md(this)&&!od(this))}function Te(a){U(this,a,od(this)||!this.Qa()!=!nd(this))} +function Ue(a){U(this,a,md(this)||od(this))}function Ve(a){U(this,a,!this.Qa()!=!nd(this))}function We(a){U(this,a,this.Qa())}function Xe(a){U(this,a,!od(this))}function Ye(a){U(this,a,!this.Qa())}function Ze(){this.ka(12,1);this.b-=5}function $e(a){U(this,a,!0)}function af(a){U(this,a,!nd(this))}function bf(a){U(this,a,nd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function cf(a){var b=Xd(this,a);a=$d(this,a);ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function df(a){var b=Wd(this,a)<<8;a=Zd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} +function ef(a){var b=$d(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function ff(){this.ka(24,2);this.b-=25} +function gf(){this.M&49152?(this.Z|=128,this.ka(4,3)):this.i?dc(this.i):this.ja();this.b-=7}function hf(){this.ka(16,4);this.b-=25}var jf=[0,7,7,10,7,11,9,13];function kf(a){this.J=this.b;O(this,Yd(this,a));this.b=this.J-jf[this.g]}var lf=[0,14,14,17,14,18,16,20];function mf(a){this.J=this.b;var b=Yd(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-lf[this.g]}var nf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function of(a){var b=Xd(this,a);this.J=this.b;R(this,be(this,a,b));this.b=this.J-nf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function pf(a){var b=Wd(this,a);R(this,ae(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var qf=[7,13,13,17,14,18,17,21]; +function rf(a){var b=$d(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function xf(a){T(this,a,Xd(this,a),Ae);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function yf(a){T(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)}function zf(){this.ka(28,5);this.b-=5}function Af(){this.H&4||this.B.da();this.H|=4;qd(this,-2);this.b-=3}function Bf(a){T(this,a,Xd(this,a),De);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=dc(b);b||this.ka(8,6)}function hd(a){Cf[a>>12].call(this,a)}function Df(a){Ef[a>>6&3].call(this,a)}function Ff(a){Gf[a>>6&3].call(this,a)} +function Hf(a){If[a>>6&3].call(this,a)}function Jf(a){Kf[a&15].call(this,a)}function Lf(a){Mf[a&15].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)} +var Cf=[function(a){Tf[a>>8&15].call(this,a)},of,cf,Ne,Je,Le,Ee,W,function(a){Uf[a>>8&15].call(this,a)},pf,df,Oe,Ke,Me,xf,W],Tf=[function(a){Vf[a>>4&15].call(this,a)},$e,Xe,Pe,Qe,Ve,Re,Te,mf,mf,Df,Ff,Hf,W,W,W],Ef=[function(a){rd(this,be(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)}],Gf=[function(a){T(this,a,0, +ue);this.b-=this.g?11:6},function(a){T(this,a,md(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,md(this)?1:0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=$d(this,a);rd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],If=[function(a){T(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}], +Vf=[function(a){Wf[a&15].call(this,a)},W,W,W,kf,kf,kf,kf,vf,W,Jf,Lf,yf,yf,yf,yf],Wf=[gf,Af,uf,Ze,hf,tf,W,W,W,W,W,W,W,W,W,W],Kf=[sf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Mf=[sf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],Uf=[Ye,We,Se,Ue,af,bf,He,Ie,ff,zf,Nf,Pf,Rf,W,W,W],Of=[function(a){rd(this, +ae(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)}],Qf=[function(a){S(this,a,0,ve);this.b-=this.g?11:6},function(a){S(this,a,md(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,md(this)?1:0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Zd(this,a);rd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],Sf=[function(a){S(this,a,0,ze);this.b-=this.g?9+(this.ob&1):3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,je);this.b-=this.g?9+(this.ob&1):3+(7==this.f?2:0)},function(a){S(this,a,0,he);this.b-=this.g?9:3+(7==this.f?2:0)}];function id(a){Xf[a>>12].call(this,a)} +var Xf=[function(a){Yf[a>>8&15].call(this,a)},of,cf,Ne,Je,Le,Ee,function(a){Zf[a>>8&15].call(this,a)},function(a){$f[a>>8&15].call(this,a)},pf,df,Oe,Ke,Me,xf,W],Yf=[function(a){ag[a>>4&15].call(this,a)},$e,Xe,Pe,Qe,Ve,Re,Te,mf,mf,Df,Ff,Hf,function(a){bg[a>>6&3].call(this,a)},W,W],bg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ud(this,a,0);vd(this,a);R(this,a);this.b-=11},function(a){var b=xd(this);this.J= +this.b;Vd(this,a,0,b);R(this,b);this.b=this.J-qf[this.g]},function(a){R(this,be(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ag=[function(a){cg[a&15].call(this,a)},W,W,W,kf,kf,kf,kf,vf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):W.call(this,a)},Jf,Lf,yf,yf,yf,yf],cg=[gf,Af,uf,Ze,hf,tf,function(){wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],Zf=[rf,rf,ef,ef,Fe,Fe,Ge,Ge,Bf,Bf,W,W,W,W,wf,wf],$f=[Ye,We,Se,Ue,af,bf,He,Ie,ff,zf,Nf,Pf,Rf,function(a){dg[a>> +6&3].call(this,a)},W,W],dg=[W,function(a){a=Ud(this,a,65536);vd(this,a);R(this,a);this.b-=11},function(a){var b=xd(this);this.J=this.b;Vd(this,a,65536,b);R(this,b);this.b=this.J-qf[this.g]},W]; +function eg(a){r.call(this,"ROM",a,eg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.F=sa(this.B);if(this.B){a=this.B;var b=ta(this.F);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ha=a.ha):c.B=null,fg(c))})}}w(eg);eg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;fg(this)}; +eg.prototype.Ea=function(){this.ha&&(this.i&&gg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};eg.prototype.Da=function(){return!0}; +function fg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(bc(a.w,b,a.g,Ic)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,p=b[h++]&255|(b[h++]&255)<<8,m=m+((n&255)+(n>>8)+(p&255)+(p>>8)),u=h,v=n-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(v)for(;v--;)a.b.kb(p++,b[u++]&255);else p&1?a.b.ja():ld(a.b,p,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&nc(e.b,e.ma))});this.na=pc(52,4);this.$=mc(this.b,function(){e.g|=128;e.g&64&&nc(e.b,e.na)});ic(b,this,Fg);G(this)}; +k.tc=function(){if(!this.J){var a=Vc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.cb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ea=function(a,b){if(!b)if(this.tc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Da=function(a){return a?this.save():!0};k.reset=function(){Gg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Gg(this)};function Gg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.dc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), +this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;oc(this.b,this.$,1E3/Math.round(this.R/10))}};var Hg={},Fg=(Hg[65392]=[null,null,Y.prototype.sd,Y.prototype.je,"RCSR"],Hg[65394]=[null,null,Y.prototype.rd,Y.prototype.ie,"RBUF"],Hg[65396]=[null,null,Y.prototype.Kd,Y.prototype.Be,"XCSR"],Hg[65398]=[null,null,Y.prototype.Jd,Y.prototype.Ae,"XBUF"],Hg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Kg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Kg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Lg(a);var e=this;if((this.g=Vc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=pc(56,4);this.ca=mc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Ug(a,b,c,d,e.ea,e.Ha, +e.Ga));a.A.Ua=!1;a.F&&(a.F--,a.F||G(a));Rg(a)})}function Og(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.$b?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){ah(a,b,c,d)})} +function ah(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Sa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var m=h[0][0][0];a.Ia=m&&m.length||512;for(d=c=0;d>2,p=m.pattern;void 0===p&&(p=m.pattern=0);var u=m.data;if(void 0===u){var v=m.bytes;if(void 0!==v&&v.length){for(var x=n<<2,z=v.length;z>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Ma+a.Aa&&(a.Aa+=f-(a.Ma+a.Aa)+1):(a.Ma=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||m>=this.b[h].length||n>=this.b[h][m].length){c="sector (CHS="+h+":"+m+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][m][n]){for(m=h.data.length;mb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Sa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=ch(this,a++);)eh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function eh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){r.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}w(N);k=N.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&fh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&gh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=ch(a,c++);)for(var m=0,n=h.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";fh(this,0)}}return!0};k.Da=function(a){return a?this.save():!0};k.reset=function(){hh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return hh(this,a[0])};function kh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}mh(a,e,b,c,!1,d)}else lh(a,e)} +function mh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.ab.toLowerCase()!=d.toLowerCase()&&(g++,lh(a,b,!0),h.Zb?a.O("RL11 busy"):(h.Zb=!0,e&&(h.Yb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Lb=!!f,$g(new Wg(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} +k.Kc=function(a,b,c,d,e){var f;a.Zb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ac)),b=null);b?(a.Ba=b,a.Sa=c,a.ab=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ac),a.Yb||e),this.B&&this.B.lb()):a.Lb=!1;a.Yb&&(a.Yb=!1,--this.I||G(this));fh(this,a.ac)}; +function jh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.Yc=function(a,b,c,d,e,f,g){for(var h=0,m=a.Ba,n=null,p;e--;){if(!n){n=a.Ba.seek(b,c,d,!0);if(!n){h=5120;break}p=0}var u,v;if(0>(u=a.Ba.read(n,p++))||0>(v=a.Ba.read(n,p++))){h=5120;break}this.w.Ib(Pd(this.b,f),u|v<<8);if(lc(this.w)){h=8192;break}f+=2;if(p>=m.Ia&&(n=null,++d>=m.qa&&(d=0,++c>=m.ya&&(c=0,++b>=m.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.Sd=function(a,b,c,d,e,f,g){for(var h=0,m=a.Ba,n=null,p;e--;){var u=this.w.ib(Pd(this.b,f));if(lc(this.w)){h=8192;break}f+=2;if(!n){n=a.Ba.seek(b,c,d,!0);if(!n){h=5120;break}p=0}if(!a.Ba.write(n,p++,u&255)||!a.Ba.write(n,p++,u>>8)){h=5120;break}if(p>=m.Ia&&(n=null,++d>=m.qa&&(d=0,++c>=m.ya&&(c=0,++b>=m.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.vd=function(){return this.fa&65535}; +k.me=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.F=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.F=this.C;break;case 12:b=this.Yc;case 10:b||(b=this.Sd),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.fa|=129,this.fa&64&&nc(this.b,this.P))}};k.td=function(){return this.J};k.ke=function(a){this.J=a&65534};k.wd=function(){return this.g};k.ne=function(a){this.g=a};k.xd=function(){return this.F};k.oe=function(a){this.F=a};k.ud=function(){return this.K};k.le=function(a){this.K=a&63}; +var nh={},ih=(nh[63744]=[null,null,N.prototype.vd,N.prototype.me,"RLCS"],nh[63746]=[null,null,N.prototype.td,N.prototype.ke,"RLBA"],nh[65284]=[null,null,N.prototype.wd,N.prototype.ne,"RLDA"],nh[65286]=[null,null,N.prototype.xd,N.prototype.oe,"RLMP"],nh[65288]=[null,null,N.prototype.ud,N.prototype.le,"RLBE"],nh);function oh(a){r.call(this,"Debugger",a,oh);this.$=a.base||16;this.za=!1;this.J=0;this.P=!1;this.v=-1;this.g=[];this.S={}}w(oh); +var ph={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};oh.prototype.pc=function(){return-1};oh.prototype.qc=function(){}; +function qh(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.P?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function rh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function ph(a,b,c){var d;if(b){b=qh(a,b);for(var e=0,f=!1,g=b,h=[],m=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=q+g;d>>=8}d=l(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function th(a,b){if(b)return sh(a,b,a.S[b]);var c=0;for(b in a.S)sh(a,b,a.S[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=l(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function wh(a,b){if(b)return vh(a,b,a.S[b]);var c=0;for(b in a.S)vh(a,b,a.S[b]),c++;return 0this.b.mb?Ch:[];Dh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.aa(Eh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var q=b[e];q.type==c?n++||d.j("..."):(c=q.type,n=ec[c],q&&d.j(l(q.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Na[a-8]:20>a?b=this.b.Aa[a-16]:20==a&&(b=Bb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Db).D));this.na&1073741824?this.ra.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ia(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ra=0,a.B.da()))};function wh(a){var b;if(!ae(a))a.G&&a.G.length&&a.j("instruction history buffer freed"),a.Y=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Y(this.b.u[7]);a&&1!=this.R?Lh(this):Mh(this)}};function Kh(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.v.ha?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.v.fa?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.za=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.ya=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wh(this);this.sa=0;this.ba=null;this.J=0;this.K=Y(this.b.u[7]);this.v.fa=!1;Nh(this);a||this.da()};k.save=function(){var a=new O(this);a.set(0,Gh(this.K));a.set(1,Gh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Hh(a[b++]),this.N=Hh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.v.fa=!0;this.xb=a;this.yb=b}; -k.stop=function(a,b){if(this.v.fa){this.v.fa=!1;this.J=b-this.yb;if(!this.R){b="stopped";if(this.J){a-=this.xb;var c=0d&&(d=a.b.lb(b)),65535!=(d&65535)&&(c=a.G[a.Y],c.D=b,c.Ga=!1,++a.Y==a.G.length&&(a.Y=0)));return!1}function cc(a){var b=a.b;if(b.v.fa)throw N(b,a.b.Db),a.ia(),-1;return!1} -function vh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.Ya=0}k.cb=function(a,b,c){var d=!0;c||Oh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].cb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.Ga=!0:(Ph(this,a,a.length-1,"set"),wh(this)));return d}; -function Oh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.Ga||wh(a);break}}return f}function Qh(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), -z&63)switch(z=B&7,B&56){case 0:y=Jh(z);break;case 8:y="@"+Jh(z);break;case 16:7>z?y="("+Jh(z)+")+":(B=x.oa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Jh(z)+")+":(B=x.oa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Jh(z)+")";break;case 40:y="@-("+Jh(z)+")";break;case 48:B=x.oa(v,2);y=J(x,B,0,!0)+"("+Jh(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.oa(v,2),y="@"+J(x,B)+"("+Jh(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); -0b?(c=Jh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Na[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Aa[b-16]):20==b&&(c="PS="+J(a,Bb(d)));c&&(c+=" ");return c}function Vh(a){var b,c="";for(b=0;6>b;b++)c+=Uh(a,b);c=c+"\n"+(Uh(a,6)+Uh(a,7)+Uh(a,20));return c+=Th(a,"T")+Th(a,"N")+Th(a,"Z")+Th(a,"V")+Th(a,"C")}k.ic=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],w=za(q,m,a.ic);0>w&&q.splice(-(w+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({we:b,D:c,Pc:d,ga:e,gc:f})}function Wh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Pc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Vh(a));c&&(a.K=Y(d.u[7]),Mh(a,J(a,a.K.D)))}}function $h(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Sh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} -function Rh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(sb(a)&&0q||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);ea-=Z;0>ea&&(null==ma[ma.length-1].D?(Z=ea+Z,ea=0):ea+=ma.length);var xd=[];"call"==lg&&(Db=1E5,xd=["CALL"]);for(void 0!==kg&&a.j(Z+" instructions earlier:");0=ma.length&&(ea=0);a.bb=Z;ng++;Db--}}ng||(a.j("no "+mg+"history available"),a.bb=void 0)}else{var Fb=Eh(a,la);if(Fb){var vc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||ti),vc=rh(a,La)>>>0,65536>4||1;vi--&&0zc?String.fromCharCode(zc):".";wc-=yc}Gb&&(Gb+="\n");Gb+=la+" "+yd+(0==Ib?" "+qg:"")}Gb&&a.j(Gb);a.$a=Fb}}}}break;case "e":if("else"==g[0])break;var gb,zd,Ad,Bd,Cd=g[0],Dd=g[1];"eb"==Cd?(gb=1,zd=255,Ad=a.zb,Bd=a.Qb):"e"==Cd||"ew"==Cd?(gb=2,zd=65535,Ad=a.oa,Bd=a.hb):Dd=null;if(null==Dd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ac=Eh(a,Dd);if(Ac)for(var Bc=2;BcGd;){for(var Ma=null,zi=256;65536>Lb.D>>>0;){Hd.D=a.oa(Lb,2);if(null==Lb.D||!zi--)break;if(!(Hd.D&1)){for(var Ai=a,Cc=Hd,sg=null,Mb=Cc.D,tg=Mb,Id=1;6>=Id&&Mb;Id++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bei){if(gi(d,this.J)){this.C=new O(this,"1.30.2","failsafe");gi(this.C)&&(li(this,d),a=2,mi(this.C));this.C.set("timestamp",Ba());ni(this.C);var e=this.f&&!this.G;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ki(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?gi(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.g=null)):this.j(f+": "+g),mi(d),gi(d)?(c=ki(d),e=!0):c=!1))}e&&ji(this,c?d:null)}else 2==a&&d.clear()}else ji(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.v.ha=!0;var d=this.F.power;d&&(d.textContent="Shutdown");this.b&&(oi(this,this.b,b,c,a),this.b.ib());this.P&&(li(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; -function li(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function bi(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new O(a,"1.30.2"),g=new O(a,"1.30.2","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.ya&&(c&&a.b.ia(),d=a.b.ya(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.v.ha=!1,!1===d&&(e=null)));for(var h=nb(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(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 m=h[0],n,q=/( [a-z]+=)(['"])(.*?)\2/g;n=q.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Gi(a,b,c)}})}else c(a,null)} -function Hi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);m&&(--si||Ya(!0));m=!1}var g,h,m=!0;si++;lb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=n:w.appendChild(document.createTextNode(n));q.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Ei(c,null,null,!1,e,function(d,m){m?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--si||Ya(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--si||Ya(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ei(b,a,d,!0,e,n):Fi(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Ya(!1);return Hi(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=Za;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Eh=[0],Fh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=xh.prototype; +k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.B=a;(a=Vc(a,"messages"))&&Ah(this,a);this.ob=Dh;this.Ab=1145>this.b.qb?Fh:[];Gh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.ba(Hh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var p=b[e];p.type==c?n++||d.j("..."):(c=p.type,n=fc[c],p&&d.j(l(p.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.qc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ra[a-8]:20>a?b=this.b.Fa[a-16]:20==a&&(b=Cb(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Hb).D));this.oa&1073741824?this.ua.push(a):this.ca&&a==this.ca||(this.ca=a,this.oa&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,dd(a),a.ua=0,a.B.da()))};function zh(a){var b;if(!ce(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.Y=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Oh(this):Ph(this)}};function Nh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ga?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ea=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Da=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){zh(this);this.va=0;this.ca=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ga=!1;Qh(this);a||this.da()};k.save=function(){var a=new P(this);a.set(0,Jh(this.K));a.set(1,Jh(this.N));a.set(2,[this.g,this.P,this.oa]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Kh(a[b++]),this.N=Kh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ga=!0;this.Bb=a;this.Cb=b}; +k.stop=function(a,b){if(this.A.ga){this.A.ga=!1;this.J=b-this.Cb;if(!this.R){b="stopped";if(this.J){a-=this.Bb;var c=0d&&(d=a.b.ib(b)),65535!=(d&65535)&&(c=a.F[a.Y],c.D=b,c.La=!1,++a.Y==a.F.length&&(a.Y=0)));return!1}function dc(a){var b=a.b;if(b.A.ga)throw O(b,a.b.Hb),a.ja(),-1;return!1} +function yh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.la],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.la],!0);a.C=["bw"];a.bb=0}k.hb=function(a,b,c){var d=!0;c||Rh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.la].hb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.La=!0:(Sh(this,a,a.length-1,"set"),zh(this)));return d}; +function Rh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.C));h.La||zh(a);break}}return f}function Th(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), +z&63)switch(z=B&7,B&56){case 0:y=Mh(z);break;case 8:y="@"+Mh(z);break;case 16:7>z?y="("+Mh(z)+")+":(B=x.pa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Mh(z)+")+":(B=x.pa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Mh(z)+")";break;case 40:y="@-("+Mh(z)+")";break;case 48:B=x.pa(v,2);y=J(x,B,0,!0)+"("+Mh(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.pa(v,2),y="@"+J(x,B)+"("+Mh(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); +0b?(c=Mh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ra[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Fa[b-16]):20==b&&(c="PS="+J(a,Cb(d)));c&&(c+=" ");return c}function Yh(a){var b,c="";for(b=0;6>b;b++)c+=Xh(a,b);c=c+"\n"+(Xh(a,6)+Xh(a,7)+Xh(a,20));return c+=Wh(a,"T")+Wh(a,"N")+Wh(a,"Z")+Wh(a,"V")+Wh(a,"C")}k.jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],u=Aa(p,m,a.jc);0>u&&p.splice(-(u+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({Je:b,D:c,Rc:d,ha:e,hc:f})}function Zh(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Rc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Yh(a));c&&(a.K=Z(d.u[7]),Ph(a,J(a,a.K.D)))}}function ci(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Vh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} +function Uh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ca=null;if(tb(a)&&0p||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].D?(aa=fa+aa,fa=0):fa+=na.length);var Ad=[];"call"==og&&(Eb=1E5,Ad=["CALL"]);for(void 0!==ng&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.gb=aa;qg++;Eb--}}qg||(a.j("no "+pg+"history available"),a.gb=void 0)}else{var Gb=Hh(a,ma);if(Gb){var wc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||wi),wc=uh(a,La)>>>0,65536>4||1;yi--&&0Ac?String.fromCharCode(Ac):".";xc-=zc}Hb&&(Hb+="\n");Hb+=ma+" "+Bd+(0==Jb?" "+tg:"")}Hb&&a.j(Hb);a.eb=Gb}}}}break;case "e":if("else"==g[0])break;var ib,Cd,Dd,Ed,Fd=g[0],Gd=g[1];"eb"==Fd?(ib=1,Cd=255,Dd=a.Db,Ed=a.Sb):"e"==Fd||"ew"==Fd?(ib=2,Cd=65535,Dd=a.pa,Ed=a.mb):Gd=null;if(null==Gd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Bc=Hh(a,Gd);if(Bc)for(var Cc= +2;CcJd;){for(var Ma=null,Ci=256;65536>Mb.D>>>0;){Kd.D=a.pa(Mb,2);if(null==Mb.D||!Ci--)break;if(!(Kd.D&1)){for(var Di=a,Dc=Kd,vg=null,Nb=Dc.D,wg=Nb,Ld=1;6>=Ld&&Nb;Ld++){if(2< +Ld){Dc.D=Nb;var Ec=Vh(Di,Dc);if(0<=Ec.indexOf("JSR")){var xg=Ec.indexOf(" ");if(Nb+(Ec.indexOf(" ",xg+1)-xg-1)/2==wg){vg=Ec;break}}}Nb-=2}Dc.D=wg;if(Ma=vg)break}}if(!Ma||null==Ma)break;var yg=null;if("ks"==Bi){var zg=Ma.match(/[0-9A-F]+$/);zg&&(yg=bi(a,zg[0]))}Ma=xa(Ma,50)+" ;"+(yg||"stack="+J(a,Mb.D));a.j(Ma);Jd++}Jd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){bi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var Da=0;if("all"== +H)Da=1878917119,H=null;else if("on"==H)pa=!0,H=null;else if("off"==H)pa=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(oa in xb)if(H==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+H);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Md=0;Md\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhi){if(ji(d,this.J)){this.C=new P(this,"1.30.2","failsafe");ji(this.C)&&(oi(this,d),a=2,pi(this.C));this.C.set("timestamp",Ca());qi(this.C);var e=this.f&&!this.F;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ni(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ji(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),pi(d),ji(d)?(c=ni(d),e=!0):c=!1))}e&&mi(this,c?d:null)}else 2==a&&d.clear()}else mi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(ri(this,this.b,b,c,a),this.b.nb());this.P&&(oi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; +function oi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ei(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Da&&(c&&a.b.ja(),d=a.b.Da(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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 m=h[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Ji(a,b,c)}})}else c(a,null)} +function Ki(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);m&&(--vi||Za(!0));m=!1}var g,h,m=!0;vi++;mb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Hi(c,null,null,!1,e,function(d,m){m?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--vi||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--vi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hi(b,a,d,!0,e,n):Ii(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Za(!1);return Ki(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 9fc722e01..05f128f64 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -34,198 +34,207 @@ for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ka(a,b){var c="";b?11>=3;return""+c}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function n(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date}; function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function q(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function va(a,b){var c,d={L:null,T:null,aa:null,$:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.aa=g.load;d.$=g.exec;if(e=g.bytes)d.L=e;else if(e=g.words)for(d.L=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.L=Array(4*e.length),f=c=0;c>8&255,d.L[f++]=e[c]>>16&255,d.L[f++]=e[c]>>24&255;else d.L=g;d.T=g.symbols;d.L.length?1==d.L.length&&(r(d.L[0]),d=null):(r("Empty resource: "+a),d=null)}catch(k){r("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Aa=this.id:(this.ia=this.id.substr(0,b),this.Aa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,jb:!1,Fd:!1,O:!1,error:!1};this.eb=null;this.j.error=!1;this.m={};this.D=null;z.push(this)}var Ja=void 0,Ka={}; -if(window){Ja||(Ja=window.location.search.substr(1));for(var La,Ma=/\+/g,Na=/([^&=]+)=?([^&]*)/g;La=Na.exec(Ja);)Ka[decodeURIComponent(La[1].replace(Ma," "))]=decodeURIComponent(La[2].replace(Ma," "))}function Oa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function A(a,b){b||(b=y);a.prototype=Oa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Pa=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else Pa={},z=[];function Qa(a,b,c){Pa[a]&&b&&(Pa[a][b]=c)}function B(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.L=e;else if(e=g.words)for(d.L=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.L=Array(4*e.length),f=c=0;c>8&255,d.L[f++]=e[c]>>16&255,d.L[f++]=e[c]>>24&255;else d.L=g;d.W=g.symbols;d.L.length?1==d.L.length&&(t(d.L[0]),d=null):(t("Empty resource: "+a),d=null)}catch(l){t("Resource data error ("+a+"): "+l.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Na=this.id:(this.na=this.id.substr(0,b),this.Na=this.id.substr(b+1));this[a]=c;this.l={ready:!1,lb:!1,Xd:!1,P:!1,error:!1};this.hb=null;this.l.error=!1;this.o={};this.F=null;y.push(this)}var Ka=void 0,La={}; +if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function A(a,b){b||(b=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function B(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.i=this.c-1;this.v=this.B/this.c|0;this.ta=[];this.o=0;this.u=[];this.Ub=[ab,bb,cb,db];a=new J(this);eb(a,this.D);this.b=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=gb(d,b)}function bb(a,b,c){var d=!1,e=this.controller,f=e.ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||gb(e,c)} -function cb(a,b){var c=-1,d=this.controller;(a=d.ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=gb(d,b)}function db(a,b,c){var d=!1,e=this.controller;if(a=e.ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||gb(e,c)}function hb(a,b){if(b!=a.h){var c;a.h&&(c=(1<>>a.l;0g&&(t=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.Da)return m.hb+=m.Da-f,m.Da=f,!0;if(f>=m.Da+m.hb){t=m.size-(f-p);t>g&&(t=g);m.hb=f-m.Da+t;f=p+a.c;g-=t;k++;continue}}return mb(1,f,g)}f=new J(a,f,t,a.c,d,e);eb(f,a.D,m);a.b[k++]=f;f=p+a.c;g-=t}if(0>=g){c/=1024;var w;e="";w?10>>=a.l;0>>=a.l;0>>a.l].tb(b&a.i,b)}function pb(a,b){return a.b[(b&a.g)>>>a.l].S(b&a.i,b)}$a.prototype.Qa=function(a,b){this.o++;this.b[(a&this.g)>>>this.l].Ab(a&this.i,b&255,a);this.o--}; -function qb(a,b,c){a.b[(b&a.g)>>>a.l].ib(b&a.i,c&65535,b)}function rb(a){for(var b=0,c=[],d=0;da.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!k&&p&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));sb(a,e,e,g,k,m,p,f[4])}}}function ub(a,b){a.u.push(b)}function vb(a,b){a.o||K(a.a,4,b)} -function mb(a,b,c){r("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function L(a){y.call(this,"Device",a,L);this.c={data:0,Bd:0,gb:20,Pc:0};this.b={Gd:0,yb:-1}}A(L);h=L.prototype;h.ba=function(a,b,c,d){this.l=b;this.a=c;this.D=d;var e=this;this.b.yb=wb(c,function(){e.b.va|=128;e.b.va&64&&(xb(e.a,e.b.Qc),yb(e.a,e.b.yb,1E3/60))});this.b.Qc=zb(64,6);tb(b,this,M);ub(b,this.reset.bind(this));G(this)};h.reset=function(){this.c.gb=this.c.gb&-120|20;this.b.va=0}; -h.kc=function(){var a=this.b.va;this.b.va&=-129;return a};h.Zc=function(a){this.b.va=a;a&64&&yb(this.a,this.b.yb,1E3/60);this.b.va=a&-129};h.dc=function(a){return(a?this.c.Pc:this.c.data)&65535};h.Sc=function(a){this.c.data=a};h.mc=function(){var a=this.a;return a.w&62337|a.Sa<<5|a.Ta<<1};h.ad=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.Sa=a>>5&3;b.Ta=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Oa!=c&&(b.Oa=c,Ab(b))}Bb(this)}; -h.nc=function(){var a=this.a.wa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.oc=function(){return this.a.vb};h.pc=function(){return this.a.xa};h.bd=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.xa!=a&&(b.xa=a,a&16?(b.pb=4194303,b.Ua=3915776):(b.pb=262143,b.Ua=253952),Ab(b));Bb(this)};function Bb(a){a.c.gb=a.c.gb&-8|(a.a.Oa?a.a.xa&16?1:2:4)}h.Dc=function(a){return this.a.H[1][a>>1&7]};h.qd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Bc=function(a){return this.a.H[1][(a>>1&7)+8]}; -h.od=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Cc=function(a){return this.a.U[1][a>>1&7]};h.pd=function(a,b){b=b>>1&7;this.a.U[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.U[1][(a>>1&7)+8]};h.nd=function(a,b){b=(b>>1&7)+8;this.a.U[1][b]=a;this.a.H[1][b]&=65295};h.jc=function(a){return this.a.H[0][a>>1&7]};h.Yc=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.hc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Wc=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295}; -h.ic=function(a){return this.a.U[0][a>>1&7]};h.Xc=function(a,b){b=b>>1&7;this.a.U[0][b]=a;this.a.H[0][b]&=65295};h.gc=function(a){return this.a.U[0][(a>>1&7)+8]};h.Vc=function(a,b){b=(b>>1&7)+8;this.a.U[0][b]=a;this.a.H[0][b]&=65295};h.Jc=function(a){return this.a.H[3][a>>1&7]};h.wd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Hc=function(a){return this.a.H[3][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Ic=function(a){return this.a.U[3][a>>1&7]}; -h.vd=function(a,b){b=b>>1&7;this.a.U[3][b]=a;this.a.H[3][b]&=65295};h.Gc=function(a){return this.a.U[3][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.U[3][b]=a;this.a.H[3][b]&=65295};h.Fa=function(a){a&=7;return this.a.A&2048?this.a.Ca[a]:this.a.f[a]};h.Ha=function(a,b){b&=7;this.a.A&2048?this.a.Ca[b]=a:this.a.f[b]=a};h.uc=function(){return this.a.A&49152?this.a.ga[0]:this.a.f[6]};h.gd=function(a){this.a.A&49152?this.a.ga[0]=a:this.a.f[6]=a};h.xc=function(){return this.a.f[7]}; -h.kd=function(a){this.a.f[7]=a};h.Ga=function(a){a&=7;return this.a.A&2048?this.a.f[a]:this.a.Ca[a]};h.Ia=function(a,b){b&=7;this.a.A&2048?this.a.f[b]=a:this.a.Ca[b]=a};h.vc=function(){return 1==(this.a.A&49152)>>14?this.a.f[6]:this.a.ga[1]};h.hd=function(a){1==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ga[1]=a};h.wc=function(){return 3==(this.a.A&49152)>>14?this.a.f[6]:this.a.ga[3]};h.jd=function(a){3==(this.a.A&49152)>>14?this.a.f[6]=a:this.a.ga[3]=a};h.fc=function(a){return this.a.Pb[a-65504>>1]}; -h.Uc=function(a,b){this.a.Pb[b-65504>>1]=a};h.Nb=function(a){return 65520==a?61183:0};h.Tb=function(){};h.Fc=function(){return 1};h.sd=function(){};h.ec=function(){return this.a.J};h.Tc=function(){this.a.J=0};h.lc=function(){return this.a.Ob};h.$c=function(a,b){b&1||(a&=255);this.a.Ob=a};h.qc=function(a){return a?this.a.wb:0};h.cd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.wb=a;b.s|=2};h.Ec=function(a){return a?this.a.ya&65280:0};h.rd=function(a){this.a.ya=a|255}; -h.tc=function(){return Za(this.a)};h.fd=function(a){Cb(this.a,a&-1809|Za(this.a)&1808);this.a.s|=128};h.Sb=function(){}; -var N={},M=(N[62592]=[null,null,L.prototype.Dc,L.prototype.qd,"SISDR",1145],N[62608]=[null,null,L.prototype.Bc,L.prototype.od,"SDSDR",1145],N[62624]=[null,null,L.prototype.Cc,L.prototype.pd,"SISAR",1145],N[62640]=[null,null,L.prototype.Ac,L.prototype.nd,"SDSAR",1145],N[62656]=[null,null,L.prototype.jc,L.prototype.Yc,"KISDR",1145],N[62672]=[null,null,L.prototype.hc,L.prototype.Wc,"KDSDR",1145],N[62688]=[null,null,L.prototype.ic,L.prototype.Xc,"KISAR",1145],N[62704]=[null,null,L.prototype.gc,L.prototype.Vc, -"KDSAR",1145],N[62798]=[null,null,L.prototype.pc,L.prototype.bd,"MMR3",1145],N[65382]=[null,null,L.prototype.kc,L.prototype.Zc,"LKS"],N[65400]=[null,null,L.prototype.dc,L.prototype.Sc,"CNSL"],N[65402]=[null,null,L.prototype.mc,L.prototype.ad,"MMR0",1145],N[65404]=[null,null,L.prototype.nc,L.prototype.Sb,"MMR1",1145],N[65406]=[null,null,L.prototype.oc,L.prototype.Sb,"MMR2",1145],N[65408]=[null,null,L.prototype.Jc,L.prototype.wd,"UISDR",1145],N[65424]=[null,null,L.prototype.Hc,L.prototype.ud,"UDSDR", -1145],N[65440]=[null,null,L.prototype.Ic,L.prototype.vd,"UISAR",1145],N[65456]=[null,null,L.prototype.Gc,L.prototype.td,"UDSAR",1145],N[65472]=[null,null,L.prototype.Fa,L.prototype.Ha,"R0SET0"],N[65473]=[null,null,L.prototype.Fa,L.prototype.Ha,"R1SET0"],N[65474]=[null,null,L.prototype.Fa,L.prototype.Ha,"R2SET0"],N[65475]=[null,null,L.prototype.Fa,L.prototype.Ha,"R3SET0"],N[65476]=[null,null,L.prototype.Fa,L.prototype.Ha,"R4SET0"],N[65477]=[null,null,L.prototype.Fa,L.prototype.Ha,"R5SET0"],N[65478]= -[null,null,L.prototype.uc,L.prototype.gd,"R6KERNEL"],N[65479]=[null,null,L.prototype.xc,L.prototype.kd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ga,L.prototype.Ia,"R0SET1",1145],N[65481]=[null,null,L.prototype.Ga,L.prototype.Ia,"R1SET1",1145],N[65482]=[null,null,L.prototype.Ga,L.prototype.Ia,"R2SET1",1145],N[65483]=[null,null,L.prototype.Ga,L.prototype.Ia,"R3SET1",1145],N[65484]=[null,null,L.prototype.Ga,L.prototype.Ia,"R4SET1",1145],N[65485]=[null,null,L.prototype.Ga,L.prototype.Ia,"R5SET1",1145], -N[65486]=[null,null,L.prototype.vc,L.prototype.hd,"R6SUPER",1145],N[65487]=[null,null,L.prototype.wc,L.prototype.jd,"R6USER",1145],N[65504]=[null,null,L.prototype.fc,L.prototype.Uc,"CTRL",1170],N[65520]=[null,null,L.prototype.Nb,L.prototype.Tb,"LSIZE",1170],N[65522]=[null,null,L.prototype.Nb,L.prototype.Tb,"HSIZE",1170],N[65524]=[null,null,L.prototype.Fc,L.prototype.sd,"SYSID",1170],N[65526]=[null,null,L.prototype.ec,L.prototype.Tc,"CPUERR",1170],N[65528]=[null,null,L.prototype.lc,L.prototype.$c, -"MB",1170],N[65530]=[null,null,L.prototype.qc,L.prototype.cd,"PIR"],N[65532]=[null,null,L.prototype.Ec,L.prototype.rd,"SL"],N[65534]=[null,null,L.prototype.tc,L.prototype.fd,"PSW"],N);M[62594]=M[62592];M[62596]=M[62592];M[62598]=M[62592];M[62600]=M[62592];M[62602]=M[62592];M[62604]=M[62592];M[62606]=M[62592];M[62610]=M[62608];M[62612]=M[62608];M[62614]=M[62608];M[62616]=M[62608];M[62618]=M[62608];M[62620]=M[62608];M[62622]=M[62608];M[62626]=M[62624];M[62628]=M[62624];M[62630]=M[62624];M[62632]=M[62624]; -M[62634]=M[62624];M[62636]=M[62624];M[62638]=M[62624];M[62642]=M[62640];M[62644]=M[62640];M[62646]=M[62640];M[62648]=M[62640];M[62650]=M[62640];M[62652]=M[62640];M[62654]=M[62640];M[62658]=M[62656];M[62660]=M[62656];M[62662]=M[62656];M[62664]=M[62656];M[62666]=M[62656];M[62668]=M[62656];M[62670]=M[62656];M[62674]=M[62672];M[62676]=M[62672];M[62678]=M[62672];M[62680]=M[62672];M[62682]=M[62672];M[62684]=M[62672];M[62686]=M[62672];M[62690]=M[62688];M[62692]=M[62688];M[62694]=M[62688];M[62696]=M[62688]; -M[62698]=M[62688];M[62700]=M[62688];M[62702]=M[62688];M[62706]=M[62704];M[62708]=M[62704];M[62710]=M[62704];M[62712]=M[62704];M[62714]=M[62704];M[62716]=M[62704];M[62718]=M[62704];M[65410]=M[65408];M[65412]=M[65408];M[65414]=M[65408];M[65416]=M[65408];M[65418]=M[65408];M[65420]=M[65408];M[65422]=M[65408];M[65426]=M[65424];M[65428]=M[65424];M[65430]=M[65424];M[65432]=M[65424];M[65434]=M[65424];M[65436]=M[65424];M[65438]=M[65424];M[65442]=M[65440];M[65444]=M[65440];M[65446]=M[65440];M[65448]=M[65440]; -M[65450]=M[65440];M[65452]=M[65440];M[65454]=M[65440];M[65458]=M[65456];M[65460]=M[65456];M[65462]=M[65456];M[65464]=M[65456];M[65466]=M[65456];M[65468]=M[65456];M[65470]=M[65456];M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -x(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.m,0,this.size>>2),Lb(this,Hb?Mb:Nb);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ia:function(a,b){a&1&&vb(this.l,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.na= -!0},G:function(a,b){return this.I(a,b)},P:function(a,b){return this.W(a,b)},ka:function(a,b,c){this.i?this.g(a,b,c):this.Ab(a,b,c)},ra:function(a,b,c){this.i?this.g(a,b,c):this.sa(a,b,c)},F:function(a){return this.b[a]},K:function(a){return this.b[a]},N:function(a,b){a&1&&vb(this.l,b);return this.c.getUint16(a,!0)},X:function(a,b){a&1&&vb(this.l,b);return this.u[a>>1]},ja:function(a,b){this.b[a]=b;this.na=!0},la:function(a,b){this.b[a]=b;this.na=!0},qa:function(a,b,c){a&1&&vb(this.l,c);this.c.setUint16(a, -b,!0);this.na=!0},Aa:function(a,b,c){a&1&&vb(this.l,c);this.u[a>>1]=b;this.na=!0}};function eb(a,b,c){a.D=b;a.h=a.o=0;c&&((a.h=c.h)&&Pb(a,Qb,!1),(a.o=c.o)&&Rb(a,Qb,!1))}function Rb(a,b,c){c&&a.o||(a.zb=!a.i&&b[1]||a.g,a.ib=!a.i&&b[3]||a.B);if(c||void 0===c)a.Ab=b[1]||a.g,a.sa=b[3]||a.B}function Pb(a,b,c){c&&a.h||(a.tb=b[0]||a.v,a.S=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.W=b[2]||a.w}function Lb(a,b){b||(b=Sb);Pb(a,b,void 0);Rb(a,b,void 0)} -var Sb=[],Ob=[J.prototype.M,J.prototype.pa,J.prototype.ia,J.prototype.Ba],Qb=[J.prototype.G,J.prototype.ka,J.prototype.P,J.prototype.ra];if(Ua)var Nb=[J.prototype.F,J.prototype.ja,J.prototype.N,J.prototype.qa],Mb=[J.prototype.K,J.prototype.la,J.prototype.X,J.prototype.Aa]; -function Tb(a,b){y.call(this,"CPU",a,Tb);var c=a.multiplier||1;this.$a=a.cycles||b;this.la=c;this.ob=Math.round(this.$a/1E4)/100;this.pa=this.ob*this.la;this.j.Z=!1;this.j.xb=!1;this.j.Ma=a.autoStart;this.j.Za=!1;this.Wa=this.ra=0;this.Ya=a.csStart;this.Ba=a.csInterval;this.Ja=a.csStop;this.I=[];this.Mb=this.Oc.bind(this);G(this)}A(Tb);var Ub=["power","reset"];h=Tb.prototype; -h.ba=function(a,b,c,d){this.i=a;this.l=b;this.D=d;for(b=0;ba.ja/a.pa&&(b=1);a.la=b;b=a.ob*a.la;if(a.pa!=b){a.pa=b;b=a.pa.toFixed(2)+"Mhz";var d=a.m.setSpeed;d&&(d.textContent=b);a.R("target speed: "+b)}c&&a.i&&dc(a.i)}a.M+=a.X;a.X=0;a.W=ra();a.ka=0;bc(a)}function wb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function yb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.$a*a.la/1E3*c|0,a.I[b][0]=c+ec(a))}function ec(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} -h.Oc=function(){if(this.j.Z){this.rb>=this.$a&&bc(this,!0);this.La=0;this.Va=ra();if(this.ka){var a=this.Va-this.ka;a>this.Jb&&(this.W+=a,this.W>this.Va&&(this.W=this.Va))}try{do{for(var b,c=this.j.Za?1:this.bb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Rb(b)}catch(m){if("number"!=typeof m)throw m;}b=ec(this,!0);this.La+=b;this.X+=b;a=b;if(this.j.Za){var f=!1;this.Wa=this.Wa+this.Fb()|0;this.ra-=a;0>=this.ra&&(this.ra+=this.Ba,f=!0);0<=this.Ja&&this.Ja<=cc(this)&& -(this.Ba=this.Ja=-1,Zb(this),H(this),f=!0);f&&this.R(cc(this)+" cycles: checksum="+l(this.Wa))}for(var a=b,g=this.I.length-1;0<=g;g--){var k=this.I[g];0>k[0]||(k[0]-=a,0>=k[0]&&(k[0]=-1,k[1]()))}this.Ka-=b;if(0>=this.Ka){this.Ka+=this.bb;15<=++this.Lb&&(this.i&&this.i.ha(),this.Lb=0);break}}while(this.j.Z)}catch(m){H(this);this.i&&this.i.stop(ra(),cc(this));b=m.stack||m.message;this.j.error=!0;this.C(b);return}if(this.j.Z){b=setTimeout;c=this.Mb;this.ka=ra();d=this.Jb;this.La&&(d=Math.round(d*this.La/ -this.bb));d-=this.ka-this.Va;if(e=this.ka-this.W)this.ja=Math.round(this.X/(10*e))/100,864E5<=e&&(this.M=0,ac(this));if(0>d||this.jad&&(this.W-=d),d=0;this.rb+=this.La;this.ka+=d;b(c,d)}}};function $b(a){var b;a.j.error?(a.R(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.Z)a.R(a.toString()+" busy");else{ac(a);a.j.Z=!0;a.j.xb=!0;if(b=a.m.run)b.textContent="Halt";a.i&&a.i.start(a.W,cc(a));setTimeout(a.Mb,0)}}h.Rb=function(){return 0}; -function H(a){var b=!1;if(a.j.Z){ec(a);a.M+=a.X;a.X=0;a.j.Z=!1;if(b=a.m.run)b.textContent="Run";a.i&&a.i.stop(ra(),cc(a));b=!0}a.j.complete=void 0;return b}function fc(a){this.Ra=+a.model||1170;this.Hb=a.addrReset||0;Tb.call(this,a,6666667);this.decode=1120==this.Ra?gc.bind(this):hc.bind(this);ic(this);this.sb=0;this.N=null;this.j.complete=!1}A(fc,Tb);h=fc.prototype;h.reset=function(){this.status("model "+this.Ra);this.j.Z&&H(this);ic(this);Yb(this);this.j.error=!1;this.parent.reset.call(this)}; -function ic(a){a.o=65536;a.g=32768;a.h=65535;a.u=32768;a.A=15;a.f=[0,0,0,0,0,0,0,a.Hb];a.Ca=[0,0,0,0,0,0];a.ga=[0,0,0,0];a.v=0;a.Ta=0;a.ac=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.cc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Pb=[0,0,0,0,0,0,0,0];a.Ob=0;a.s=0;a.B=a.F=0;a.c=a.b=a.nb=0;a.sa=-1;jc(a)}function jc(a){a.ya=255;a.J=0;a.wb=0;a.w=0;a.wa=0;a.vb=0;a.xa=0;a.Oa=0;a.Sa=0;a.pb=262143;a.Ua=253952;a.N=null;a.l&&Ab(a)}function Ab(a){a.Oa?(a.P=65536,a.K=a.$b,a.S=a.Lc,a.ib=a.yd,hb(a.l,a.xa&16?22:18)):(a.P=0,a.K=a.Zb,a.S=a.Kc,a.ib=a.xd,hb(a.l,16))}function kc(a,b,c){a.Hb=b;O(a,b);!c&&a.D&&(H(a)||a.D.ha())}h.Fb=function(){return 0}; -h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.M,this.la]);a.set(2,rb(this.l));return a.data()};h.restore=function(a){var b=a[1];this.M=b[1];ac(this,b[3]);a:{b=this.l;a=a[2];var c;for(c=0;c>14&3;c=a.A>>14&3;a.v!=c&&(a.ga[c]=a.f[6],a.f[6]=a.ga[a.v]);a.A=b;a.s|=2}function S(a,b){a.s&128||(a.u=a.h=b,a.g=0)}function nc(a,b,c){a.s&128||(a.u=a.h=a.o=b,a.g=c||0)}function oc(a,b,c,d){a.s&128||(a.u=a.h=a.o=b,a.g=(c^b)&(d^b))}function pc(a,b){a.s&128||(a.u=a.h=a.o=b,a.g=a.u^a.o>>1)}function qc(a,b,c,d){a.s&128||(a.u=a.h=a.o=b,a.g=(c^d)&(d^b))} -function K(a,b,c){if(!a.sb){var d=!1;0>a.sa?a.sa=Za(a):a.v||(b=4,d=!0);a.w&57344||(a.wa=63222,a.vb=b);a.v=0;var e=a.S(b|a.P),f=a.S(b+2&65535|a.P);Cb(a,f&-12289|a.sa>>2&12288);d&&(a.J|=4,a.f[6]=4);rc(a,a.sa);rc(a,a.f[7]);O(a,e);a.s&=-113;a.sa=-1;a.s|=8;if(26!=c)throw b;}}function sc(a){var b=tc(a),c=tc(a)&-1793;a.A&49152&&(c=c&-225|a.A&63712);O(a,b);Cb(a,c);a.s&=-17} -function uc(a,b,c){var d,e,f,g=0;d=b>>13;a.xa&a.ac[a.v]||(d&=7);e=a.H[a.v][d];f=(a.U[a.v][d]<<6)+(b&8191)&a.pb;if(ff){if(3932160<=f){f&=262143;var k=f>>13&31;31>k?a.xa&32&&(f=a.cc[k]+(f&8190)&4194302,3932160<=f&&4186112>f&&console.log("panic(898)")):f|=4186112}f>=a.Ua&&4186112>f&&(a.J|=32,K(a,4,12))}switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192: -128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Sa=a.v,a.Ta=d;g&&(g&57344&&(0<=a.sa&&(g|=128),a.w&57344||(a.w=a.w|g|a.Sa<<5|a.Ta<<1),K(a,168,16)),a.w&61440||!(4191360>f||4194239>>a.l].zb(b&a.i,c&255,b)}function tc(a){var b=a.S(a.f[6]|a.P);a.f[6]=a.f[6]+2&65535;return b} -function rc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.wa=a.wa<<8|246);!a.v&&c<=a.ya&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.S(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.S(e)|g;a.a-= -8;break;case 6:return e=a.S(mc(a,2)),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=a.S(mc(a,2)),e=e+a.f[c]&65535,e=a.S(e|a.P)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.w&57344||(a.wa=a.wa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.ya||65534<=a.f[6])&&(a.f[6]<=a.ya-32?(a.J|=4,a.f[6]=4,K(a,4,24)):(a.J|=8,a.s|=64));return e}h.Qa=function(a,b){this.Oa?(this.sb++,vc(this,uc(this,a,5),b),this.sb--):this.l.Qa(a,b)};h.Zb=function(a,b,c){return wc(this,a,b,c)}; -h.$b=function(a,b,c){return uc(this,wc(this,a,b,c),c)};h.Kc=function(a){return pb(this.l,a)};h.Lc=function(a){return pb(this.l,uc(this,a,2))};h.xd=function(a,b){qb(this.l,a,b&65535)};h.yd=function(a,b){qb(this.l,uc(this,a,4),b)};function xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=wc(a,b,d,2),c&65536||61440!==(a.A&61440)&&(d&=65535),a.v=a.A>>12&3,c=a.S(d|c&a.P),a.v=a.A>>14&3):c=6!=d||(a.A>>2&12288)===(a.A&12288)?a.f[d]:a.ga[a.A>>12&3];return c} -function yc(a,b,c,d){a.w&57344||(a.wa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=wc(a,b,e,4),c&65536||(e&=65535),a.v=a.A>>12&3,e=uc(a,e|c&65536,4),a.v=a.A>>14&3,qb(a.l,e,d)):6!=e||(a.A>>2&12288)===(a.A&12288)?a.f[e]=d:a.ga[a.A>>12&3]=d}function zc(a,b){b>>=6;var c=a.F=b&7;(b=a.B=(b&56)>>3)?(c=a.K(b,c,3),a=ob(a.l,c)):a=a.f[c]&255;return a}function Ac(a,b){b>>=6;var c=a.F=b&7;return(b=a.B=(b&56)>>3)?pb(a.l,a.K(b,c,2)):a.f[c]}function Bc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return wc(a,b,c,8)} -function Cc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.K(b,c,3),a=ob(a.l,c)):a=a.f[c]&255;return a}function Dc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?pb(a.l,a.K(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.nb=a.K(b,e,7),vc(a,e,d.call(a,c,ob(a.l,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.K(b,e,6),qb(a.l,e,d.call(a,c,pb(a.l,e)))):a.f[e]=d.call(a,c,a.f[e])} -function Ec(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?vc(a,a.K(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Fc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?qb(a.l,a.K(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.Rb=function(a){this.j.complete=!0;var b=a?this.j.xb?0:1:-1;this.j.xb=!1;this.qa=this.a=a;do{if(this.s){this.s&112&&(this.s&32?K(this,168,28):this.s&64?K(this,4,30):this.s&16&&K(this,12,32),this.s&=-113);if(a=this.s&7){a=!1;if(this.s&2){this.s&=-3;var c=160,d=(this.wb&224)>>5,e=this.N&&this.N.Ea>d?this.N:null;e&&(c=e.Rc,d=e.Ea);d>(this.A&224)>>5?(this.s&4&&(mc(this,2),this.s&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.s&1&&this.s++;a=a&&0>b}if(a)break}this.s=this.s&7|this.A&16;this.decode(lc(this))}while(0>1|b<<16;pc(this,a);return a&65535}function Lc(a,b){a=b&2048|b>>1|b<<8;pc(this,a<<8);return a&255}function Mc(a,b){a=b&~a;S(this,a);return a}function Nc(a,b){a=b&~a;S(this,a<<8);return a}function Oc(a,b){a|=b;S(this,a);return a}function Pc(a,b){a|=b;S(this,a<<8);return a}function Qc(a,b){a=~b|65536;nc(this,a);return a&65535}function Rc(a,b){a=~b|256;nc(this,a<<8);return a&255} -function Sc(a,b){a=b-a;this.s&128||(this.u=this.h=a,this.g=b&(b^a));return a&65535}function Tc(a,b){a=b-a;var c=a<<8;b<<=8;this.s&128||(this.u=this.h=c,this.g=b&(b^c));return a&255}function Uc(a,b){a=b+a;this.s&128||(this.u=this.h=a,this.g=a&(b^a));return a&65535}function Vc(a,b){a=b+a;var c=a<<8;this.s&128||(this.u=this.h=c,this.g=c&(b<<8^c));return a&255}function Wc(a,b){a=-b;nc(this,a,a&b&32768);return a&65535}function Xc(a,b){a=-b;nc(this,a<<8,(a&b&128)<<8);return a&255} -function Yc(a,b){a=b<<1|this.o>>16&1;pc(this,a);return a&65535}function Zc(a,b){a=b<<1|this.o>>16&1;pc(this,a<<8);return a&255}function $c(a,b){a=(this.o&65536|b)>>1|b<<16;pc(this,a);return a&65535}function ad(a,b){a=((this.o&65536)>>8|b)>>1|b<<8;pc(this,a<<8);return a&255}function bd(a,b){var c=b-a;qc(this,c,a,b);return c&65535}function cd(a,b){var c=b-a;qc(this,c<<8,a<<8,b<<8);return c&255}function dd(a,b){this.s&128||(this.u=this.h=b&65280,this.g=this.o=0);return(b<<8|b>>8)&65535} -function ed(a,b){a^=b;S(this,a);return a&65535}function fd(a){U(this,a,Ac(this,a),Gc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function gd(a){var b=Dc(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.o=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.u=this.h=c;this.a-=(this.c?6:7)+b} -function hd(a){var b=Dc(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.o=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.u=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function id(a){V(this,a,!Q(this))}function jd(a){V(this,a,Q(this))} -function kd(a){U(this,a,Ac(this,a),Mc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ld(a){T(this,a,zc(this,a),Nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function md(a){U(this,a,Ac(this,a),Oc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function nd(a){T(this,a,zc(this,a),Pc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function od(a){S(this,Ac(this,a)&Dc(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function pd(a){S(this,(zc(this,a)&Cc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function qd(a){V(this,a,this.h&65535?0:4)}function rd(a){V(this,a,!this.ua()==!(this.g&32768))}function sd(a){V(this,a,!!(this.h&65535)&&!this.ua()==!(this.g&32768))}function td(a){V(this,a,!Q(this)&&!!(this.h&65535))} -function ud(a){V(this,a,(this.h&65535?0:4)||!this.ua()!=!(this.g&32768))}function vd(a){V(this,a,Q(this)||(this.h&65535?0:4))}function wd(a){V(this,a,!this.ua()!=!(this.g&32768))}function xd(a){V(this,a,this.ua())}function yd(a){V(this,a,!!(this.h&65535))}function zd(a){V(this,a,!this.ua())}function Ad(){K(this,12,1);this.a-=5}function Bd(a){V(this,a,!0)}function Cd(a){V(this,a,!(this.g&32768))}function Dd(a){V(this,a,this.g&32768?2:0)} -function W(a){a&1&&(this.o=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.u=0);this.a-=5}function Ed(a){var b=Ac(this,a);a=Dc(this,a);qc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function Fd(a){var b=zc(this,a)<<8;a=Cc(this,a)<<8;qc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} -function Gd(a){var b=Dc(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.o=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.u=d>>16):(this.g=32768,this.h=d>>15|d,this.u=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.u=0,this.g=32768,this.o=65536,this.a-=7}function Hd(){K(this,24,2);this.a-=25} -function Id(){this.A&49152?(this.J|=128,K(this,4,3)):this.D?this.D.c():H(this);this.a-=7}function Jd(){K(this,16,4);this.a-=25}var Kd=[0,7,7,10,7,11,9,13];function Ld(a){this.G=this.a;O(this,Bc(this,a));this.a=this.G-Kd[this.c]}var Md=[0,14,14,17,14,18,16,20];function Nd(a){this.G=this.a;var b=Bc(this,a);a=a>>6&7;rc(this,this.f[a]);this.f[a]=this.f[7];O(this,b);this.a=this.G-Md[this.c]}var Od=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Pd(a){var b=Ac(this,a);this.G=this.a;S(this,Fc(this,a,b));this.a=this.G-Od[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Qd(a){var b=zc(this,a);S(this,Ec(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var Rd=[7,13,13,17,14,18,17,21]; -function Sd(a){var b=Dc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.s&128||(this.u=b>>16,this.h=this.u|b,this.g=0,this.o=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)O(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Yd(a){U(this,a,Ac(this,a),bd);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)} -function Zd(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)}function $d(){K(this,28,5);this.a-=5}function ae(){this.s&4||this.i.ha();this.s|=4;mc(this,-2);this.a-=3}function be(a){U(this,a,Ac(this,a),ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function gc(a){ce[a>>12].call(this,a)}function de(a){ee[a>>6&3].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)}function he(a){ie[a>>6&3].call(this,a)}function je(a){ke[a&15].call(this,a)}function le(a){me[a&15].call(this,a)} -function ne(a){oe[a>>6&3].call(this,a)}function pe(a){qe[a>>6&3].call(this,a)}function re(a){se[a>>6&3].call(this,a)} -var ce=[function(a){te[a>>8&15].call(this,a)},Pd,Ed,od,kd,md,fd,Y,function(a){ue[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,Yd,Y],te=[function(a){ve[a>>4&15].call(this,a)},Bd,yd,qd,rd,wd,sd,ud,Nd,Nd,de,fe,he,Y,Y,Y],ee=[function(a){nc(this,Fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Sc);this.a-=this.c?9:3+(7==this.b?2:0)}],ge=[function(a){U(this,a,0, -Wc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Gc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Dc(this,a);nc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ie=[function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)}], -ve=[function(a){we[a&15].call(this,a)},Y,Y,Y,Ld,Ld,Ld,Ld,Wd,Y,je,le,Zd,Zd,Zd,Zd],we=[Id,ae,Vd,Ad,Jd,Ud,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ke=[Td,function(){this.o=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.u=0;this.a-=5},W,W,W,W,W,W,W],me=[Td,function(){this.o=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.u=32768;this.a-=5},X,X,X,X,X,X,X],ue=[zd,xd,td,vd,Cd,Dd,id,jd,Hd,$d,ne,pe,re,Y,Y,Y],oe=[function(a){nc(this, -Ec(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}],qe=[function(a){T(this,a,0,Xc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Cc(this,a);nc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],se=[function(a){T(this,a,0,ad);this.a-=this.c?9+(this.nb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Lc);this.a-=this.c?9+(this.nb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}];function hc(a){xe[a>>12].call(this,a)} -var xe=[function(a){ye[a>>8&15].call(this,a)},Pd,Ed,od,kd,md,fd,function(a){ze[a>>8&15].call(this,a)},function(a){Ae[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,Yd,Y],ye=[function(a){Be[a>>4&15].call(this,a)},Bd,yd,qd,rd,wd,sd,ud,Nd,Nd,de,fe,he,function(a){Ce[a>>6&3].call(this,a)},Y,Y],Ce=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.S(a|this.P);O(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=xc(this,a,0);rc(this,a);S(this,a);this.a-=11},function(a){var b=tc(this);this.G= -this.a;yc(this,a,0,b);S(this,b);this.a=this.G-Rd[this.c]},function(a){S(this,Fc(this,a,this.ua?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Be=[function(a){De[a&15].call(this,a)},Y,Y,Y,Ld,Ld,Ld,Ld,Wd,function(a){a&8?(this.A&49152||(this.A=this.A&-2017|(a&7)<<5,this.s|=1),this.a-=5):K(this,8,6)},je,le,Zd,Zd,Zd,Zd],De=[Id,ae,Vd,Ad,Jd,Ud,function(){sc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[Sd,Sd,Gd,Gd,gd,gd,hd,hd,be,be,Y,Y,Y,Y,Xd,Xd],Ae=[zd,xd,td,vd,Cd,Dd,id,jd,Hd,$d,ne,pe,re,function(a){Ee[a>>6& -3].call(this,a)},Y,Y],Ee=[Y,function(a){a=xc(this,a,65536);rc(this,a);S(this,a);this.a-=11},function(a){var b=tc(this);this.G=this.a;yc(this,a,65536,b);S(this,b);this.a=this.G-Rd[this.c]},Y]; -function Fe(a){y.call(this,"ROM",a,Fe);this.T=this.b=null;this.h=a.addr;this.c=a.size;this.g=a.alias;this.i=a.file;this.o=n(this.i);if(this.i){a=this.i;var b=la(this.o);"json"!=b&&"hex"!=b&&(a=u()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;q(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Qa(c.ia,a,b),(a=va(a,b))?(c.b=a.L,c.T=a.T):c.i=null,Ge(c))})}}A(Fe);Fe.prototype.ba=function(a,b,c,d){this.l=b;this.a=c;this.D=d;Ge(this)}; -Fe.prototype.ea=function(){this.T&&(this.D&&this.D.a(this.id,this.h,this.c,this.T),delete this.T);return!0};Fe.prototype.da=function(){return!0}; -function Ge(a){if(!Ta(a)){if(a.i){if(!a.b||!a.l)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+l(a.b.length,8,!0)+") does not match specified size ("+l(a.c,8,!0)+")";a.j.error=!0;a.C(b)}else{b=a.h;if(kb(a.l,b,a.c,Kb)){var c;for(c=0;c>>a.l;0=b.length)break;for(var k=k+2,p=b[k++]&255|(b[k++]&255)<<8,t=b[k++]&255|(b[k++]&255)<<8,m=m+((p&255)+(p>>8)+(t&255)+(t>>8)),w=k,F=p-=6;0=b.length)break;m+=b[k++]&255;if(m&255)break;if(F)for(;F--;)a.a.Qa(t++,b[w++]&255);else t&1?H(a.a):kc(a.a,t,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&xb(e.a,e.W))});this.X=zb(52,4);this.N=wb(this.a,function(){e.c|=128;e.c&64&&xb(e.a,e.X)});tb(b,this,Me);G(this)}; -h.Gb=function(){if(!this.v){var a=Vb(this.i,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Aa)return;b=pa(b[1]);if(this.v=Ra(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.B=d.receiveData){this.status(this.ia+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ea=function(a,b){if(!b)if(this.Gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.da=function(a){return a?this.save():!0};h.reset=function(){Ne(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Ne(this)};function Ne(a){a.w=0;a.b=0;a.c=128;a.h=[];return!0}h.ub=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.u%a,this.K&&(b=" ".slice(0,c)));this.G&&!this.u&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.u+=c}else if(null!=this.o){if(10==a||1024<=this.o.length)this.R(this.o), -this.o="";10!=a&&(this.o+=String.fromCharCode(a))}this.c&=-129;yb(this.a,this.N,1E3/Math.round(this.I/10))}};var Oe={},Me=(Oe[65392]=[null,null,Z.prototype.zc,Z.prototype.md,"RCSR"],Oe[65394]=[null,null,Z.prototype.yc,Z.prototype.ld,"RBUF"],Oe[65396]=[null,null,Z.prototype.Nc,Z.prototype.Ad,"XCSR"],Oe[65398]=[null,null,Z.prototype.Mc,Z.prototype.zd,"XBUF"],Oe);x(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.m[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.m[b]=c,c.onclick=function(){var a= -d.m.listTapes;a&&Re(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.I){c.parentNode.removeChild(c);break}this.m[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Re(d,n(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.m[b]=c,!0}return!1}; -h.ba=function(a,b,c,d){this.i=a;this.l=b;this.a=c;this.D=d;this.M=Se(a);var e=this;if((this.c=Vb(this.i,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){r("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.G=zb(56,4);this.P=wb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):u()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!q(f,null,!0,function(e,f,g){var k=0>g&&a.i&&!a.i.j.O;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Qa(a.ia,e,f),(e=va(e,f))&&af(a,b,c,d,e.L,e.aa,e.$)); -a.j.jb=!1;a.o&&(a.o--,a.o||G(a));Ye(a)})}function Ve(a,b,c,d){if((a=a.m.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.fa);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=u()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.mb?"":e)+"&format=json"));return!!q(f, -null,!0,function(b,c,d){hf(a,b,c,d)})} -function hf(a,b,c,d){var e=null;a.l=!1;var f=0>d&&a.i&&!a.i.j.O;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Qa(a.controller.ia,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)r(k[0]);else{a.fa=k.length;a.ca=k[0].length;a.Y=k[0][0].length;var m=k[0][0][0];a.ma=m&&m.length||512;for(d=c=0;d>2,t=m.pattern;void 0===t&&(t=m.pattern=0);var w=m.data;if(void 0===w){var F=m.bytes;if(void 0!==F&&F.length){for(var R=p<<2,ta=F.length;ta>2,e=Array(d),f=0;f>2,g=(k>((f&3)<<3)&255;f=g;if(0>f)break;d|=f<=this.a.length||m>=this.a[k].length||p>=this.a[k][m].length){c="sector (CHS="+k+":"+m+":"+p+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.l){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][m][p]){for(m=k.data.length;mb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.oa+": "+c);return b}; -cf.prototype.toJSON=function(){var a;a=0;for(var b;b=kf(this,a++);)mf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function mf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Eb(a){y.call(this,"RL11",a,Eb);this.c=a.autoMount||null;this.g=0;this.b=Array(1);this.h=!Ba("Mobi")&&window&&"FileReader"in window}A(Eb);h=Eb.prototype; -h.V=function(a,b,c){var d=this;switch(b){case "listDisks":return this.m[b]=c,c.onchange=function(){var a=d.m.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){r("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.m[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&nf(d,a)},!0;case "loadDrive":return this.m[b]= -c,c.onclick=function(){var a=d.m.listDisks;a&&of(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.h){c.parentNode.removeChild(c);break}this.m[b]=c;c.onclick=function(){var a=d.m.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ab){var b;b="";for(var c=0,k;k=kf(a,c++);)for(var m=0,p=k.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nf(this,0)}}return!0};h.da=function(a){return a?this.save():!0};h.reset=function(){pf(this)};h.save=function(){return(new P(this)).data()}; -h.restore=function(){return!0};function pf(a){for(var b=0;bg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}uf(a,e,b,c,!1,d)}else tf(a,e)} -function uf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.za.toLowerCase()!=d.toLowerCase()&&(g++,tf(a,b,!0),k.lb?a.C("RL11 busy"):(k.lb=!0,e&&(k.kb=!0,a.g++),k.cb=!!f,gf(new cf(a,k,"preload"),c,d,f,a.Xb)&&g++));return g} -h.Xb=function(a,b,c,d,e){var f;a.lb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.fa||f[1]>a.ca)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.qb)),b=null);b?(a.ab=b,a.oa=c,a.za=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.qb),a.kb||e),this.i&&dc(this.i)):a.cb=!1;a.kb&&(a.kb=!1,--this.g||G(this));nf(this,a.qb)}; -function rf(a,b,c,d){if((a=a.m.listDisks)&&a.options){for(var e=0;e\nLicense: GPL version 3 or later ");this.R("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bxf){if(zf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");zf(this.h)&&(Ef(this,d),a=2,Ff(this.h));this.h.set("timestamp",sa());Gf(this.h);var e=this.b&&!this.o;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Df(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?zf(d,g):("error"== -f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.R(f+": "+g),Ff(d),zf(d)?(c=Df(d),e=!0):c=!1))}e&&Cf(this,c?d:null)}else 2==a&&d.clear()}else Cf(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.P=!0;this.j.O=!0;var d=this.m.power;d&&(d.textContent="Shutdown");this.a&&(Hf(this,this.a,b,c,a),this.a.Ma());this.G&&(Ef(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.i=0}; -function Ef(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.N;d.user=c;d.type="bug";d.data=b;q("http://www.pcjs.org/api/v1/report",d,!0)}} -function Kf(a,b,c){var d,e="none";if(a.i)return null;a.i--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.da&&(c&&H(a.a),d=a.a.da(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=B(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){f=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");q(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=k[0],p,t=/( [a-z]+=)(['"])(.*?)\2/g;p=t.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);k[0]!=m&&(g=g.replace(k[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Rf(a,b,c)}})}else c(a,null)} -function Sf(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Of||Ha(!0));m=!1}var g,k,m=!0;Of++;Pa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],w=document.createElement("style");w.type="text/css";w.styleSheet?w.styleSheet.cssText=p:w.appendChild(document.createTextNode(p));t.appendChild(w)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,k){k?Pf(c,null,null,!1,e,function(d,m){m?(Qa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=k.transformNode(m))?(g.outerHTML=m,--Of||Ha(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Of||Ha(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pf(b,a,d,!0,e,p):Qf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(F){f(F.message)}return m}window.embedPDP11=function(a,b,c,d){Ha(!1);return Sf(a,b,c,d)};window.enableEvents=Ha;window.sendEvent=Ia;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Va="undefined"!==typeof ArrayBuffer;function Wa(a){x.call(this,"Panel",a,Wa);this.b=0;this.l.Fb=!0}A(Wa);h=Wa.prototype; +h.Z=function(a,b,c,d){if(this.j&&this.j.Z(a,b,c,d)||this.a&&this.a.Z(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.b++,!0;default:return"rled"==a?(this.o[b]=c,this.b++,!0):this.parent.Z.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.F=d};h.ja=function(a,b){b||Xa();return!0};h.ia=function(){return!0}; +function Ya(a,b,c,d){if(a.o[b]){void 0===c&&(a.l.error=!0,a.C("Value for "+b+" is invalid"),G(a.a));var e=a.F&&a.F.h||8;c=!a.a.l.da||a.l.Fb?8==e?ka(c,d):k(c,d):"--------".substr(0,d||4);a.o[b].textContent!=c&&(a.o[b].textContent=c)}}function Za(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.w=this.D/this.b|0;this.xa=[];this.f=0;this.m=!1;this.v=[];this.ac=[bb,cb,db,eb];a=new I(this);fb(a,this.F);this.h=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=hb(d,b)}function cb(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||hb(e,c)} +function db(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=hb(d,b)}function eb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||hb(e,c)}function ib(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.Ha)return m.jb+=m.Ha-f,m.Ha=f,!0;if(f>=m.Ha+m.jb){q=m.size-(f-p);q>g&&(q=g);m.jb=f-m.Ha+q;f=p+a.b;g-=q;l++;continue}}return nb(1,f,g)}f=new I(a,f,q,a.b,d,e);fb(f,a.F,m);a.h[l++]=f;f=p+a.b;g-=q}if(0>=g){c/=1024;var u;e="";u?10>>=a.c;0>>=a.c;0>>a.c].vb(b&a.j,b)}function qb(a,b){return a.h[(b&a.i)>>>a.c].V(b&a.j,b)}h.qb=function(a){var b=a&this.j,c=(a&this.i)>>>this.c;this.m=!1;this.f++;a=this.h[c].Rb(b,a);this.f--;return a}; +h.Va=function(a,b){this.m=!1;this.f++;this.h[(a&this.i)>>>this.c].Db(a&this.j,b&255,a);this.f--};function rb(a,b,c){a.h[(b&a.i)>>>a.c].kb(b&a.j,c&65535,b)}h.zb=function(a,b){var c=a&this.j,d=(a&this.i)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function sb(a){for(var b=0,c=[],d=0;da.a.Za)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));tb(a,e,e,g,l,m,p,f[4])}}}function vb(a,b){a.v.push(b)}function wb(a,b){a.f||J(a.a,4,b);a.m=!0}function xb(a){var b=a.m;a.m=!1;return b} +function nb(a,b,c){t("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){x.call(this,"Device",a,K);this.c={data:0,Td:0,ib:20,bd:0};this.b={M:0,Bb:-1}}A(K);h=K.prototype;h.ha=function(a,b,c,d){this.h=b;this.a=c;this.F=d;var e=this;this.b.Bb=yb(c,function(){e.b.za|=128;e.b.za&64&&(zb(e.a,e.b.cd),Ab(e.a,e.b.Bb,1E3/60))});this.b.cd=Bb(64,6);ub(b,this,L);vb(b,this.reset.bind(this));F(this)};h.reset=function(){this.c.ib=this.c.ib&-120|20;this.b.za=0}; +h.tc=function(){var a=this.b.za;this.b.za&=-129;return a};h.nd=function(a){this.b.za=a;a&64&&Ab(this.a,this.b.Bb,1E3/60);this.b.za=a&-129};h.lc=function(a){return(a?this.c.bd:this.c.data)&65535};h.ed=function(a){this.c.data=a};h.vc=function(){var a=this.a;return a.w&62337|a.Xa<<5|a.Ya<<1};h.pd=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.Xa=a>>5&3;b.Ya=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ea!=c&&(b.Ea=c,Cb(b))}Db(this)}; +h.wc=function(){var a=this.a.Aa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.xc=function(){return this.a.xb};h.yc=function(){return this.a.Ba};h.qd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ba!=a&&(b.Ba=a,a&16?(b.tb=4194303,b.Wa=3915776):(b.tb=262143,b.Wa=253952),Cb(b));Db(this)};function Db(a){a.c.ib=a.c.ib&-8|(a.a.Ea?a.a.Ba&16?1:2:4)}h.Rc=function(a){return this.a.H[1][a>>1&7]};h.Jd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Pc=function(a){return this.a.H[1][(a>>1&7)+8]}; +h.Hd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.a.X[1][a>>1&7]};h.Id=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.Oc=function(a){return this.a.X[1][(a>>1&7)+8]};h.Gd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.sc=function(a){return this.a.H[0][a>>1&7]};h.md=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.qc=function(a){return this.a.H[0][(a>>1&7)+8]};h.kd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295}; +h.rc=function(a){return this.a.X[0][a>>1&7]};h.ld=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.pc=function(a){return this.a.X[0][(a>>1&7)+8]};h.jd=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.Xc=function(a){return this.a.H[3][a>>1&7]};h.Pd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Vc=function(a){return this.a.H[3][(a>>1&7)+8]};h.Nd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.a.X[3][a>>1&7]}; +h.Od=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.H[3][b]&=65295};h.Uc=function(a){return this.a.X[3][(a>>1&7)+8]};h.Md=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.H[3][b]&=65295};h.Ja=function(a){a&=7;return this.a.B&2048?this.a.Fa[a]:this.a.g[a]};h.La=function(a,b){b&=7;this.a.B&2048?this.a.Fa[b]=a:this.a.g[b]=a};h.Dc=function(){return this.a.B&49152?this.a.la[0]:this.a.g[6]};h.vd=function(a){this.a.B&49152?this.a.la[0]=a:this.a.g[6]=a};h.Gc=function(){return this.a.g[7]}; +h.yd=function(a){this.a.g[7]=a};h.Ka=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Fa[a]};h.Ma=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Fa[b]=a};h.Ec=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.la[1]};h.wd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.la[1]=a};h.Fc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.la[3]};h.xd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.la[3]=a};h.nc=function(a){return this.a.Ub[a-65504>>1]}; +h.gd=function(a,b){this.a.Ub[b-65504>>1]=a};h.Qb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.Tc=function(){return 1};h.Ld=function(){};h.mc=function(){return this.a.I};h.fd=function(){this.a.I=0};h.uc=function(){return this.a.Tb};h.od=function(a,b){b&1||(a&=255);this.a.Tb=a};h.zc=function(a){return a?this.a.yb:0};h.rd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.yb=a;b.u|=2};h.Sc=function(a){return a?this.a.Ca&65280:0};h.Kd=function(a){this.a.Ca=a|255}; +h.Cc=function(){return $a(this.a)};h.ud=function(a){Eb(this.a,a&-1809|$a(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +var M={},L=(M[62592]=[null,null,K.prototype.Rc,K.prototype.Jd,"SISDR",1145],M[62608]=[null,null,K.prototype.Pc,K.prototype.Hd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Qc,K.prototype.Id,"SISAR",1145],M[62640]=[null,null,K.prototype.Oc,K.prototype.Gd,"SDSAR",1145],M[62656]=[null,null,K.prototype.sc,K.prototype.md,"KISDR",1145],M[62672]=[null,null,K.prototype.qc,K.prototype.kd,"KDSDR",1145],M[62688]=[null,null,K.prototype.rc,K.prototype.ld,"KISAR",1145],M[62704]=[null,null,K.prototype.pc,K.prototype.jd, +"KDSAR",1145],M[62798]=[null,null,K.prototype.yc,K.prototype.qd,"MMR3",1145],M[65382]=[null,null,K.prototype.tc,K.prototype.nd,"LKS"],M[65400]=[null,null,K.prototype.lc,K.prototype.ed,"CNSL"],M[65402]=[null,null,K.prototype.vc,K.prototype.pd,"MMR0",1145],M[65404]=[null,null,K.prototype.wc,K.prototype.Xb,"MMR1",1145],M[65406]=[null,null,K.prototype.xc,K.prototype.Xb,"MMR2",1145],M[65408]=[null,null,K.prototype.Xc,K.prototype.Pd,"UISDR",1145],M[65424]=[null,null,K.prototype.Vc,K.prototype.Nd,"UDSDR", +1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Od,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Md,"UDSAR",1145],M[65472]=[null,null,K.prototype.Ja,K.prototype.La,"R0SET0"],M[65473]=[null,null,K.prototype.Ja,K.prototype.La,"R1SET0"],M[65474]=[null,null,K.prototype.Ja,K.prototype.La,"R2SET0"],M[65475]=[null,null,K.prototype.Ja,K.prototype.La,"R3SET0"],M[65476]=[null,null,K.prototype.Ja,K.prototype.La,"R4SET0"],M[65477]=[null,null,K.prototype.Ja,K.prototype.La,"R5SET0"],M[65478]= +[null,null,K.prototype.Dc,K.prototype.vd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.yd,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ka,K.prototype.Ma,"R0SET1",1145],M[65481]=[null,null,K.prototype.Ka,K.prototype.Ma,"R1SET1",1145],M[65482]=[null,null,K.prototype.Ka,K.prototype.Ma,"R2SET1",1145],M[65483]=[null,null,K.prototype.Ka,K.prototype.Ma,"R3SET1",1145],M[65484]=[null,null,K.prototype.Ka,K.prototype.Ma,"R4SET1",1145],M[65485]=[null,null,K.prototype.Ka,K.prototype.Ma,"R5SET1",1145], +M[65486]=[null,null,K.prototype.Ec,K.prototype.wd,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Fc,K.prototype.xd,"R6USER",1145],M[65504]=[null,null,K.prototype.nc,K.prototype.gd,"CTRL",1170],M[65520]=[null,null,K.prototype.Qb,K.prototype.Yb,"LSIZE",1170],M[65522]=[null,null,K.prototype.Qb,K.prototype.Yb,"HSIZE",1170],M[65524]=[null,null,K.prototype.Tc,K.prototype.Ld,"SYSID",1170],M[65526]=[null,null,K.prototype.mc,K.prototype.fd,"CPUERR",1170],M[65528]=[null,null,K.prototype.uc,K.prototype.od, +"MB",1170],M[65530]=[null,null,K.prototype.zc,K.prototype.rd,"PIR"],M[65532]=[null,null,K.prototype.Sc,K.prototype.Kd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.ud,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; +L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; +L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; +L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.o,0,this.size>>2),Mb(this,Ib?Nb:Ob);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a,b){a&1&&wb(this.h,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.sa= +!0},G:function(a,b){return this.J(a,b)},R:function(a,b){return this.Rb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Db(a,b,c)},ua:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.b[a]},K:function(a){return this.b[a]},O:function(a,b){a&1&&wb(this.h,b);return this.c.getUint16(a,!0)},$:function(a,b){a&1&&wb(this.h,b);return this.s[a>>1]},na:function(a,b){this.b[a]=b;this.sa=!0},pa:function(a,b){this.b[a]=b;this.sa=!0},ra:function(a,b,c){a&1&&wb(this.h,c);this.c.setUint16(a, +b,!0);this.sa=!0},va:function(a,b,c){a&1&&wb(this.h,c);this.s[a>>1]=b;this.sa=!0}};function fb(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&Qb(a,Rb,!1),(a.m=c.m)&&Sb(a,Rb,!1))}function Sb(a,b,c){c&&a.m||(a.Cb=!a.j&&b[1]||a.f,a.kb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Db=b[1]||a.f,a.Zb=b[3]||a.A}function Qb(a,b,c){c&&a.i||(a.vb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.J=b[0]||a.v,a.Rb=b[2]||a.w}function Mb(a,b){b||(b=Tb);Qb(a,b,void 0);Sb(a,b,void 0)} +var Tb=[],Pb=[I.prototype.N,I.prototype.qa,I.prototype.aa,I.prototype.wa],Rb=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.ua];if(Va)var Ob=[I.prototype.D,I.prototype.na,I.prototype.O,I.prototype.ra],Nb=[I.prototype.K,I.prototype.pa,I.prototype.$,I.prototype.va]; +function Ub(a,b){x.call(this,"CPU",a,Ub);var c=a.multiplier||1;this.eb=a.cycles||b;this.qa=c;this.rb=Math.round(this.eb/1E4)/100;this.ua=this.rb*this.qa;this.l.da=!1;this.l.Ab=!1;this.l.Sa=a.autoStart;this.l.bb=!1;this.ab=this.wa=0;this.cb=a.csStart;this.Oa=a.csInterval;this.Pa=a.csStop;this.J=[];this.Pb=this.ad.bind(this);F(this)}A(Ub);var Vb=["power","reset"];h=Ub.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.F=d;for(b=0;ba.oa/a.ua&&(b=1);a.qa=b;b=a.rb*a.qa;if(a.ua!=b){a.ua=b;b=a.ua.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.j&&ec(a.j)}a.N+=a.aa;a.aa=0;a.$=ra();a.pa=0;cc(a)}function yb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Ab(a,b,c){0<=b&&ba.J[b][0]&&(c=a.eb*a.qa/1E3*c|0,a.J[b][0]=c+fc(a))}function fc(a,b){var c=a.va-=a.a;a.a=a.G=0;b&&(a.va=0);return c} +h.ad=function(){if(this.l.da){this.ub>=this.eb&&cc(this,!0);this.Ra=0;this.$a=ra();if(this.pa){var a=this.$a-this.pa;a>this.Mb&&(this.$+=a,this.$>this.$a&&(this.$=this.$a))}try{do{for(var b,c=this.l.bb?1:this.gb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Wb(b)}catch(m){if("number"!=typeof m)throw m;}b=fc(this,!0);this.Ra+=b;this.aa+=b;a=b;if(this.l.bb){var f=!1;this.ab=this.ab+this.Ib()|0;this.wa-=a;0>=this.wa&&(this.wa+=this.Oa,f=!0);0<=this.Pa&&this.Pa<=dc(this)&& +(this.Oa=this.Pa=-1,$b(this),G(this),f=!0);f&&this.U(dc(this)+" cycles: checksum="+k(this.ab))}for(var a=b,g=this.J.length-1;0<=g;g--){var l=this.J[g];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Qa-=b;if(0>=this.Qa){this.Qa+=this.gb;15<=++this.Ob&&(this.j&&this.j.ma(),this.Ob=0);break}}while(this.l.da)}catch(m){G(this);this.j&&this.j.stop(ra(),dc(this));b=m.stack||m.message;this.l.error=!0;this.C(b);return}if(this.l.da){b=setTimeout;c=this.Pb;this.pa=ra();d=this.Mb;this.Ra&&(d=Math.round(d*this.Ra/ +this.gb));d-=this.pa-this.$a;if(e=this.pa-this.$)this.oa=Math.round(this.aa/(10*e))/100,864E5<=e&&(this.N=0,bc(this));if(0>d||this.oad&&(this.$-=d),d=0;this.ub+=this.Ra;this.pa+=d;b(c,d)}}};function ac(a){var b;a.l.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.da)a.U(a.toString()+" busy");else{bc(a);a.l.da=!0;a.l.Ab=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.$,dc(a));setTimeout(a.Pb,0)}}h.Wb=function(){return 0}; +function G(a){var b=!1;if(a.l.da){fc(a);a.N+=a.aa;a.aa=0;a.l.da=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),dc(a));b=!0}a.l.complete=void 0;return b}function gc(a){this.Za=+a.model||1170;this.Kb=a.addrReset||0;Ub.call(this,a,6666667);this.decode=1120==this.Za?hc.bind(this):ic.bind(this);jc(this);this.ra=0;this.O=null;this.l.complete=!1}A(gc,Ub);h=gc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.da&&G(this);jc(this);Xb(this);this.l.error=!1;this.parent.reset.call(this)}; +function jc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Fa=[0,0,0,0,0,0];a.la=[0,0,0,0];a.v=0;a.Ya=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.kc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Ub=[0,0,0,0,0,0,0,0];a.Tb=0;a.u=0;a.A=a.D=0;a.c=a.b=a.pb=0;a.Ga=-1;kc(a)}function kc(a){a.Ca=255;a.I=0;a.yb=0;a.w=0;a.Aa=0;a.xb=0;a.Ba=0;a.Ea=0;a.Xa=0;a.tb=262143;a.Wa=253952;a.O=null;a.h&&Cb(a)}function Cb(a){a.Ea?(a.R=65536,a.K=a.hc,a.V=a.Yc,a.kb=a.Qd,ib(a.h,a.Ba&16?22:18)):(a.R=0,a.K=a.gc,a.V=a.Sb,a.kb=a.$b,ib(a.h,16))}function lc(a,b,c){a.Kb=b;O(a,b);!c&&a.F&&(G(a)||a.F.ma())}h.Ib=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.N,this.qa]);a.set(2,sb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.N=b[1];bc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.la[c]=a.g[6],a.g[6]=a.la[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function oc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function pc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function qc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function rc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function J(a,b,c){if(!a.ra){var d=!1;0>a.Ga?a.Ga=$a(a):a.v||(b=4,d=!0);a.w&57344||(a.Aa=63222,a.xb=b);a.v=0;var e=a.V(b|a.R),f=a.V(b+2&65535|a.R);Eb(a,f&-12289|a.Ga>>2&12288);d&&(a.I|=4,a.g[6]=4);sc(a,a.Ga);sc(a,a.g[7]);O(a,e);a.u&=-113;a.Ga=-1;a.u|=8;if(26!=c)throw b;}}function tc(a){var b=uc(a),c=uc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Eb(a,c);a.u&=-17} +function vc(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.kc[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} +function wc(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.tb;ff&&(3932160<=f&&(f=vc(a,f&262143)),f>=a.Wa&&4186112>f&&(a.I|=32,J(a,4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= +16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Xa=a.v,a.Ya=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.w&57344||(a.w=a.w|g|a.Xa<<5|a.Ya<<1),J(a,168,16)),a.w&61440||!(4191360>f||4194239>>a.c].Cb(b&a.j,c&255,b)}function uc(a){var b=a.V(a.g[6]|a.R);a.g[6]=a.g[6]+2&65535;return b} +function sc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Aa=a.Aa<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-= +8;break;case 6:return e=a.V(nc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.V(nc(a,2)),e=e+a.g[c]&65535,e=a.V(e|a.R)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.I|=4,a.g[6]=4,J(a,4,24)):(a.I|=8,a.u|=64));return e}h.qb=function(a){if(!this.Ea)return this.h.qb(a);this.ra++;a=this.Sb(wc(this,a,2));this.ra--;return a}; +h.Va=function(a,b){this.Ea?(this.ra++,xc(this,wc(this,a,5),b),this.ra--):this.h.Va(a,b)};h.zb=function(a,b){this.Ea?(this.ra++,this.$b(wc(this,a,4),b),this.ra--):this.h.zb(a,b)};h.gc=function(a,b,c){return yc(this,a,b,c)};h.hc=function(a,b,c){return wc(this,yc(this,a,b,c),c)};h.Sb=function(a){return qb(this.h,a)};h.Yc=function(a){return qb(this.h,wc(this,a,2))};h.$b=function(a,b){rb(this.h,a,b&65535)};h.Qd=function(a,b){rb(this.h,wc(this,a,4),b)}; +function zc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=yc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.V(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.la[a.B>>12&3];return c}function Ac(a,b,c,d){a.w&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=yc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=wc(a,e|c&65536,4),a.v=a.B>>14&3,rb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.la[a.B>>12&3]=d} +function Bc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.K(b,c,3),a=pb(a.h,c)):a=a.g[c]&255;return a}function Cc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?qb(a.h,a.K(b,c,2)):a.g[c]}function Dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return yc(a,b,c,8)}function Ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.K(b,c,3),a=pb(a.h,c)):a=a.g[c]&255;return a}function Fc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?qb(a.h,a.K(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.pb=a.K(b,e,7),xc(a,e,d.call(a,c,pb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.K(b,e,6),rb(a.h,e,d.call(a,c,qb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Gc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?xc(a,a.K(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Hc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?rb(a.h,a.K(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.Wb=function(a){this.l.complete=!0;var b=a?this.l.Ab?0:1:-1;this.l.Ab=!1;this.va=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.yb&224)>>5,e=this.O&&this.O.Ia>d?this.O:null;e&&(c=e.dd,d=e.Ia);d>(this.B&224)>>5?(this.u&4&&(nc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(mc(this))}while(0>1|b<<16;qc(this,a);return a&65535}function Nc(a,b){a=b&2048|b>>1|b<<8;qc(this,a<<8);return a&255}function Oc(a,b){a=b&~a;R(this,a);return a}function Pc(a,b){a=b&~a;R(this,a<<8);return a}function Qc(a,b){a|=b;R(this,a);return a}function Rc(a,b){a|=b;R(this,a<<8);return a}function Sc(a,b){a=~b|65536;oc(this,a);return a&65535}function Tc(a,b){a=~b|256;oc(this,a<<8);return a&255} +function Uc(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function Vc(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function Wc(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function Xc(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function Yc(a,b){a=-b;oc(this,a,a&b&32768);return a&65535}function Zc(a,b){a=-b;oc(this,a<<8,(a&b&128)<<8);return a&255} +function $c(a,b){a=b<<1|this.m>>16&1;qc(this,a);return a&65535}function ad(a,b){a=b<<1|this.m>>16&1;qc(this,a<<8);return a&255}function bd(a,b){a=(this.m&65536|b)>>1|b<<16;qc(this,a);return a&65535}function cd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;qc(this,a<<8);return a&255}function dd(a,b){var c=b-a;rc(this,c,a,b);return c&65535}function ed(a,b){var c=b-a;rc(this,c<<8,a<<8,b<<8);return c&255}function fd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function gd(a,b){a^=b;R(this,a);return a&65535}function hd(a){U(this,a,Cc(this,a),Ic);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function id(a){var b=Fc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function jd(a){var b=Fc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function kd(a){V(this,a,!Q(this))}function ld(a){V(this,a,Q(this))} +function md(a){U(this,a,Cc(this,a),Oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){T(this,a,Bc(this,a),Pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function od(a){U(this,a,Cc(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function pd(a){T(this,a,Bc(this,a),Rc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function qd(a){R(this,Cc(this,a)&Fc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function rd(a){R(this,(Bc(this,a)&Ec(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function sd(a){V(this,a,this.i&65535?0:4)}function td(a){V(this,a,!this.ya()==!(this.f&32768))}function ud(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function vd(a){V(this,a,!Q(this)&&!!(this.i&65535))} +function wd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function xd(a){V(this,a,Q(this)||(this.i&65535?0:4))}function yd(a){V(this,a,!this.ya()!=!(this.f&32768))}function zd(a){V(this,a,this.ya())}function Ad(a){V(this,a,!!(this.i&65535))}function Bd(a){V(this,a,!this.ya())}function Cd(){J(this,12,1);this.a-=5}function Dd(a){V(this,a,!0)}function Ed(a){V(this,a,!(this.f&32768))}function Fd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Gd(a){var b=Cc(this,a);a=Fc(this,a);rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){var b=Bc(this,a)<<8;a=Ec(this,a)<<8;rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Id(a){var b=Fc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Jd(){J(this,24,2);this.a-=25} +function Kd(){this.B&49152?(this.I|=128,J(this,4,3)):this.F?this.F.b():G(this);this.a-=7}function Ld(){J(this,16,4);this.a-=25}var Md=[0,7,7,10,7,11,9,13];function Nd(a){this.G=this.a;O(this,Dc(this,a));this.a=this.G-Md[this.c]}var Od=[0,14,14,17,14,18,16,20];function Pd(a){this.G=this.a;var b=Dc(this,a);a=a>>6&7;sc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.G-Od[this.c]}var Qd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Rd(a){var b=Cc(this,a);this.G=this.a;R(this,Hc(this,a,b));this.a=this.G-Qd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Sd(a){var b=Bc(this,a);R(this,Gc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Td=[7,13,13,17,14,18,17,21]; +function Ud(a){var b=Fc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function $d(a){U(this,a,Cc(this,a),dd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function ae(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)}function be(){J(this,28,5);this.a-=5}function ce(){this.u&4||this.j.ma();this.u|=4;nc(this,-2);this.a-=3}function de(a){U(this,a,Cc(this,a),gd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function hc(a){ee[a>>12].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)}function he(a){ie[a>>6&3].call(this,a)}function je(a){ke[a>>6&3].call(this,a)}function le(a){me[a&15].call(this,a)}function ne(a){oe[a&15].call(this,a)} +function pe(a){qe[a>>6&3].call(this,a)}function re(a){se[a>>6&3].call(this,a)}function te(a){ue[a>>6&3].call(this,a)} +var ee=[function(a){ve[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,hd,Y,function(a){we[a>>8&15].call(this,a)},Sd,Hd,rd,nd,pd,$d,Y],ve=[function(a){xe[a>>4&15].call(this,a)},Dd,Ad,sd,td,yd,ud,wd,Pd,Pd,fe,he,je,Y,Y,Y],ge=[function(a){oc(this,Hc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)}],ie=[function(a){U(this,a,0, +Yc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Fc(this,a);oc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ke=[function(a){U(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}], +xe=[function(a){ye[a&15].call(this,a)},Y,Y,Y,Nd,Nd,Nd,Nd,Yd,Y,le,ne,ae,ae,ae,ae],ye=[Kd,ce,Xd,Cd,Ld,Wd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],me=[Vd,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],oe=[Vd,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],we=[Bd,zd,vd,xd,Ed,Fd,kd,ld,Jd,be,pe,re,te,Y,Y,Y],qe=[function(a){oc(this, +Gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}],se=[function(a){T(this,a,0,Zc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Ec(this,a);oc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],ue=[function(a){T(this,a,0,cd);this.a-=this.c?9+(this.pb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Nc);this.a-=this.c?9+(this.pb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Lc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ic(a){ze[a>>12].call(this,a)} +var ze=[function(a){Ae[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,hd,function(a){Be[a>>8&15].call(this,a)},function(a){Ce[a>>8&15].call(this,a)},Sd,Hd,rd,nd,pd,$d,Y],Ae=[function(a){De[a>>4&15].call(this,a)},Dd,Ad,sd,td,yd,ud,wd,Pd,Pd,fe,he,je,function(a){Ee[a>>6&3].call(this,a)},Y,Y],Ee=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=zc(this,a,0);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G= +this.a;Ac(this,a,0,b);R(this,b);this.a=this.G-Td[this.c]},function(a){R(this,Hc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],De=[function(a){Fe[a&15].call(this,a)},Y,Y,Y,Nd,Nd,Nd,Nd,Yd,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},le,ne,ae,ae,ae,ae],Fe=[Kd,ce,Xd,Cd,Ld,Wd,function(){tc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[Ud,Ud,Id,Id,id,id,jd,jd,de,de,Y,Y,Y,Y,Zd,Zd],Ce=[Bd,zd,vd,xd,Ed,Fd,kd,ld,Jd,be,pe,re,te,function(a){Ge[a>>6& +3].call(this,a)},Y,Y],Ge=[Y,function(a){a=zc(this,a,65536);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G=this.a;Ac(this,a,65536,b);R(this,b);this.a=this.G-Td[this.c]},Y]; +function He(a){x.call(this,"ROM",a,He);this.W=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=n(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Ra(c.na,a,b),(a=ta(a,b))?(c.b=a.L,c.W=a.W):c.j=null,Ie(c))})}}A(He);He.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.F=d;Ie(this)}; +He.prototype.ja=function(){this.W&&(this.F&&this.F.a(this.id,this.i,this.c,this.W),delete this.W);return!0};He.prototype.ia=function(){return!0}; +function Ie(a){if(!Ua(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+k(a.b.length,8,!0)+") does not match specified size ("+k(a.c,8,!0)+")";a.l.error=!0;a.C(b)}else{b=a.i;if(lb(a.h,b,a.c,Lb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,q=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),u=l,z=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(z)for(;z--;)a.a.Va(q++,b[u++]&255);else q&1?G(a.a):lc(a.a,q,f);g=!0}else l++;else l+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&zb(e.a,e.$))});this.aa=Bb(52,4);this.O=yb(this.a,function(){e.c|=128;e.c&64&&zb(e.a,e.aa)});ub(b,this,Oe);F(this)}; +h.Jb=function(){if(!this.v){var a=Wb(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Na)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Jb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ia=function(a){return a?this.save():!0};h.reset=function(){Pe(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Pe(this)};function Pe(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.wb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.s%a,this.K&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ab(this.a,this.O,1E3/Math.round(this.J/10))}};var Qe={},Oe=(Qe[65392]=[null,null,Z.prototype.Ic,Z.prototype.Ad,"RCSR"],Qe[65394]=[null,null,Z.prototype.Hc,Z.prototype.zd,"RBUF"],Qe[65396]=[null,null,Z.prototype.$c,Z.prototype.Sd,"XCSR"],Qe[65398]=[null,null,Z.prototype.Zc,Z.prototype.Rd,"XBUF"],Qe);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&Te(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Te(d,n(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.F=d;this.K=Ue(a);var e=this;if((this.c=Wb(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Bb(56,4);this.R=yb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var l=0>g&&a.j&&!a.j.l.P;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",l):(Ra(a.na,e,f),(e=ta(e,f))&&cf(a,b,c,d,e.L,e.fa,e.ea)); +a.l.lb=!1;a.m&&(a.m--,a.m||F(a));$e(a)})}function Xe(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.T);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ob?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){kf(a,b,c,d)})} +function kf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.P;if(d)a.controller.C('Unable to load disk "'+a.ta+'" (error '+d+": "+b+")",f);else{Ra(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(l.length)if(1==l.length)t(l[0]);else{a.T=l.length;a.Y=l[0].length;a.S=l[0][0].length;var m=l[0][0][0];a.ga=m&&m.length||512;for(d=c=0;d>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var u=m.data;if(void 0===u){var z=m.bytes;if(void 0!==z&&z.length){for(var S=p<<2,ua=z.length;ua>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ka+a.ba&&(a.ba+=f-(a.ka+a.ba)+1):(a.ka=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||m>=this.a[l].length||p>=this.a[l][m].length){c="sector (CHS="+l+":"+m+":"+p+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(l=this.a[l][m][p]){for(m=l.data.length;mb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.ta+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=mf(this,a++);)of(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function of(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; +h.Z=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(l){t("RL11 option error: "+l.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&pf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&qf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,l;l=mf(a,c++);)for(var m=0,p=l.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";pf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){rf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return rf(this,a[0])};function uf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}wf(a,e,b,c,!1,d)}else vf(a,e)} +function wf(a,b,c,d,e,f){var g=-1,l=a.b[b];l.Da.toLowerCase()!=d.toLowerCase()&&(g++,vf(a,b,!0),l.nb?a.C("RL11 busy"):(l.nb=!0,e&&(l.mb=!0,a.s++),l.fb=!!f,jf(new ef(a,l,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.nb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.T||f[1]>a.Y)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.sb)),b=null);b?(a.ca=b,a.ta=c,a.Da=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.sb),a.mb||e),this.j&&ec(this.j)):a.fb=!1;a.mb&&(a.mb=!1,--this.s||F(this));pf(this,a.sb)}; +function tf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.M=this.M|a|32768);return!0}; +h.oc=function(a,b,c,d,e,f,g){for(var l=0,m=a.ca,p=null,q;e--;){if(!p){p=a.ca.seek(b,c,d,!0);if(!p){l=5120;break}q=0}var u,z;if(0>(u=a.ca.read(p,q++))||0>(z=a.ca.read(p,q++))){l=5120;break}this.h.zb(vc(this.a,f),u|z<<8);if(xb(this.h)){l=8192;break}f+=2;if(q>=m.ga&&(p=null,++d>=m.S&&(d=0,++c>=m.Y&&(c=0,++b>=m.T)))){l=5120;break}}return g(l,b,c,d,e,f)}; +h.hd=function(a,b,c,d,e,f,g){for(var l=0,m=a.ca,p=null,q;e--;){var u=this.h.qb(vc(this.a,f));if(xb(this.h)){l=8192;break}f+=2;if(!p){p=a.ca.seek(b,c,d,!0);if(!p){l=5120;break}q=0}if(!a.ca.write(p,q++,u&255)||!a.ca.write(p,q++,u>>8)){l=5120;break}if(q>=m.ga&&(p=null,++d>=m.S&&(d=0,++c>=m.Y&&(c=0,++b>=m.T)))){l=5120;break}}return g(l,b,c,d,e,f)};h.Lc=function(){return this.M&65535}; +h.Dd=function(a){this.M=this.M&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.b[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.c&8&&(this.M&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.oc;case 10:b||(b=this.hd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.T||f>=c.S?this.M|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.M|=129,this.M&64&&zb(this.a,this.G))}};h.Jc=function(){return this.v};h.Bd=function(a){this.v=a&65534};h.Mc=function(){return this.c};h.Ed=function(a){this.c=a};h.Nc=function(){return this.m};h.Fd=function(a){this.m=a};h.Kc=function(){return this.w};h.Cd=function(a){this.w=a&63}; +var xf={},sf=(xf[63744]=[null,null,N.prototype.Lc,N.prototype.Dd,"RLCS"],xf[63746]=[null,null,N.prototype.Jc,N.prototype.Bd,"RLBA"],xf[65284]=[null,null,N.prototype.Mc,N.prototype.Ed,"RLDA"],xf[65286]=[null,null,N.prototype.Nc,N.prototype.Fd,"RLMP"],xf[65288]=[null,null,N.prototype.Kc,N.prototype.Cd,"RLBE"],xf); +function yf(a,b,c){x.call(this,"Computer",a,yf);this.l.P=!1;zf(this,b);this.A=Wb(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Af;this.v=null;this.m=this.J=!1;this.O=Wb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Bf(this);if(this.a=Ta("CPU",this.id)){this.F=Ta("Debugger",this.id);this.h=new ab({id:this.na+".bus",busWidth:this.N},this.a,this.F);var d,e=B(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Ta)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bAf){if(Cf(d,this.v)){this.i=new P(this,"1.30.2","failsafe");Cf(this.i)&&(Hf(this,d),a=2,If(this.i));this.i.set("timestamp",sa());Jf(this.i);var e=this.b&&!this.m;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Gf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Cf(d,g):("error"== +f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.U(f+": "+g),If(d),Cf(d)?(c=Gf(d),e=!0):c=!1))}e&&Ff(this,c?d:null)}else 2==a&&d.clear()}else Ff(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Kf(this,this.a,b,c,a),this.a.Sa());this.G&&(Hf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Hf(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function Nf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.P=!1,!1===d&&(e=null)));for(var l=B(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Uf(a,b,c)}})}else c(a,null)} +function Vf(a,b,c,d){function e(a){if(void 0===l){var b=g&&E(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Rf||Ia(!0));m=!1}var g,l,m=!0;Rf++;Qa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=p:u.appendChild(document.createTextNode(p));q.appendChild(u)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,l){l?Sf(c,null,null,!1,e,function(d,m){m?(Ra(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Rf||Ia(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Rf||Ia(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Sf(b,a,d,!0,e,p):Tf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(z){f(z.message)}return m}window.embedPDP11=function(a,b,c,d){Ia(!1);return Vf(a,b,c,d)};window.enableEvents=Ia;window.sendEvent=Ja;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From daefc2992c0137a09bf0803514ebede06c411818 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 31 Oct 2016 12:44:29 -0700 Subject: [PATCH 08/30] Attempted to clean up mapUnibus() and bus-related faults; how well or ill-advised these changes are remains to be seen --- apps/pdp11/boot/README.md | 2 +- apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst | 4 +- apps/pdp11/boot/bootstrap/README.md | 6 +- apps/pdp11/boot/monitor/PDPJSMON.json | 89 +++ apps/pdp11/boot/monitor/PDPJSMON.lst | 533 +++++++++++++++++ .../BOOTTEST.mac => monitor/PDPJSMON.mac} | 5 +- apps/pdp11/boot/{test => monitor}/README.md | 27 +- apps/pdp11/boot/monitor/makefile | 11 + apps/pdp11/boot/test/BOOTTEST.json | 94 --- apps/pdp11/boot/test/BOOTTEST.lst | 555 ------------------ apps/pdp11/boot/test/makefile | 11 - devices/pdp11/machine/1120/README.md | 2 +- devices/pdp11/machine/1120/monitor/README.md | 19 + .../machine/1120/monitor/debugger/README.md | 18 + .../{test => monitor}/debugger/machine.xml | 4 +- .../1120/{test => monitor}/machine.xml | 4 +- devices/pdp11/machine/1120/test/README.md | 19 - .../machine/1120/test/debugger/README.md | 18 - devices/pdp11/machine/1170/README.md | 2 +- .../machine/1170/{test => monitor}/README.md | 4 +- .../1170/{test => monitor}/debugger/README.md | 4 +- .../{test => monitor}/debugger/machine.xml | 4 +- .../1170/{test => monitor}/machine.xml | 4 +- .../machine/1170/panel/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/panel/machine.xml | 2 +- .../machine/1170/vt100/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/vt100/machine.xml | 2 +- devices/pdp11/panel/1170/debugger/README.md | 10 + devices/pdp11/panel/test/README.md | 55 ++ devices/pdp11/panel/test/debugger/README.md | 10 + devices/pdp11/rl11/README.md | 2 +- modules/pdp11/lib/bus.js | 126 ++-- modules/pdp11/lib/cpustate.js | 87 ++- modules/pdp11/lib/defines.js | 1 + modules/pdp11/lib/device.js | 192 +++--- modules/pdp11/lib/memory.js | 20 +- modules/pdp11/lib/ram.js | 24 +- modules/pdp11/lib/rl11.js | 9 +- modules/pdp11/lib/rom.js | 20 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 530 +++++++++-------- versions/pdpjs/1.30.2/pdp11.js | 397 +++++++------ 41 files changed, 1454 insertions(+), 1476 deletions(-) create mode 100644 apps/pdp11/boot/monitor/PDPJSMON.json create mode 100644 apps/pdp11/boot/monitor/PDPJSMON.lst rename apps/pdp11/boot/{test/BOOTTEST.mac => monitor/PDPJSMON.mac} (98%) rename apps/pdp11/boot/{test => monitor}/README.md (94%) create mode 100644 apps/pdp11/boot/monitor/makefile delete mode 100644 apps/pdp11/boot/test/BOOTTEST.json delete mode 100644 apps/pdp11/boot/test/BOOTTEST.lst delete mode 100644 apps/pdp11/boot/test/makefile create mode 100644 devices/pdp11/machine/1120/monitor/README.md create mode 100644 devices/pdp11/machine/1120/monitor/debugger/README.md rename devices/pdp11/machine/1120/{test => monitor}/debugger/machine.xml (85%) rename devices/pdp11/machine/1120/{test => monitor}/machine.xml (86%) delete mode 100644 devices/pdp11/machine/1120/test/README.md delete mode 100644 devices/pdp11/machine/1120/test/debugger/README.md rename devices/pdp11/machine/1170/{test => monitor}/README.md (69%) rename devices/pdp11/machine/1170/{test => monitor}/debugger/README.md (55%) rename devices/pdp11/machine/1170/{test => monitor}/debugger/machine.xml (88%) rename devices/pdp11/machine/1170/{test => monitor}/machine.xml (88%) create mode 100644 devices/pdp11/panel/1170/debugger/README.md create mode 100644 devices/pdp11/panel/test/debugger/README.md diff --git a/apps/pdp11/boot/README.md b/apps/pdp11/boot/README.md index 0027882bc..c095b8a3a 100644 --- a/apps/pdp11/boot/README.md +++ b/apps/pdp11/boot/README.md @@ -9,7 +9,7 @@ PDP-11 Boot Images The project contains the following PDP-11 boot images: -* [PDP-11 Boot Test](test/) +* [PDP-11 Boot Monitor](monitor/) * [DEC PDP-11 Bootstrap Loader](bootstrap/) Boot code can be pre-loaded into any machine by including a `` component in the machine XML configuration file diff --git a/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst b/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst index dc7acb522..ef5262202 100644 --- a/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst +++ b/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst @@ -1,9 +1,9 @@ -037744: 016701 000026 MOV 26(PC),R1 ; @037776 +037744: 016701 000026 MOV 037776,R1 037750: 012702 000352 MOV #352,R2 037754: 005211 INC @R1 037756: 105711 TSTB @R1 037760: 100376 BPL 037756 037762: 116162 000002 037400 MOVB 2(R1),37400(R2) -037770: 005267 177756 INC 177756(PC) ; @037752 +037770: 005267 177756 INC 037752 037774: 000765 BR 037750 037776: 177550 .WORD 177550 diff --git a/apps/pdp11/boot/bootstrap/README.md b/apps/pdp11/boot/bootstrap/README.md index 450d0567a..1c951bb5b 100644 --- a/apps/pdp11/boot/bootstrap/README.md +++ b/apps/pdp11/boot/bootstrap/README.md @@ -29,20 +29,20 @@ Here's what the **Bootstrap Loader** looks like: 037776 177550 Using any [PDPjs](/modules/pdpjs/) machine with the built-in Debugger, such as this -[PDP-11/20 Boot Test](/devices/pdp11/machine/1120/test/debugger/), the **Bootstrap Loader** +[PDP-11/20 Boot Monitor](/devices/pdp11/machine/1120/monitor/debugger/), the **Bootstrap Loader** is easily entered with a single Debugger EDIT ("e") command: e 037744 016701 000026 012702 000352 005211 105711 100376 116162 000002 037400 005267 177756 000765 177550 You can immediately disassemble the code using the Debugger's UNASSEMBLE ("u") command `u 037744 040000`: - 037744: 016701 000026 MOV 26(PC),R1 ; @037776 + 037744: 016701 000026 MOV 037776,R1 037750: 012702 000352 MOV #352,R2 037754: 005211 INC @R1 037756: 105711 TSTB @R1 037760: 100376 BPL 037756 037762: 116162 000002 037400 MOVB 2(R1),37400(R2) - 037770: 005267 177756 INC 177756(PC) ; @037752 + 037770: 005267 177756 INC 037752 037774: 000765 BR 037750 037776: 177550 .WORD 177550 diff --git a/apps/pdp11/boot/monitor/PDPJSMON.json b/apps/pdp11/boot/monitor/PDPJSMON.json new file mode 100644 index 000000000..226df4d83 --- /dev/null +++ b/apps/pdp11/boot/monitor/PDPJSMON.json @@ -0,0 +1,89 @@ +{"load":0xC000 /*140000*/,"exec":0xC000 /*140000*/, +"words":[ +0x0005 /*000005*/,0x0A1F /*005037*/,0xFFFE /*177776*/,0x15C6 /*012706*/,0xC000 /*140000*/,0x0A1F /*005037*/,0xFF74 /*177564*/,0x15C0 /*012700*/, +0xC251 /*141121*/,0x09F7 /*004767*/,0x0052 /*000122*/,0x15DF /*012737*/,0xC054 /*140124*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, +0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC269 /*141151*/,0x09F7 /*004767*/,0x0038 /*000070*/, +0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006A /*000152*/,0x0A00 /*005000*/,0x0001 /*000001*/,0x0A80 /*005200*/, +0x0BF7 /*005767*/,0x000C /*000014*/,0x03FB /*001773*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/,0x0002 /*000002*/,0x0002 /*000002*/, +0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/,0xFF74 /*177564*/,0x80FD /*100375*/, +0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/, +0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC088 /*140210*/,0x0034 /*000064*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0036 /*000066*/, +0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/,0x0306 /*001406*/,0x9FDF /*117737*/, +0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/,0xFF74 /*177564*/,0x0002 /*000002*/, +0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/,0x15DF /*012737*/,0xC0C0 /*140300*/, +0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF70 /*177560*/,0x0087 /*000207*/, +0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/,0xA017 /*120027*/,0x007F /*000177*/, +0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/,0x0306 /*001406*/,0x0AF7 /*005367*/, +0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC21F /*141037*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/,0xA017 /*120027*/,0x0020 /*000040*/, +0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/,0xA017 /*120027*/,0x007A /*000172*/, +0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/,0x2DD7 /*026727*/,0xFF92 /*177622*/, +0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/,0xFF84 /*177604*/,0x9588 /*112610*/, +0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/,0xFF74 /*177564*/,0x8A08 /*105010*/, +0x15DF /*012737*/,0xC146 /*140506*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/,0x15DF /*012737*/,0x0400 /*002000*/, +0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/,0x1066 /*010146*/,0x10A6 /*010246*/, +0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFF0C /*177414*/,0xB5DF /*132737*/,0x0040 /*000100*/, +0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC223 /*141043*/,0x94C0 /*112300*/,0x0319 /*001431*/,0x1DC2 /*016702*/, +0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA001 /*120001*/,0x0208 /*001010*/, +0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/,0x02F7 /*001367*/,0x0104 /*000404*/, +0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/,0xC1C0 /*140700*/,0x0104 /*000404*/, +0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/,0x15C0 /*012700*/,0xC269 /*141151*/, +0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/,0x1580 /*012600*/,0x0002 /*000002*/, +0xC428 /*142050*/,0xC2A4 /*141244*/,0xC2B0 /*141260*/,0xC2F4 /*141364*/,0xC29A /*141232*/,0x4F43 /*047503*/,0x4D4D /*046515*/,0x4E41 /*047101*/, +0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/,0x4820 /*044040*/,0x4C41 /*046101*/, +0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/,0x5345 /*051505*/,0x2054 /*020124*/, +0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/, +0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/,0x3F4B /*037513*/,0x5220 /*051040*/, +0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/,0x0A0D /*005015*/,0x0800 /*004000*/, +0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/,0x5400 /*052000*/,0x5345 /*051505*/, +0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/,0x0050 /*000120*/,0x5500 /*052400*/, +0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/,0x444E /*042116*/,0x0D0A /*006412*/, +0x5000 /*050000*/,0x5044 /*050104*/,0x312D /*030455*/,0x2031 /*020061*/,0x4F4D /*047515*/,0x494E /*044516*/,0x4F54 /*047524*/,0x2052 /*020122*/, +0x3156 /*030526*/,0x302E /*030056*/,0x0D0A /*006412*/,0x0D0A /*006412*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x3E54 /*037124*/,0x0020 /*000040*/, +0x4E55 /*047125*/,0x4E4B /*047113*/,0x574F /*053517*/,0x204E /*020116*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/,0x5645 /*053105*/, +0x4349 /*041511*/,0x0A45 /*005105*/,0x000D /*000015*/,0x2020 /*020040*/,0x2020 /*020040*/,0x2020 /*020040*/,0x4C43 /*046103*/,0x434F /*041517*/, +0x204B /*020113*/,0x4954 /*044524*/,0x4B43 /*045503*/,0x0A53 /*005123*/,0x000D /*000015*/,0x15C0 /*012700*/,0xC1CA /*140712*/,0x09F7 /*004767*/, +0xFDC6 /*176706*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFDBA /*176672*/,0x0087 /*000207*/, +0x0A37 /*005067*/,0xFD9E /*176636*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/,0x1144 /*010504*/,0x0C84 /*006204*/, +0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/,0x2045 /*020105*/,0x0301 /*001401*/, +0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC28B /*141213*/,0x1DC3 /*016703*/,0xFD74 /*176564*/,0x0A02 /*005002*/, +0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/,0x02F8 /*001370*/,0x09F7 /*004767*/, +0xFD76 /*176566*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/,0x15C0 /*012700*/,0x0008 /*000010*/, +0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/,0x10B1 /*010261*/,0xF4F0 /*172360*/, +0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/,0x10B1 /*010261*/,0xF4B0 /*172260*/, +0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/,0x10F1 /*010361*/,0xFFB0 /*177660*/, +0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4FE /*172376*/, +0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/,0x15DF /*012737*/,0x003F /*000077*/, +0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4A4 /*172244*/,0x15DF /*012737*/, +0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/,0x4080 /*040200*/,0x15C2 /*012702*/, +0xC384 /*141604*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC428 /*142050*/,0x87FB /*103773*/,0x15F7 /*012767*/,0x4080 /*040200*/, +0xFCCE /*176316*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/,0x35DF /*032737*/,0x0001 /*000001*/, +0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/,0x35DF /*032737*/,0x0002 /*000002*/, +0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/,0x1042 /*010102*/,0xE5C2 /*162702*/, +0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/,0x15F3 /*012763*/,0x0001 /*000001*/, +0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/,0x1084 /*010204*/,0x7517 /*072427*/, +0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1084 /*010204*/,0x7517 /*072427*/, +0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/,0x74D7 /*072327*/,0xFFF4 /*177764*/, +0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/, +0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/,0x15C4 /*012704*/,0x0003 /*000003*/, +0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/,0x7F02 /*077402*/,0x1002 /*010002*/, +0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/,0x0365 /*001545*/,0xA057 /*120127*/, +0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/,0xC270 /*141160*/,0x09F7 /*004767*/, +0xFC26 /*176046*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/,0x0020 /*000040*/,0x030B /*001413*/, +0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/, +0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/,0x15D2 /*012722*/,0xC000 /*140000*/, +0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/,0xA057 /*120127*/,0x004C /*000114*/, +0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFBD8 /*175730*/, +0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/,0x000B /*000013*/,0x0004 /*000004*/, +0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0008 /*000010*/, +0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/,0x003F /*000077*/,0x0A82 /*005202*/, +0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/, +0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0006 /*000006*/,0x8A03 /*105003*/, +0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/,0x00FF /*000377*/,0x0A02 /*005002*/, +0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/, +0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/,0x0A21 /*005041*/,0x15E1 /*012741*/, +0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x8BC9 /*105711*/, +0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/,0x15F1 /*012761*/,0x0020 /*000040*/, +0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/,0x1000 /*010000*/,0x001A /*000032*/, +0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/,0x0006 /*000006*/,0x0A31 /*005061*/, +0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x10C0 /*010300*/,0x0A07 /*005007*/] +} \ No newline at end of file diff --git a/apps/pdp11/boot/monitor/PDPJSMON.lst b/apps/pdp11/boot/monitor/PDPJSMON.lst new file mode 100644 index 000000000..5fda0e322 --- /dev/null +++ b/apps/pdp11/boot/monitor/PDPJSMON.lst @@ -0,0 +1,533 @@ + 1 ; BOOT MONITOR + 2 ; + 3 ; REBASE HIGHER LINK/BOT:140000 + 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? + 5 + 6 177776 PSW = 177776 + 7 177564 DL11XCSR = 177564 + 8 000064 DL11VEC = 64 + 9 + 10 177546 KW11LKS = 177546 + 11 000100 KW11VEC = 100 + 12 + 13 .ASECT + 14 140000 .=140000 + 15 140000 000005 START: RESET ; 140000 + 16 140002 005037 177776 CLR @#PSW + 17 140006 012706 140000 MOV #START,SP + 18 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR + 19 140016 012700 141121 MOV #BANNER,R0 + 20 140022 004767 140150' JSR PC,PRINT + 21 140026 012737 140124 000100 MOV #CLKAST,@#KW11VEC + 22 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 + 23 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING + 24 + 25 140050 012700 141151 MOV #PROMPT,R0 + 26 140054 004767 140150' JSR PC,PRINT + 27 140060 162706 000256 SUB #256,SP + 28 140064 010600 MOV SP,R0 + 29 140066 004767 140244' JSR PC,INPUT + 30 140072 005000 CLR R0 + 31 140074 000001 1$: WAIT + 32 140076 005200 INC R0 + 33 140100 005767 140120' TST LGHTON + 34 140104 001773 BEQ 1$ + 35 140106 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG + 36 140112 016746 140120' MOV LGHTON,-(SP) ; CALL SUPER LOOP START + 37 140116 000002 RTI + 38 + 39 140120 000000 LGHTON: .WORD 0 + 40 140122 000000 CLKTIC: .WORD 0 + 41 + 42 CLKAST: ; 140124 + 43 140124 005267 140122' INC CLKTIC + 44 140130 000002 RTI + 45 + 46 ONECHR: + 47 140132 105737 177564 TSTB @#DL11XCSR ; 140132 + 48 140136 100375 BPL ONECHR + 49 140140 110037 177566 MOVB R0,@#177566 + 50 140144 000207 RTS PC + 51 + 52 140146 000000 PRTPTR: .WORD 0 ; 140146 + 53 + 54 PRINT: ; 140150 + 55 140150 132737 000100 177564 BITB #100,@#DL11XCSR + 56 140156 001374 BNE PRINT + 57 140160 010067 140146' MOV R0,PRTPTR + 58 140164 012737 140210 000064 MOV #PRTAST,@#DL11VEC + 59 140172 012737 000200 000066 MOV #200,@#DL11VEC+2 + 60 140200 152737 000100 177564 BISB #100,@#DL11XCSR + 61 140206 000207 RTS PC + 62 + 63 PRTAST: ; 140210 + 64 140210 105777 140146' TSTB @PRTPTR + 65 140214 001406 BEQ 2$ + 66 140216 117737 140146' 177566 MOVB @PRTPTR,@#177566 + 67 140224 005267 140146' INC PRTPTR + 68 140230 000002 RTI + 69 140232 105037 177564 2$: CLRB @#177564 + 70 140236 000002 RTI + 71 + 72 140240 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER + 73 140242 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH + 74 + 75 INPUT: + 76 140244 010067 140240' MOV R0,BUFFER ; 140244 + 77 140250 005067 140242' CLR LENGTH + 78 140254 012737 140300 000060 MOV #INPAST,@#60 + 79 140262 012737 000200 000062 MOV #200,@#62 + 80 140270 152737 000100 177560 BISB #100,@#177560 + 81 140276 000207 RTS PC + 82 + 83 INPAST: ; 140300 + 84 140300 010046 MOV R0,-(SP) + 85 140302 113700 177562 MOVB @#177562,R0 + 86 140306 120027 000015 CMPB R0,#15 + 87 140312 001455 BEQ 7$ ; CARRIAGE RETURN + 88 140314 120027 000177 CMPB R0,#127. + 89 140320 001403 BEQ 2$ ; + 90 140322 120027 000010 CMPB R0,#10 + 91 140326 001012 BNE 4$ ; BACK SPACE + 92 140330 005767 140242' 2$: TST LENGTH ; DATA IN BUFFER? + 93 140334 001406 BEQ 3$ + 94 140336 005367 140242' DEC LENGTH ; LENGTH + 95 140342 012700 141037 MOV #DEL,R0 + 96 140346 004767 140150' JSR PC,PRINT + 97 140352 000453 3$: BR 9$ + 98 140354 120027 000040 4$: CMPB R0,#40 + 99 140360 002450 BLT 9$ ; BELOW SPACE + 100 140362 120027 000177 CMPB R0,#177 + 101 140366 002045 BGE 9$ ; SKIP STUFF TOO BIG + 102 140370 004767 140132' JSR PC,ONECHR ; ECHO CHAR + 103 140374 120027 000172 CMPB R0,#172 + 104 140400 003005 BGT 5$ ; ABOVE Z + 105 140402 120027 000141 CMPB R0,#141 + 106 140406 002402 BLT 5$ ; BELOW A + 107 140410 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE + 108 140414 026727 140242' 000254 5$: CMP LENGTH,#254 + 109 140422 002027 BGE 9$ + 110 140424 110046 MOVB R0,-(SP) + 111 140426 016700 140240' MOV BUFFER,R0 + 112 140432 066700 140242' ADD LENGTH,R0 + 113 140436 112610 MOVB (SP)+,(R0) + 114 140440 005267 140242' INC LENGTH + 115 140444 000416 BR 9$ + 116 + 117 140446 016700 140240' 7$: MOV BUFFER,R0 + 118 140452 066700 140242' ADD LENGTH,R0 + 119 140456 105010 CLRB (R0) + 120 140460 012737 140506 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 + 121 140466 012737 000100 000242 MOV #100,@#242 + 122 140474 012737 002000 177772 MOV #2000,@#177772 + 123 140502 012600 9$: MOV (SP)+,R0 + 124 140504 000002 RTI + 125 + 126 CMD: ; 140506 + 127 140506 005037 177772 CLR @#177772 ; NO MORE PIR CALLS + 128 140512 010046 MOV R0,-(SP) + 129 140514 010146 MOV R1,-(SP) + 130 140516 010246 MOV R2,-(SP) + 131 140520 010346 MOV R3,-(SP) + 132 140522 010446 MOV R4,-(SP) + 133 140524 012700 141034 MOV #EOL,R0 + 134 140530 004767 140150' JSR PC,PRINT + 135 140534 132737 000100 177564 1$: BITB #100,@#177564 + 136 140542 001374 BNE 1$ + 137 140544 005004 CLR R4 + 138 140546 012703 141043 MOV #CMDLST,R3 ; CMD LIST + 139 140552 112300 3$: MOVB (R3)+,R0 + 140 140554 001431 BEQ 13$ + 141 140556 016702 140240' MOV BUFFER,R2 ; USER CMD + 142 140562 112201 4$: MOVB (R2)+,R1 + 143 140564 001431 BEQ 15$ ; NULL COMMAND? + 144 140566 120127 000040 CMPB R1,#40 + 145 140572 001773 BEQ 4$ ; SKIP SPACE + 146 140574 120001 5$: CMPB R0,R1 + 147 140576 001010 BNE 7$ + 148 140600 112300 MOVB (R3)+,R0 + 149 140602 001412 BEQ 9$ + 150 140604 112201 MOVB (R2)+,R1 + 151 140606 001410 BEQ 9$ + 152 140610 120127 000040 CMPB R1,#40 + 153 140614 001367 BNE 5$ + 154 140616 000404 BR 9$ + 155 140620 112300 7$: MOVB (R3)+,R0 + 156 140622 001376 BNE 7$ + 157 140624 005204 INC R4 + 158 140626 000751 BR 3$ + 159 140630 006304 9$: ASL R4 + 160 140632 004774 140700 JSR PC,@CMDTBL(R4) ; EXECUTE + 161 140636 000404 BR 15$ + 162 + 163 140640 012700 141077 13$: MOV #UNKMSG,R0 + 164 140644 004767 140150' JSR PC,PRINT + 165 + 166 140650 005067 140242' 15$: CLR LENGTH + 167 140654 012700 141151 MOV #PROMPT,R0 + 168 140660 004767 140150' JSR PC,PRINT + 169 140664 012604 MOV (SP)+,R4 + 170 140666 012603 MOV (SP)+,R3 + 171 140670 012602 MOV (SP)+,R2 + 172 140672 012601 MOV (SP)+,R1 + 173 140674 012600 MOV (SP)+,R0 + 174 140676 000002 RTI + 175 + 176 + 177 140700 142050 141244 141260 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP + 140706 141364 141232 + 178 140712 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> + 140715 115 101 116 + 140720 104 123 040 + 140723 101 122 105 + 140726 040 102 117 + 140731 117 124 054 + 140734 040 110 101 + 140737 114 124 054 + 140742 040 114 111 + 140745 107 110 124 + 140750 123 054 040 + 140753 124 105 123 + 140756 124 040 101 + 140761 116 104 040 + 140764 110 105 114 + 140767 120 015 012 + 140772 102 117 117 + 140775 124 040 104 + 141000 105 126 111 + 141003 103 105 123 + 141006 040 101 122 + 141011 105 040 122 + 141014 113 077 040 + 141017 122 114 077 + 141022 040 117 122 + 141025 040 122 120 + 141030 077 015 012 + 141033 000 + 179 141034 015 012 000 EOL: .BYTE 15,12,0 + 180 141037 010 040 010 DEL: .BYTE 10,40,10,0 + 141042 000 + 181 141043 102 117 117 CMDLST: .ASCIZ 'BOOT' + 141046 124 000 + 182 141050 110 101 114 .ASCIZ 'HALT' + 141053 124 000 + 183 141055 124 105 123 .ASCIZ 'TEST' + 141060 124 000 + 184 141062 114 111 107 .ASCIZ 'LIGHTS' + 141065 110 124 123 + 141070 000 + 185 141071 110 105 114 .ASCIZ 'HELP' + 141074 120 000 + 186 141076 000 .BYTE 0 + 187 141077 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> + 141102 116 117 127 + 141105 116 040 103 + 141110 117 115 115 + 141113 101 116 104 + 141116 012 015 000 + 188 141121 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> + 141124 055 061 061 + 141127 040 115 117 + 141132 116 111 124 + 141135 117 122 040 + 141140 126 061 056 + 141143 060 012 015 + 141146 012 015 000 + 189 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> + 190 141151 102 117 117 PROMPT: .ASCIZ 'BOOT> ' + 141154 124 076 040 + 141157 000 + 191 141160 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> + 141163 116 117 127 + 141166 116 040 102 + 141171 117 117 124 + 141174 040 104 105 + 141177 126 111 103 + 141202 105 012 015 + 141205 000 + 192 141206 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> + 141211 040 040 040 + 141214 103 114 117 + 141217 103 113 040 + 141222 124 111 103 + 141225 113 123 012 + 141230 015 000 + 193 + 194 .EVEN + 195 + 196 HELP: ; 141244 + 197 141232 012700 140712 MOV #HLPMSG,R0 + 198 141236 004767 140150' JSR PC,PRINT + 199 141242 000207 RTS PC + 200 + 201 HALT: ; 141260 + 202 141244 000000 HALT + 203 141246 012700 141034 MOV #EOL,R0 + 204 141252 004767 140150' JSR PC,PRINT + 205 141256 000207 RTS PC + 206 + 207 TEST: ; 141272 + 208 141260 005067 140122' CLR CLKTIC + 209 + 210 141264 012705 015000 MOV #15000,R5 + 211 141270 010537 177570 10$: MOV R5,@#177570 ; DISPLAY + 212 141274 010504 MOV R5,R4 + 213 141276 006204 ASR R4 + 214 141300 005000 15$: CLR R0 + 215 141302 010501 MOV R5,R1 + 216 141304 071004 DIV R4,R0 + 217 141306 010002 MOV R0,R2 + 218 141310 070204 MUL R4,R2 + 219 141312 060301 ADD R3,R1 + 220 141314 020105 CMP R1,R5 + 221 141316 001401 BEQ 20$ + 222 141320 000000 HALT + 223 141322 077412 20$: SOB R4,15$ + 224 141324 077517 SOB R5,10$ + 225 + 226 141326 012700 141213 MOV #PERMSG+5,R0 + 227 141332 016703 140122' MOV CLKTIC,R3 + 228 + 229 141336 005002 25$: CLR R2 ; 141350 + 230 141340 071227 000010 DIV #10,R2 + 231 141344 062703 000060 ADD #'0,R3 + 232 141350 110340 MOVB R3,-(R0) + 233 141352 010203 MOV R2,R3 + 234 141354 001370 BNE 25$ + 235 + 236 141356 004767 140150' JSR PC,PRINT + 237 141362 000207 RTS PC + 238 + 239 + 240 177572 MMR0=177572 + 241 177574 MMR1=177574 + 242 177576 MMR2=177576 + 243 172516 MMR3=172516 + 244 + 245 LIGHTS: ; 141376 + 246 141364 012703 077406 MOV #77406,R3 ; DEFAULT PDR + 247 141370 005002 CLR R2 + 248 141372 005001 CLR R1 + 249 141374 012700 000010 MOV #8.,R0 + 250 141400 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR + 251 141404 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR + 252 141410 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR + 253 141414 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR + 254 141420 010361 172200 MOV R3,172200(R1) ; SUPER I PDR + 255 141424 010261 172240 MOV R2,172240(R1) ; SUPER I PAR + 256 141430 010361 172220 MOV R3,172220(R1) ; SUPER D PDR + 257 141434 010261 172260 MOV R2,172260(R1) ; SUPER D PAR + 258 141440 010361 177600 MOV R3,177600(R1) ; USER I PDR + 259 141444 010261 177640 MOV R2,177640(R1) ; USER I PAR + 260 141450 010361 177620 MOV R3,177620(R1) ; USER D PDR + 261 141454 010361 177660 MOV R3,177660(R1) ; USER D PAR + 262 141460 062702 000200 ADD #200,R2 + 263 141464 062701 000002 ADD #2,R1 + 264 141470 077035 SOB R0,1$ + 265 141472 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE + 266 141500 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE + 267 141506 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE + 268 141514 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT + 269 141522 012737 000001 177572 MOV #1,@#MMR0 + 270 + 271 141530 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 + 272 141536 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 + 273 141544 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER + 274 + 275 141552 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS + 276 141556 012702 141604 MOV #SUPERS,R2 ; ADDRESS SUPER CODE + 277 141562 012246 10$: MOV (R2)+,-(SP) + 278 141564 006623 MTPI (R3)+ + 279 141566 020227 142050 CMP R2,#SUPERE + 280 141572 103773 BLO 10$ + 281 + 282 141574 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK + 283 141602 000207 RTS PC + 284 + 285 ; + 286 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 + 287 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS + 288 ; + 289 SUPERS: ; 141616 + 290 141604 012700 000037 MOV #37,R0 ; LOAD PATTERN + 291 141610 012701 174000 MOV #174000,R1 + 292 141614 032737 000001 177570 BIT #1,@#177570 + 293 141622 001414 BEQ 10$ + 294 141624 012700 007417 MOV #7417,R0 + 295 141630 010001 MOV R0,R1 + 296 141632 005101 COM R1 + 297 141634 032737 000002 177570 BIT #2,@#177570 + 298 141642 001404 BEQ 10$ + 299 141644 012700 036163 MOV #36163,R0 + 300 141650 012701 037000 MOV #37000,R1 + 301 141654 010102 10$: MOV R1,R2 + 302 141656 162702 000002 SUB #2,R2 + 303 141662 042702 000001 BIC #1,R2 ; WAIT ADDRESS + 304 141666 010203 MOV R2,R3 + 305 141670 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET + 306 141674 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT + 307 141702 062703 000002 ADD #2,R3 + 308 141706 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) + 309 + 310 141714 010204 MOV R2,R4 + 311 141716 072427 177772 ASH #-6,R4 + 312 141722 042704 177600 BIC #177600,R4 + 313 141726 012705 001700 MOV #1700,R5 + 314 141732 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT + 315 141734 010204 MOV R2,R4 + 316 141736 072427 177764 ASH #-12.,R4 + 317 141742 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET + 318 141746 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE + 319 + 320 141752 010103 MOV R1,R3 + 321 141754 072327 177764 ASH #-12.,R3 + 322 141760 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET + 323 141764 020304 CMP R3,R4 ; SAME PAR + 324 141766 001412 BEQ 30$ + 325 141770 010104 MOV R1,R4 + 326 141772 072427 177772 ASH #-6,R4 + 327 141776 042704 177600 BIC #177600,R4 + 328 142002 012705 001700 MOV #1700,R5 + 329 142006 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP + 330 142010 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE + 331 30$: + 332 142014 012704 000003 MOV #3,R4 + 333 142020 063704 177570 ADD @#177570,R4 + 334 142024 012703 000002 MOV #2,R3 + 335 142030 060703 ADD PC,R3 + 336 142032 000112 40$: JMP (R2) + 337 142034 077402 SOB R4,40$ + 338 142036 010002 MOV R0,R2 + 339 142040 006002 ROR R2 ; ROTATE PATTERN + 340 142042 006101 ROL R1 + 341 142044 006000 ROR R0 + 342 142046 000702 BR 10$ + 343 SUPERE: + 344 + 345 BOOT: ; 142062 + 346 142050 005003 CLR R3 ; UNIT + 347 142052 112201 1$: MOVB (R2)+,R1 + 348 142054 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 + 349 142056 120127 000040 CMPB R1,#40 + 350 142062 001773 BEQ 1$ + 351 142064 120127 000122 CMPB R1,#'R + 352 142070 001405 BEQ 5$ + 353 + 354 142072 012700 141160 MOV #BADBOO,R0 + 355 142076 004767 140150' JSR PC,PRINT + 356 142102 000207 RTS PC + 357 + 358 142104 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P + 359 142106 112200 7$: MOVB (R2)+,R0 ; DIGIT + 360 142110 001416 BEQ 9$ + 361 142112 120027 000040 CMPB R0,#40 + 362 142116 001413 BEQ 9$ + 363 142120 120027 000067 CMPB R0,#'7 + 364 142124 003031 BGT 11$ + 365 142126 162700 000060 SUB #'0,R0 + 366 142132 002426 BLT 11$ + 367 142134 006303 ASL R3 + 368 142136 006303 ASL R3 + 369 142140 006303 ASL R3 + 370 142142 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT + 371 142144 000760 BR 7$ + 372 142146 005002 9$: CLR R2 + 373 142150 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 + 374 142154 012722 140000 MOV #START,(R2)+ + 375 142160 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 + 376 142164 005022 CLR (R2)+ + 377 142166 120127 000113 CMPB R1,#'K + 378 142172 001476 BEQ BOOTRK + 379 142174 120127 000114 CMPB R1,#'L + 380 142200 001410 BEQ BOOTRL + 381 142202 120127 000120 CMPB R1,#'P + 382 142206 001517 BEQ BOOTRP + 383 + 384 142210 012700 141077 11$: MOV #UNKMSG,R0 + 385 142214 004767 140150' JSR PC,PRINT + 386 142220 000207 RTS PC + 387 + 388 174400 RLCS=174400 + 389 BOOTRL: ; 142326 + 390 142222 000005 RESET + 391 142224 000303 SWAB R3 ; UNIT NUMBER + 392 142226 012701 174400 MOV #RLCS,R1 ; CSR + 393 142232 012761 000013 000004 MOV #13,4(R1) ; CLR ERR + 394 142240 052703 000004 BIS #4,R3 ; UNIT+GSTAT + 395 142244 010311 MOV R3,(R1) ; ISSUE CMD + 396 142246 105711 TSTB (R1) ; WAIT + 397 142250 100376 BPL .-2 + 398 142252 105003 CLRB R3 + 399 142254 052703 000010 BIS #10,R3 ; UNIT+RDHDR + 400 142260 010311 MOV R3,(R1) ; ISSUE CMD + 401 142262 105711 TSTB (R1) ; WAIT + 402 142264 100376 BPL .-2 + 403 142266 016102 000006 MOV 6(R1),R2 ; GET HDR + 404 142272 042702 000077 BIC #77,R2 ; CLR SECTOR + 405 142276 005202 INC R2 ; MAGIC BIT + 406 142300 010261 000004 MOV R2,4(R1) ; SEEK TO 0 + 407 142304 105003 CLRB R3 + 408 142306 052703 000006 BIS #6,R3 ; UNIT+SEEK + 409 142312 010311 MOV R3,(R1) ; ISSUE CMD + 410 142314 105711 TSTB (R1) ; WAIT + 411 142316 100376 BPL .-2 + 412 142320 005061 000002 CLR 2(R1) ; CLR BA + 413 142324 005061 000004 CLR 4(R1) ; CLR DA + 414 142330 012761 177000 000006 MOV #-512.,6(R1) ; SET WC + 415 142336 105003 CLRB R3 + 416 142340 052703 000014 BIS #14,R3 ; UNIT+READ + 417 142344 010311 MOV R3,(R1) ; ISSUE CMD + 418 142346 105711 TSTB (R1) ; WAIT + 419 142350 100376 BPL .-2 + 420 142352 042711 000377 BIC #377,(R1) + 421 142356 005002 CLR R2 + 422 142360 005003 CLR R3 + 423 142362 005004 CLR R4 + 424 142364 005005 CLR R5 + 425 142366 005007 CLR PC + 426 + 427 177412 RKDA=177412 + 428 000005 READGO=5 + 429 BOOTRK: + 430 142370 000005 RESET ; 142402 + 431 142372 000303 SWAB R3 ; UNIT NUMBER + 432 142374 006303 ASL R3 + 433 142376 006303 ASL R3 + 434 142400 006303 ASL R3 + 435 142402 006303 ASL R3 + 436 142404 006303 ASL R3 + 437 142406 012701 177412 MOV #RKDA,R1 ; CSR + 438 142412 010311 MOV R3,(R1) ; LOAD DA + 439 142414 005041 CLR -(R1) ; CLEAR BA + 440 142416 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC + 441 142422 012741 000005 MOV #READGO,-(R1) ; READ & GO + 442 142426 005002 CLR R2 + 443 142430 005003 CLR R3 + 444 142432 005004 CLR R4 + 445 142434 005005 CLR R5 + 446 142436 105711 TSTB (R1) + 447 142440 100376 BPL .-2 + 448 142442 105011 CLRB (R1) + 449 142444 005007 CLR PC + 450 + 451 176700 RPCSR=0176700 + 452 BOOTRP: ; 142460 + 453 142446 000005 RESET + 454 142450 012701 176700 MOV #RPCSR, R1 + 455 142454 012761 000040 000010 MOV #0000040, 10(R1) ; RESET + 456 142462 010361 000010 MOV R3, 10(R1) ; SET UNIT + 457 142466 012711 000021 MOV #0000021, (R1) ; PACK ACK + 458 142472 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE + 459 142500 012761 177000 000002 MOV #-512., 2(R1) ; SET WC + 460 142506 005061 000004 CLR 4(R1) ; CLR BA + 461 142512 005061 000006 CLR 6(R1) ; CLR DA + 462 142516 005061 000034 CLR 34(R1) ; CLR CYL + 463 142522 012711 000071 MOV #0000071, (R1) ; READ + 464 142526 105711 TSTB (R1) ; WAIT + 465 142530 100376 BPL .-2 + 466 142532 105011 CLRB (R1) + 467 142534 010300 MOV R3,R0 + 468 142536 005007 CLR PC + 469 + 470 .END START + 470 diff --git a/apps/pdp11/boot/test/BOOTTEST.mac b/apps/pdp11/boot/monitor/PDPJSMON.mac similarity index 98% rename from apps/pdp11/boot/test/BOOTTEST.mac rename to apps/pdp11/boot/monitor/PDPJSMON.mac index 5a32b52bb..22a1da5f1 100644 --- a/apps/pdp11/boot/test/BOOTTEST.mac +++ b/apps/pdp11/boot/monitor/PDPJSMON.mac @@ -1,4 +1,4 @@ -; BOOT LOADER CODE +; BOOT MONITOR ; ; REBASE HIGHER LINK/BOT:140000 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? @@ -185,7 +185,8 @@ CMDLST: .ASCIZ 'BOOT' .ASCIZ 'HELP' .BYTE 0 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> -BANNER: .ASCIZ 'PDP-11 BOOT TEST FOR PDPjs'<12><15>'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> +BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> +; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> PROMPT: .ASCIZ 'BOOT> ' BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> diff --git a/apps/pdp11/boot/test/README.md b/apps/pdp11/boot/monitor/README.md similarity index 94% rename from apps/pdp11/boot/test/README.md rename to apps/pdp11/boot/monitor/README.md index e67a005e8..a4983b42f 100644 --- a/apps/pdp11/boot/test/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -1,26 +1,26 @@ --- layout: page -title: PDP-11 Boot Test -permalink: /apps/pdp11/boot/test/ +title: PDP-11 Boot Monitor +permalink: /apps/pdp11/boot/monitor/ redirect_from: - /devices/pdp11/rom/test/ --- -PDP-11 Boot Test ----------------- +PDP-11 Boot Monitor +------------------- -[BOOTTEST.mac](BOOTTEST.mac) is based on [boot.mac](http://skn.noip.me/pdp11/boot.mac) written by -[Paul Nankervis](mailto:paulnank@hotmail.com). It is used with all our initial PDP-11 boot tests. +[PDPJSMON.mac](PDPJSMON.mac) is a custom boot monitor/loader based on [boot.mac](http://skn.noip.me/pdp11/boot.mac) written by +[Paul Nankervis](mailto:paulnank@hotmail.com). It is used with all our PDP-11 test machines. -[BOOTTEST.mac](BOOTTEST.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce -[BOOTTEST.lst](BOOTTEST.lst), which was then processed by [FileDump](/modules/filedump/) to produce -[BOOTTEST.json](BOOTTEST.json). +[PDPJSMON.mac](PDPJSMON.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce +[PDPJSMON.lst](PDPJSMON.lst), which was then processed by [FileDump](/modules/filedump/) to produce +[PDPJSMON.json](PDPJSMON.json). -To see the Boot Test in action, try the [PDP-11/70 Boot Test (with Debugger)](/devices/pdp11/machine/1170/test/debugger/). +To see the Boot Monitor in action, try the [PDP-11/70 Boot Monitor (with Debugger)](/devices/pdp11/machine/1170/monitor/debugger/). -The **BOOTTEST.mac** source code is shown below. +The **PDPJSMON.mac** source code is shown below. - ; BOOT LOADER CODE + ; BOOT MONITOR ; ; REBASE HIGHER LINK/BOT:140000 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? @@ -207,7 +207,8 @@ The **BOOTTEST.mac** source code is shown below. .ASCIZ 'HELP' .BYTE 0 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> - BANNER: .ASCIZ 'PDP-11 BOOT TEST FOR PDPjs'<12><15>'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> + BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> + ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> PROMPT: .ASCIZ 'BOOT> ' BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> diff --git a/apps/pdp11/boot/monitor/makefile b/apps/pdp11/boot/monitor/makefile new file mode 100644 index 000000000..de120c409 --- /dev/null +++ b/apps/pdp11/boot/monitor/makefile @@ -0,0 +1,11 @@ +# +# Don't have macro11? Make yourself a copy from https://github.com/shattered/macro11 +# + +all: PDPJSMON.json + +PDPJSMON.lst: PDPJSMON.mac + macro11 PDPJSMON.mac -l PDPJSMON.lst + +PDPJSMON.json: PDPJSMON.lst + node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.lst --format=octal --output=PDPJSMON.json --overwrite diff --git a/apps/pdp11/boot/test/BOOTTEST.json b/apps/pdp11/boot/test/BOOTTEST.json deleted file mode 100644 index ac05ede12..000000000 --- a/apps/pdp11/boot/test/BOOTTEST.json +++ /dev/null @@ -1,94 +0,0 @@ -{"load":0xC000 /*140000*/,"exec":0xC000 /*140000*/, -"words":[ -0x0005 /*000005*/,0x0A1F /*005037*/,0xFFFE /*177776*/,0x15C6 /*012706*/,0xC000 /*140000*/,0x0A1F /*005037*/,0xFF74 /*177564*/,0x15C0 /*012700*/, -0xC251 /*141121*/,0x09F7 /*004767*/,0x0052 /*000122*/,0x15DF /*012737*/,0xC054 /*140124*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, -0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC2AC /*141254*/,0x09F7 /*004767*/,0x0038 /*000070*/, -0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006A /*000152*/,0x0A00 /*005000*/,0x0001 /*000001*/,0x0A80 /*005200*/, -0x0BF7 /*005767*/,0x000C /*000014*/,0x03FB /*001773*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/,0x0002 /*000002*/,0x0002 /*000002*/, -0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/,0xFF74 /*177564*/,0x80FD /*100375*/, -0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/, -0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC088 /*140210*/,0x0034 /*000064*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0036 /*000066*/, -0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/,0x0306 /*001406*/,0x9FDF /*117737*/, -0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/,0xFF74 /*177564*/,0x0002 /*000002*/, -0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/,0x15DF /*012737*/,0xC0C0 /*140300*/, -0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF70 /*177560*/,0x0087 /*000207*/, -0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/,0xA017 /*120027*/,0x007F /*000177*/, -0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/,0x0306 /*001406*/,0x0AF7 /*005367*/, -0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC21F /*141037*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/,0xA017 /*120027*/,0x0020 /*000040*/, -0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/,0xA017 /*120027*/,0x007A /*000172*/, -0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/,0x2DD7 /*026727*/,0xFF92 /*177622*/, -0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/,0xFF84 /*177604*/,0x9588 /*112610*/, -0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/,0xFF74 /*177564*/,0x8A08 /*105010*/, -0x15DF /*012737*/,0xC146 /*140506*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/,0x15DF /*012737*/,0x0400 /*002000*/, -0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/,0x1066 /*010146*/,0x10A6 /*010246*/, -0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFF0C /*177414*/,0xB5DF /*132737*/,0x0040 /*000100*/, -0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC223 /*141043*/,0x94C0 /*112300*/,0x0319 /*001431*/,0x1DC2 /*016702*/, -0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA001 /*120001*/,0x0208 /*001010*/, -0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/,0x02F7 /*001367*/,0x0104 /*000404*/, -0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/,0xC1C0 /*140700*/,0x0104 /*000404*/, -0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/,0x15C0 /*012700*/,0xC2AC /*141254*/, -0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/,0x1580 /*012600*/,0x0002 /*000002*/, -0xC46C /*142154*/,0xC2E8 /*141350*/,0xC2F4 /*141364*/,0xC338 /*141470*/,0xC2DE /*141336*/,0x4F43 /*047503*/,0x4D4D /*046515*/,0x4E41 /*047101*/, -0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/,0x4820 /*044040*/,0x4C41 /*046101*/, -0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/,0x5345 /*051505*/,0x2054 /*020124*/, -0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/, -0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/,0x3F4B /*037513*/,0x5220 /*051040*/, -0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/,0x0A0D /*005015*/,0x0800 /*004000*/, -0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/,0x5400 /*052000*/,0x5345 /*051505*/, -0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/,0x0050 /*000120*/,0x5500 /*052400*/, -0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/,0x444E /*042116*/,0x0D0A /*006412*/, -0x5000 /*050000*/,0x5044 /*050104*/,0x312D /*030455*/,0x2031 /*020061*/,0x4F42 /*047502*/,0x544F /*052117*/,0x5420 /*052040*/,0x5345 /*051505*/, -0x2054 /*020124*/,0x4F46 /*047506*/,0x2052 /*020122*/,0x4450 /*042120*/,0x6A50 /*065120*/,0x0A73 /*005163*/,0x410D /*040415*/,0x4144 /*040504*/, -0x5450 /*052120*/,0x4445 /*042105*/,0x4620 /*043040*/,0x4F52 /*047522*/,0x204D /*020115*/,0x4F43 /*047503*/,0x4544 /*042504*/,0x4220 /*041040*/, -0x2059 /*020131*/,0x4150 /*040520*/,0x4C55 /*046125*/,0x4E20 /*047040*/,0x4E41 /*047101*/,0x454B /*042513*/,0x5652 /*053122*/,0x5349 /*051511*/, -0x3C20 /*036040*/,0x4150 /*040520*/,0x4C55 /*046125*/,0x414E /*040516*/,0x4B4E /*045516*/,0x4840 /*044100*/,0x544F /*052117*/,0x414D /*040515*/, -0x4C49 /*046111*/,0x432E /*041456*/,0x4D4F /*046517*/,0x0A3E /*005076*/,0x0A0D /*005015*/,0x000D /*000015*/,0x4F42 /*047502*/,0x544F /*052117*/, -0x203E /*020076*/,0x5500 /*052400*/,0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2054 /*020124*/, -0x4544 /*042504*/,0x4956 /*044526*/,0x4543 /*042503*/,0x0D0A /*006412*/,0x2000 /*020000*/,0x2020 /*020040*/,0x2020 /*020040*/,0x4320 /*041440*/, -0x4F4C /*047514*/,0x4B43 /*045503*/,0x5420 /*052040*/,0x4349 /*041511*/,0x534B /*051513*/,0x0D0A /*006412*/,0x0000 /*000000*/,0x15C0 /*012700*/, -0xC1CA /*140712*/,0x09F7 /*004767*/,0xFD82 /*176602*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/, -0xFD76 /*176566*/,0x0087 /*000207*/,0x0A37 /*005067*/,0xFD5A /*176532*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/, -0x1144 /*010504*/,0x0C84 /*006204*/,0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/, -0x2045 /*020105*/,0x0301 /*001401*/,0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC2CE /*141316*/,0x1DC3 /*016703*/, -0xFD30 /*176460*/,0x0A02 /*005002*/,0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/, -0x02F8 /*001370*/,0x09F7 /*004767*/,0xFD32 /*176462*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/, -0x15C0 /*012700*/,0x0008 /*000010*/,0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/, -0x10B1 /*010261*/,0xF4F0 /*172360*/,0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/, -0x10B1 /*010261*/,0xF4B0 /*172260*/,0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/, -0x10F1 /*010361*/,0xFFB0 /*177660*/,0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/, -0xFC00 /*176000*/,0xF4FE /*172376*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/, -0x15DF /*012737*/,0x003F /*000077*/,0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/, -0xF4A4 /*172244*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/, -0x4080 /*040200*/,0x15C2 /*012702*/,0xC3C8 /*141710*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC46C /*142154*/,0x87FB /*103773*/, -0x15F7 /*012767*/,0x4080 /*040200*/,0xFC8A /*176212*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/, -0x35DF /*032737*/,0x0001 /*000001*/,0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/, -0x35DF /*032737*/,0x0002 /*000002*/,0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/, -0x1042 /*010102*/,0xE5C2 /*162702*/,0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/, -0x15F3 /*012763*/,0x0001 /*000001*/,0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/, -0x1084 /*010204*/,0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/, -0x1084 /*010204*/,0x7517 /*072427*/,0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/, -0x74D7 /*072327*/,0xFFF4 /*177764*/,0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/, -0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/, -0x15C4 /*012704*/,0x0003 /*000003*/,0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/, -0x7F02 /*077402*/,0x1002 /*010002*/,0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/, -0x0365 /*001545*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/, -0xC2B3 /*141263*/,0x09F7 /*004767*/,0xFBE2 /*175742*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/, -0x0020 /*000040*/,0x030B /*001413*/,0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/, -0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/, -0x15D2 /*012722*/,0xC000 /*140000*/,0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/, -0xA057 /*120127*/,0x004C /*000114*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC23F /*141077*/, -0x09F7 /*004767*/,0xFB94 /*175624*/,0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/, -0x000B /*000013*/,0x0004 /*000004*/,0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/, -0x55C3 /*052703*/,0x0008 /*000010*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/, -0x003F /*000077*/,0x0A82 /*005202*/,0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/, -0x8BC9 /*105711*/,0x80FE /*100376*/,0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/, -0x0006 /*000006*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/, -0x00FF /*000377*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/, -0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/, -0x0A21 /*005041*/,0x15E1 /*012741*/,0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/, -0x0A05 /*005005*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/, -0x15F1 /*012761*/,0x0020 /*000040*/,0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/, -0x1000 /*010000*/,0x001A /*000032*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/, -0x0006 /*000006*/,0x0A31 /*005061*/,0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/, -0x10C0 /*010300*/,0x0A07 /*005007*/] -} \ No newline at end of file diff --git a/apps/pdp11/boot/test/BOOTTEST.lst b/apps/pdp11/boot/test/BOOTTEST.lst deleted file mode 100644 index 1372a0a08..000000000 --- a/apps/pdp11/boot/test/BOOTTEST.lst +++ /dev/null @@ -1,555 +0,0 @@ - 1 ; BOOT LOADER CODE - 2 ; - 3 ; REBASE HIGHER LINK/BOT:140000 - 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? - 5 - 6 177776 PSW = 177776 - 7 177564 DL11XCSR = 177564 - 8 000064 DL11VEC = 64 - 9 - 10 177546 KW11LKS = 177546 - 11 000100 KW11VEC = 100 - 12 - 13 .ASECT - 14 140000 .=140000 - 15 140000 000005 START: RESET ; 140000 - 16 140002 005037 177776 CLR @#PSW - 17 140006 012706 140000 MOV #START,SP - 18 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR - 19 140016 012700 141121 MOV #BANNER,R0 - 20 140022 004767 140150' JSR PC,PRINT - 21 140026 012737 140124 000100 MOV #CLKAST,@#KW11VEC - 22 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 - 23 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING - 24 - 25 140050 012700 141254 MOV #PROMPT,R0 - 26 140054 004767 140150' JSR PC,PRINT - 27 140060 162706 000256 SUB #256,SP - 28 140064 010600 MOV SP,R0 - 29 140066 004767 140244' JSR PC,INPUT - 30 140072 005000 CLR R0 - 31 140074 000001 1$: WAIT - 32 140076 005200 INC R0 - 33 140100 005767 140120' TST LGHTON - 34 140104 001773 BEQ 1$ - 35 140106 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG - 36 140112 016746 140120' MOV LGHTON,-(SP) ; CALL SUPER LOOP START - 37 140116 000002 RTI - 38 - 39 140120 000000 LGHTON: .WORD 0 - 40 140122 000000 CLKTIC: .WORD 0 - 41 - 42 CLKAST: ; 140124 - 43 140124 005267 140122' INC CLKTIC - 44 140130 000002 RTI - 45 - 46 ONECHR: - 47 140132 105737 177564 TSTB @#DL11XCSR ; 140132 - 48 140136 100375 BPL ONECHR - 49 140140 110037 177566 MOVB R0,@#177566 - 50 140144 000207 RTS PC - 51 - 52 140146 000000 PRTPTR: .WORD 0 ; 140146 - 53 - 54 PRINT: ; 140150 - 55 140150 132737 000100 177564 BITB #100,@#DL11XCSR - 56 140156 001374 BNE PRINT - 57 140160 010067 140146' MOV R0,PRTPTR - 58 140164 012737 140210 000064 MOV #PRTAST,@#DL11VEC - 59 140172 012737 000200 000066 MOV #200,@#DL11VEC+2 - 60 140200 152737 000100 177564 BISB #100,@#DL11XCSR - 61 140206 000207 RTS PC - 62 - 63 PRTAST: ; 140210 - 64 140210 105777 140146' TSTB @PRTPTR - 65 140214 001406 BEQ 2$ - 66 140216 117737 140146' 177566 MOVB @PRTPTR,@#177566 - 67 140224 005267 140146' INC PRTPTR - 68 140230 000002 RTI - 69 140232 105037 177564 2$: CLRB @#177564 - 70 140236 000002 RTI - 71 - 72 140240 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER - 73 140242 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH - 74 - 75 INPUT: - 76 140244 010067 140240' MOV R0,BUFFER ; 140244 - 77 140250 005067 140242' CLR LENGTH - 78 140254 012737 140300 000060 MOV #INPAST,@#60 - 79 140262 012737 000200 000062 MOV #200,@#62 - 80 140270 152737 000100 177560 BISB #100,@#177560 - 81 140276 000207 RTS PC - 82 - 83 INPAST: ; 140300 - 84 140300 010046 MOV R0,-(SP) - 85 140302 113700 177562 MOVB @#177562,R0 - 86 140306 120027 000015 CMPB R0,#15 - 87 140312 001455 BEQ 7$ ; CARRIAGE RETURN - 88 140314 120027 000177 CMPB R0,#127. - 89 140320 001403 BEQ 2$ ; - 90 140322 120027 000010 CMPB R0,#10 - 91 140326 001012 BNE 4$ ; BACK SPACE - 92 140330 005767 140242' 2$: TST LENGTH ; DATA IN BUFFER? - 93 140334 001406 BEQ 3$ - 94 140336 005367 140242' DEC LENGTH ; LENGTH - 95 140342 012700 141037 MOV #DEL,R0 - 96 140346 004767 140150' JSR PC,PRINT - 97 140352 000453 3$: BR 9$ - 98 140354 120027 000040 4$: CMPB R0,#40 - 99 140360 002450 BLT 9$ ; BELOW SPACE - 100 140362 120027 000177 CMPB R0,#177 - 101 140366 002045 BGE 9$ ; SKIP STUFF TOO BIG - 102 140370 004767 140132' JSR PC,ONECHR ; ECHO CHAR - 103 140374 120027 000172 CMPB R0,#172 - 104 140400 003005 BGT 5$ ; ABOVE Z - 105 140402 120027 000141 CMPB R0,#141 - 106 140406 002402 BLT 5$ ; BELOW A - 107 140410 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE - 108 140414 026727 140242' 000254 5$: CMP LENGTH,#254 - 109 140422 002027 BGE 9$ - 110 140424 110046 MOVB R0,-(SP) - 111 140426 016700 140240' MOV BUFFER,R0 - 112 140432 066700 140242' ADD LENGTH,R0 - 113 140436 112610 MOVB (SP)+,(R0) - 114 140440 005267 140242' INC LENGTH - 115 140444 000416 BR 9$ - 116 - 117 140446 016700 140240' 7$: MOV BUFFER,R0 - 118 140452 066700 140242' ADD LENGTH,R0 - 119 140456 105010 CLRB (R0) - 120 140460 012737 140506 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 - 121 140466 012737 000100 000242 MOV #100,@#242 - 122 140474 012737 002000 177772 MOV #2000,@#177772 - 123 140502 012600 9$: MOV (SP)+,R0 - 124 140504 000002 RTI - 125 - 126 CMD: ; 140506 - 127 140506 005037 177772 CLR @#177772 ; NO MORE PIR CALLS - 128 140512 010046 MOV R0,-(SP) - 129 140514 010146 MOV R1,-(SP) - 130 140516 010246 MOV R2,-(SP) - 131 140520 010346 MOV R3,-(SP) - 132 140522 010446 MOV R4,-(SP) - 133 140524 012700 141034 MOV #EOL,R0 - 134 140530 004767 140150' JSR PC,PRINT - 135 140534 132737 000100 177564 1$: BITB #100,@#177564 - 136 140542 001374 BNE 1$ - 137 140544 005004 CLR R4 - 138 140546 012703 141043 MOV #CMDLST,R3 ; CMD LIST - 139 140552 112300 3$: MOVB (R3)+,R0 - 140 140554 001431 BEQ 13$ - 141 140556 016702 140240' MOV BUFFER,R2 ; USER CMD - 142 140562 112201 4$: MOVB (R2)+,R1 - 143 140564 001431 BEQ 15$ ; NULL COMMAND? - 144 140566 120127 000040 CMPB R1,#40 - 145 140572 001773 BEQ 4$ ; SKIP SPACE - 146 140574 120001 5$: CMPB R0,R1 - 147 140576 001010 BNE 7$ - 148 140600 112300 MOVB (R3)+,R0 - 149 140602 001412 BEQ 9$ - 150 140604 112201 MOVB (R2)+,R1 - 151 140606 001410 BEQ 9$ - 152 140610 120127 000040 CMPB R1,#40 - 153 140614 001367 BNE 5$ - 154 140616 000404 BR 9$ - 155 140620 112300 7$: MOVB (R3)+,R0 - 156 140622 001376 BNE 7$ - 157 140624 005204 INC R4 - 158 140626 000751 BR 3$ - 159 140630 006304 9$: ASL R4 - 160 140632 004774 140700 JSR PC,@CMDTBL(R4) ; EXECUTE - 161 140636 000404 BR 15$ - 162 - 163 140640 012700 141077 13$: MOV #UNKMSG,R0 - 164 140644 004767 140150' JSR PC,PRINT - 165 - 166 140650 005067 140242' 15$: CLR LENGTH - 167 140654 012700 141254 MOV #PROMPT,R0 - 168 140660 004767 140150' JSR PC,PRINT - 169 140664 012604 MOV (SP)+,R4 - 170 140666 012603 MOV (SP)+,R3 - 171 140670 012602 MOV (SP)+,R2 - 172 140672 012601 MOV (SP)+,R1 - 173 140674 012600 MOV (SP)+,R0 - 174 140676 000002 RTI - 175 - 176 - 177 140700 142154 141350 141364 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP - 140706 141470 141336 - 178 140712 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> - 140715 115 101 116 - 140720 104 123 040 - 140723 101 122 105 - 140726 040 102 117 - 140731 117 124 054 - 140734 040 110 101 - 140737 114 124 054 - 140742 040 114 111 - 140745 107 110 124 - 140750 123 054 040 - 140753 124 105 123 - 140756 124 040 101 - 140761 116 104 040 - 140764 110 105 114 - 140767 120 015 012 - 140772 102 117 117 - 140775 124 040 104 - 141000 105 126 111 - 141003 103 105 123 - 141006 040 101 122 - 141011 105 040 122 - 141014 113 077 040 - 141017 122 114 077 - 141022 040 117 122 - 141025 040 122 120 - 141030 077 015 012 - 141033 000 - 179 141034 015 012 000 EOL: .BYTE 15,12,0 - 180 141037 010 040 010 DEL: .BYTE 10,40,10,0 - 141042 000 - 181 141043 102 117 117 CMDLST: .ASCIZ 'BOOT' - 141046 124 000 - 182 141050 110 101 114 .ASCIZ 'HALT' - 141053 124 000 - 183 141055 124 105 123 .ASCIZ 'TEST' - 141060 124 000 - 184 141062 114 111 107 .ASCIZ 'LIGHTS' - 141065 110 124 123 - 141070 000 - 185 141071 110 105 114 .ASCIZ 'HELP' - 141074 120 000 - 186 141076 000 .BYTE 0 - 187 141077 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> - 141102 116 117 127 - 141105 116 040 103 - 141110 117 115 115 - 141113 101 116 104 - 141116 012 015 000 - 188 141121 120 104 120 BANNER: .ASCIZ 'PDP-11 BOOT TEST FOR PDPjs'<12><15>'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> - 141124 055 061 061 - 141127 040 102 117 - 141132 117 124 040 - 141135 124 105 123 - 141140 124 040 106 - 141143 117 122 040 - 141146 120 104 120 - 141151 152 163 012 - 141154 015 101 104 - 141157 101 120 124 - 141162 105 104 040 - 141165 106 122 117 - 141170 115 040 103 - 141173 117 104 105 - 141176 040 102 131 - 141201 040 120 101 - 141204 125 114 040 - 141207 116 101 116 - 141212 113 105 122 - 141215 126 111 123 - 141220 040 074 120 - 141223 101 125 114 - 141226 116 101 116 - 141231 113 100 110 - 141234 117 124 115 - 141237 101 111 114 - 141242 056 103 117 - 141245 115 076 012 - 141250 015 012 015 - 141253 000 - 189 141254 102 117 117 PROMPT: .ASCIZ 'BOOT> ' - 141257 124 076 040 - 141262 000 - 190 141263 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> - 141266 116 117 127 - 141271 116 040 102 - 141274 117 117 124 - 141277 040 104 105 - 141302 126 111 103 - 141305 105 012 015 - 141310 000 - 191 141311 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> - 141314 040 040 040 - 141317 103 114 117 - 141322 103 113 040 - 141325 124 111 103 - 141330 113 123 012 - 141333 015 000 - 192 - 193 141335 000 .EVEN - 194 - 195 HELP: ; 141244 - 196 141336 012700 140712 MOV #HLPMSG,R0 - 197 141342 004767 140150' JSR PC,PRINT - 198 141346 000207 RTS PC - 199 - 200 HALT: ; 141260 - 201 141350 000000 HALT - 202 141352 012700 141034 MOV #EOL,R0 - 203 141356 004767 140150' JSR PC,PRINT - 204 141362 000207 RTS PC - 205 - 206 TEST: ; 141272 - 207 141364 005067 140122' CLR CLKTIC - 208 - 209 141370 012705 015000 MOV #15000,R5 - 210 141374 010537 177570 10$: MOV R5,@#177570 ; DISPLAY - 211 141400 010504 MOV R5,R4 - 212 141402 006204 ASR R4 - 213 141404 005000 15$: CLR R0 - 214 141406 010501 MOV R5,R1 - 215 141410 071004 DIV R4,R0 - 216 141412 010002 MOV R0,R2 - 217 141414 070204 MUL R4,R2 - 218 141416 060301 ADD R3,R1 - 219 141420 020105 CMP R1,R5 - 220 141422 001401 BEQ 20$ - 221 141424 000000 HALT - 222 141426 077412 20$: SOB R4,15$ - 223 141430 077517 SOB R5,10$ - 224 - 225 141432 012700 141316 MOV #PERMSG+5,R0 - 226 141436 016703 140122' MOV CLKTIC,R3 - 227 - 228 141442 005002 25$: CLR R2 ; 141350 - 229 141444 071227 000010 DIV #10,R2 - 230 141450 062703 000060 ADD #'0,R3 - 231 141454 110340 MOVB R3,-(R0) - 232 141456 010203 MOV R2,R3 - 233 141460 001370 BNE 25$ - 234 - 235 141462 004767 140150' JSR PC,PRINT - 236 141466 000207 RTS PC - 237 - 238 - 239 177572 MMR0=177572 - 240 177574 MMR1=177574 - 241 177576 MMR2=177576 - 242 172516 MMR3=172516 - 243 - 244 LIGHTS: ; 141376 - 245 141470 012703 077406 MOV #77406,R3 ; DEFAULT PDR - 246 141474 005002 CLR R2 - 247 141476 005001 CLR R1 - 248 141500 012700 000010 MOV #8.,R0 - 249 141504 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR - 250 141510 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR - 251 141514 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR - 252 141520 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR - 253 141524 010361 172200 MOV R3,172200(R1) ; SUPER I PDR - 254 141530 010261 172240 MOV R2,172240(R1) ; SUPER I PAR - 255 141534 010361 172220 MOV R3,172220(R1) ; SUPER D PDR - 256 141540 010261 172260 MOV R2,172260(R1) ; SUPER D PAR - 257 141544 010361 177600 MOV R3,177600(R1) ; USER I PDR - 258 141550 010261 177640 MOV R2,177640(R1) ; USER I PAR - 259 141554 010361 177620 MOV R3,177620(R1) ; USER D PDR - 260 141560 010361 177660 MOV R3,177660(R1) ; USER D PAR - 261 141564 062702 000200 ADD #200,R2 - 262 141570 062701 000002 ADD #2,R1 - 263 141574 077035 SOB R0,1$ - 264 141576 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE - 265 141604 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE - 266 141612 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE - 267 141620 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT - 268 141626 012737 000001 177572 MOV #1,@#MMR0 - 269 - 270 141634 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 - 271 141642 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 - 272 141650 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER - 273 - 274 141656 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS - 275 141662 012702 141710 MOV #SUPERS,R2 ; ADDRESS SUPER CODE - 276 141666 012246 10$: MOV (R2)+,-(SP) - 277 141670 006623 MTPI (R3)+ - 278 141672 020227 142154 CMP R2,#SUPERE - 279 141676 103773 BLO 10$ - 280 - 281 141700 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK - 282 141706 000207 RTS PC - 283 - 284 ; - 285 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 - 286 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS - 287 ; - 288 SUPERS: ; 141616 - 289 141710 012700 000037 MOV #37,R0 ; LOAD PATTERN - 290 141714 012701 174000 MOV #174000,R1 - 291 141720 032737 000001 177570 BIT #1,@#177570 - 292 141726 001414 BEQ 10$ - 293 141730 012700 007417 MOV #7417,R0 - 294 141734 010001 MOV R0,R1 - 295 141736 005101 COM R1 - 296 141740 032737 000002 177570 BIT #2,@#177570 - 297 141746 001404 BEQ 10$ - 298 141750 012700 036163 MOV #36163,R0 - 299 141754 012701 037000 MOV #37000,R1 - 300 141760 010102 10$: MOV R1,R2 - 301 141762 162702 000002 SUB #2,R2 - 302 141766 042702 000001 BIC #1,R2 ; WAIT ADDRESS - 303 141772 010203 MOV R2,R3 - 304 141774 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET - 305 142000 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT - 306 142006 062703 000002 ADD #2,R3 - 307 142012 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) - 308 - 309 142020 010204 MOV R2,R4 - 310 142022 072427 177772 ASH #-6,R4 - 311 142026 042704 177600 BIC #177600,R4 - 312 142032 012705 001700 MOV #1700,R5 - 313 142036 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT - 314 142040 010204 MOV R2,R4 - 315 142042 072427 177764 ASH #-12.,R4 - 316 142046 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET - 317 142052 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE - 318 - 319 142056 010103 MOV R1,R3 - 320 142060 072327 177764 ASH #-12.,R3 - 321 142064 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET - 322 142070 020304 CMP R3,R4 ; SAME PAR - 323 142072 001412 BEQ 30$ - 324 142074 010104 MOV R1,R4 - 325 142076 072427 177772 ASH #-6,R4 - 326 142102 042704 177600 BIC #177600,R4 - 327 142106 012705 001700 MOV #1700,R5 - 328 142112 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP - 329 142114 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE - 330 30$: - 331 142120 012704 000003 MOV #3,R4 - 332 142124 063704 177570 ADD @#177570,R4 - 333 142130 012703 000002 MOV #2,R3 - 334 142134 060703 ADD PC,R3 - 335 142136 000112 40$: JMP (R2) - 336 142140 077402 SOB R4,40$ - 337 142142 010002 MOV R0,R2 - 338 142144 006002 ROR R2 ; ROTATE PATTERN - 339 142146 006101 ROL R1 - 340 142150 006000 ROR R0 - 341 142152 000702 BR 10$ - 342 SUPERE: - 343 - 344 BOOT: ; 142062 - 345 142154 005003 CLR R3 ; UNIT - 346 142156 112201 1$: MOVB (R2)+,R1 - 347 142160 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 - 348 142162 120127 000040 CMPB R1,#40 - 349 142166 001773 BEQ 1$ - 350 142170 120127 000122 CMPB R1,#'R - 351 142174 001405 BEQ 5$ - 352 - 353 142176 012700 141263 MOV #BADBOO,R0 - 354 142202 004767 140150' JSR PC,PRINT - 355 142206 000207 RTS PC - 356 - 357 142210 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P - 358 142212 112200 7$: MOVB (R2)+,R0 ; DIGIT - 359 142214 001416 BEQ 9$ - 360 142216 120027 000040 CMPB R0,#40 - 361 142222 001413 BEQ 9$ - 362 142224 120027 000067 CMPB R0,#'7 - 363 142230 003031 BGT 11$ - 364 142232 162700 000060 SUB #'0,R0 - 365 142236 002426 BLT 11$ - 366 142240 006303 ASL R3 - 367 142242 006303 ASL R3 - 368 142244 006303 ASL R3 - 369 142246 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT - 370 142250 000760 BR 7$ - 371 142252 005002 9$: CLR R2 - 372 142254 012722 000137 MOV #137,(R2)+ - 373 142260 012722 140000 MOV #START,(R2)+ - 374 142264 012722 140000 MOV #START,(R2)+ - 375 142270 005022 CLR (R2)+ - 376 142272 120127 000113 CMPB R1,#'K - 377 142276 001476 BEQ BOOTRK - 378 142300 120127 000114 CMPB R1,#'L - 379 142304 001410 BEQ BOOTRL - 380 142306 120127 000120 CMPB R1,#'P - 381 142312 001517 BEQ BOOTRP - 382 - 383 142314 012700 141077 11$: MOV #UNKMSG,R0 - 384 142320 004767 140150' JSR PC,PRINT - 385 142324 000207 RTS PC - 386 - 387 174400 RLCS=174400 - 388 BOOTRL: ; 142234 - 389 142326 000005 RESET - 390 142330 000303 SWAB R3 ; UNIT NUMBER - 391 142332 012701 174400 MOV #RLCS,R1 ; CSR - 392 142336 012761 000013 000004 MOV #13,4(R1) ; CLR ERR - 393 142344 052703 000004 BIS #4,R3 ; UNIT+GSTAT - 394 142350 010311 MOV R3,(R1) ; ISSUE CMD - 395 142352 105711 TSTB (R1) ; WAIT - 396 142354 100376 BPL .-2 - 397 142356 105003 CLRB R3 - 398 142360 052703 000010 BIS #10,R3 ; UNIT+RDHDR - 399 142364 010311 MOV R3,(R1) ; ISSUE CMD - 400 142366 105711 TSTB (R1) ; WAIT - 401 142370 100376 BPL .-2 - 402 142372 016102 000006 MOV 6(R1),R2 ; GET HDR - 403 142376 042702 000077 BIC #77,R2 ; CLR SECTOR - 404 142402 005202 INC R2 ; MAGIC BIT - 405 142404 010261 000004 MOV R2,4(R1) ; SEEK TO 0 - 406 142410 105003 CLRB R3 - 407 142412 052703 000006 BIS #6,R3 ; UNIT+SEEK - 408 142416 010311 MOV R3,(R1) ; ISSUE CMD - 409 142420 105711 TSTB (R1) ; WAIT - 410 142422 100376 BPL .-2 - 411 142424 005061 000002 CLR 2(R1) ; CLR BA - 412 142430 005061 000004 CLR 4(R1) ; CLR DA - 413 142434 012761 177000 000006 MOV #-512.,6(R1) ; SET WC - 414 142442 105003 CLRB R3 - 415 142444 052703 000014 BIS #14,R3 ; UNIT+READ - 416 142450 010311 MOV R3,(R1) ; ISSUE CMD - 417 142452 105711 TSTB (R1) ; WAIT - 418 142454 100376 BPL .-2 - 419 142456 042711 000377 BIC #377,(R1) - 420 142462 005002 CLR R2 - 421 142464 005003 CLR R3 - 422 142466 005004 CLR R4 - 423 142470 005005 CLR R5 - 424 142472 005007 CLR PC - 425 - 426 177412 RKDA=177412 - 427 000005 READGO=5 - 428 BOOTRK: - 429 142474 000005 RESET ; 142402 - 430 142476 000303 SWAB R3 ; UNIT NUMBER - 431 142500 006303 ASL R3 - 432 142502 006303 ASL R3 - 433 142504 006303 ASL R3 - 434 142506 006303 ASL R3 - 435 142510 006303 ASL R3 - 436 142512 012701 177412 MOV #RKDA,R1 ; CSR - 437 142516 010311 MOV R3,(R1) ; LOAD DA - 438 142520 005041 CLR -(R1) ; CLEAR BA - 439 142522 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC - 440 142526 012741 000005 MOV #READGO,-(R1) ; READ & GO - 441 142532 005002 CLR R2 - 442 142534 005003 CLR R3 - 443 142536 005004 CLR R4 - 444 142540 005005 CLR R5 - 445 142542 105711 TSTB (R1) - 446 142544 100376 BPL .-2 - 447 142546 105011 CLRB (R1) - 448 142550 005007 CLR PC - 449 - 450 176700 RPCSR=0176700 - 451 BOOTRP: ; 142460 - 452 142552 000005 RESET - 453 142554 012701 176700 MOV #RPCSR, R1 - 454 142560 012761 000040 000010 MOV #0000040, 10(R1) ; RESET - 455 142566 010361 000010 MOV R3, 10(R1) ; SET UNIT - 456 142572 012711 000021 MOV #0000021, (R1) ; PACK ACK - 457 142576 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE - 458 142604 012761 177000 000002 MOV #-512., 2(R1) ; SET WC - 459 142612 005061 000004 CLR 4(R1) ; CLR BA - 460 142616 005061 000006 CLR 6(R1) ; CLR DA - 461 142622 005061 000034 CLR 34(R1) ; CLR CYL - 462 142626 012711 000071 MOV #0000071, (R1) ; READ - 463 142632 105711 TSTB (R1) ; WAIT - 464 142634 100376 BPL .-2 - 465 142636 105011 CLRB (R1) - 466 142640 010300 MOV R3,R0 - 467 142642 005007 CLR PC - 468 - 469 .END START - 469 diff --git a/apps/pdp11/boot/test/makefile b/apps/pdp11/boot/test/makefile deleted file mode 100644 index 6d6b10b83..000000000 --- a/apps/pdp11/boot/test/makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Don't have macro11? Make yourself a copy from https://github.com/shattered/macro11 -# - -all: BOOTTEST.json - -BOOTTEST.lst: BOOTTEST.mac - macro11 BOOTTEST.mac -l BOOTTEST.lst - -BOOTTEST.json: BOOTTEST.lst - node ../../../../modules/filedump/bin/filedump --file=BOOTTEST.lst --format=octal --output=BOOTTEST.json --overwrite diff --git a/devices/pdp11/machine/1120/README.md b/devices/pdp11/machine/1120/README.md index 976f08c2d..5a9fb9200 100644 --- a/devices/pdp11/machine/1120/README.md +++ b/devices/pdp11/machine/1120/README.md @@ -9,7 +9,7 @@ PDP-11/20 Machine Configurations PDPjs is currently being tested with the following PDP-11/20 machine configurations: -* [PDP-11/20 Boot Test](/devices/pdp11/machine/1120/test/) (with [Debugger](/devices/pdp11/machine/1120/test/debugger/)) +* [PDP-11/20 Boot Monitor](/devices/pdp11/machine/1120/monitor/) (with [Debugger](/devices/pdp11/machine/1120/monitor/debugger/)) * [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) (with [Debugger](/devices/pdp11/machine/1120/bootstrap/debugger/)) * [PDP-11/20 BASIC Demo](/devices/pdp11/machine/1120/basic/) (with [Debugger](/devices/pdp11/machine/1120/basic/debugger/)) diff --git a/devices/pdp11/machine/1120/monitor/README.md b/devices/pdp11/machine/1120/monitor/README.md new file mode 100644 index 000000000..8c9ef5c2b --- /dev/null +++ b/devices/pdp11/machine/1120/monitor/README.md @@ -0,0 +1,19 @@ +--- +layout: page +title: PDP-11/20 Boot Monitor +permalink: /devices/pdp11/machine/1120/monitor/ +machines: + - id: test1120 + type: pdp11 +--- + +PDP-11/20 Boot Monitor +---------------------- + +The machine below pre-loads the [PDP-11 Boot Monitor](/apps/pdp11/boot/monitor/) into RAM: + + + +{% include machine.html id="test1120" %} + +This machine is also available with our built-in [Debugger](debugger/). diff --git a/devices/pdp11/machine/1120/monitor/debugger/README.md b/devices/pdp11/machine/1120/monitor/debugger/README.md new file mode 100644 index 000000000..8dafedd2f --- /dev/null +++ b/devices/pdp11/machine/1120/monitor/debugger/README.md @@ -0,0 +1,18 @@ +--- +layout: page +title: PDP-11/20 Boot Monitor with Debugger +permalink: /devices/pdp11/machine/1120/monitor/debugger/ +machines: + - id: test1120 + type: pdp11 + debugger: true +--- + +PDP-11/20 Boot Monitor (with Debugger) +-------------------------------------- + +The machine below pre-loads the [PDP-11 Boot Monitor](/apps/pdp11/boot/monitor/) into RAM: + + + +{% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/test/debugger/machine.xml b/devices/pdp11/machine/1120/monitor/debugger/machine.xml similarity index 85% rename from devices/pdp11/machine/1120/test/debugger/machine.xml rename to devices/pdp11/machine/1120/monitor/debugger/machine.xml index 962d05944..57fb4c4c5 100644 --- a/devices/pdp11/machine/1120/test/debugger/machine.xml +++ b/devices/pdp11/machine/1120/monitor/debugger/machine.xml @@ -1,10 +1,10 @@ - PDP-11/20 Boot Test with 56Kb and Debugger + PDP-11/20 Boot Monitor with 56Kb and Debugger - + diff --git a/devices/pdp11/machine/1120/test/machine.xml b/devices/pdp11/machine/1120/monitor/machine.xml similarity index 86% rename from devices/pdp11/machine/1120/test/machine.xml rename to devices/pdp11/machine/1120/monitor/machine.xml index 5a1cc1100..3d9507d3e 100644 --- a/devices/pdp11/machine/1120/test/machine.xml +++ b/devices/pdp11/machine/1120/monitor/machine.xml @@ -1,10 +1,10 @@ - PDP-11/20 Boot Test with 56Kb + PDP-11/20 Boot Monitor with 56Kb - + diff --git a/devices/pdp11/machine/1120/test/README.md b/devices/pdp11/machine/1120/test/README.md deleted file mode 100644 index 7362eb869..000000000 --- a/devices/pdp11/machine/1120/test/README.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: page -title: PDP-11/20 Boot Test -permalink: /devices/pdp11/machine/1120/test/ -machines: - - id: test1120 - type: pdp11 ---- - -PDP-11/20 Boot Test -------------------- - -The machine below pre-loads the [PDP-11 Boot Test](/apps/pdp11/boot/test/) code into RAM: - - - -{% include machine.html id="test1120" %} - -This machine is also available with our built-in [Debugger](debugger/). diff --git a/devices/pdp11/machine/1120/test/debugger/README.md b/devices/pdp11/machine/1120/test/debugger/README.md deleted file mode 100644 index 4d7fcbdee..000000000 --- a/devices/pdp11/machine/1120/test/debugger/README.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: page -title: PDP-11/20 Boot Test with Debugger -permalink: /devices/pdp11/machine/1120/test/debugger/ -machines: - - id: test1120 - type: pdp11 - debugger: true ---- - -PDP-11/20 Boot Test (with Debugger) ------------------------------------ - -The machine below pre-loads the [PDP-11 Boot Test](/apps/pdp11/boot/test/) code into RAM: - - - -{% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1170/README.md b/devices/pdp11/machine/1170/README.md index f345f9388..1fb225e9a 100644 --- a/devices/pdp11/machine/1170/README.md +++ b/devices/pdp11/machine/1170/README.md @@ -9,7 +9,7 @@ PDP-11/70 Machine Configurations PDPjs is currently being tested with the following PDP-11/70 machine configurations: -* [PDP-11/70 Boot Test](/devices/pdp11/machine/1170/test/) (with [Debugger](/devices/pdp11/machine/1170/test/debugger/)) +* [PDP-11/70 Boot Monitor](/devices/pdp11/machine/1170/monitor/) (with [Debugger](/devices/pdp11/machine/1170/monitor/debugger/)) * [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel) (with [Debugger](/devices/pdp11/machine/1170/panel/debugger/)) * [PDP-11/70 "Server Array"](/devices/pdp11/machine/1170/array/) * [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/) (with [Debugger](/devices/pdp11/machine/1170/vt100/debugger/)) diff --git a/devices/pdp11/machine/1170/test/README.md b/devices/pdp11/machine/1170/monitor/README.md similarity index 69% rename from devices/pdp11/machine/1170/test/README.md rename to devices/pdp11/machine/1170/monitor/README.md index 8d8d98787..0d51dee37 100644 --- a/devices/pdp11/machine/1170/test/README.md +++ b/devices/pdp11/machine/1170/monitor/README.md @@ -1,7 +1,7 @@ --- layout: page -title: PDP-11/70 Boot Test -permalink: /devices/pdp11/machine/1170/test/ +title: PDP-11/70 Boot Monitor +permalink: /devices/pdp11/machine/1170/monitor/ machines: - id: test1170 type: pdp11 diff --git a/devices/pdp11/machine/1170/test/debugger/README.md b/devices/pdp11/machine/1170/monitor/debugger/README.md similarity index 55% rename from devices/pdp11/machine/1170/test/debugger/README.md rename to devices/pdp11/machine/1170/monitor/debugger/README.md index ece24b397..0dca71b9c 100644 --- a/devices/pdp11/machine/1170/test/debugger/README.md +++ b/devices/pdp11/machine/1170/monitor/debugger/README.md @@ -1,7 +1,7 @@ --- layout: page -title: PDP-11/70 Boot Test with Debugger -permalink: /devices/pdp11/machine/1170/test/debugger/ +title: PDP-11/70 Boot Monitor with Debugger +permalink: /devices/pdp11/machine/1170/monitor/debugger/ machines: - id: test1170 type: pdp11 diff --git a/devices/pdp11/machine/1170/test/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml similarity index 88% rename from devices/pdp11/machine/1170/test/debugger/machine.xml rename to devices/pdp11/machine/1170/monitor/debugger/machine.xml index 7f7edaa71..339ea4f59 100644 --- a/devices/pdp11/machine/1170/test/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 Boot Test with Debugger + PDP-11/70 Boot Monitor with Debugger - + diff --git a/devices/pdp11/machine/1170/test/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml similarity index 88% rename from devices/pdp11/machine/1170/test/machine.xml rename to devices/pdp11/machine/1170/monitor/machine.xml index 11de545fe..a3add530a 100644 --- a/devices/pdp11/machine/1170/test/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -1,10 +1,10 @@ - PDP-11/70 Boot Test + PDP-11/70 Boot Monitor - + diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 45dc0237e..dcac05d60 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel and Debugger - + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index b0ba7dc2f..4d1466a77 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index d6b697b9f..087a5e7ad 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 86b340930..3e8036ef2 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/devices/pdp11/panel/1170/debugger/README.md b/devices/pdp11/panel/1170/debugger/README.md new file mode 100644 index 000000000..bf57d0a36 --- /dev/null +++ b/devices/pdp11/panel/1170/debugger/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11/70 Control Panel with Debugger +permalink: /devices/pdp11/panel/1170/debugger/ +--- + +PDP-11/70 Control Panel with Debugger +------------------------------------- + +* [PDP-11/70 Front Panel with Debugger](front.xml) diff --git a/devices/pdp11/panel/test/README.md b/devices/pdp11/panel/test/README.md index 92b955810..b3620c2d2 100644 --- a/devices/pdp11/panel/test/README.md +++ b/devices/pdp11/panel/test/README.md @@ -8,3 +8,58 @@ PDP-11 Test Panels ------------------ * [Terminal Test Panel](terminal.xml) (with [Debugger](debugger/terminal.xml)) + +Toggle-Ins +---------- + +From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: + + There are several useful toggle-ins that are probably not very well known. They are as follows: + + Memory Management + + Use the following toggle-in to verify the correct operation of Memory Management Relocation. + + 200/012737 MOV #400,@#177572 (load maint. bit in MMRO) + 202/000400 + 204/177572 + 206/012737 MOV #070707,@#200 (move 070707 to virtual 200) + 210/070707 + 212/000200 + 214/000000 HLT + + 300/000300 Preset loc 300 to 300 + + 17772300/077406 Set Kernal I PDR 0 to R/W 4K page + 17772340/000001 Set Kernal I PAR 0 to (Base address 100) + + Load Address 200 + Start Display = 000216 (Halt@214) + Load Address 300 + Exam Display = 070707 ... Relocation works + + Unibus Map Checkout + + Use the following console operating procedure to verify the correct operation of the Unibus Map. + + Load Address 500 + Deposit 125252 Known Data + + Load Address 17000500 + Deposit 125252 Data Path Ok + + Load Address 17000700 + Deposit 070707 Known Data + + Load Address 17770202 Map register 0 Hi + Deposit 000000 Relocation constant + + Load Address 17770200 Map register 0 Lo + Deposit 000200 Relocation constant + + Load Address 17772516 MMR3 + Deposit 000040 Enable map + + Load address 17000500 Relocates to 700 + Examine 070707 ... Relocated ok diff --git a/devices/pdp11/panel/test/debugger/README.md b/devices/pdp11/panel/test/debugger/README.md new file mode 100644 index 000000000..0dd06573f --- /dev/null +++ b/devices/pdp11/panel/test/debugger/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11 Test Panel with Debugger +permalink: /devices/pdp11/panel/test/debugger/ +--- + +PDP-11 Test Panel with Debugger +------------------------------- + +* [Terminal Test Panel with Debugger](terminal.xml) diff --git a/devices/pdp11/rl11/README.md b/devices/pdp11/rl11/README.md index ea6cc8416..742167fb5 100644 --- a/devices/pdp11/rl11/README.md +++ b/devices/pdp11/rl11/README.md @@ -9,7 +9,7 @@ RL11 Disk Controller Machines containing the [RL11 Component](/modules/pdp11/lib/pc11.js) include: -- [PDP-11/70 Boot Test](/devices/pdp11/machine/1170/test/) (with [Debugger](/devices/pdp11/machine/1170/test/debugger/)) +- [PDP-11/70 Boot Monitor](/devices/pdp11/machine/1170/monitor/) (with [Debugger](/devices/pdp11/machine/1170/monitor/debugger/)) - [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) (with [Debugger](/devices/pdp11/machine/1170/panel/debugger/)) PCjs has archived a selection of [RL02K Disk Images](/disks/dec/rl02k/) for use by those machines, most of which are diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 3986084b0..feb47dcc3 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -84,39 +84,19 @@ function BusPDP11(parmsBus, cpu, dbg) this.realIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them /* - * Compute all BusPDP11 memory block parameters, based on the width of the bus. The entire - * address space is divided into blocks, using a block size that is (hopefully) appropriate to - * the bus width. The following table summarizes our (original) simplistic calculations: + * Compute all BusPDP11 memory block parameters now, based on the width of the bus. * - * Bus Width Block Shift Block Size - * --------- ----------- ---------- - * 16 bits (64Kb address space): 10 1Kb (64 maximum blocks) - * 18 bits (256Kb address space): 11 2Kb (128 maximum blocks) - * 20 bits (1Mb address space): 12 4Kb (256 maximum blocks) - * 22 bits (4Mb address space): 13 8Kb (512 maximum blocks) - * 24 bits (16Mb address space): 14 16Kb (1K maximum blocks) - * 32 bits (4Gb address space); 15 32Kb (128K maximum blocks) + * Note that all PCjs machines divide their address space into blocks, using a block size appropriate for + * the machine's bus width. This allows us to efficiently allocate the entire address space, by reusing blocks + * as appropriate, and to define to different address behaviors on a block-granular level. * - * The coarser block granularities (ie, 16Kb and 32Kb) may cause problems for certain RAM and/or ROM - * allocations that are contiguous but are allocated out of order, or that have different controller - * requirements. Your choices, for the moment, are either to ensure the allocations are performed in - * order, or to choose smaller nBlockShift values (at the expense of a generating a larger block array). + * For PDPjs machines, the ideal block size is 8Kb (IOPAGE_LENGTH), the size of the IOPAGE on all PDP-11 machines; + * as a result, our IOController functions assume that all incoming offsets are within a single 8Kb block. */ this.addrTotal = Math.pow(2, this.nBusWidth); this.nBusLimit = this.nBusMask = (this.addrTotal - 1) | 0; - - /* - * WARNING: Instead of dynamically calculating nBlockShift based on nBusWidth, as described above, we - * now force nBlockSize to IOPAGE_LENGTH, because that's what our IOController functions currently assume. - * - * this.nBlockShift = (this.nBusWidth >> 1) + 2; - * if (this.nBlockShift < 10) this.nBlockShift = 10; - * if (this.nBlockShift > 15) this.nBlockShift = 15; - * this.nBlockSize = 1 << this.nBlockShift; - */ this.nBlockSize = BusPDP11.IOPAGE_LENGTH; this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2) - this.nBlockLen = this.nBlockSize >> 2; this.nBlockLimit = this.nBlockSize - 1; this.nBlockTotal = (this.addrTotal / this.nBlockSize) | 0; @@ -209,8 +189,8 @@ BusPDP11.IOHANDLER = { /* * These are our custom IOController functions for all IOPAGE accesses. They look up the IOPAGE * offset in the aIOHandlers table, and if an entry exists, they use the appropriate IOHANDLER indexes - * (above) to locate the registered read/write handlers. If no handler is found, then unknownAccess() - * is called, triggering a trap -- unless traps are disabled because direct access was requested + * (above) to locate the registered read/write handlers. If no handler is found, then fault() will + * be called, triggering a trap -- unless traps are disabled because direct access was requested * (eg, by the Debugger). * * Handlers receive the original IOPAGE address that was used, although in most cases, it's ignored, @@ -282,7 +262,8 @@ BusPDP11.IOController = { } return b; } - b = bus.unknownAccess(addr, true); + bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_BYTE); + b = 0xff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -355,7 +336,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr, true, b); + bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_BYTE); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } @@ -387,7 +368,8 @@ BusPDP11.IOController = { } return w; } - w = bus.unknownAccess(addr, false); + bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_WORD); + w = 0xffff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -423,7 +405,7 @@ BusPDP11.IOController = { } return; } - bus.unknownAccess(addr, false, w); + bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_WORD); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } @@ -495,7 +477,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) BusPDP11.prototype.getControllerBuffer = function(addr) { /* - * No buffer is required for the IOPAGE; all accesses go to registered I/O handlers or to unknownAccess(). + * No buffer is required for the IOPAGE; all accesses go to registered I/O handlers or to fault(). */ return [null, 0]; }; @@ -539,30 +521,6 @@ BusPDP11.prototype.reset = function() this.setIOPageRange(16); }; -/** - * unknownAccess(addr, fByte, data) - * - * This is our default I/O handler, called when there's an IOPAGE access without a corresponding entry in aIOHandlers. - * - * @this {BusPDP11} - * @param {number} addr (ie, an IOPAGE address) - * @param {boolean} [fByte] (true if byte access, otherwise word) - * @param {number} [data] (undefined if read, otherwise write) - * @return {number} - */ -BusPDP11.prototype.unknownAccess = function(addr, fByte, data) -{ - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) { - this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true); - this.dbg.stopInstruction(); - } - if (!this.nDisableFaults) { - this.cpu.regErr |= PDP11.CPUERR.TIMEOUT; - this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); - } - return 0; -}; - /** * powerUp(data, fRepower) * @@ -910,13 +868,21 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type) */ BusPDP11.prototype.getByte = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByte(addr & this.nBlockLimit, addr); }; /** * getByteDirect(addr) * - * This is useful for the Debugger and other components that want to bypass getByte() breakpoint detection. + * This is useful for the Debugger and other components that want to access physical memory without side-effects. * * @this {BusPDP11} * @param {number} addr is a physical address @@ -940,6 +906,14 @@ BusPDP11.prototype.getByteDirect = function(addr) */ BusPDP11.prototype.getWord = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; if (!PDP11.WORDBUS && off == this.nBlockLimit) { @@ -982,6 +956,14 @@ BusPDP11.prototype.getWordDirect = function(addr) */ BusPDP11.prototype.setByte = function(addr, b) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByte(addr & this.nBlockLimit, b & 0xff, addr); }; @@ -1012,6 +994,14 @@ BusPDP11.prototype.setByteDirect = function(addr, b) */ BusPDP11.prototype.setWord = function(addr, w) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; if (!PDP11.WORDBUS && off == this.nBlockLimit) { @@ -1215,12 +1205,13 @@ BusPDP11.prototype.addIOTable = function(component, table) * Don't install (ie, ignore) handlers for I/O addresses that are defined with a model number * that is "greater than" than the current model. */ - if (afn[5] && afn[5] > this.cpu.model) continue; + if (afn[6] && afn[6] > this.cpu.model) continue; var fnReadByte = afn[0]? afn[0].bind(component) : null; var fnWriteByte = afn[1]? afn[1].bind(component) : null; var fnReadWord = afn[2]? afn[2].bind(component) : null; var fnWriteWord = afn[3]? afn[3].bind(component) : null; + var nRegs = afn[5] || 1; /* * As discussed in the IOController comments above, when handlers are being registered for the following @@ -1242,7 +1233,12 @@ BusPDP11.prototype.addIOTable = function(component, table) }(fnWriteWord); } } - this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]); + + var sReg = afn[4]; + for (var iReg = 0; iReg < nRegs; iReg++, addr += 2) { + if (sReg && nRegs > 1) sReg = afn[4] + iReg; + this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sReg); + } } }; @@ -1258,24 +1254,26 @@ BusPDP11.prototype.addResetHandler = function(fnReset) }; /** - * fault(addr, access) + * fault(addr, err, access) * - * Memory interface for signaling alignment errors, invalid memory + * Bus interface for signaling alignment errors, invalid memory, etc. * * @this {BusPDP11} * @param {number} addr + * @param {number} [err] * @param {number} [access] (for diagnostic purposes only) */ -BusPDP11.prototype.fault = function(addr, access) +BusPDP11.prototype.fault = function(addr, err, access) { + this.fFault = true; if (!this.nDisableFaults) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { this.dbg.printMessage("memory fault (" + access + ") on address " + this.dbg.toStrBase(addr), true, true); this.dbg.stopInstruction(); } + if (err) this.cpu.regErr |= err; this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); } - this.fFault = true; }; /** diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 344fb21f1..1cc7ca70d 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -200,7 +200,6 @@ CPUStatePDP11.prototype.initRegs = function() [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] // user 3 ]; this.unibusMap = [ // 32 unibus map registers - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; this.regsControl = [ // various control registers (177740-177756) we don't really care about @@ -242,10 +241,7 @@ CPUStatePDP11.prototype.resetRegs = function() this.regMMR3 = 0; // 172516 this.mmuEnable = 0; // MMU enabled for PDP11.ACCESS.READ or PDP11.ACCESS.WRITE this.mmuLastMode = 0; - this.mmuMask = 0x3ffff; - this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; - this.resetTriggers(); if (this.bus) this.setMemoryAccess(); @@ -359,13 +355,7 @@ CPUStatePDP11.prototype.setMMR3 = function(newMMR3) } if (this.regMMR3 != newMMR3) { this.regMMR3 = newMMR3; - if (newMMR3 & PDP11.MMR3.MMU_22BIT) { - this.mmuMask = 0x3fffff; - this.mmuMemorySize = BusPDP11.MAX_MEMORY; - } else { - this.mmuMask = 0x3ffff; - this.mmuMemorySize = BusPDP11.IOPAGE_18BIT; - } + this.mmuMask = (newMMR3 & PDP11.MMR3.MMU_22BIT)? 0x3fffff : 0x3ffff; this.setMemoryAccess(); } }; @@ -1242,24 +1232,45 @@ CPUStatePDP11.prototype.getTrapStatus = function() }; /** - * mapUnibus(unibusAddress) + * mapUnibus(addr) + * + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so if the UNIBUS relocation map is enabled, + * we must pass the lower 18 bits of that address through the map. + * + * Since mapUnibus() only looks at the low 18 bits of addr, there's no need to mask addr first. Note that + * if bits 13-17 are all set, then the 18-bit address points to the top 8Kb of its 256Kb range, and mapUnibus() + * will return addr unchanged, since it should already be pointing to the top 8Kb of the 4Mb 22-bit range. + * + * From the PDP-11/70 Handbook: + * + * On the 11/44 and 11/70, there are a total of 31 mapping registers for address relocation. Each register is + * composed of a double 16-bit PDP-11 word (in consecutive locations) that holds the 22-bit base address. These + * registers have UNIBUS addresses in the range 770200 to 770372. + * + * If the UNIBUS map relocation is not enabled, an incoming 18-bit UNIBUS address has 4 leading zeroes added for + * referencing a 22-bit physical address. The lower 18 bits are the same. No relocation is performed. + * + * If UNIBUS map relocation is enabled, the five high order bits of the UNIBUS address are used to select one of the + * 31 mapping registers. The low-order 13 bits of the incoming address are used as an offset from the base address + * contained in the 22-bit mapping register. To form the physical address, the 13 low-order bits of the UNIBUS + * address are added to 22 bits of the selected mapping register to produce the 22-bit physical address. The lowest + * order bit of all mapping registers is always a zero, since relocation is always on word boundaries. * * @this {CPUStatePDP11} - * @param {number} unibusAddress + * @param {number} addr * @return {number} */ -CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) +CPUStatePDP11.prototype.mapUnibus = function(addr) { - var idx = (unibusAddress >> 13) & 0x1f; + var idx = (addr >> 13) & 0x1f; if (idx < 31) { if (this.regMMR3 & PDP11.MMR3.UNIBUS_MAP) { - unibusAddress = (this.unibusMap[idx] + (unibusAddress & 0x1ffe)) & 0x3ffffe; - if (unibusAddress >= BusPDP11.IOPAGE_UNIBUS && unibusAddress < BusPDP11.IOPAGE_22BIT) this.panic(898); + addr = (this.unibusMap[idx] + (addr & 0x1ffe)) & 0x3ffffe; + if (addr >= BusPDP11.IOPAGE_UNIBUS && addr < BusPDP11.IOPAGE_22BIT) this.panic(898); } - } else { - unibusAddress |= BusPDP11.IOPAGE_22BIT; } - return unibusAddress; + return addr; }; /** @@ -1287,8 +1298,8 @@ CPUStatePDP11.prototype.mapUnibus = function(unibusAddress) * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 & above) * maps directly to UNIBUS space - including low memory. This doesn't appear to be particularly * useful as it restricts maximum system memory - although it does appear to allow software - * testing of the unibus map. This feature also appears to confuse some OSes which test consecutive - * memory locations to find maximum memory - and on a full memory system find themselves accessing + * testing of the unibus map. This feature also appears to confuse some OSes which test consecutive + * memory locations to find maximum memory -- and on a full memory system find themselves accessing * low memory again at high addresses. * * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 @@ -1318,26 +1329,6 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl pdr = this.mmuPDR[this.mmuMode][page]; physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask; - if (physicalAddress < this.mmuMemorySize) { - if ((physicalAddress & 1) && !(accessFlags & PDP11.ACCESS.BYTE)) { - this.regErr |= PDP11.CPUERR.ODDADDR; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.ODDMEMADDR); - } - } else { - if (!(this.regMMR3 & 0x10)) { - if (physicalAddress >= BusPDP11.IOPAGE_18BIT) physicalAddress |= BusPDP11.IOPAGE_22BIT; - } - if (physicalAddress < BusPDP11.IOPAGE_22BIT) { - if (physicalAddress >= BusPDP11.IOPAGE_UNIBUS) { - physicalAddress = this.mapUnibus(physicalAddress & 0x3ffff); // 18bit unibus space - } - if (physicalAddress >= this.mmuMemorySize && physicalAddress < BusPDP11.IOPAGE_22BIT) { - this.regErr |= PDP11.CPUERR.NOMEMORY; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOMEMORY); // KB11-EM does this after ABORT handling - KB11-CM before - } - } - } - switch (pdr & 0x7) { case 1: // read-only with trap errorMask = 0x1000; // MMU trap @@ -1365,18 +1356,19 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl } if ((pdr & 0x7f08) !== 0x7f00) { // skip checking most common case (hopefully) - if (pdr & 0x8) { // expand downwards + if (pdr & 0x8) { // expand downwards if (pdr & 0x7f00) { if ((virtualAddress & 0x1fc0) < ((pdr >> 2) & 0x1fc0)) { errorMask |= 0x4000; // page length error abort } } - } else { // expand upwards + } else { // expand upwards if ((virtualAddress & 0x1fc0) > ((pdr >> 2) & 0x1fc0)) { errorMask |= 0x4000; // page length error abort } } } + // aborts and traps: log FIRST trap and MOST RECENT abort this.mmuPDR[this.mmuMode][page] = pdr; @@ -1384,13 +1376,15 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl this.mmuLastMode = this.mmuMode; this.mmuLastPage = page; } + + var fTrap = false; if (errorMask) { if (errorMask & 0xe000) { if (this.trapPSW >= 0) errorMask |= 0x80; // Instruction complete if (!(this.regMMR0 & 0xe000)) { this.regMMR0 |= errorMask | (this.mmuLastMode << 5) | (this.mmuLastPage << 1); } - this.trap(PDP11.TRAP.MMU, PDP11.REASON.MAPERROR); + fTrap = true; } if (!(this.regMMR0 & 0xf000)) { //if (physicalAddress < 017772200 || physicalAddress > 017777677) { @@ -1401,6 +1395,9 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl } } } + if (fTrap) { // don't trap until the end, because it throws an exception + this.trap(PDP11.TRAP.MMU, PDP11.REASON.MAPERROR); + } } return physicalAddress; }; diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 86302edb3..50fa653d3 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -364,6 +364,7 @@ var PDP11 = { * For more details: https://github.com/google/closure-compiler/wiki/ECMAScript6 */ UNIBUS: { //16-bit 18-bit 22-bit Hex Description + UNIMAP: 0o170200, // UNIBUS Mapping Registers (0-31) 64 words (ends at 0o170372) SISDR0: 0o172200, // Supervisor I Space Descriptor Register 0 SISDR1: 0o172202, // Supervisor I Space Descriptor Register 1 SISDR2: 0o172204, // Supervisor I Space Descriptor Register 2 diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 141040188..3ddbd6331 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -321,6 +321,41 @@ DevicePDP11.prototype.updateConsoleMode = function() this.console.misc = (this.console.misc & ~7) | bit; }; +/** + * readUNIMAP(addr) + * + * NOTE: The UNIBUS map is 32 registers spread across 64 words, so we first calculate the word index. + * + * @this {DevicePDP11} + * @param {number} addr (eg, PDP11.UNIBUS.UNIMAP) + * @return {number} + */ +DevicePDP11.prototype.readUNIMAP = function(addr) +{ + var word = (addr >> 1) & 0x3f, reg = word >> 1; + var data = this.cpu.unibusMap[reg]; + return (word & 1)? (data >> 16) : (data & 0xffff); +}; + +/** + * writeUNIMAP(data, addr) + * + * NOTE: The UNIBUS map is 32 registers spread across 64 words, so we first calculate the word index. + * + * @this {DevicePDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.UNIMAP) + */ +DevicePDP11.prototype.writeUNIMAP = function(data, addr) +{ + var word = (addr >> 1) & 0x3f, reg = word >> 1; + if (word & 1) { + this.cpu.unibusMap[reg] = (this.cpu.unibusMap[reg] & 0xffff) | ((data & 0x003f) << 16); + } else { + this.cpu.unibusMap[reg] = (this.cpu.unibusMap[reg] & ~0xffff) | (data & 0xfffe); + } +}; + /** * readSISDR(addr) * @@ -1059,24 +1094,25 @@ DevicePDP11.prototype.writeIgnored = function(data, addr) * ES6 ALERT: As you can see below, I've finally started using computed property names. */ DevicePDP11.UNIBUS_IOTABLE = { - [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR", PDP11.MODEL_1145], - [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR", PDP11.MODEL_1145], - [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR", PDP11.MODEL_1145], - [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR", PDP11.MODEL_1145], - [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", PDP11.MODEL_1145], + [PDP11.UNIBUS.UNIMAP]: /* 170200 */ [null, null, DevicePDP11.prototype.readUNIMAP, DevicePDP11.prototype.writeUNIMAP, "UNIMAP", 64, PDP11.MODEL_1170], + [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.CNSL]: /* 177570 */ [null, null, DevicePDP11.prototype.readCNSL, DevicePDP11.prototype.writeCNSL, "CNSL"], - [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", PDP11.MODEL_1145], - [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", PDP11.MODEL_1145], - [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", PDP11.MODEL_1145], - [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR", PDP11.MODEL_1145], - [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR", PDP11.MODEL_1145], - [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR", PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR", 8, PDP11.MODEL_1145], [PDP11.UNIBUS.R0SET0]: /* 177700 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], [PDP11.UNIBUS.R1SET0]: /* 177701 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], [PDP11.UNIBUS.R2SET0]: /* 177702 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], @@ -1085,121 +1121,25 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.R5SET0]: /* 177705 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R5SET0"], [PDP11.UNIBUS.R6KERNEL]:/* 177706 */ [null, null, DevicePDP11.prototype.readR6KERNEL,DevicePDP11.prototype.writeR6KERNEL,"R6KERNEL"], [PDP11.UNIBUS.R7KERNEL]:/* 177707 */ [null, null, DevicePDP11.prototype.readR7KERNEL,DevicePDP11.prototype.writeR7KERNEL,"R7KERNEL"], - [PDP11.UNIBUS.R0SET1]: /* 177710 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R1SET1]: /* 177711 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R2SET1]: /* 177712 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R3SET1]: /* 177713 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R4SET1]: /* 177714 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1", PDP11.MODEL_1145], - [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER", PDP11.MODEL_1145], - [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER", PDP11.MODEL_1145], - [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", PDP11.MODEL_1170], - [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", PDP11.MODEL_1170], - [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", PDP11.MODEL_1170], - [PDP11.UNIBUS.SYSID]: /* 177764 */ [null, null, DevicePDP11.prototype.readSYSID, DevicePDP11.prototype.writeSYSID, "SYSID", PDP11.MODEL_1170], - [PDP11.UNIBUS.CPUERR]: /* 177766 */ [null, null, DevicePDP11.prototype.readCPUERR, DevicePDP11.prototype.writeCPUERR, "CPUERR", PDP11.MODEL_1170], - [PDP11.UNIBUS.MB]: /* 177770 */ [null, null, DevicePDP11.prototype.readMB, DevicePDP11.prototype.writeMB, "MB", PDP11.MODEL_1170], + [PDP11.UNIBUS.R0SET1]: /* 177710 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R0SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R1SET1]: /* 177711 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R1SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R2SET1]: /* 177712 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R2SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R3SET1]: /* 177713 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R3SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R4SET1]: /* 177714 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R4SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER", 1, PDP11.MODEL_1145], + [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.SYSID]: /* 177764 */ [null, null, DevicePDP11.prototype.readSYSID, DevicePDP11.prototype.writeSYSID, "SYSID", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.CPUERR]: /* 177766 */ [null, null, DevicePDP11.prototype.readCPUERR, DevicePDP11.prototype.writeCPUERR, "CPUERR", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.MB]: /* 177770 */ [null, null, DevicePDP11.prototype.readMB, DevicePDP11.prototype.writeMB, "MB", 1, PDP11.MODEL_1170], [PDP11.UNIBUS.PIR]: /* 177772 */ [null, null, DevicePDP11.prototype.readPIR, DevicePDP11.prototype.writePIR, "PIR"], [PDP11.UNIBUS.SL]: /* 177774 */ [null, null, DevicePDP11.prototype.readSL, DevicePDP11.prototype.writeSL, "SL"], [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"] }; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SISAR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.SDSAR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KISAR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.KDSAR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSDR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UISAR0]; - -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR3] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR4] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR5] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR6] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR7] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UDSAR0]; - DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.HAERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.MEMERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.CACHEC] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 132e41099..4282183f0 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -575,7 +575,9 @@ MemoryPDP11.prototype = { * * TODO: Determine if we should have separate readByteNone(), readWordNone() and readLongNone() functions * to return 0xff, 0xffff and 0xffffffff|0, respectively. This seems sufficient for now, as it seems unlikely - * that a system would require nonexistent memory locations to return ALL bits set. + * that a system would require nonexistent memory locations to return ALL bits set. However, another factor + * is whether or not ODDADDR faults take precedence over NOMEMORY faults; if they do, then we need separate + * interfaces. * * Also, I'm reluctant to address that potential issue by simply returning -1, because to date, the above * Memory interfaces have always returned values that are properly masked to 8, 16 or 32 bits, respectively. @@ -590,7 +592,7 @@ MemoryPDP11.prototype = { this.dbg.printMessage("attempt to read invalid address " + this.dbg.toStrBase(addr), true); this.dbg.stopInstruction(); } - this.bus.fault(addr, PDP11.ACCESS.READ); + this.bus.fault(addr, PDP11.CPUERR.NOMEMORY, PDP11.ACCESS.READ); return 0xff; }, /** @@ -606,7 +608,7 @@ MemoryPDP11.prototype = { this.dbg.printMessage("attempt to write " + this.dbg.toStrBase(v) + " to invalid addresses " + this.dbg.toStrBase(addr), true); this.dbg.stopInstruction(); } - this.bus.fault(addr, PDP11.ACCESS.WRITE); + this.bus.fault(addr, PDP11.CPUERR.NOMEMORY, PDP11.ACCESS.WRITE); }, /** * readWordDefault(off, addr) @@ -655,7 +657,7 @@ MemoryPDP11.prototype = { */ readWordMemory: function readWordMemory(off, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.READ_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.READ_WORD); } if (BYTEARRAYS) { return this.ab[off] | (this.ab[off + 1] << 8); @@ -699,7 +701,7 @@ MemoryPDP11.prototype = { */ writeWordMemory: function writeWordMemory(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.WRITE_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.WRITE_WORD); } if (BYTEARRAYS) { this.ab[off] = (w & 0xff); @@ -809,7 +811,7 @@ MemoryPDP11.prototype = { */ readWordBE: function readWordBE(off, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.READ_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.READ_WORD); } return this.dv.getUint16(off, true); }, @@ -824,7 +826,7 @@ MemoryPDP11.prototype = { readWordLE: function readWordLE(off, addr) { var w; if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.READ_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.READ_WORD); } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset @@ -877,7 +879,7 @@ MemoryPDP11.prototype = { */ writeWordBE: function writeWordBE(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.WRITE_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.WRITE_WORD); } this.dv.setUint16(off, w, true); this.fDirty = true; @@ -892,7 +894,7 @@ MemoryPDP11.prototype = { */ writeWordLE: function writeWordLE(off, w, addr) { if (PDP11.MEMFAULT && (off & 0x1)) { - this.bus.fault(addr, PDP11.ACCESS.WRITE_WORD); + this.bus.fault(addr, PDP11.CPUERR.ODDADDR, PDP11.ACCESS.WRITE_WORD); } /* * TODO: For non-WORDBUS machines, it remains to be seen if there's any advantage to checking the offset diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 3751c982d..1f07716ca 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -176,20 +176,20 @@ RAMPDP11.prototype.doneLoad = function(sURL, sData, nErrorCode) { if (nErrorCode) { this.notice("Unable to load RAM resource (error " + nErrorCode + ": " + sURL + ")"); - return; - } - - Component.addMachineResource(this.idMachine, sURL, sData); - - var resource = web.parseMemoryResource(sURL, sData); - if (resource) { - this.abInit = resource.aBytes; - this.aSymbols = resource.aSymbols; - if (this.addrLoad == null) this.addrLoad = resource.addrLoad; - if (this.addrExec == null) this.addrExec = resource.addrExec; - } else { this.sFilePath = null; } + else { + Component.addMachineResource(this.idMachine, sURL, sData); + var resource = web.parseMemoryResource(sURL, sData); + if (resource) { + this.abInit = resource.aBytes; + this.aSymbols = resource.aSymbols; + if (this.addrLoad == null) this.addrLoad = resource.addrLoad; + if (this.addrExec == null) this.addrExec = resource.addrExec; + } else { + this.sFilePath = null; + } + } this.initRAM(); }; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index bbea2da15..cd5c9db5e 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -856,7 +856,6 @@ RL11.prototype.initDrive = function(drive, iDrive, data) * The next group of properties are set by various controller command sequences. */ drive.bHead = 0; - drive.bCylinderSeek = 0; drive.bCylinder = 0; drive.bSector = 1; drive.bSectorEnd = drive.nSectors; // aka EOT @@ -1010,7 +1009,7 @@ RL11.prototype.readData = function(drive, iCylinder, iHead, iSector, nWords, add while (nWords--) { if (!sector) { - sector = drive.disk.seek(iCylinder, iHead, iSector, true); + sector = drive.disk.seek(iCylinder, iHead, iSector + 1); if (!sector) { err = PDP11.RL11.ERRC.HNF; break; @@ -1022,7 +1021,7 @@ RL11.prototype.readData = function(drive, iCylinder, iHead, iSector, nWords, add err = PDP11.RL11.ERRC.HNF; break; } - var data = this.bus.setWordDirect(this.cpu.mapUnibus(addr), b0 | (b1 << 8)); + var data = this.bus.setWord(addr, b0 | (b1 << 8)); if (this.bus.checkFault()) { err = PDP11.RL11.ERRC.NXM; break; @@ -1065,14 +1064,14 @@ RL11.prototype.writeData = function(drive, iCylinder, iHead, iSector, nWords, ad var sector = null, ibSector; while (nWords--) { - var data = this.bus.getWordDirect(this.cpu.mapUnibus(addr)); + var data = this.bus.getWord(addr); if (this.bus.checkFault()) { err = PDP11.RL11.ERRC.NXM; break; } addr += 2; if (!sector) { - sector = drive.disk.seek(iCylinder, iHead, iSector, true); + sector = drive.disk.seek(iCylinder, iHead, iSector + 1, true); if (!sector) { err = PDP11.RL11.ERRC.HNF; break; diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index 300387fbe..1d9204e18 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -191,18 +191,18 @@ ROMPDP11.prototype.doneLoad = function(sURL, sData, nErrorCode) { if (nErrorCode) { this.notice("Unable to load ROM resource (error " + nErrorCode + ": " + sURL + ")"); - return; - } - - Component.addMachineResource(this.idMachine, sURL, sData); - - var resource = web.parseMemoryResource(sURL, sData); - if (resource) { - this.abInit = resource.aBytes; - this.aSymbols = resource.aSymbols; - } else { this.sFilePath = null; } + else { + Component.addMachineResource(this.idMachine, sURL, sData); + var resource = web.parseMemoryResource(sURL, sData); + if (resource) { + this.abInit = resource.aBytes; + this.aSymbols = resource.aSymbols; + } else { + this.sFilePath = null; + } + } this.initROM(); }; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index f08225f4b..e7aa695e8 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -31,287 +31,283 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function l(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",n;for(n in b)b.hasOwnProperty(n)&&(m&&(m+="&"),m+=n+"="+encodeURIComponent(b[n]));m=m.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(m)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ha:null,Ha:null,Ga:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ha=g.load;d.Ga=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ha=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ha=g.load;d.Ga=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.cb=this.id:(this.Na=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Ua:!1,Wb:!1,ia:!1,error:!1};this.Ob=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;t.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function w(a,b){b||(b=r);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),t=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},t=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.cb=this.id:(this.Na=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Ua:!1,Xb:!1,ia:!1,error:!1};this.Nb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var ib,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;ib=kb.exec(ab);)bb[decodeURIComponent(ib[1].replace(jb," "))]=decodeURIComponent(ib[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.xa-1;this.F=this.J/this.xa|0;this.Ta=[];this.f=0;this.B=!1;this.C=[];this.Gc=[Sb,Tb,Ub,Vb];a=new I(this);Wb(a,this.i);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Yb(d,b,!0);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Tb(a,b,c){var d=!1,e=this.controller,f=e.Ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Yb(e,c,!0,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Ub(a,b){var c=-1,d=this.controller;(a=d.Ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;c=Yb(d,b,!1);this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Vb(a,b,c){var d=!1,e=this.controller;if(a=e.Ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(Yb(e,c,!1,b),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Zb(a,b){if(b!=a.v){var c;a.v&&(c=(1<>>a.la;0g&&(p=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.D)return m.Jb+=m.D-f,m.D=f,!0;if(f>=m.D+m.Jb){p=m.size-(f-n);p>g&&(p=g);m.Jb=f-m.D+p;f=n+a.xa;g-=p;h++;continue}}return ec(1,f,g)}f=new I(a,f,p,a.xa,d,e);Wb(f,a.i,m);a.W[h++]=f;f=n+a.xa;g-=p}if(0>=g){c/=1024;var u;e="";u?10>>=a.la;0>>=a.la;0>>this.la].Rb(a&this.w,a)};k.Pb=function(a){this.B=!1;this.f++;a=this.W[(a&this.g)>>>this.la].bc(a&this.w,a);this.f--;return a}; -k.pa=function(a){return this.W[(a&this.g)>>>this.la].ra(a&this.w,a)};k.ib=function(a){var b=a&this.w,c=(a&this.g)>>>this.la;this.B=!1;this.f++;a=this.W[c].cc(b,a);this.f--;return a};k.Sb=function(a,b){this.W[(a&this.g)>>>this.la].Ub(a&this.w,b&255,a)};k.kb=function(a,b){this.B=!1;this.f++;this.W[(a&this.g)>>>this.la].Vb(a&this.w,b&255,a);this.f--};k.mb=function(a,b){this.W[(a&this.g)>>>this.la].Kb(a&this.w,b&65535,a)}; -k.Ib=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.la;this.B=!1;this.f++;this.W[d].gc(c,b&65535,a);this.f--};function gc(a){for(var b=0,c=[],d=0;da.b.qb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));hc(a,e,e,g,h,m,n,f[4])}}}function jc(a,b){a.C.push(b)} -function kc(a,b,c){a.f||(a.i&&F(a.i,64)&&(E(a.i,"memory fault ("+c+") on address "+J(a.i,b),!0,!0),dc(a.i)),a.b.ka(4,b));a.B=!0}function lc(a){var b=a.B;a.B=!1;return b}function ec(a,b,c){q("Memory block error ("+a+": "+l(b)+","+l(c)+")");return!1}function K(a){r.call(this,"Device",a,K,256);this.g={data:0,Ce:0,Qb:20,Md:0};this.f={fa:0,fc:-1}}w(K);k=K.prototype; -k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.fc=mc(c,function(){e.f.Va|=128;e.f.Va&64&&(nc(e.b,e.f.Nd),oc(e.b,e.f.fc,1E3/60))});this.f.Nd=pc(64,6);ic(b,this,L);jc(b,this.reset.bind(this));G(this)};k.reset=function(){this.g.Qb=this.g.Qb&-120|20;this.f.Va=0};k.cd=function(){var a=this.f.Va;this.f.Va&=-129;return a};k.Xd=function(a){this.f.Va=a;a&64&&oc(this.b,this.f.fc,1E3/60);this.f.Va=a&-129};k.Vc=function(a){return(a?this.g.Md:this.g.data)&65535}; -k.Pd=function(a){this.g.data=a};k.ed=function(){var a=this.b;return a.C&62337|a.Ja<<5|a.Ka<<1};k.Zd=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ja=a>>5&3;b.Ka=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Wa!=c&&(b.Wa=c,qc(b))}rc(this)};k.fd=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.gd=function(){return this.b.Hb};k.hd=function(){return this.b.Za}; -k.$d=function(a){var b=this.b;1170>b.qb&&(a&=-49);b.Za!=a&&(b.Za=a,a&16?(b.Bb=4194303,b.eb=3915776):(b.Bb=262143,b.eb=253952),qc(b));rc(this)};function rc(a){a.g.Qb=a.g.Qb&-8|(a.b.Wa?a.b.Za&16?1:2:4)}k.Bd=function(a){return this.b.V[1][a>>1&7]};k.se=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.zd=function(a){return this.b.V[1][(a>>1&7)+8]};k.qe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ad=function(a){return this.b.wa[1][a>>1&7]}; -k.re=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.yd=function(a){return this.b.wa[1][(a>>1&7)+8]};k.pe=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.bd=function(a){return this.b.V[0][a>>1&7]};k.Wd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.$c=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ud=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ad=function(a){return this.b.wa[0][a>>1&7]};k.Vd=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; -k.Zc=function(a){return this.b.wa[0][(a>>1&7)+8]};k.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.Hd=function(a){return this.b.V[3][a>>1&7]};k.ye=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Fd=function(a){return this.b.V[3][(a>>1&7)+8]};k.we=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Gd=function(a){return this.b.wa[3][a>>1&7]};k.xe=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ed=function(a){return this.b.wa[3][(a>>1&7)+8]}; -k.ve=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.ub=function(a){a&=7;return this.b.M&2048?this.b.Ra[a]:this.b.u[a]};k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Ra[b]=a:this.b.u[b]=a};k.nd=function(){return this.b.M&49152?this.b.Fa[0]:this.b.u[6]};k.ee=function(a){this.b.M&49152?this.b.Fa[0]=a:this.b.u[6]=a};k.qd=function(){return this.b.u[7]};k.he=function(a){this.b.u[7]=a};k.vb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ra[a]}; -k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ra[b]=a};k.od=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[1]};k.fe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[1]=a};k.pd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[3]};k.ge=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[3]=a};k.Xc=function(a){return this.b.zc[a-65504>>1]};k.Rd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){}; -k.Dd=function(){return 1};k.ue=function(){};k.Wc=function(){return this.b.Z};k.Qd=function(){this.b.Z=0};k.dd=function(){return this.b.yc};k.Yd=function(a,b){b&1||(a&=255);this.b.yc=a};k.jd=function(a){return a?this.b.ec:0};k.ae=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ec=a;b.H|=2};k.Cd=function(a){return a?this.b.$a&65280:0};k.te=function(a){this.b.$a=a|255};k.md=function(){return Cb(this.b)};k.de=function(a){sc(this.b,a&-1809|Cb(this.b)&1808);this.b.H|=128}; +function Ab(a,b,c,d){if(a.G[b]){void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ja());var e=a.i&&a.i.Z||8;c=!a.b.A.ga||a.A.lc?8==e?ra(c,d):p(c,d):"--------".substr(0,d||4);a.G[b].textContent!=c&&(a.G[b].textContent=c)}}function Bb(a,b,c,d){for(var e=0;e>2;this.w=this.xa-1;this.F=this.J/this.xa|0;this.Ta=[];this.f=0;this.B=!1;this.C=[];this.Gc=[Sb,Tb,Ub,Vb];a=new I(this);Wb(a,this.i);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,3);c=255;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Tb(a,b,c){var d=!1,e=this.controller,f=e.Ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,5),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Ub(a,b){var c=-1,d=this.controller;(a=d.Ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,2);c=65535;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function Vb(a,b,c){var d=!1,e=this.controller;if(a=e.Ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,4),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function Yb(a,b){if(b!=a.v){var c;a.v&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.D)return l.Hb+=l.D-f,l.D=f,!0;if(f>=l.D+l.Hb){n=l.size-(f-m);n>g&&(n=g);l.Hb=f-l.D+n;f=m+a.xa;g-=n;h++;continue}}return cc(1,f,g)}f=new I(a,f,n,a.xa,d,e);Wb(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Rb(a&this.w,a)};k.Pb=function(a){this.B=!1;this.f++;a=this.W[(a&this.g)>>>this.ka].cc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=ec(this.b,a));return this.W[(a&this.g)>>>this.ka].ra(a&this.w,a)};k.pb=function(a){var b=a&this.w,c=(a&this.g)>>>this.ka;this.B=!1;this.f++;a=this.W[c].dc(b,a);this.f--;return a};k.Sb=function(a,b){3932160<=a&&(a=ec(this.b,a));this.W[(a&this.g)>>>this.ka].Vb(a&this.w,b&255,a)};k.jb=function(a,b){this.B=!1;this.f++;this.W[(a&this.g)>>>this.ka].Wb(a&this.w,b&255,a);this.f--}; +k.ab=function(a,b){3932160<=a&&(a=ec(this.b,a));this.W[(a&this.g)>>>this.ka].Ib(a&this.w,b&65535,a)};k.Tb=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.ka;this.B=!1;this.f++;this.W[d].hc(c,b&65535,a);this.f--};function fc(a){for(var b=0,c=[],d=0;da.b.qb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null,n=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var r=f[4],t=0;t>5&3;b.Ka=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Wa!=c&&(b.Wa=c,pc(b))}qc(this)};k.ed=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.fd=function(){return this.b.Fb};k.gd=function(){return this.b.ib};k.$d=function(a){var b=this.b;1170>b.qb&&(a&=-49);b.ib!=a&&(b.ib=a,b.Mb=a&16?4194303:262143,pc(b));qc(this)}; +function qc(a){a.g.Qb=a.g.Qb&-8|(a.b.Wa?a.b.ib&16?1:2:4)}k.Hd=function(a){a=a>>1&63;var b=this.b.Gb[a>>1];return a&1?b>>16:b&65535};k.ze=function(a,b){b=b>>1&63;var c=b>>1;this.b.Gb[c]=b&1?this.b.Gb[c]&65535|(a&63)<<16:this.b.Gb[c]&-65536|a&65534};k.Ad=function(a){return this.b.V[1][a>>1&7]};k.se=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.yd=function(a){return this.b.V[1][(a>>1&7)+8]};k.qe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.zd=function(a){return this.b.wa[1][a>>1&7]}; +k.re=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.xd=function(a){return this.b.wa[1][(a>>1&7)+8]};k.pe=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ad=function(a){return this.b.V[0][a>>1&7]};k.Wd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.Zc=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ud=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.$c=function(a){return this.b.wa[0][a>>1&7]};k.Vd=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; +k.Yc=function(a){return this.b.wa[0][(a>>1&7)+8]};k.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.Gd=function(a){return this.b.V[3][a>>1&7]};k.ye=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Ed=function(a){return this.b.V[3][(a>>1&7)+8]};k.we=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Fd=function(a){return this.b.wa[3][a>>1&7]};k.xe=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Dd=function(a){return this.b.wa[3][(a>>1&7)+8]}; +k.ve=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.ub=function(a){a&=7;return this.b.M&2048?this.b.Ra[a]:this.b.u[a]};k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Ra[b]=a:this.b.u[b]=a};k.md=function(){return this.b.M&49152?this.b.Fa[0]:this.b.u[6]};k.ee=function(a){this.b.M&49152?this.b.Fa[0]=a:this.b.u[6]=a};k.pd=function(){return this.b.u[7]};k.he=function(a){this.b.u[7]=a};k.vb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ra[a]}; +k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ra[b]=a};k.nd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[1]};k.fe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[1]=a};k.od=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[3]};k.ge=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[3]=a};k.Wc=function(a){return this.b.zc[a-65504>>1]};k.Rd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){}; +k.Cd=function(){return 1};k.ue=function(){};k.Vc=function(){return this.b.fa};k.Qd=function(){this.b.fa=0};k.cd=function(){return this.b.yc};k.Yd=function(a,b){b&1||(a&=255);this.b.yc=a};k.hd=function(a){return a?this.b.fc:0};k.ae=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.fc=a;b.H|=2};k.Bd=function(a){return a?this.b.Za&65280:0};k.te=function(a){this.b.Za=a|255};k.ld=function(){return Cb(this.b)};k.de=function(a){rc(this.b,a&-1809|Cb(this.b)&1808);this.b.H|=128}; k.Cc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[62592]=[null,null,K.prototype.Bd,K.prototype.se,"SISDR",1145],M[62608]=[null,null,K.prototype.zd,K.prototype.qe,"SDSDR",1145],M[62624]=[null,null,K.prototype.Ad,K.prototype.re,"SISAR",1145],M[62640]=[null,null,K.prototype.yd,K.prototype.pe,"SDSAR",1145],M[62656]=[null,null,K.prototype.bd,K.prototype.Wd,"KISDR",1145],M[62672]=[null,null,K.prototype.$c,K.prototype.Ud,"KDSDR",1145],M[62688]=[null,null,K.prototype.ad,K.prototype.Vd,"KISAR",1145],M[62704]=[null,null,K.prototype.Zc,K.prototype.Td, -"KDSAR",1145],M[62798]=[null,null,K.prototype.hd,K.prototype.$d,"MMR3",1145],M[65382]=[null,null,K.prototype.cd,K.prototype.Xd,"LKS"],M[65400]=[null,null,K.prototype.Vc,K.prototype.Pd,"CNSL"],M[65402]=[null,null,K.prototype.ed,K.prototype.Zd,"MMR0",1145],M[65404]=[null,null,K.prototype.fd,K.prototype.Cc,"MMR1",1145],M[65406]=[null,null,K.prototype.gd,K.prototype.Cc,"MMR2",1145],M[65408]=[null,null,K.prototype.Hd,K.prototype.ye,"UISDR",1145],M[65424]=[null,null,K.prototype.Fd,K.prototype.we,"UDSDR", -1145],M[65440]=[null,null,K.prototype.Gd,K.prototype.xe,"UISAR",1145],M[65456]=[null,null,K.prototype.Ed,K.prototype.ve,"UDSAR",1145],M[65472]=[null,null,K.prototype.ub,K.prototype.yb,"R0SET0"],M[65473]=[null,null,K.prototype.ub,K.prototype.yb,"R1SET0"],M[65474]=[null,null,K.prototype.ub,K.prototype.yb,"R2SET0"],M[65475]=[null,null,K.prototype.ub,K.prototype.yb,"R3SET0"],M[65476]=[null,null,K.prototype.ub,K.prototype.yb,"R4SET0"],M[65477]=[null,null,K.prototype.ub,K.prototype.yb,"R5SET0"],M[65478]= -[null,null,K.prototype.nd,K.prototype.ee,"R6KERNEL"],M[65479]=[null,null,K.prototype.qd,K.prototype.he,"R7KERNEL"],M[65480]=[null,null,K.prototype.vb,K.prototype.zb,"R0SET1",1145],M[65481]=[null,null,K.prototype.vb,K.prototype.zb,"R1SET1",1145],M[65482]=[null,null,K.prototype.vb,K.prototype.zb,"R2SET1",1145],M[65483]=[null,null,K.prototype.vb,K.prototype.zb,"R3SET1",1145],M[65484]=[null,null,K.prototype.vb,K.prototype.zb,"R4SET1",1145],M[65485]=[null,null,K.prototype.vb,K.prototype.zb,"R5SET1",1145], -M[65486]=[null,null,K.prototype.od,K.prototype.fe,"R6SUPER",1145],M[65487]=[null,null,K.prototype.pd,K.prototype.ge,"R6USER",1145],M[65504]=[null,null,K.prototype.Xc,K.prototype.Rd,"CTRL",1170],M[65520]=[null,null,K.prototype.wc,K.prototype.Dc,"LSIZE",1170],M[65522]=[null,null,K.prototype.wc,K.prototype.Dc,"HSIZE",1170],M[65524]=[null,null,K.prototype.Dd,K.prototype.ue,"SYSID",1170],M[65526]=[null,null,K.prototype.Wc,K.prototype.Qd,"CPUERR",1170],M[65528]=[null,null,K.prototype.dd,K.prototype.Yd, -"MB",1170],M[65530]=[null,null,K.prototype.jd,K.prototype.ae,"PIR"],M[65532]=[null,null,K.prototype.Cd,K.prototype.te,"SL"],M[65534]=[null,null,K.prototype.md,K.prototype.de,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; -L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; -L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; -L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Jc(this,Fc?Kc:Lc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&kc(this.w,b,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535: -c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Qc(c,this.D+a,1,c.L)&&c.ja(!0)}return this.bc(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Qc(c,this.D+a,2,c.L)&&c.ja(!0)}return this.cc(a, -b)},na:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Qc(d,this.D+a,1,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.Vb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Qc(d,this.D+a,2,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.gc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Na:function(a,b){a&1&&kc(this.w,b,2);return this.F.getUint16(a,!0)},$:function(a,b){a&1&&kc(this.w, -b,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ma:function(a,b){this.G[a]=b;this.Pa=!0},ua:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},cb:function(a,b,c){a&1&&kc(this.w,c,4);this.F.setUint16(a,b,!0);this.Pa=!0},Ja:function(a,b,c){a&1&&kc(this.w,c,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function Wb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Pc(a,Oc,!1),(a.B=c.B)&&Nc(a,Oc,!1))}function Rc(a,b){b?--a.B||(a.Ub=a.f?a.v:a.Vb,a.Kb=a.f?a.I:a.gc):--a.g||(a.Rb=a.bc,a.ra=a.cc)}function Nc(a,b,c){c&&a.B||(a.Ub=!a.f&&b[1]||a.v,a.Kb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Vb=b[1]||a.v,a.gc=b[3]||a.I}function Pc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.bc=b[0]||a.K,a.cc=b[2]||a.L}function Jc(a,b){b||(b=Sc);Pc(a,b,void 0);Nc(a,b,void 0)} -var Sc=[],Mc=[I.prototype.S,I.prototype.va,I.prototype.ca,I.prototype.Ka],Oc=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.za];if(wb)var Lc=[I.prototype.N,I.prototype.ma,I.prototype.Na,I.prototype.cb],Kc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; -function Tc(a,b){r.call(this,"CPU",a,Tc,1);var c=a.multiplier||1;this.bb=a.cycles||b;this.Xa=c;this.Ab=Math.round(this.bb/1E4)/100;this.jb=this.Ab*this.Xa;this.A.ga=!1;this.A.Tb=!1;this.A.nb=a.autoStart;this.A.pb=!1;this.Eb=this.na=0;this.Fb=a.csStart;this.rb=a.csInterval;this.sb=a.csStop;this.K=[];this.uc=this.Ld.bind(this);G(this)}w(Tc);var Uc=["power","reset"];k=Tc.prototype; -k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.rb,c=!0);0<=a.sb&&a.sb<=$c(a)&&(a.rb=a.sb=-1,Xc(a),a.ja(),c=!0);c&&a.j($c(a)+" cycles: checksum="+l(a.Eb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.jb?b=1:d=!0;a.Xa=b;b=a.Ab*a.Xa;if(a.jb!=b){a.jb=b;b=a.jb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.lb()}bd(a,a.S);a.S=0;a.R=Ba();a.$=0;cd(a);return d}function mc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function oc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.bb*a.Xa/1E3*c|0,a.K[b][0]=c+dd(a))} -function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function fd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function dd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Ld=function(){if(this.A.ga){this.Cb>=this.bb&&cd(this,!0);this.za=0;this.fb=Ba();if(this.$){var a=this.fb-this.$;a>this.rc&&(this.R+=a,this.R>this.fb&&(this.R=this.fb))}try{do{var b=ed(this,this.A.pb?1:this.gb);try{this.xb(b)}catch(e){if("number"!=typeof e)throw e;}b=dd(this,!0);this.za+=b;this.S+=b;Zc(this,b);fd(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.gb;15<=++this.sc&&(this.B&&this.B.da(),this.sc=0);break}}while(this.A.ga)}catch(e){this.ja();this.B&&this.B.stop(Ba(),$c(this));vb(this, -e.stack||e.message);return}if(this.A.ga){a=setTimeout;b=this.uc;this.$=Ba();var c=this.rc;this.za&&(c=Math.round(c*this.za/this.gb));var c=c-(this.$-this.fb),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ma=0,ad(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Cb+=this.za;this.$+=c;a(b,c)}}}; -k.wb=function(a){if(ub(this))return!1;if(this.A.ga)return this.j(this.toString()+" busy"),!1;ad(this);this.A.ga=!0;this.A.Tb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.lb(!0),this.B.start(this.R,$c(this)));setTimeout(this.uc,0);return!0};k.xb=function(){return 0};k.ja=function(a){var b=!1;if(this.A.ga){dd(this);bd(this,this.S);this.S=0;this.A.ga=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),$c(this));b=!0}this.A.complete=a;return b}; -function gd(a){this.qb=+a.model||1170;this.Nb=a.addrReset||0;Tc.call(this,a,6666667);this.decode=1120==this.qb?hd.bind(this):id.bind(this);jd(this);this.L=0;this.N=null;this.A.complete=!1}w(gd,Tc);k=gd.prototype;k.reset=function(){this.status("model "+this.qb);this.A.ga&&this.ja();jd(this);Wc(this);this.A.error=!1;this.parent.reset.call(this)}; -function jd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Ra=[0,0,0,0,0,0];a.Fa=[0,0,0,0];a.v=0;a.Ka=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Uc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.F=a.I=0;a.g=a.f=a.ob=0;a.va=-1;kd(a)}function kd(a){a.$a=255;a.Z=0;a.ec=0;a.C=0;a.Ya=0;a.Hb=0;a.Za=0;a.Wa=0;a.Ja=0;a.Bb=262143;a.eb=253952;a.N=null;a.w&&qc(a)}function qc(a){a.Wa?(a.P=65536,a.ba=a.Oc,a.ra=a.Id,a.Kb=a.ze,Zb(a.w,a.Za&16?22:18)):(a.P=0,a.ba=a.Nc,a.ra=a.xc,a.Kb=a.Ec,Zb(a.w,16))}function ld(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ja()||a.i.da())}k.oc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ma,this.Xa]);a.set(2,gc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ma=b[1];ad(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Fa[c]=a.u[6],a.u[6]=a.Fa[a.v]);a.M=b;a.H|=2}function R(a,b){a.H&128||(a.X=a.aa=b,a.U=0)}function rd(a,b,c){a.H&128||(a.X=a.aa=a.T=b,a.U=c||0)}function sd(a,b,c,d){a.H&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function td(a,b){a.H&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function ud(a,b,c,d){a.H&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.ka=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=Cb(this):this.v||(a=4,c=!0);this.C&57344||(this.Ya=63222,this.Hb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);sc(this,e&-12289|this.va>>2&12288);c&&(this.Z|=4,this.u[6]=4);vd(this,this.va);vd(this,this.u[7]);O(this,d);this.H&=-113;this.va=-1;this.H|=8;this.Tc=a;this.Sc=b;if(26!=b)throw a;}}; -function wd(a){var b=xd(a),c=xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);sc(a,c);a.H&=-17}function Pd(a,b){var c=b>>13&31;31>c?a.Za&32&&(b=a.Uc[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function Qd(a,b,c){var d,e,f,g=0;d=b>>13;a.Za&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Bb;ff&&(3932160<=f&&(f=Pd(a,f&262143)),f>=a.eb&&4186112>f&&(a.Z|=32,a.ka(4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= -16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Ka=d;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Ka<<1),a.ka(168,16)),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)|g; -a.b-=8;break;case 6:return e=a.ra(qd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(qd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.$a||65534<=a.u[6])&&(a.u[6]<=a.$a-32?(a.Z|=4,a.u[6]=4,a.ka(4,24)):(a.Z|=8,a.H|=64));return e}k.Pb=function(a){if(!this.Wa)return this.w.Pb(a);this.L++;a=Rd(this,Qd(this,a,3));this.L--;return a}; -k.ib=function(a){if(!this.Wa)return this.w.ib(a);this.L++;a=this.xc(Qd(this,a,2));this.L--;return a};k.kb=function(a,b){this.Wa?(this.L++,Sd(this,Qd(this,a,5),b),this.L--):this.w.kb(a,b)};k.Ib=function(a,b){this.Wa?(this.L++,this.Ec(Qd(this,a,4),b),this.L--):this.w.Ib(a,b)};k.Nc=function(a,b,c){return Td(this,a,b,c)};k.Oc=function(a,b,c){return Qd(this,Td(this,a,b,c),c)};k.xc=function(a){return this.w.pa(a)};k.Id=function(a){return this.w.pa(Qd(this,a,2))};k.Ec=function(a,b){this.w.mb(a,b&65535)}; -k.ze=function(a,b){this.w.mb(Qd(this,a,4),b)};function Ud(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Td(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Fa[a.M>>12&3];return c}function Vd(a,b,c,d){a.C&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Td(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Qd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.mb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Fa[a.M>>12&3]=d} -function Wd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?Rd(a,a.ba(b,c,3)):a.u[c]&255}function Xd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]}function Yd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Td(a,b,c,8)}function Zd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Rd(a,a.ba(b,c,3)):a.u[c]&255}function $d(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ob=a.ba(b,e,7),Sd(a,e,d.call(a,c,Rd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.mb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ae(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Sd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.mb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.xb=function(a){this.A.complete=!0;var b=this.i&&ce(this.i)?1:this.A.Tb?-1:0,c=a?this.A.Tb?0:1:-1;this.A.Tb=!1;this.ca=this.b=a;do{if(b){if(this.i&&de(this.i,this.u[7],c)){this.ja();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.ka(168,28):this.H&64?this.ka(4,30):this.H&16&&this.ka(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.ec&224)>>5,f=this.N&&this.N.tb>e?this.N:null;f&&(d=f.Od,e=f.tb);e>(this.M&224)>>5?(this.H&4&&(qd(this,2),this.H&=-5),this.ka(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(pd(this))}while(0>1|b<<16;td(this,a);return a&65535}function je(a,b){a=b&2048|b>>1|b<<8;td(this,a<<8);return a&255}function ke(a,b){a=b&~a;R(this,a);return a}function le(a,b){a=b&~a;R(this,a<<8);return a}function me(a,b){a|=b;R(this,a);return a}function ne(a,b){a|=b;R(this,a<<8);return a} -function oe(a,b){a=~b|65536;rd(this,a);return a&65535}function pe(a,b){a=~b|256;rd(this,a<<8);return a&255}function qe(a,b){a=b-a;this.H&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function re(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function se(a,b){a=b+a;this.H&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function te(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function ue(a,b){a=-b;rd(this,a,a&b&32768);return a&65535}function ve(a,b){a=-b;rd(this,a<<8,(a&b&128)<<8);return a&255}function we(a,b){a=b<<1|this.T>>16&1;td(this,a);return a&65535}function xe(a,b){a=b<<1|this.T>>16&1;td(this,a<<8);return a&255}function ye(a,b){a=(this.T&65536|b)>>1|b<<16;td(this,a);return a&65535}function ze(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;td(this,a<<8);return a&255}function Ae(a,b){var c=b-a;ud(this,c,a,b);return c&65535} -function Be(a,b){var c=b-a;ud(this,c<<8,a<<8,b<<8);return c&255}function Ce(a,b){this.H&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function De(a,b){a^=b;R(this,a);return a&65535}function Ee(a){T(this,a,Xd(this,a),ee);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function Fe(a){var b=$d(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Ge(a){var b=$d(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function He(a){U(this,a,!md(this))}function Ie(a){U(this,a,md(this))} -function Je(a){T(this,a,Xd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ke(a){S(this,a,Wd(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Le(a){T(this,a,Xd(this,a),me);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Me(a){S(this,a,Wd(this,a),ne);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function Ne(a){R(this,Xd(this,a)&$d(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Oe(a){R(this,(Wd(this,a)&Zd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Pe(a){U(this,a,od(this))}function Qe(a){U(this,a,!this.Qa()==!nd(this))}function Re(a){U(this,a,!od(this)&&!this.Qa()==!nd(this))}function Se(a){U(this,a,!md(this)&&!od(this))}function Te(a){U(this,a,od(this)||!this.Qa()!=!nd(this))} -function Ue(a){U(this,a,md(this)||od(this))}function Ve(a){U(this,a,!this.Qa()!=!nd(this))}function We(a){U(this,a,this.Qa())}function Xe(a){U(this,a,!od(this))}function Ye(a){U(this,a,!this.Qa())}function Ze(){this.ka(12,1);this.b-=5}function $e(a){U(this,a,!0)}function af(a){U(this,a,!nd(this))}function bf(a){U(this,a,nd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function cf(a){var b=Xd(this,a);a=$d(this,a);ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function df(a){var b=Wd(this,a)<<8;a=Zd(this,a)<<8;ud(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} -function ef(a){var b=$d(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function ff(){this.ka(24,2);this.b-=25} -function gf(){this.M&49152?(this.Z|=128,this.ka(4,3)):this.i?dc(this.i):this.ja();this.b-=7}function hf(){this.ka(16,4);this.b-=25}var jf=[0,7,7,10,7,11,9,13];function kf(a){this.J=this.b;O(this,Yd(this,a));this.b=this.J-jf[this.g]}var lf=[0,14,14,17,14,18,16,20];function mf(a){this.J=this.b;var b=Yd(this,a);a=a>>6&7;vd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-lf[this.g]}var nf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function of(a){var b=Xd(this,a);this.J=this.b;R(this,be(this,a,b));this.b=this.J-nf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function pf(a){var b=Wd(this,a);R(this,ae(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var qf=[7,13,13,17,14,18,17,21]; -function rf(a){var b=$d(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function xf(a){T(this,a,Xd(this,a),Ae);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function yf(a){T(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)}function zf(){this.ka(28,5);this.b-=5}function Af(){this.H&4||this.B.da();this.H|=4;qd(this,-2);this.b-=3}function Bf(a){T(this,a,Xd(this,a),De);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=dc(b);b||this.ka(8,6)}function hd(a){Cf[a>>12].call(this,a)}function Df(a){Ef[a>>6&3].call(this,a)}function Ff(a){Gf[a>>6&3].call(this,a)} -function Hf(a){If[a>>6&3].call(this,a)}function Jf(a){Kf[a&15].call(this,a)}function Lf(a){Mf[a&15].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)} -var Cf=[function(a){Tf[a>>8&15].call(this,a)},of,cf,Ne,Je,Le,Ee,W,function(a){Uf[a>>8&15].call(this,a)},pf,df,Oe,Ke,Me,xf,W],Tf=[function(a){Vf[a>>4&15].call(this,a)},$e,Xe,Pe,Qe,Ve,Re,Te,mf,mf,Df,Ff,Hf,W,W,W],Ef=[function(a){rd(this,be(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)}],Gf=[function(a){T(this,a,0, -ue);this.b-=this.g?11:6},function(a){T(this,a,md(this)?1:0,ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,md(this)?1:0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=$d(this,a);rd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],If=[function(a){T(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)}], -Vf=[function(a){Wf[a&15].call(this,a)},W,W,W,kf,kf,kf,kf,vf,W,Jf,Lf,yf,yf,yf,yf],Wf=[gf,Af,uf,Ze,hf,tf,W,W,W,W,W,W,W,W,W,W],Kf=[sf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Mf=[sf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],Uf=[Ye,We,Se,Ue,af,bf,He,Ie,ff,zf,Nf,Pf,Rf,W,W,W],Of=[function(a){rd(this, -ae(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)}],Qf=[function(a){S(this,a,0,ve);this.b-=this.g?11:6},function(a){S(this,a,md(this)?1:0,fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,md(this)?1:0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Zd(this,a);rd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],Sf=[function(a){S(this,a,0,ze);this.b-=this.g?9+(this.ob&1):3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,je);this.b-=this.g?9+(this.ob&1):3+(7==this.f?2:0)},function(a){S(this,a,0,he);this.b-=this.g?9:3+(7==this.f?2:0)}];function id(a){Xf[a>>12].call(this,a)} -var Xf=[function(a){Yf[a>>8&15].call(this,a)},of,cf,Ne,Je,Le,Ee,function(a){Zf[a>>8&15].call(this,a)},function(a){$f[a>>8&15].call(this,a)},pf,df,Oe,Ke,Me,xf,W],Yf=[function(a){ag[a>>4&15].call(this,a)},$e,Xe,Pe,Qe,Ve,Re,Te,mf,mf,Df,Ff,Hf,function(a){bg[a>>6&3].call(this,a)},W,W],bg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Ud(this,a,0);vd(this,a);R(this,a);this.b-=11},function(a){var b=xd(this);this.J= -this.b;Vd(this,a,0,b);R(this,b);this.b=this.J-qf[this.g]},function(a){R(this,be(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ag=[function(a){cg[a&15].call(this,a)},W,W,W,kf,kf,kf,kf,vf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):W.call(this,a)},Jf,Lf,yf,yf,yf,yf],cg=[gf,Af,uf,Ze,hf,tf,function(){wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],Zf=[rf,rf,ef,ef,Fe,Fe,Ge,Ge,Bf,Bf,W,W,W,W,wf,wf],$f=[Ye,We,Se,Ue,af,bf,He,Ie,ff,zf,Nf,Pf,Rf,function(a){dg[a>> -6&3].call(this,a)},W,W],dg=[W,function(a){a=Ud(this,a,65536);vd(this,a);R(this,a);this.b-=11},function(a){var b=xd(this);this.J=this.b;Vd(this,a,65536,b);R(this,b);this.b=this.J-qf[this.g]},W]; -function eg(a){r.call(this,"ROM",a,eg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.F=sa(this.B);if(this.B){a=this.B;var b=ta(this.F);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ha=a.ha):c.B=null,fg(c))})}}w(eg);eg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;fg(this)}; -eg.prototype.Ea=function(){this.ha&&(this.i&&gg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};eg.prototype.Da=function(){return!0}; -function fg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+l(a.f.length,8,!0)+") does not match specified size ("+l(a.g,8,!0)+")");else{var b;b=a.C;if(bc(a.w,b,a.g,Ic)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,p=b[h++]&255|(b[h++]&255)<<8,m=m+((n&255)+(n>>8)+(p&255)+(p>>8)),u=h,v=n-=6;0=b.length)break;m+=b[h++]&255;if(m&255)break;if(v)for(;v--;)a.b.kb(p++,b[u++]&255);else p&1?a.b.ja():ld(a.b,p,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&nc(e.b,e.ma))});this.na=pc(52,4);this.$=mc(this.b,function(){e.g|=128;e.g&64&&nc(e.b,e.na)});ic(b,this,Fg);G(this)}; -k.tc=function(){if(!this.J){var a=Vc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.cb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ea=function(a,b){if(!b)if(this.tc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Da=function(a){return a?this.save():!0};k.reset=function(){Gg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Gg(this)};function Gg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.dc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), -this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;oc(this.b,this.$,1E3/Math.round(this.R/10))}};var Hg={},Fg=(Hg[65392]=[null,null,Y.prototype.sd,Y.prototype.je,"RCSR"],Hg[65394]=[null,null,Y.prototype.rd,Y.prototype.ie,"RBUF"],Hg[65396]=[null,null,Y.prototype.Kd,Y.prototype.Be,"XCSR"],Hg[65398]=[null,null,Y.prototype.Jd,Y.prototype.Ae,"XBUF"],Hg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Kg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Kg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Lg(a);var e=this;if((this.g=Vc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=pc(56,4);this.ca=mc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Ug(a,b,c,d,e.ea,e.Ha, -e.Ga));a.A.Ua=!1;a.F&&(a.F--,a.F||G(a));Rg(a)})}function Og(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.$b?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){ah(a,b,c,d)})} -function ah(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Sa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var m=h[0][0][0];a.Ia=m&&m.length||512;for(d=c=0;d>2,p=m.pattern;void 0===p&&(p=m.pattern=0);var u=m.data;if(void 0===u){var v=m.bytes;if(void 0!==v&&v.length){for(var x=n<<2,z=v.length;z>2,e=Array(d),f=0;f>1),this.b=new Int32Array(this.C,0,this.size>>2),Ic(this,vc?Jc:Kc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&K(this.w,b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24> +a?c&65535:c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,1,c.L)&&c.ja(!0)}return this.cc(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,2,c.L)&&c.ja(!0)}return this.dc(a, +b)},ma:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,1,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.Wb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,2,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.hc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Na:function(a,b){a&1&&K(this.w,b,64,2);return this.F.getUint16(a,!0)},Z:function(a,b){a&1&&K(this.w, +b,64,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Pa=!0},ua:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},cb:function(a,b,c){a&1&&K(this.w,c,64,4);this.F.setUint16(a,b,!0);this.Pa=!0},Ja:function(a,b,c){a&1&&K(this.w,c,64,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+ +J(this.i,b)+")",!0)}};function Wb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Oc(a,Nc,!1),(a.B=c.B)&&Mc(a,Nc,!1))}function Qc(a,b){b?--a.B||(a.Vb=a.f?a.v:a.Wb,a.Ib=a.f?a.I:a.hc):--a.g||(a.Rb=a.cc,a.ra=a.dc)}function Mc(a,b,c){c&&a.B||(a.Vb=!a.f&&b[1]||a.v,a.Ib=!a.f&&b[3]||a.I);if(c||void 0===c)a.Wb=b[1]||a.v,a.hc=b[3]||a.I}function Oc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.cc=b[0]||a.K,a.dc=b[2]||a.L}function Ic(a,b){b||(b=Rc);Oc(a,b,void 0);Mc(a,b,void 0)} +var Rc=[],Lc=[I.prototype.S,I.prototype.va,I.prototype.ba,I.prototype.Ka],Nc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Kc=[I.prototype.N,I.prototype.la,I.prototype.Na,I.prototype.cb],Jc=[I.prototype.R,I.prototype.ua,I.prototype.Z,I.prototype.Ja]; +function Sc(a,b){u.call(this,"CPU",a,Sc,1);var c=a.multiplier||1;this.fb=a.cycles||b;this.Xa=c;this.nb=Math.round(this.fb/1E4)/100;this.hb=this.nb*this.Xa;this.A.ga=!1;this.A.Ub=!1;this.A.mb=a.autoStart;this.A.ob=!1;this.Cb=this.ma=0;this.Db=a.csStart;this.rb=a.csInterval;this.sb=a.csStop;this.K=[];this.tc=this.Ld.bind(this);H(this)}z(Sc);var Tc=["power","reset"];k=Sc.prototype; +k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.rb,c=!0);0<=a.sb&&a.sb<=Zc(a)&&(a.rb=a.sb=-1,Wc(a),a.ja(),c=!0);c&&a.j(Zc(a)+" cycles: checksum="+p(a.Cb))}} +k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.hb?b=1:d=!0;a.Xa=b;b=a.nb*a.Xa;if(a.hb!=b){a.hb=b;b=a.hb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.kb()}ad(a,a.S);a.S=0;a.R=Ba();a.Z=0;bd(a);return d}function lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function nc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.fb*a.Xa/1E3*c|0,a.K[b][0]=c+cd(a))} +function dd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function cd(a,b){var c=a.ba-=a.b;a.b=a.J=0;b&&(a.ba=0);return c} +k.Ld=function(){if(this.A.ga){this.Ab>=this.fb&&bd(this,!0);this.za=0;this.eb=Ba();if(this.Z){var a=this.eb-this.Z;a>this.Ob&&(this.R+=a,this.R>this.eb&&(this.R=this.eb))}try{do{var b=dd(this,this.A.ob?1:this.bb);try{this.xb(b)}catch(e){if("number"!=typeof e)throw e;}b=cd(this,!0);this.za+=b;this.S+=b;Yc(this,b);ed(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.bb;15<=++this.sc&&(this.B&&this.B.ca(),this.sc=0);break}}while(this.A.ga)}catch(e){this.ja();this.B&&this.B.stop(Ba(),Zc(this));vb(this, +e.stack||e.message);return}if(this.A.ga){a=setTimeout;b=this.tc;this.Z=Ba();var c=this.Ob;this.za&&(c=Math.round(c*this.za/this.bb));var c=c-(this.Z-this.eb),d=this.Z-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.la=0,$c(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Ab+=this.za;this.Z+=c;a(b,c)}}}; +k.wb=function(a){if(ub(this))return!1;if(this.A.ga)return this.j(this.toString()+" busy"),!1;$c(this);this.A.ga=!0;this.A.Ub=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.kb(!0),this.B.start(this.R,Zc(this)));setTimeout(this.tc,0);return!0};k.xb=function(){return 0};k.ja=function(a){var b=!1;if(this.A.ga){cd(this);ad(this,this.S);this.S=0;this.A.ga=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Zc(this));b=!0}this.A.complete=a;return b}; +function fd(a){this.qb=+a.model||1170;this.Jb=a.addrReset||0;Sc.call(this,a,6666667);this.decode=1120==this.qb?gd.bind(this):hd.bind(this);id(this);this.L=0;this.N=null;this.A.complete=!1}z(fd,Sc);k=fd.prototype;k.reset=function(){this.status("model "+this.qb);this.A.ga&&this.ja();id(this);Vc(this);this.A.error=!1;this.parent.reset.call(this)}; +function id(a){a.T=65536;a.U=32768;a.$=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Jb];a.Ra=[0,0,0,0,0,0];a.Fa=[0,0,0,0];a.v=0;a.Ka=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Gb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.F=a.I=0;a.g=a.f=a.lb=0;a.va=-1;jd(a)}function jd(a){a.Za=255;a.fa=0;a.fc=0;a.C=0;a.Ya=0;a.Fb=0;a.ib=0;a.Wa=0;a.Ja=0;a.Mb=262143;a.N=null;a.w&&pc(a)}function pc(a){a.Wa?(a.P=65536,a.aa=a.Oc,a.ra=a.Id,a.Ib=a.Ae,Yb(a.w,a.ib&16?22:18)):(a.P=0,a.aa=a.Nc,a.ra=a.xc,a.Ib=a.Ec,Yb(a.w,16))}function kd(a,b,c){a.Jb=b;P(a,b);!c&&a.i&&(a.ja()||a.i.ca())}k.pc=function(){return 0}; +k.save=function(){var a=new R(this);a.set(0,[]);a.set(1,[this.la,this.Xa]);a.set(2,fc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];$c(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Fa[c]=a.u[6],a.u[6]=a.Fa[a.v]);a.M=b;a.H|=2}function S(a,b){a.H&128||(a.X=a.$=b,a.U=0)}function qd(a,b,c){a.H&128||(a.X=a.$=a.T=b,a.U=c||0)}function rd(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^b)&(d^b))}function sd(a,b){a.H&128||(a.X=a.$=a.T=b,a.U=a.X^a.T>>1)} +function td(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=Cb(this):this.v||(a=4,c=!0);this.C&57344||(this.Ya=63222,this.Fb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);rc(this,e&-12289|this.va>>2&12288);c&&(this.fa|=4,this.u[6]=4);ud(this,this.va);ud(this,this.u[7]);P(this,d);this.H&=-113;this.va=-1;this.H|=8;this.Tc=a;this.Rc=b;if(26!=b)throw a;}}; +function vd(a){var b=wd(a),c=wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);P(a,b);rc(a,c);a.H&=-17}function ec(a,b){var c=b>>13&31;31>c&&a.ib&32&&(b=a.Gb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Od(a,b,c){var d,e,f,g=0;d=b>>13;a.ib&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Ka=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Ka<<1),b=!0),a.C&61440||!(4191360> +f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(pd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(pd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.H|=64));return e}k.Pb=function(a){if(!this.Wa)return this.w.Pb(a);this.L++;a=Pd(this,Od(this,a,3));this.L--;return a}; +k.pb=function(a){if(!this.Wa)return this.w.pb(a);this.L++;a=this.xc(Od(this,a,2));this.L--;return a};k.jb=function(a,b){this.Wa?(this.L++,Qd(this,Od(this,a,5),b),this.L--):this.w.jb(a,b)};k.Tb=function(a,b){this.Wa?(this.L++,this.Ec(Od(this,a,4),b),this.L--):this.w.Tb(a,b)};k.Nc=function(a,b,c){return Rd(this,a,b,c)};k.Oc=function(a,b,c){return Od(this,Rd(this,a,b,c),c)};k.xc=function(a){return this.w.oa(a)};k.Id=function(a){return this.w.oa(Od(this,a,2))};k.Ec=function(a,b){this.w.ab(a,b&65535)}; +k.Ae=function(a,b){this.w.ab(Od(this,a,4),b)};function Sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Rd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Fa[a.M>>12&3];return c}function Td(a,b,c,d){a.C&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Rd(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Od(a,e|c&65536,4),a.v=a.M>>14&3,a.w.ab(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Fa[a.M>>12&3]=d} +function Ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]}function Wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Rd(a,b,c,8)}function Xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]} +function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.lb=a.aa(b,e,7),Qd(a,e,d.call(a,c,Pd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.w.ab(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function Zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Qd(a,a.aa(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function $d(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ab(a.aa(b,d,4),c):a.u[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.xb=function(a){this.A.complete=!0;var b=this.i&&ae(this.i)?1:this.A.Ub?-1:0,c=a?this.A.Ub?0:1:-1;this.A.Ub=!1;this.ba=this.b=a;do{if(b){if(this.i&&be(this.i,this.u[7],c)){this.ja();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.pa(168,28):this.H&64?this.pa(4,30):this.H&16&&this.pa(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.fc&224)>>5,f=this.N&&this.N.tb>e?this.N:null;f&&(d=f.Od,e=f.tb);e>(this.M&224)>>5?(this.H&4&&(pd(this,2),this.H&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function he(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function ie(a,b){a=b&~a;S(this,a);return a}function je(a,b){a=b&~a;S(this,a<<8);return a}function ke(a,b){a|=b;S(this,a);return a}function le(a,b){a|=b;S(this,a<<8);return a} +function me(a,b){a=~b|65536;qd(this,a);return a&65535}function ne(a,b){a=~b|256;qd(this,a<<8);return a&255}function oe(a,b){a=b-a;this.H&128||(this.X=this.$=a,this.U=b&(b^a));return a&65535}function pe(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.$=c,this.U=b&(b^c));return a&255}function qe(a,b){a=b+a;this.H&128||(this.X=this.$=a,this.U=a&(b^a));return a&65535}function re(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.$=c,this.U=c&(b<<8^c));return a&255} +function se(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function te(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function ue(a,b){a=b<<1|this.T>>16&1;sd(this,a);return a&65535}function ve(a,b){a=b<<1|this.T>>16&1;sd(this,a<<8);return a&255}function we(a,b){a=(this.T&65536|b)>>1|b<<16;sd(this,a);return a&65535}function xe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function ye(a,b){var c=b-a;td(this,c,a,b);return c&65535} +function ze(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function Ae(a,b){this.H&128||(this.X=this.$=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Be(a,b){a^=b;S(this,a);return a&65535}function Ce(a){U(this,a,Vd(this,a),ce);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function De(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.$=c;this.b-=(this.g?6:7)+b} +function Ee(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.$=d>>16|d;this.b-=(this.g?6:7)+b}function Fe(a){V(this,a,!ld(this))}function Ge(a){V(this,a,ld(this))} +function He(a){U(this,a,Vd(this,a),ie);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ie(a){T(this,a,Ud(this,a),je);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Je(a){U(this,a,Vd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ke(a){T(this,a,Ud(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function Le(a){S(this,Vd(this,a)&Yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Me(a){S(this,(Ud(this,a)&Xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ne(a){V(this,a,nd(this))}function Oe(a){V(this,a,!this.Qa()==!md(this))}function Pe(a){V(this,a,!nd(this)&&!this.Qa()==!md(this))}function Qe(a){V(this,a,!ld(this)&&!nd(this))}function Re(a){V(this,a,nd(this)||!this.Qa()!=!md(this))} +function Se(a){V(this,a,ld(this)||nd(this))}function Te(a){V(this,a,!this.Qa()!=!md(this))}function Ue(a){V(this,a,this.Qa())}function Ve(a){V(this,a,!nd(this))}function We(a){V(this,a,!this.Qa())}function Xe(){this.pa(12,1);this.b-=5}function Ye(a){V(this,a,!0)}function Ze(a){V(this,a,!md(this))}function $e(a){V(this,a,md(this))}function W(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.$=1);a&8&&(this.X=0);this.b-=5} +function af(a){var b=Vd(this,a);a=Yd(this,a);td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function bf(a){var b=Ud(this,a)<<8;a=Xd(this,a)<<8;td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} +function cf(a){var b=Yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.$=d>>16|d,this.X=d>>16):(this.U=32768,this.$=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.$=this.X=0,this.U=32768,this.T=65536,this.b-=7}function df(){this.pa(24,2);this.b-=25} +function ef(){this.M&49152?(this.fa|=128,this.pa(4,3)):this.i?jc(this.i):this.ja();this.b-=7}function ff(){this.pa(16,4);this.b-=25}var gf=[0,7,7,10,7,11,9,13];function hf(a){this.J=this.b;P(this,Wd(this,a));this.b=this.J-gf[this.g]}var jf=[0,14,14,17,14,18,16,20];function kf(a){this.J=this.b;var b=Wd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];P(this,b);this.b=this.J-jf[this.g]}var lf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function mf(a){var b=Vd(this,a);this.J=this.b;S(this,$d(this,a,b));this.b=this.J-lf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function nf(a){var b=Ud(this,a);S(this,Zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var of=[7,13,13,17,14,18,17,21]; +function pf(a){var b=Yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.$=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)P(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function wf(a){U(this,a,Vd(this,a),ye);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function xf(a){U(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}function yf(){this.pa(28,5);this.b-=5}function zf(){this.H&4||this.B.ca();this.H|=4;pd(this,-2);this.b-=3}function Af(a){U(this,a,Vd(this,a),Be);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=jc(b);b||this.pa(8,6)}function gd(a){Bf[a>>12].call(this,a)}function Cf(a){Df[a>>6&3].call(this,a)}function Ef(a){Ff[a>>6&3].call(this,a)} +function Gf(a){Hf[a>>6&3].call(this,a)}function If(a){Jf[a&15].call(this,a)}function Kf(a){Lf[a&15].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)}function Qf(a){Rf[a>>6&3].call(this,a)} +var Bf=[function(a){Sf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,X,function(a){Tf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,wf,X],Sf=[function(a){Uf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Cf,Ef,Gf,X,X,X],Df=[function(a){qd(this,$d(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)}],Ff=[function(a){U(this,a,0, +se);this.b-=this.g?11:6},function(a){U(this,a,ld(this)?1:0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,ld(this)?1:0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Yd(this,a);qd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Hf=[function(a){U(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)}], +Uf=[function(a){Vf[a&15].call(this,a)},X,X,X,hf,hf,hf,hf,tf,X,If,Kf,xf,xf,xf,xf],Vf=[ef,zf,sf,Xe,ff,rf,X,X,X,X,X,X,X,X,X,X],Jf=[qf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},W,function(){this.$=1;this.b-=5},W,W,W,function(){this.X=0;this.b-=5},W,W,W,W,W,W,W],Lf=[qf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},uf,function(){this.$=0;this.b-=5},uf,uf,uf,function(){this.X=32768;this.b-=5},uf,uf,uf,uf,uf,uf,uf],Tf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,yf,Mf,Of,Qf,X,X, +X],Nf=[function(a){qd(this,Zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,pe);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0,te);this.b-=this.g?11:6},function(a){T(this,a,ld(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,ld(this)?1:0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Xd(this,a);qd(this,a<< +8);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,xe);this.b-=this.g?9+(this.lb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,he);this.b-=this.g?9+(this.lb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}];function hd(a){Wf[a>>12].call(this,a)} +var Wf=[function(a){Xf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,function(a){Yf[a>>8&15].call(this,a)},function(a){Zf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,wf,X],Xf=[function(a){$f[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Cf,Ef,Gf,function(a){ag[a>>6&3].call(this,a)},X,X],ag=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);P(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Sd(this,a,0);ud(this,a);S(this,a);this.b-=11},function(a){var b=wd(this);this.J= +this.b;Td(this,a,0,b);S(this,b);this.b=this.J-of[this.g]},function(a){S(this,$d(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],$f=[function(a){bg[a&15].call(this,a)},X,X,X,hf,hf,hf,hf,tf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):X.call(this,a)},If,Kf,xf,xf,xf,xf],bg=[ef,zf,sf,Xe,ff,rf,function(){vd(this);this.b-=13},X,X,X,X,X,X,X,X,X],Yf=[pf,pf,cf,cf,De,De,Ee,Ee,Af,Af,X,X,X,X,vf,vf],Zf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,yf,Mf,Of,Qf,function(a){cg[a>> +6&3].call(this,a)},X,X],cg=[X,function(a){a=Sd(this,a,65536);ud(this,a);S(this,a);this.b-=11},function(a){var b=wd(this);this.J=this.b;Td(this,a,65536,b);S(this,b);this.b=this.J-of[this.g]},X]; +function dg(a){u.call(this,"ROM",a,dg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.F=sa(this.B);if(this.B){a=this.B;var b=ta(this.F);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null,eg(c))})}}z(dg);dg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;eg(this)}; +dg.prototype.Ea=function(){this.ha&&(this.i&&fg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};dg.prototype.Da=function(){return!0}; +function eg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(ac(a.w,b,a.g,Hc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.jb(n++,b[r++]&255);else n&1?a.b.ja():kd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&mc(e.b,e.la))});this.ma=oc(52,4);this.Z=lc(this.b,function(){e.g|=128;e.g&64&&mc(e.b,e.ma)});hc(b,this,Eg);H(this)}; +k.uc=function(){if(!this.J){var a=Uc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.cb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ea=function(a,b){if(!b)if(this.uc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Da=function(a){return a?this.save():!0};k.reset=function(){Fg(this)};k.save=function(){var a=new R(this);a.set(0,[]);return a.data()};k.restore=function(){return Fg(this)};function Fg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ec=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), +this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;nc(this.b,this.Z,1E3/Math.round(this.R/10))}};var Gg={},Eg=(Gg[65392]=[null,null,Y.prototype.rd,Y.prototype.je,"RCSR"],Gg[65394]=[null,null,Y.prototype.qd,Y.prototype.ie,"RBUF"],Gg[65396]=[null,null,Y.prototype.Kd,Y.prototype.Ce,"XCSR"],Gg[65398]=[null,null,Y.prototype.Jd,Y.prototype.Be,"XBUF"],Gg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Jg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Jg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Kg(a);var e=this;if((this.g=Uc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=oc(56,4);this.ba=lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Tg(a,b,c,d,e.da,e.Ha, +e.Ga));a.A.Ua=!1;a.F&&(a.F--,a.F||H(a));Qg(a)})}function Ng(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ac?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){$g(a,b,c,d)})} +function $g(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Sa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ia=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Ma+a.Aa&&(a.Aa+=f-(a.Ma+a.Aa)+1):(a.Ma=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||m>=this.b[h].length||n>=this.b[h][m].length){c="sector (CHS="+h+":"+m+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][m][n]){for(m=h.data.length;mb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Sa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=ch(this,a++);)eh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function eh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){r.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}w(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&fh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&gh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=ch(a,c++);)for(var m=0,n=h.length;mg)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Sa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=bh(this,a++);)dh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function dh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){u.call(this,"RL11",a,O,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(O);k=O.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&eh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&fh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[ma(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=bh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";fh(this,0)}}return!0};k.Da=function(a){return a?this.save():!0};k.reset=function(){hh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return hh(this,a[0])};function kh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}mh(a,e,b,c,!1,d)}else lh(a,e)} -function mh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.ab.toLowerCase()!=d.toLowerCase()&&(g++,lh(a,b,!0),h.Zb?a.O("RL11 busy"):(h.Zb=!0,e&&(h.Yb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Lb=!!f,$g(new Wg(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} -k.Kc=function(a,b,c,d,e){var f;a.Zb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ac)),b=null);b?(a.Ba=b,a.Sa=c,a.ab=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ac),a.Yb||e),this.B&&this.B.lb()):a.Lb=!1;a.Yb&&(a.Yb=!1,--this.I||G(this));fh(this,a.ac)}; -function jh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.Yc=function(a,b,c,d,e,f,g){for(var h=0,m=a.Ba,n=null,p;e--;){if(!n){n=a.Ba.seek(b,c,d,!0);if(!n){h=5120;break}p=0}var u,v;if(0>(u=a.Ba.read(n,p++))||0>(v=a.Ba.read(n,p++))){h=5120;break}this.w.Ib(Pd(this.b,f),u|v<<8);if(lc(this.w)){h=8192;break}f+=2;if(p>=m.Ia&&(n=null,++d>=m.qa&&(d=0,++c>=m.ya&&(c=0,++b>=m.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.Sd=function(a,b,c,d,e,f,g){for(var h=0,m=a.Ba,n=null,p;e--;){var u=this.w.ib(Pd(this.b,f));if(lc(this.w)){h=8192;break}f+=2;if(!n){n=a.Ba.seek(b,c,d,!0);if(!n){h=5120;break}p=0}if(!a.Ba.write(n,p++,u&255)||!a.Ba.write(n,p++,u>>8)){h=5120;break}if(p>=m.Ia&&(n=null,++d>=m.qa&&(d=0,++c>=m.ya&&(c=0,++b>=m.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.vd=function(){return this.fa&65535}; -k.me=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.F=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.F=this.C;break;case 12:b=this.Yc;case 10:b||(b=this.Sd),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.fa|=129,this.fa&64&&nc(this.b,this.P))}};k.td=function(){return this.J};k.ke=function(a){this.J=a&65534};k.wd=function(){return this.g};k.ne=function(a){this.g=a};k.xd=function(){return this.F};k.oe=function(a){this.F=a};k.ud=function(){return this.K};k.le=function(a){this.K=a&63}; -var nh={},ih=(nh[63744]=[null,null,N.prototype.vd,N.prototype.me,"RLCS"],nh[63746]=[null,null,N.prototype.td,N.prototype.ke,"RLBA"],nh[65284]=[null,null,N.prototype.wd,N.prototype.ne,"RLDA"],nh[65286]=[null,null,N.prototype.xd,N.prototype.oe,"RLMP"],nh[65288]=[null,null,N.prototype.ud,N.prototype.le,"RLBE"],nh);function oh(a){r.call(this,"Debugger",a,oh);this.$=a.base||16;this.za=!1;this.J=0;this.P=!1;this.v=-1;this.g=[];this.S={}}w(oh); -var ph={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};oh.prototype.pc=function(){return-1};oh.prototype.qc=function(){}; -function qh(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.P?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function rh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;fh(d,sa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=Uc(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}gh(this);this.P=oc(112,5);hc(b,this,hh);ih(this,"None","",!0);this.L&&ih(this,"Local Disk","?");ih(this,"Remote Disk","??");jh(this)||H(this)}; +k.Ea=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.oc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";eh(this,0)}}return!0};k.Da=function(a){return a?this.save():!0};k.reset=function(){gh(this)};k.save=function(){return(new R(this)).data()}; +k.restore=function(a){return gh(this,a[0])};function jh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}lh(a,e,b,c,!1,d)}else kh(a,e)} +function lh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.$a.toLowerCase()!=d.toLowerCase()&&(g++,kh(a,b,!0),h.$b?a.O("RL11 busy"):(h.$b=!0,e&&(h.Zb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Kb=!!f,Zg(new Vg(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} +k.Kc=function(a,b,c,d,e){var f;a.$b=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.bc)),b=null);b?(a.Ba=b,a.Sa=c,a.$a=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.bc),a.Zb||e),this.B&&this.B.kb()):a.Kb=!1;a.Zb&&(a.Zb=!1,--this.I||H(this));eh(this,a.bc)}; +function ih(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.Xc=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.ab(f,r|t<<8);if(kc(this.w)){h=8192;break}f+=2;if(n>=l.Ia&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.Sd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ia&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.ud=function(){return this.ea&65535}; +k.me=function(a){this.ea=this.ea&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.F=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.F=this.C;break;case 12:b=this.Xc;case 10:b||(b=this.Sd),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.ea|=129,this.ea&64&&mc(this.b,this.P))}};k.sd=function(){return this.J};k.ke=function(a){this.J=a&65534};k.vd=function(){return this.g};k.ne=function(a){this.g=a};k.wd=function(){return this.F};k.oe=function(a){this.F=a};k.td=function(){return this.K};k.le=function(a){this.K=a&63}; +var mh={},hh=(mh[63744]=[null,null,O.prototype.ud,O.prototype.me,"RLCS"],mh[63746]=[null,null,O.prototype.sd,O.prototype.ke,"RLBA"],mh[65284]=[null,null,O.prototype.vd,O.prototype.ne,"RLDA"],mh[65286]=[null,null,O.prototype.wd,O.prototype.oe,"RLMP"],mh[65288]=[null,null,O.prototype.td,O.prototype.le,"RLBE"],mh);function nh(a){u.call(this,"Debugger",a,nh);this.Z=a.base||16;this.za=!1;this.J=0;this.P=!1;this.v=-1;this.g=[];this.S={}}z(nh); +var oh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};nh.prototype.qc=function(){return-1};nh.prototype.rc=function(){}; +function ph(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.P?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function qh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function sh(a,b,c){var d;if(b){b=th(a,b);for(var e=0,f=!1,g=b,h=[],m=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=l(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function wh(a,b){if(b)return vh(a,b,a.S[b]);var c=0;for(b in a.S)vh(a,b,a.S[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function vh(a,b){if(b)return uh(a,b,a.S[b]);var c=0;for(b in a.S)uh(a,b,a.S[b]),c++;return 0this.b.qb?Fh:[];Gh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,m=b.length;if(c){a=d.ba(Hh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;m=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;m--;){var p=b[e];p.type==c?n++||d.j("..."):(c=p.type,n=fc[c],p&&d.j(l(p.id,8)+" %"+l(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.qc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ra[a-8]:20>a?b=this.b.Fa[a-16]:20==a&&(b=Cb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Hb).D));this.oa&1073741824?this.ua.push(a):this.ca&&a==this.ca||(this.ca=a,this.oa&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,dd(a),a.ua=0,a.B.da()))};function zh(a){var b;if(!ce(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.Y=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Oh(this):Ph(this)}};function Nh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ga?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ea=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Da=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){zh(this);this.va=0;this.ca=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ga=!1;Qh(this);a||this.da()};k.save=function(){var a=new P(this);a.set(0,Jh(this.K));a.set(1,Jh(this.N));a.set(2,[this.g,this.P,this.oa]);a.set(3,this.I);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Kh(a[b++]),this.N=Kh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.oa|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ga=!0;this.Bb=a;this.Cb=b}; -k.stop=function(a,b){if(this.A.ga){this.A.ga=!1;this.J=b-this.Cb;if(!this.R){b="stopped";if(this.J){a-=this.Bb;var c=0d&&(d=a.b.ib(b)),65535!=(d&65535)&&(c=a.F[a.Y],c.D=b,c.La=!1,++a.Y==a.F.length&&(a.Y=0)));return!1}function dc(a){var b=a.b;if(b.A.ga)throw O(b,a.b.Hb),a.ja(),-1;return!1} -function yh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.la],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.la],!0);a.C=["bw"];a.bb=0}k.hb=function(a,b,c){var d=!0;c||Rh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.la].hb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.La=!0:(Sh(this,a,a.length-1,"set"),zh(this)));return d}; -function Rh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.C));h.La||zh(a);break}}return f}function Th(a,b){for(var c=1;c>23)&65535,y=J(x,v);else if(8192==B)v=v.D-((f&63)<<1)&65535,y=J(x,v);else if(12288==B)y=J(x,f&7,1);else if(24576==B)y=J(x,f&63,1);else if(32768==B)y=J(x,f&255,1);else if(B=f&z,z&4032&&(B>>=6,z>>=6), -z&63)switch(z=B&7,B&56){case 0:y=Mh(z);break;case 8:y="@"+Mh(z);break;case 16:7>z?y="("+Mh(z)+")+":(B=x.pa(v,2),y="#"+J(x,B,0,!0));break;case 24:7>z?y="@("+Mh(z)+")+":(B=x.pa(v,2),y="@#"+J(x,B,0,!0));break;case 32:y="-("+Mh(z)+")";break;case 40:y="@-("+Mh(z)+")";break;case 48:B=x.pa(v,2);y=J(x,B,0,!0)+"("+Mh(z)+")";7==z&&(y=J(x,B+v.D&65535));break;case 56:B=x.pa(v,2),y="@"+J(x,B)+"("+Mh(z)+")",7==z&&(y="@"+J(x,B+v.D&65535))}x=y;if(!x||!x.length){h="INVALID";break}"string"!=typeof x&&(n=x[1],x=x[0]); -0b?(c=Mh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ra[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Fa[b-16]):20==b&&(c="PS="+J(a,Cb(d)));c&&(c+=" ");return c}function Yh(a){var b,c="";for(b=0;6>b;b++)c+=Xh(a,b);c=c+"\n"+(Xh(a,6)+Xh(a,7)+Xh(a,20));return c+=Wh(a,"T")+Wh(a,"N")+Wh(a,"Z")+Wh(a,"V")+Wh(a,"C")}k.jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],u=Aa(p,m,a.jc);0>u&&p.splice(-(u+1),0,m)}n&&(h.a=n.replace(/''/g,'"'))}a.I.push({Je:b,D:c,Rc:d,ha:e,hc:f})}function Zh(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Rc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.da();a.j("updated registers:")}a.j(Yh(a));c&&(a.K=Z(d.u[7]),Ph(a,J(a,a.K.D)))}}function ci(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.j(n)}h[3]&&(g=h[3],f=null);f=Vh(a,b,g,f);a.j(f);a.K=b;e-=b.D-m;c++}}} -function Uh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ca=null;if(tb(a)&&0p||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].D?(aa=fa+aa,fa=0):fa+=na.length);var Ad=[];"call"==og&&(Eb=1E5,Ad=["CALL"]);for(void 0!==ng&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.gb=aa;qg++;Eb--}}qg||(a.j("no "+pg+"history available"),a.gb=void 0)}else{var Gb=Hh(a,ma);if(Gb){var wc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||wi),wc=uh(a,La)>>>0,65536>4||1;yi--&&0Ac?String.fromCharCode(Ac):".";xc-=zc}Hb&&(Hb+="\n");Hb+=ma+" "+Bd+(0==Jb?" "+tg:"")}Hb&&a.j(Hb);a.eb=Gb}}}}break;case "e":if("else"==g[0])break;var ib,Cd,Dd,Ed,Fd=g[0],Gd=g[1];"eb"==Fd?(ib=1,Cd=255,Dd=a.Db,Ed=a.Sb):"e"==Fd||"ew"==Fd?(ib=2,Cd=65535,Dd=a.pa,Ed=a.mb):Gd=null;if(null==Gd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Bc=Hh(a,Gd);if(Bc)for(var Cc= -2;CcJd;){for(var Ma=null,Ci=256;65536>Mb.D>>>0;){Kd.D=a.pa(Mb,2);if(null==Mb.D||!Ci--)break;if(!(Kd.D&1)){for(var Di=a,Dc=Kd,vg=null,Nb=Dc.D,wg=Nb,Ld=1;6>=Ld&&Nb;Ld++){if(2< -Ld){Dc.D=Nb;var Ec=Vh(Di,Dc);if(0<=Ec.indexOf("JSR")){var xg=Ec.indexOf(" ");if(Nb+(Ec.indexOf(" ",xg+1)-xg-1)/2==wg){vg=Ec;break}}}Nb-=2}Dc.D=wg;if(Ma=vg)break}}if(!Ma||null==Ma)break;var yg=null;if("ks"==Bi){var zg=Ma.match(/[0-9A-F]+$/);zg&&(yg=bi(a,zg[0]))}Ma=xa(Ma,50)+" ;"+(yg||"stack="+J(a,Mb.D));a.j(Ma);Jd++}Jd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){bi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,H=g[1];"?"==H&&(H=void 0);if(void 0!==H){var Da=0;if("all"== -H)Da=1878917119,H=null;else if("on"==H)pa=!0,H=null;else if("off"==H)pa=!1,H=null;else{"keys"==H&&(H="key");"kbd"==H&&(H="keyboard");for(oa in xb)if(H==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+H);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Md=0;Md\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhi){if(ji(d,this.J)){this.C=new P(this,"1.30.2","failsafe");ji(this.C)&&(oi(this,d),a=2,pi(this.C));this.C.set("timestamp",Ca());qi(this.C);var e=this.f&&!this.F;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ni(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ji(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),pi(d),ji(d)?(c=ni(d),e=!0):c=!1))}e&&mi(this,c?d:null)}else 2==a&&d.clear()}else mi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(ri(this,this.b,b,c,a),this.b.nb());this.P&&(oi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; -function oi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ei(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Da&&(c&&a.b.ja(),d=a.b.Da(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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 m=h[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)m=0>m.indexOf(n[1])?m.replace(">",n[0]+">"):m.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);h[0]!=m&&(g=g.replace(h[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Ji(a,b,c)}})}else c(a,null)} -function Ki(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);m&&(--vi||Za(!0));m=!1}var g,h,m=!0;vi++;mb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Hi(c,null,null,!1,e,function(d,m){m?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=h.transformNode(m))?(g.outerHTML=m,--vi||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--vi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Hi(b,a,d,!0,e,n):Ii(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(v){f(v.message)}return m}window.embedPDP11=function(a,b,c,d){Za(!1);return Ki(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Dh=[0],Eh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=wh.prototype; +k.Ca=function(a,b,c,d){this.w=b;this.b=c;this.B=a;(a=Uc(a,"messages"))&&zh(this,a);this.nb=Ch;this.Ab=1145>this.b.qb?Eh:[];Fh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.aa(Gh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=dc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.rc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ra[a-8]:20>a?b=this.b.Fa[a-16]:20==a&&(b=Cb(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Fb).D));this.na&1073741824?this.ua.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ua=0,a.B.ca()))};function yh(a){var b;if(!ae(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.Y=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Nh(this):Oh(this)}};function Mh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ga?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ea=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Da=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){yh(this);this.va=0;this.ba=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ga=!1;Ph(this);a||this.ca()};k.save=function(){var a=new R(this);a.set(0,Ih(this.K));a.set(1,Ih(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Jh(a[b++]),this.N=Jh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ga=!0;this.Jb=a;this.Mb=b}; +k.stop=function(a,b){if(this.A.ga){this.A.ga=!1;this.J=b-this.Mb;if(!this.R){b="stopped";if(this.J){a-=this.Jb;var c=0d&&(d=a.b.pb(b)),65535!=(d&65535)&&(c=a.F[a.Y],c.D=b,c.La=!1,++a.Y==a.F.length&&(a.Y=0)));return!1}function jc(a){var b=a.b;if(b.A.ga)throw P(b,a.b.Fb),a.ja(),-1;return!1} +function xh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.bb=0}k.gb=function(a,b,c){var d=!0;c||Qh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].gb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.La=!0:(Rh(this,a,a.length-1,"set"),yh(this)));return d}; +function Qh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.La||yh(a);break}}return f}function Sh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.D-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Lh(y);break;case 8:x="@"+Lh(y);break;case 16:7>y?x="("+Lh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Lh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Lh(y)+")";break;case 40:x="@-("+Lh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Lh(y)+")";7==y&&(x=J(w,A+t.D&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Lh(y)+")",7==y&&(x="@"+J(w,A+t.D&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Lh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ra[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Fa[b-16]):20==b&&(c="PS="+J(a,Cb(d)));c&&(c+=" ");return c}function Xh(a){var b,c="";for(b=0;6>b;b++)c+=Wh(a,b);c=c+"\n"+(Wh(a,6)+Wh(a,7)+Wh(a,20));return c+=Vh(a,"T")+Vh(a,"N")+Vh(a,"Z")+Vh(a,"V")+Vh(a,"C")}k.kc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.kc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Je:b,D:c,Sc:d,ha:e,ic:f})}function Yh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.ca();a.j("updated registers:")}a.j(Xh(a));c&&(a.K=Z(d.u[7]),Oh(a,J(a,a.K.D)))}}function bi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=Uh(a,b,g,f);a.j(f);a.K=b;e-=b.D-l;c++}}} +function Th(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(tb(a)&&0n||"z"oa.length&&(a.j("note: only "+oa.length+" available"),ba=oa.length);ga-=ba;0>ga&&(null==oa[oa.length-1].D?(ba=ga+ba,ga=0):ga+=oa.length);var zd=[];"call"==ng&&(Eb=1E5,zd=["CALL"]);for(void 0!==mg&&a.j(ba+" instructions earlier:");0=oa.length&&(ga=0);a.lb=ba;pg++;Eb--}}pg||(a.j("no "+og+"history available"),a.lb=void 0)}else{var Gb=Gh(a,na);if(Gb){var wc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||vi),wc=th(a,La)>>>0,65536>4||1;xi--&&0Ac?String.fromCharCode(Ac):".";xc-=zc}Hb&&(Hb+="\n");Hb+=na+" "+Ad+(0==Jb?" "+sg:"")}Hb&&a.j(Hb);a.eb=Gb}}}}break;case "e":if("else"==g[0])break;var hb,Bd,Cd,Dd,Ed=g[0],Fd=g[1];"eb"==Ed?(hb=1,Bd=255,Cd=a.Bb,Dd=a.Sb):"e"==Ed||"ew"==Ed?(hb=2,Bd=65535,Cd=a.oa,Dd=a.ab):Fd=null;if(null==Fd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Bc=Gh(a,Fd);if(Bc)for(var Cc= +2;CcId;){for(var Ma=null,Bi=256;65536>Mb.D>>>0;){Jd.D=a.oa(Mb,2);if(null==Mb.D||!Bi--)break;if(!(Jd.D&1)){for(var Ci=a,Dc=Jd,ug=null,Nb=Dc.D,vg=Nb,Kd=1;6>=Kd&&Nb;Kd++){if(2< +Kd){Dc.D=Nb;var Ec=Uh(Ci,Dc);if(0<=Ec.indexOf("JSR")){var wg=Ec.indexOf(" ");if(Nb+(Ec.indexOf(" ",wg+1)-wg-1)/2==vg){ug=Ec;break}}}Nb-=2}Dc.D=vg;if(Ma=ug)break}}if(!Ma||null==Ma)break;var xg=null;if("ks"==Ai){var yg=Ma.match(/[0-9A-F]+$/);yg&&(xg=ai(a,yg[0]))}Ma=xa(Ma,50)+" ;"+(xg||"stack="+J(a,Mb.D));a.j(Ma);Id++}Id||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ai(a,g[1],!0);break}f=!0;break;case "m":a:{var pa,qa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)qa=!0,G=null;else if("off"==G)qa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(pa in xb)if(G==pa){Da=xb[pa];qa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,qa=!0;else if("off"==g[2]&&(a.na&=~Da,qa=!1,1073741824==Da)){for(var Ld=0;Ld\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bgi){if(ii(d,this.J)){this.C=new R(this,"1.30.2","failsafe");ii(this.C)&&(ni(this,d),a=2,oi(this.C));this.C.set("timestamp",Ca());pi(this.C);var e=this.f&&!this.F;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=mi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ii(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),oi(d),ii(d)?(c=mi(d),e=!0):c=!1))}e&&li(this,c?d:null)}else 2==a&&d.clear()}else li(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(qi(this,this.b,b,c,a),this.b.mb());this.P&&(ni(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; +function ni(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function di(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new R(a,"1.30.2"),g=new R(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Da&&(c&&a.b.ja(),d=a.b.Da(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ii(a,b,c)}})}else c(a,null)} +function Ji(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--ui||Za(!0));l=!1}var g,h,l=!0;ui++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Gi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--ui||Za(!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),--ui||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Gi(b,a,d,!0,e,m):Hi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ji(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 05f128f64..8494b3248 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -31,210 +31,205 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function k(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function n(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} +e&&d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f|0)}return c}function ka(a,b){var c="";b?11>=3;return""+c}function m(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function q(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date}; function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var l=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(l.onreadystatechange=function(){4===l.readyState&&(f=l.responseText,200==l.status||!l.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=l.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var m="",p;for(p in b)b.hasOwnProperty(p)&&(m&&(m+="&"),m+=p+"="+encodeURIComponent(b[p]));m=m.replace(/%20/g,"+");l.open("POST",a,!!c);l.setRequestHeader("Content-type","application/x-www-form-urlencoded");l.send(m)}else l.open("GET",a,!!c),"bytes"==b&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.send();c||(f=l.responseText,200!=l.status&&(e=l.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={L:null,W:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.L=e;else if(e=g.words)for(d.L=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.L=Array(4*e.length),f=c=0;c>8&255,d.L[f++]=e[c]>>16&255,d.L[f++]=e[c]>>24&255;else d.L=g;d.W=g.symbols;d.L.length?1==d.L.length&&(t(d.L[0]),d=null):(t("Empty resource: "+a),d=null)}catch(l){t("Resource data error ("+a+"): "+l.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Na=this.id:(this.na=this.id.substr(0,b),this.Na=this.id.substr(b+1));this[a]=c;this.l={ready:!1,lb:!1,Xd:!1,P:!1,error:!1};this.hb=null;this.l.error=!1;this.o={};this.F=null;y.push(this)}var Ka=void 0,La={}; -if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function A(a,b){b||(b=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function B(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.W=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(h){u("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Da=this.id:(this.na=this.id.substr(0,b),this.Da=this.id.substr(b+1));this[a]=c;this.l={ready:!1,kb:!1,Td:!1,P:!1,error:!1};this.gb=null;this.l.error=!1;this.o={};this.F=null;y.push(this)}var La=void 0,Ma={}; +if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.j=this.b-1;this.w=this.D/this.b|0;this.xa=[];this.f=0;this.m=!1;this.v=[];this.ac=[bb,cb,db,eb];a=new I(this);fb(a,this.F);this.h=Array(this.w);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);return 0<=c?c:c=hb(d,b)}function cb(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||hb(e,c)} -function db(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));return 0<=c?c:c=hb(d,b)}function eb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||hb(e,c)}function ib(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(q=g);if(!e&&m&&m.size){if(m.type==d){if(f+g<=m.Ha)return m.jb+=m.Ha-f,m.Ha=f,!0;if(f>=m.Ha+m.jb){q=m.size-(f-p);q>g&&(q=g);m.jb=f-m.Ha+q;f=p+a.b;g-=q;l++;continue}}return nb(1,f,g)}f=new I(a,f,q,a.b,d,e);fb(f,a.F,m);a.h[l++]=f;f=p+a.b;g-=q}if(0>=g){c/=1024;var u;e="";u?10>>=a.c;0>>=a.c;0>>a.c].vb(b&a.j,b)}function qb(a,b){return a.h[(b&a.i)>>>a.c].V(b&a.j,b)}h.qb=function(a){var b=a&this.j,c=(a&this.i)>>>this.c;this.m=!1;this.f++;a=this.h[c].Rb(b,a);this.f--;return a}; -h.Va=function(a,b){this.m=!1;this.f++;this.h[(a&this.i)>>>this.c].Db(a&this.j,b&255,a);this.f--};function rb(a,b,c){a.h[(b&a.i)>>>a.c].kb(b&a.j,c&65535,b)}h.zb=function(a,b){var c=a&this.j,d=(a&this.i)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function sb(a){for(var b=0,c=[],d=0;da.a.Za)){var g=f[0]?f[0].bind(b):null,l=f[1]?f[1].bind(b):null,m=f[2]?f[2].bind(b):null,p=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&m&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));tb(a,e,e,g,l,m,p,f[4])}}}function vb(a,b){a.v.push(b)}function wb(a,b){a.f||J(a.a,4,b);a.m=!0}function xb(a){var b=a.m;a.m=!1;return b} -function nb(a,b,c){t("Memory block error ("+a+": "+k(b)+","+k(c)+")");return!1}function K(a){x.call(this,"Device",a,K);this.c={data:0,Td:0,ib:20,bd:0};this.b={M:0,Bb:-1}}A(K);h=K.prototype;h.ha=function(a,b,c,d){this.h=b;this.a=c;this.F=d;var e=this;this.b.Bb=yb(c,function(){e.b.za|=128;e.b.za&64&&(zb(e.a,e.b.cd),Ab(e.a,e.b.Bb,1E3/60))});this.b.cd=Bb(64,6);ub(b,this,L);vb(b,this.reset.bind(this));F(this)};h.reset=function(){this.c.ib=this.c.ib&-120|20;this.b.za=0}; -h.tc=function(){var a=this.b.za;this.b.za&=-129;return a};h.nd=function(a){this.b.za=a;a&64&&Ab(this.a,this.b.Bb,1E3/60);this.b.za=a&-129};h.lc=function(a){return(a?this.c.bd:this.c.data)&65535};h.ed=function(a){this.c.data=a};h.vc=function(){var a=this.a;return a.w&62337|a.Xa<<5|a.Ya<<1};h.pd=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.Xa=a>>5&3;b.Ya=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ea!=c&&(b.Ea=c,Cb(b))}Db(this)}; -h.wc=function(){var a=this.a.Aa;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.xc=function(){return this.a.xb};h.yc=function(){return this.a.Ba};h.qd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ba!=a&&(b.Ba=a,a&16?(b.tb=4194303,b.Wa=3915776):(b.tb=262143,b.Wa=253952),Cb(b));Db(this)};function Db(a){a.c.ib=a.c.ib&-8|(a.a.Ea?a.a.Ba&16?1:2:4)}h.Rc=function(a){return this.a.H[1][a>>1&7]};h.Jd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Pc=function(a){return this.a.H[1][(a>>1&7)+8]}; -h.Hd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Qc=function(a){return this.a.X[1][a>>1&7]};h.Id=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.Oc=function(a){return this.a.X[1][(a>>1&7)+8]};h.Gd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.sc=function(a){return this.a.H[0][a>>1&7]};h.md=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.qc=function(a){return this.a.H[0][(a>>1&7)+8]};h.kd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295}; -h.rc=function(a){return this.a.X[0][a>>1&7]};h.ld=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.pc=function(a){return this.a.X[0][(a>>1&7)+8]};h.jd=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.Xc=function(a){return this.a.H[3][a>>1&7]};h.Pd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Vc=function(a){return this.a.H[3][(a>>1&7)+8]};h.Nd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Wc=function(a){return this.a.X[3][a>>1&7]}; -h.Od=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.H[3][b]&=65295};h.Uc=function(a){return this.a.X[3][(a>>1&7)+8]};h.Md=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.H[3][b]&=65295};h.Ja=function(a){a&=7;return this.a.B&2048?this.a.Fa[a]:this.a.g[a]};h.La=function(a,b){b&=7;this.a.B&2048?this.a.Fa[b]=a:this.a.g[b]=a};h.Dc=function(){return this.a.B&49152?this.a.la[0]:this.a.g[6]};h.vd=function(a){this.a.B&49152?this.a.la[0]=a:this.a.g[6]=a};h.Gc=function(){return this.a.g[7]}; -h.yd=function(a){this.a.g[7]=a};h.Ka=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Fa[a]};h.Ma=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Fa[b]=a};h.Ec=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.la[1]};h.wd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.la[1]=a};h.Fc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.la[3]};h.xd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.la[3]=a};h.nc=function(a){return this.a.Ub[a-65504>>1]}; -h.gd=function(a,b){this.a.Ub[b-65504>>1]=a};h.Qb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.Tc=function(){return 1};h.Ld=function(){};h.mc=function(){return this.a.I};h.fd=function(){this.a.I=0};h.uc=function(){return this.a.Tb};h.od=function(a,b){b&1||(a&=255);this.a.Tb=a};h.zc=function(a){return a?this.a.yb:0};h.rd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.yb=a;b.u|=2};h.Sc=function(a){return a?this.a.Ca&65280:0};h.Kd=function(a){this.a.Ca=a|255}; -h.Cc=function(){return $a(this.a)};h.ud=function(a){Eb(this.a,a&-1809|$a(this.a)&1808);this.a.u|=128};h.Xb=function(){}; -var M={},L=(M[62592]=[null,null,K.prototype.Rc,K.prototype.Jd,"SISDR",1145],M[62608]=[null,null,K.prototype.Pc,K.prototype.Hd,"SDSDR",1145],M[62624]=[null,null,K.prototype.Qc,K.prototype.Id,"SISAR",1145],M[62640]=[null,null,K.prototype.Oc,K.prototype.Gd,"SDSAR",1145],M[62656]=[null,null,K.prototype.sc,K.prototype.md,"KISDR",1145],M[62672]=[null,null,K.prototype.qc,K.prototype.kd,"KDSDR",1145],M[62688]=[null,null,K.prototype.rc,K.prototype.ld,"KISAR",1145],M[62704]=[null,null,K.prototype.pc,K.prototype.jd, -"KDSAR",1145],M[62798]=[null,null,K.prototype.yc,K.prototype.qd,"MMR3",1145],M[65382]=[null,null,K.prototype.tc,K.prototype.nd,"LKS"],M[65400]=[null,null,K.prototype.lc,K.prototype.ed,"CNSL"],M[65402]=[null,null,K.prototype.vc,K.prototype.pd,"MMR0",1145],M[65404]=[null,null,K.prototype.wc,K.prototype.Xb,"MMR1",1145],M[65406]=[null,null,K.prototype.xc,K.prototype.Xb,"MMR2",1145],M[65408]=[null,null,K.prototype.Xc,K.prototype.Pd,"UISDR",1145],M[65424]=[null,null,K.prototype.Vc,K.prototype.Nd,"UDSDR", -1145],M[65440]=[null,null,K.prototype.Wc,K.prototype.Od,"UISAR",1145],M[65456]=[null,null,K.prototype.Uc,K.prototype.Md,"UDSAR",1145],M[65472]=[null,null,K.prototype.Ja,K.prototype.La,"R0SET0"],M[65473]=[null,null,K.prototype.Ja,K.prototype.La,"R1SET0"],M[65474]=[null,null,K.prototype.Ja,K.prototype.La,"R2SET0"],M[65475]=[null,null,K.prototype.Ja,K.prototype.La,"R3SET0"],M[65476]=[null,null,K.prototype.Ja,K.prototype.La,"R4SET0"],M[65477]=[null,null,K.prototype.Ja,K.prototype.La,"R5SET0"],M[65478]= -[null,null,K.prototype.Dc,K.prototype.vd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Gc,K.prototype.yd,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ka,K.prototype.Ma,"R0SET1",1145],M[65481]=[null,null,K.prototype.Ka,K.prototype.Ma,"R1SET1",1145],M[65482]=[null,null,K.prototype.Ka,K.prototype.Ma,"R2SET1",1145],M[65483]=[null,null,K.prototype.Ka,K.prototype.Ma,"R3SET1",1145],M[65484]=[null,null,K.prototype.Ka,K.prototype.Ma,"R4SET1",1145],M[65485]=[null,null,K.prototype.Ka,K.prototype.Ma,"R5SET1",1145], -M[65486]=[null,null,K.prototype.Ec,K.prototype.wd,"R6SUPER",1145],M[65487]=[null,null,K.prototype.Fc,K.prototype.xd,"R6USER",1145],M[65504]=[null,null,K.prototype.nc,K.prototype.gd,"CTRL",1170],M[65520]=[null,null,K.prototype.Qb,K.prototype.Yb,"LSIZE",1170],M[65522]=[null,null,K.prototype.Qb,K.prototype.Yb,"HSIZE",1170],M[65524]=[null,null,K.prototype.Tc,K.prototype.Ld,"SYSID",1170],M[65526]=[null,null,K.prototype.mc,K.prototype.fd,"CPUERR",1170],M[65528]=[null,null,K.prototype.uc,K.prototype.od, -"MB",1170],M[65530]=[null,null,K.prototype.zc,K.prototype.rd,"PIR"],M[65532]=[null,null,K.prototype.Sc,K.prototype.Kd,"SL"],M[65534]=[null,null,K.prototype.Cc,K.prototype.ud,"PSW"],M);L[62594]=L[62592];L[62596]=L[62592];L[62598]=L[62592];L[62600]=L[62592];L[62602]=L[62592];L[62604]=L[62592];L[62606]=L[62592];L[62610]=L[62608];L[62612]=L[62608];L[62614]=L[62608];L[62616]=L[62608];L[62618]=L[62608];L[62620]=L[62608];L[62622]=L[62608];L[62626]=L[62624];L[62628]=L[62624];L[62630]=L[62624];L[62632]=L[62624]; -L[62634]=L[62624];L[62636]=L[62624];L[62638]=L[62624];L[62642]=L[62640];L[62644]=L[62640];L[62646]=L[62640];L[62648]=L[62640];L[62650]=L[62640];L[62652]=L[62640];L[62654]=L[62640];L[62658]=L[62656];L[62660]=L[62656];L[62662]=L[62656];L[62664]=L[62656];L[62666]=L[62656];L[62668]=L[62656];L[62670]=L[62656];L[62674]=L[62672];L[62676]=L[62672];L[62678]=L[62672];L[62680]=L[62672];L[62682]=L[62672];L[62684]=L[62672];L[62686]=L[62672];L[62690]=L[62688];L[62692]=L[62688];L[62694]=L[62688];L[62696]=L[62688]; -L[62698]=L[62688];L[62700]=L[62688];L[62702]=L[62688];L[62706]=L[62704];L[62708]=L[62704];L[62710]=L[62704];L[62712]=L[62704];L[62714]=L[62704];L[62716]=L[62704];L[62718]=L[62704];L[65410]=L[65408];L[65412]=L[65408];L[65414]=L[65408];L[65416]=L[65408];L[65418]=L[65408];L[65420]=L[65408];L[65422]=L[65408];L[65426]=L[65424];L[65428]=L[65424];L[65430]=L[65424];L[65432]=L[65424];L[65434]=L[65424];L[65436]=L[65424];L[65438]=L[65424];L[65442]=L[65440];L[65444]=L[65440];L[65446]=L[65440];L[65448]=L[65440]; -L[65450]=L[65440];L[65452]=L[65440];L[65454]=L[65440];L[65458]=L[65456];L[65460]=L[65456];L[65462]=L[65456];L[65464]=L[65456];L[65466]=L[65456];L[65468]=L[65456];L[65470]=L[65456];L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.o,0,this.size>>2),Mb(this,Ib?Nb:Ob);else{a=this.a=Array(this.size>> +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});var Wa="undefined"!==typeof ArrayBuffer;function Xa(a){x.call(this,"Panel",a,Xa);this.b=0;this.l.Cb=!0}z(Xa);k=Xa.prototype; +k.Z=function(a,b,c,d){if(this.j&&this.j.Z(a,b,c,d)||this.a&&this.a.Z(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.b++,!0;default:return"rled"==a?(this.o[b]=c,this.b++,!0):this.parent.Z.call(this,a,b,c,d)}};k.ha=function(a,b,c,d){this.j=a;this.i=b;this.a=c;this.F=d};k.ja=function(a,b){b||Ya();return!0};k.ia=function(){return!0}; +function Za(a,b,c,d){if(a.o[b]){void 0===c&&(a.l.error=!0,a.C("Value for "+b+" is invalid"),F(a.a));var e=a.F&&a.F.b||8;c=!a.a.l.da||a.l.Cb?8==e?ka(c,d):m(c,d):"--------".substr(0,d||4);a.o[b].textContent!=c&&(a.o[b].textContent=c)}}function $a(a,b,c,d){for(var e=0;e>2;this.j=this.i-1;this.v=this.D/this.i|0;this.xa=[];this.w=0;this.m=!1;this.u=[];this.Vb=[cb,db,eb,fb];a=new H(this);gb(a,this.F);this.b=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function db(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||I(e,c,16)} +function eb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function fb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||I(e,c,16)}function ib(a,b){if(b!=a.h){var c;a.h&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ha)return l.ib+=l.Ha-f,l.Ha=f,!0;if(f>=l.Ha+l.ib){p=l.size-(f-n);p>g&&(p=g);l.ib=f-l.Ha+p;f=n+a.i;g-=p;h++;continue}}return nb(1,f,g)}f=new H(a,f,p,a.i,d,e);gb(f,a.F,l);a.b[h++]=f;f=n+a.i;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].tb(b&a.j,b)}function rb(a,b){3932160<=b&&(b=qb(a.a,b));return a.b[(b&a.g)>>>a.c].V(b&a.j,b)} +bb.prototype.Ua=function(a,b){this.m=!1;this.w++;this.b[(a&this.g)>>>this.c].Ab(a&this.j,b&255,a);this.w--};function sb(a,b,c){3932160<=b&&(b=qb(a.a,b));a.b[(b&a.g)>>>a.c].jb(b&a.j,c&65535,b)}function tb(a){for(var b=0,c=[],d=0;da.a.Za)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null,p=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=f[4],w=0;w>5&3;b.Ya=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Sa!=c&&(b.Sa=c,Cb(b))}Db(this)}; +k.pc=function(){var a=this.a.Aa;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qc=function(){return this.a.vb};k.rc=function(){return this.a.Fa};k.ld=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Fa!=a&&(b.Fa=a,b.Jb=a&16?4194303:262143,Cb(b));Db(this)};function Db(a){a.c.hb=a.c.hb&-8|(a.a.Sa?a.a.Fa&16?1:2:4)}k.Rc=function(a){a=a>>1&63;var b=this.a.Va[a>>1];return a&1?b>>16:b&65535};k.Ld=function(a,b){b=b>>1&63;var c=b>>1;this.a.Va[c]=b&1?this.a.Va[c]&65535|(a&63)<<16:this.a.Va[c]&-65536|a&65534}; +k.Kc=function(a){return this.a.H[1][a>>1&7]};k.Ed=function(a,b){this.a.H[1][b>>1&7]=a&65295};k.Ic=function(a){return this.a.H[1][(a>>1&7)+8]};k.Cd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};k.Jc=function(a){return this.a.X[1][a>>1&7]};k.Dd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.H[1][b]&=65295};k.Hc=function(a){return this.a.X[1][(a>>1&7)+8]};k.Bd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.H[1][b]&=65295};k.lc=function(a){return this.a.H[0][a>>1&7]}; +k.gd=function(a,b){this.a.H[0][b>>1&7]=a&65295};k.jc=function(a){return this.a.H[0][(a>>1&7)+8]};k.ed=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};k.kc=function(a){return this.a.X[0][a>>1&7]};k.fd=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.H[0][b]&=65295};k.ic=function(a){return this.a.X[0][(a>>1&7)+8]};k.dd=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.H[0][b]&=65295};k.Qc=function(a){return this.a.H[3][a>>1&7]};k.Kd=function(a,b){this.a.H[3][b>>1&7]=a&65295}; +k.Oc=function(a){return this.a.H[3][(a>>1&7)+8]};k.Id=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};k.Pc=function(a){return this.a.X[3][a>>1&7]};k.Jd=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.H[3][b]&=65295};k.Nc=function(a){return this.a.X[3][(a>>1&7)+8]};k.Hd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.H[3][b]&=65295};k.Ja=function(a){a&=7;return this.a.B&2048?this.a.Ga[a]:this.a.f[a]};k.La=function(a,b){b&=7;this.a.B&2048?this.a.Ga[b]=a:this.a.f[b]=a}; +k.wc=function(){return this.a.B&49152?this.a.la[0]:this.a.f[6]};k.qd=function(a){this.a.B&49152?this.a.la[0]=a:this.a.f[6]=a};k.zc=function(){return this.a.f[7]};k.td=function(a){this.a.f[7]=a};k.Ka=function(a){a&=7;return this.a.B&2048?this.a.f[a]:this.a.Ga[a]};k.Ma=function(a,b){b&=7;this.a.B&2048?this.a.f[b]=a:this.a.Ga[b]=a};k.xc=function(){return 1==(this.a.B&49152)>>14?this.a.f[6]:this.a.la[1]};k.rd=function(a){1==(this.a.B&49152)>>14?this.a.f[6]=a:this.a.la[1]=a}; +k.yc=function(){return 3==(this.a.B&49152)>>14?this.a.f[6]:this.a.la[3]};k.sd=function(a){3==(this.a.B&49152)>>14?this.a.f[6]=a:this.a.la[3]=a};k.gc=function(a){return this.a.Qb[a-65504>>1]};k.bd=function(a,b){this.a.Qb[b-65504>>1]=a};k.Ob=function(a){return 65520==a?61183:0};k.Ub=function(){};k.Mc=function(){return 1};k.Gd=function(){};k.fc=function(){return this.a.M};k.ad=function(){this.a.M=0};k.nc=function(){return this.a.Pb};k.jd=function(a,b){b&1||(a&=255);this.a.Pb=a}; +k.sc=function(a){return a?this.a.wb:0};k.md=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.wb=a;b.s|=2};k.Lc=function(a){return a?this.a.Ba&65280:0};k.Fd=function(a){this.a.Ba=a|255};k.vc=function(){return ab(this.a)};k.pd=function(a){Eb(this.a,a&-1809|ab(this.a)&1808);this.a.s|=128};k.Tb=function(){}; +var M={},L=(M[61568]=[null,null,K.prototype.Rc,K.prototype.Ld,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kc,K.prototype.Ed,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Ic,K.prototype.Cd,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jc,K.prototype.Dd,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hc,K.prototype.Bd,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.lc,K.prototype.gd,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jc,K.prototype.ed,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kc, +K.prototype.fd,"KISAR",8,1145],M[62704]=[null,null,K.prototype.ic,K.prototype.dd,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rc,K.prototype.ld,"MMR3",1,1145],M[65382]=[null,null,K.prototype.mc,K.prototype.hd,"LKS"],M[65400]=[null,null,K.prototype.ec,K.prototype.$c,"CNSL"],M[65402]=[null,null,K.prototype.oc,K.prototype.kd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pc,K.prototype.Tb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qc,K.prototype.Tb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qc, +K.prototype.Kd,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Oc,K.prototype.Id,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pc,K.prototype.Jd,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nc,K.prototype.Hd,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ja,K.prototype.La,"R0SET0"],M[65473]=[null,null,K.prototype.Ja,K.prototype.La,"R1SET0"],M[65474]=[null,null,K.prototype.Ja,K.prototype.La,"R2SET0"],M[65475]=[null,null,K.prototype.Ja,K.prototype.La,"R3SET0"],M[65476]=[null,null,K.prototype.Ja, +K.prototype.La,"R4SET0"],M[65477]=[null,null,K.prototype.Ja,K.prototype.La,"R5SET0"],M[65478]=[null,null,K.prototype.wc,K.prototype.qd,"R6KERNEL"],M[65479]=[null,null,K.prototype.zc,K.prototype.td,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ka,K.prototype.Ma,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ka,K.prototype.Ma,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ka,K.prototype.Ma,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ka,K.prototype.Ma,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ka, +K.prototype.Ma,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ka,K.prototype.Ma,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xc,K.prototype.rd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yc,K.prototype.sd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gc,K.prototype.bd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Ob,K.prototype.Ub,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Ob,K.prototype.Ub,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Mc,K.prototype.Gd,"SYSID",1,1170],M[65526]= +[null,null,K.prototype.fc,K.prototype.ad,"CPUERR",1,1170],M[65528]=[null,null,K.prototype.nc,K.prototype.jd,"MB",1,1170],M[65530]=[null,null,K.prototype.sc,K.prototype.md,"PIR"],M[65532]=[null,null,K.prototype.Lc,K.prototype.Fd,"SL"],M[65534]=[null,null,K.prototype.vc,K.prototype.pd,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.o,0,this.size>>2),Mb(this,Ib?Nb:Ob);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a,b){a&1&&wb(this.h,b);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.sa= -!0},G:function(a,b){return this.J(a,b)},R:function(a,b){return this.Rb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Db(a,b,c)},ua:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.b[a]},K:function(a){return this.b[a]},O:function(a,b){a&1&&wb(this.h,b);return this.c.getUint16(a,!0)},$:function(a,b){a&1&&wb(this.h,b);return this.s[a>>1]},na:function(a,b){this.b[a]=b;this.sa=!0},pa:function(a,b){this.b[a]=b;this.sa=!0},ra:function(a,b,c){a&1&&wb(this.h,c);this.c.setUint16(a, -b,!0);this.sa=!0},va:function(a,b,c){a&1&&wb(this.h,c);this.s[a>>1]=b;this.sa=!0}};function fb(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&Qb(a,Rb,!1),(a.m=c.m)&&Sb(a,Rb,!1))}function Sb(a,b,c){c&&a.m||(a.Cb=!a.j&&b[1]||a.f,a.kb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Db=b[1]||a.f,a.Zb=b[3]||a.A}function Qb(a,b,c){c&&a.i||(a.vb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.J=b[0]||a.v,a.Rb=b[2]||a.w}function Mb(a,b){b||(b=Tb);Qb(a,b,void 0);Sb(a,b,void 0)} -var Tb=[],Pb=[I.prototype.N,I.prototype.qa,I.prototype.aa,I.prototype.wa],Rb=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.ua];if(Va)var Ob=[I.prototype.D,I.prototype.na,I.prototype.O,I.prototype.ra],Nb=[I.prototype.K,I.prototype.pa,I.prototype.$,I.prototype.va]; -function Ub(a,b){x.call(this,"CPU",a,Ub);var c=a.multiplier||1;this.eb=a.cycles||b;this.qa=c;this.rb=Math.round(this.eb/1E4)/100;this.ua=this.rb*this.qa;this.l.da=!1;this.l.Ab=!1;this.l.Sa=a.autoStart;this.l.bb=!1;this.ab=this.wa=0;this.cb=a.csStart;this.Oa=a.csInterval;this.Pa=a.csStop;this.J=[];this.Pb=this.ad.bind(this);F(this)}A(Ub);var Vb=["power","reset"];h=Ub.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.F=d;for(b=0;ba.oa/a.ua&&(b=1);a.qa=b;b=a.rb*a.qa;if(a.ua!=b){a.ua=b;b=a.ua.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.j&&ec(a.j)}a.N+=a.aa;a.aa=0;a.$=ra();a.pa=0;cc(a)}function yb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Ab(a,b,c){0<=b&&ba.J[b][0]&&(c=a.eb*a.qa/1E3*c|0,a.J[b][0]=c+fc(a))}function fc(a,b){var c=a.va-=a.a;a.a=a.G=0;b&&(a.va=0);return c} -h.ad=function(){if(this.l.da){this.ub>=this.eb&&cc(this,!0);this.Ra=0;this.$a=ra();if(this.pa){var a=this.$a-this.pa;a>this.Mb&&(this.$+=a,this.$>this.$a&&(this.$=this.$a))}try{do{for(var b,c=this.l.bb?1:this.gb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Wb(b)}catch(m){if("number"!=typeof m)throw m;}b=fc(this,!0);this.Ra+=b;this.aa+=b;a=b;if(this.l.bb){var f=!1;this.ab=this.ab+this.Ib()|0;this.wa-=a;0>=this.wa&&(this.wa+=this.Oa,f=!0);0<=this.Pa&&this.Pa<=dc(this)&& -(this.Oa=this.Pa=-1,$b(this),G(this),f=!0);f&&this.U(dc(this)+" cycles: checksum="+k(this.ab))}for(var a=b,g=this.J.length-1;0<=g;g--){var l=this.J[g];0>l[0]||(l[0]-=a,0>=l[0]&&(l[0]=-1,l[1]()))}this.Qa-=b;if(0>=this.Qa){this.Qa+=this.gb;15<=++this.Ob&&(this.j&&this.j.ma(),this.Ob=0);break}}while(this.l.da)}catch(m){G(this);this.j&&this.j.stop(ra(),dc(this));b=m.stack||m.message;this.l.error=!0;this.C(b);return}if(this.l.da){b=setTimeout;c=this.Pb;this.pa=ra();d=this.Mb;this.Ra&&(d=Math.round(d*this.Ra/ -this.gb));d-=this.pa-this.$a;if(e=this.pa-this.$)this.oa=Math.round(this.aa/(10*e))/100,864E5<=e&&(this.N=0,bc(this));if(0>d||this.oad&&(this.$-=d),d=0;this.ub+=this.Ra;this.pa+=d;b(c,d)}}};function ac(a){var b;a.l.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.da)a.U(a.toString()+" busy");else{bc(a);a.l.da=!0;a.l.Ab=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.$,dc(a));setTimeout(a.Pb,0)}}h.Wb=function(){return 0}; -function G(a){var b=!1;if(a.l.da){fc(a);a.N+=a.aa;a.aa=0;a.l.da=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),dc(a));b=!0}a.l.complete=void 0;return b}function gc(a){this.Za=+a.model||1170;this.Kb=a.addrReset||0;Ub.call(this,a,6666667);this.decode=1120==this.Za?hc.bind(this):ic.bind(this);jc(this);this.ra=0;this.O=null;this.l.complete=!1}A(gc,Ub);h=gc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.da&&G(this);jc(this);Xb(this);this.l.error=!1;this.parent.reset.call(this)}; -function jc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Fa=[0,0,0,0,0,0];a.la=[0,0,0,0];a.v=0;a.Ya=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.kc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Ub=[0,0,0,0,0,0,0,0];a.Tb=0;a.u=0;a.A=a.D=0;a.c=a.b=a.pb=0;a.Ga=-1;kc(a)}function kc(a){a.Ca=255;a.I=0;a.yb=0;a.w=0;a.Aa=0;a.xb=0;a.Ba=0;a.Ea=0;a.Xa=0;a.tb=262143;a.Wa=253952;a.O=null;a.h&&Cb(a)}function Cb(a){a.Ea?(a.R=65536,a.K=a.hc,a.V=a.Yc,a.kb=a.Qd,ib(a.h,a.Ba&16?22:18)):(a.R=0,a.K=a.gc,a.V=a.Sb,a.kb=a.$b,ib(a.h,16))}function lc(a,b,c){a.Kb=b;O(a,b);!c&&a.F&&(G(a)||a.F.ma())}h.Ib=function(){return 0}; -h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.N,this.qa]);a.set(2,sb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.N=b[1];bc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.la[c]=a.g[6],a.g[6]=a.la[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function oc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function pc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function qc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function rc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function J(a,b,c){if(!a.ra){var d=!1;0>a.Ga?a.Ga=$a(a):a.v||(b=4,d=!0);a.w&57344||(a.Aa=63222,a.xb=b);a.v=0;var e=a.V(b|a.R),f=a.V(b+2&65535|a.R);Eb(a,f&-12289|a.Ga>>2&12288);d&&(a.I|=4,a.g[6]=4);sc(a,a.Ga);sc(a,a.g[7]);O(a,e);a.u&=-113;a.Ga=-1;a.u|=8;if(26!=c)throw b;}}function tc(a){var b=uc(a),c=uc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Eb(a,c);a.u&=-17} -function vc(a,b){var c=b>>13&31;31>c?a.Ba&32&&(b=a.kc[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)")):b|=4186112;return b} -function wc(a,b,c){var d,e,f,g=0;d=b>>13;a.Ba&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.tb;ff&&(3932160<=f&&(f=vc(a,f&262143)),f>=a.Wa&&4186112>f&&(a.I|=32,J(a,4,12))));switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|= -16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Xa=a.v,a.Ya=d;g&&(g&57344&&(0<=a.Ga&&(g|=128),a.w&57344||(a.w=a.w|g|a.Xa<<5|a.Ya<<1),J(a,168,16)),a.w&61440||!(4191360>f||4194239>>a.c].Cb(b&a.j,c&255,b)}function uc(a){var b=a.V(a.g[6]|a.R);a.g[6]=a.g[6]+2&65535;return b} -function sc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Aa=a.Aa<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-= -8;break;case 6:return e=a.V(nc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.V(nc(a,2)),e=e+a.g[c]&65535,e=a.V(e|a.R)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.I|=4,a.g[6]=4,J(a,4,24)):(a.I|=8,a.u|=64));return e}h.qb=function(a){if(!this.Ea)return this.h.qb(a);this.ra++;a=this.Sb(wc(this,a,2));this.ra--;return a}; -h.Va=function(a,b){this.Ea?(this.ra++,xc(this,wc(this,a,5),b),this.ra--):this.h.Va(a,b)};h.zb=function(a,b){this.Ea?(this.ra++,this.$b(wc(this,a,4),b),this.ra--):this.h.zb(a,b)};h.gc=function(a,b,c){return yc(this,a,b,c)};h.hc=function(a,b,c){return wc(this,yc(this,a,b,c),c)};h.Sb=function(a){return qb(this.h,a)};h.Yc=function(a){return qb(this.h,wc(this,a,2))};h.$b=function(a,b){rb(this.h,a,b&65535)};h.Qd=function(a,b){rb(this.h,wc(this,a,4),b)}; -function zc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=yc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.V(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.la[a.B>>12&3];return c}function Ac(a,b,c,d){a.w&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=yc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=wc(a,e|c&65536,4),a.v=a.B>>14&3,rb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.la[a.B>>12&3]=d} -function Bc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.K(b,c,3),a=pb(a.h,c)):a=a.g[c]&255;return a}function Cc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?qb(a.h,a.K(b,c,2)):a.g[c]}function Dc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return yc(a,b,c,8)}function Ec(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.K(b,c,3),a=pb(a.h,c)):a=a.g[c]&255;return a}function Fc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?qb(a.h,a.K(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.pb=a.K(b,e,7),xc(a,e,d.call(a,c,pb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.K(b,e,6),rb(a.h,e,d.call(a,c,qb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Gc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?xc(a,a.K(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Hc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?rb(a.h,a.K(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.Wb=function(a){this.l.complete=!0;var b=a?this.l.Ab?0:1:-1;this.l.Ab=!1;this.va=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.yb&224)>>5,e=this.O&&this.O.Ia>d?this.O:null;e&&(c=e.dd,d=e.Ia);d>(this.B&224)>>5?(this.u&4&&(nc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(mc(this))}while(0>1|b<<16;qc(this,a);return a&65535}function Nc(a,b){a=b&2048|b>>1|b<<8;qc(this,a<<8);return a&255}function Oc(a,b){a=b&~a;R(this,a);return a}function Pc(a,b){a=b&~a;R(this,a<<8);return a}function Qc(a,b){a|=b;R(this,a);return a}function Rc(a,b){a|=b;R(this,a<<8);return a}function Sc(a,b){a=~b|65536;oc(this,a);return a&65535}function Tc(a,b){a=~b|256;oc(this,a<<8);return a&255} -function Uc(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function Vc(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function Wc(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function Xc(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function Yc(a,b){a=-b;oc(this,a,a&b&32768);return a&65535}function Zc(a,b){a=-b;oc(this,a<<8,(a&b&128)<<8);return a&255} -function $c(a,b){a=b<<1|this.m>>16&1;qc(this,a);return a&65535}function ad(a,b){a=b<<1|this.m>>16&1;qc(this,a<<8);return a&255}function bd(a,b){a=(this.m&65536|b)>>1|b<<16;qc(this,a);return a&65535}function cd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;qc(this,a<<8);return a&255}function dd(a,b){var c=b-a;rc(this,c,a,b);return c&65535}function ed(a,b){var c=b-a;rc(this,c<<8,a<<8,b<<8);return c&255}function fd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function gd(a,b){a^=b;R(this,a);return a&65535}function hd(a){U(this,a,Cc(this,a),Ic);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function id(a){var b=Fc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function jd(a){var b=Fc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function kd(a){V(this,a,!Q(this))}function ld(a){V(this,a,Q(this))} -function md(a){U(this,a,Cc(this,a),Oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){T(this,a,Bc(this,a),Pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function od(a){U(this,a,Cc(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function pd(a){T(this,a,Bc(this,a),Rc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function qd(a){R(this,Cc(this,a)&Fc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function rd(a){R(this,(Bc(this,a)&Ec(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function sd(a){V(this,a,this.i&65535?0:4)}function td(a){V(this,a,!this.ya()==!(this.f&32768))}function ud(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function vd(a){V(this,a,!Q(this)&&!!(this.i&65535))} -function wd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function xd(a){V(this,a,Q(this)||(this.i&65535?0:4))}function yd(a){V(this,a,!this.ya()!=!(this.f&32768))}function zd(a){V(this,a,this.ya())}function Ad(a){V(this,a,!!(this.i&65535))}function Bd(a){V(this,a,!this.ya())}function Cd(){J(this,12,1);this.a-=5}function Dd(a){V(this,a,!0)}function Ed(a){V(this,a,!(this.f&32768))}function Fd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Gd(a){var b=Cc(this,a);a=Fc(this,a);rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){var b=Bc(this,a)<<8;a=Ec(this,a)<<8;rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Id(a){var b=Fc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Jd(){J(this,24,2);this.a-=25} -function Kd(){this.B&49152?(this.I|=128,J(this,4,3)):this.F?this.F.b():G(this);this.a-=7}function Ld(){J(this,16,4);this.a-=25}var Md=[0,7,7,10,7,11,9,13];function Nd(a){this.G=this.a;O(this,Dc(this,a));this.a=this.G-Md[this.c]}var Od=[0,14,14,17,14,18,16,20];function Pd(a){this.G=this.a;var b=Dc(this,a);a=a>>6&7;sc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.G-Od[this.c]}var Qd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Rd(a){var b=Cc(this,a);this.G=this.a;R(this,Hc(this,a,b));this.a=this.G-Qd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Sd(a){var b=Bc(this,a);R(this,Gc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Td=[7,13,13,17,14,18,17,21]; -function Ud(a){var b=Fc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function $d(a){U(this,a,Cc(this,a),dd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function ae(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)}function be(){J(this,28,5);this.a-=5}function ce(){this.u&4||this.j.ma();this.u|=4;nc(this,-2);this.a-=3}function de(a){U(this,a,Cc(this,a),gd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function hc(a){ee[a>>12].call(this,a)}function fe(a){ge[a>>6&3].call(this,a)}function he(a){ie[a>>6&3].call(this,a)}function je(a){ke[a>>6&3].call(this,a)}function le(a){me[a&15].call(this,a)}function ne(a){oe[a&15].call(this,a)} -function pe(a){qe[a>>6&3].call(this,a)}function re(a){se[a>>6&3].call(this,a)}function te(a){ue[a>>6&3].call(this,a)} -var ee=[function(a){ve[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,hd,Y,function(a){we[a>>8&15].call(this,a)},Sd,Hd,rd,nd,pd,$d,Y],ve=[function(a){xe[a>>4&15].call(this,a)},Dd,Ad,sd,td,yd,ud,wd,Pd,Pd,fe,he,je,Y,Y,Y],ge=[function(a){oc(this,Hc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)}],ie=[function(a){U(this,a,0, -Yc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Fc(this,a);oc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ke=[function(a){U(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Mc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}], -xe=[function(a){ye[a&15].call(this,a)},Y,Y,Y,Nd,Nd,Nd,Nd,Yd,Y,le,ne,ae,ae,ae,ae],ye=[Kd,ce,Xd,Cd,Ld,Wd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],me=[Vd,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],oe=[Vd,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],we=[Bd,zd,vd,xd,Ed,Fd,kd,ld,Jd,be,pe,re,te,Y,Y,Y],qe=[function(a){oc(this, -Gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}],se=[function(a){T(this,a,0,Zc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Ec(this,a);oc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],ue=[function(a){T(this,a,0,cd);this.a-=this.c?9+(this.pb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Nc);this.a-=this.c?9+(this.pb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Lc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ic(a){ze[a>>12].call(this,a)} -var ze=[function(a){Ae[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,hd,function(a){Be[a>>8&15].call(this,a)},function(a){Ce[a>>8&15].call(this,a)},Sd,Hd,rd,nd,pd,$d,Y],Ae=[function(a){De[a>>4&15].call(this,a)},Dd,Ad,sd,td,yd,ud,wd,Pd,Pd,fe,he,je,function(a){Ee[a>>6&3].call(this,a)},Y,Y],Ee=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=zc(this,a,0);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G= -this.a;Ac(this,a,0,b);R(this,b);this.a=this.G-Td[this.c]},function(a){R(this,Hc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],De=[function(a){Fe[a&15].call(this,a)},Y,Y,Y,Nd,Nd,Nd,Nd,Yd,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},le,ne,ae,ae,ae,ae],Fe=[Kd,ce,Xd,Cd,Ld,Wd,function(){tc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[Ud,Ud,Id,Id,id,id,jd,jd,de,de,Y,Y,Y,Y,Zd,Zd],Ce=[Bd,zd,vd,xd,Ed,Fd,kd,ld,Jd,be,pe,re,te,function(a){Ge[a>>6& -3].call(this,a)},Y,Y],Ge=[Y,function(a){a=zc(this,a,65536);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G=this.a;Ac(this,a,65536,b);R(this,b);this.a=this.G-Td[this.c]},Y]; -function He(a){x.call(this,"ROM",a,He);this.W=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=n(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Ra(c.na,a,b),(a=ta(a,b))?(c.b=a.L,c.W=a.W):c.j=null,Ie(c))})}}A(He);He.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.F=d;Ie(this)}; -He.prototype.ja=function(){this.W&&(this.F&&this.F.a(this.id,this.i,this.c,this.W),delete this.W);return!0};He.prototype.ia=function(){return!0}; -function Ie(a){if(!Ua(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+k(a.b.length,8,!0)+") does not match specified size ("+k(a.c,8,!0)+")";a.l.error=!0;a.C(b)}else{b=a.i;if(lb(a.h,b,a.c,Lb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,q=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),u=l,z=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(z)for(;z--;)a.a.Va(q++,b[u++]&255);else q&1?G(a.a):lc(a.a,q,f);g=!0}else l++;else l+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&zb(e.a,e.$))});this.aa=Bb(52,4);this.O=yb(this.a,function(){e.c|=128;e.c&64&&zb(e.a,e.aa)});ub(b,this,Oe);F(this)}; -h.Jb=function(){if(!this.v){var a=Wb(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Na)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Jb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ia=function(a){return a?this.save():!0};h.reset=function(){Pe(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Pe(this)};function Pe(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.wb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.K||8,c=a-this.s%a,this.K&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ab(this.a,this.O,1E3/Math.round(this.J/10))}};var Qe={},Oe=(Qe[65392]=[null,null,Z.prototype.Ic,Z.prototype.Ad,"RCSR"],Qe[65394]=[null,null,Z.prototype.Hc,Z.prototype.zd,"RBUF"],Qe[65396]=[null,null,Z.prototype.$c,Z.prototype.Sd,"XCSR"],Qe[65398]=[null,null,Z.prototype.Zc,Z.prototype.Rd,"XBUF"],Qe);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&Te(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Te(d,n(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.F=d;this.K=Ue(a);var e=this;if((this.c=Wb(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Bb(56,4);this.R=yb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var l=0>g&&a.j&&!a.j.l.P;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",l):(Ra(a.na,e,f),(e=ta(e,f))&&cf(a,b,c,d,e.L,e.fa,e.ea)); -a.l.lb=!1;a.m&&(a.m--,a.m||F(a));$e(a)})}function Xe(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.T);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ob?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){kf(a,b,c,d)})} -function kf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.P;if(d)a.controller.C('Unable to load disk "'+a.ta+'" (error '+d+": "+b+")",f);else{Ra(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(l.length)if(1==l.length)t(l[0]);else{a.T=l.length;a.Y=l[0].length;a.S=l[0][0].length;var m=l[0][0][0];a.ga=m&&m.length||512;for(d=c=0;d>2,q=m.pattern;void 0===q&&(q=m.pattern=0);var u=m.data;if(void 0===u){var z=m.bytes;if(void 0!==z&&z.length){for(var S=p<<2,ua=z.length;ua>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ka+a.ba&&(a.ba+=f-(a.ka+a.ba)+1):(a.ka=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||m>=this.a[l].length||p>=this.a[l][m].length){c="sector (CHS="+l+":"+m+":"+p+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(l=this.a[l][m][p]){for(m=l.data.length;mb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.ta+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=mf(this,a++);)of(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function of(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; -h.Z=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(l){t("RL11 option error: "+l.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&pf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&qf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,l;l=mf(a,c++);)for(var m=0,p=l.length;mb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";pf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){rf(this)};h.save=function(){return(new P(this)).data()}; -h.restore=function(a){return rf(this,a[0])};function uf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=n(c);a.status("Attempting to load "+c+' as "'+b+'"')}wf(a,e,b,c,!1,d)}else vf(a,e)} -function wf(a,b,c,d,e,f){var g=-1,l=a.b[b];l.Da.toLowerCase()!=d.toLowerCase()&&(g++,vf(a,b,!0),l.nb?a.C("RL11 busy"):(l.nb=!0,e&&(l.mb=!0,a.s++),l.fb=!!f,jf(new ef(a,l,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.nb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.T||f[1]>a.Y)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.sb)),b=null);b?(a.ca=b,a.ta=c,a.Da=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.sb),a.mb||e),this.j&&ec(this.j)):a.fb=!1;a.mb&&(a.mb=!1,--this.s||F(this));pf(this,a.sb)}; -function tf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.M=this.M|a|32768);return!0}; -h.oc=function(a,b,c,d,e,f,g){for(var l=0,m=a.ca,p=null,q;e--;){if(!p){p=a.ca.seek(b,c,d,!0);if(!p){l=5120;break}q=0}var u,z;if(0>(u=a.ca.read(p,q++))||0>(z=a.ca.read(p,q++))){l=5120;break}this.h.zb(vc(this.a,f),u|z<<8);if(xb(this.h)){l=8192;break}f+=2;if(q>=m.ga&&(p=null,++d>=m.S&&(d=0,++c>=m.Y&&(c=0,++b>=m.T)))){l=5120;break}}return g(l,b,c,d,e,f)}; -h.hd=function(a,b,c,d,e,f,g){for(var l=0,m=a.ca,p=null,q;e--;){var u=this.h.qb(vc(this.a,f));if(xb(this.h)){l=8192;break}f+=2;if(!p){p=a.ca.seek(b,c,d,!0);if(!p){l=5120;break}q=0}if(!a.ca.write(p,q++,u&255)||!a.ca.write(p,q++,u>>8)){l=5120;break}if(q>=m.ga&&(p=null,++d>=m.S&&(d=0,++c>=m.Y&&(c=0,++b>=m.T)))){l=5120;break}}return g(l,b,c,d,e,f)};h.Lc=function(){return this.M&65535}; -h.Dd=function(a){this.M=this.M&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.M&128)){var b;a=!0;var c=this.b[(this.M&768)>>8],d,e,f,g;this.M&=-2;switch(this.M&14){case 4:this.c&8&&(this.M&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.oc;case 10:b||(b=this.hd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.T||f>=c.S?this.M|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.M|=129,this.M&64&&zb(this.a,this.G))}};h.Jc=function(){return this.v};h.Bd=function(a){this.v=a&65534};h.Mc=function(){return this.c};h.Ed=function(a){this.c=a};h.Nc=function(){return this.m};h.Fd=function(a){this.m=a};h.Kc=function(){return this.w};h.Cd=function(a){this.w=a&63}; -var xf={},sf=(xf[63744]=[null,null,N.prototype.Lc,N.prototype.Dd,"RLCS"],xf[63746]=[null,null,N.prototype.Jc,N.prototype.Bd,"RLBA"],xf[65284]=[null,null,N.prototype.Mc,N.prototype.Ed,"RLDA"],xf[65286]=[null,null,N.prototype.Nc,N.prototype.Fd,"RLMP"],xf[65288]=[null,null,N.prototype.Kc,N.prototype.Cd,"RLBE"],xf); -function yf(a,b,c){x.call(this,"Computer",a,yf);this.l.P=!1;zf(this,b);this.A=Wb(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Af;this.v=null;this.m=this.J=!1;this.O=Wb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Bf(this);if(this.a=Ta("CPU",this.id)){this.F=Ta("Debugger",this.id);this.h=new ab({id:this.na+".bus",busWidth:this.N},this.a,this.F);var d,e=B(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Ta)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bAf){if(Cf(d,this.v)){this.i=new P(this,"1.30.2","failsafe");Cf(this.i)&&(Hf(this,d),a=2,If(this.i));this.i.set("timestamp",sa());Jf(this.i);var e=this.b&&!this.m;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Gf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Cf(d,g):("error"== -f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.U(f+": "+g),If(d),Cf(d)?(c=Gf(d),e=!0):c=!1))}e&&Ff(this,c?d:null)}else 2==a&&d.clear()}else Ff(this);delete this.v;delete this.w}e=B(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Kf(this,this.a,b,c,a),this.a.Sa());this.G&&(Hf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Hf(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Nf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),l=sa();g.set("timestamp",l);f.set("timestamp",l);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.P=!1,!1===d&&(e=null)));for(var l=B(a.id),m=0;mf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,l){if(l||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+l+")");else{if(f=d[3])if(l=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var m=l[0],p,q=/( [a-z]+=)(['"])(.*?)\2/g;p=q.exec(f);)m=0>m.indexOf(p[1])?m.replace(">",p[0]+">"):m.replace(new RegExp(p[1]+"(['\"])(.*?)\\1"),p[0]);l[0]!=m&&(g=g.replace(l[0],m))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Uf(a,b,c)}})}else c(a,null)} -function Vf(a,b,c,d){function e(a){if(void 0===l){var b=g&&E(g,"machine-warning");l=b&&b[0]||g}l&&(l.innerHTML=oa(a))}function f(a){e("Error: "+a);m&&(--Rf||Ia(!0));m=!1}var g,l,m=!0;Rf++;Qa[a]={};try{if(g=document.getElementById(a)){var p;if("object"==typeof resources&&(p=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=p:u.appendChild(document.createTextNode(p));q.appendChild(u)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");p=function(d,l){l?Sf(c,null,null,!1,e,function(d,m){m?(Ra(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(m=l.transformNode(m))?(g.outerHTML=m,--Rf||Ia(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(m),(m=d.transformToFragment(l,document))?g.parentNode?(g.parentNode.replaceChild(m,g),--Rf||Ia(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Sf(b,a,d,!0,e,p):Tf(b,null,a,d,!1,e,p)}else f("missing machine element: "+a)}catch(z){f(z.message)}return m}window.embedPDP11=function(a,b,c,d){Ia(!1);return Vf(a,b,c,d)};window.enableEvents=Ia;window.sendEvent=Ja;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Wa)for(a=Array(this.size>>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&I(this.i,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ra=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.$(a,b)},pa:function(a,b,c){this.j?this.g(a,b,c):this.Ab(a,b,c)},va:function(a,b,c){this.j?this.g(a,b,c):this.wa(a,b,c)},D:function(a){return this.b[a]},J:function(a){return this.b[a]},O:function(a,b){a&1&&I(this.i,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&I(this.i,b,64);return this.u[a>>1]},oa:function(a,b){this.b[a]=b;this.ra=!0},qa:function(a,b){this.b[a]=b;this.ra=!0},ua:function(a,b,c){a&1&&I(this.i, +c,64);this.c.setUint16(a,b,!0);this.ra=!0},Da:function(a,b,c){a&1&&I(this.i,c,64);this.u[a>>1]=b;this.ra=!0}};function gb(a,b,c){a.F=b;a.h=a.m=0;c&&((a.h=c.h)&&Qb(a,Rb,!1),(a.m=c.m)&&Sb(a,Rb,!1))}function Sb(a,b,c){c&&a.m||(a.zb=!a.j&&b[1]||a.g,a.jb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Ab=b[1]||a.g,a.wa=b[3]||a.A}function Qb(a,b,c){c&&a.h||(a.tb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.$=b[2]||a.w}function Mb(a,b){b||(b=Tb);Qb(a,b,void 0);Sb(a,b,void 0)} +var Tb=[],Pb=[H.prototype.N,H.prototype.ta,H.prototype.na,H.prototype.Ea],Rb=[H.prototype.G,H.prototype.pa,H.prototype.R,H.prototype.va];if(Wa)var Ob=[H.prototype.D,H.prototype.oa,H.prototype.O,H.prototype.ua],Nb=[H.prototype.J,H.prototype.qa,H.prototype.aa,H.prototype.Da]; +function Ub(a,b){x.call(this,"CPU",a,Ub);var c=a.multiplier||1;this.bb=a.cycles||b;this.qa=c;this.pb=Math.round(this.bb/1E4)/100;this.ta=this.pb*this.qa;this.l.da=!1;this.l.xb=!1;this.l.Qa=a.autoStart;this.l.cb=!1;this.$a=this.va=0;this.ab=a.csStart;this.Ea=a.csInterval;this.Na=a.csStop;this.I=[];this.Nb=this.Wc.bind(this);E(this)}z(Ub);var Vb=["power","reset"];k=Ub.prototype; +k.ha=function(a,b,c,d){this.j=a;this.i=b;this.F=d;for(b=0;ba.oa/a.ta&&(b=1);a.qa=b;b=a.pb*a.qa;if(a.ta!=b){a.ta=b;b=a.ta.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.j&&ec(a.j)}a.N+=a.aa;a.aa=0;a.$=ra();a.pa=0;cc(a)}function yb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Ab(a,b,c){0<=b&&ba.I[b][0]&&(c=a.bb*a.qa/1E3*c|0,a.I[b][0]=c+fc(a))}function fc(a,b){var c=a.ua-=a.a;a.a=a.G=0;b&&(a.ua=0);return c} +k.Wc=function(){if(this.l.da){this.qb>=this.bb&&cc(this,!0);this.Pa=0;this.Wa=ra();if(this.pa){var a=this.Wa-this.pa;a>this.Kb&&(this.$+=a,this.$>this.Wa&&(this.$=this.Wa))}try{do{for(var b,c=this.l.cb?1:this.eb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Sb(b)}catch(l){if("number"!=typeof l)throw l;}b=fc(this,!0);this.Pa+=b;this.aa+=b;a=b;if(this.l.cb){var f=!1;this.$a=this.$a+this.Fb()|0;this.va-=a;0>=this.va&&(this.va+=this.Ea,f=!0);0<=this.Na&&this.Na<=dc(this)&& +(this.Ea=this.Na=-1,$b(this),F(this),f=!0);f&&this.U(dc(this)+" cycles: checksum="+m(this.$a))}for(var a=b,g=this.I.length-1;0<=g;g--){var h=this.I[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Oa-=b;if(0>=this.Oa){this.Oa+=this.eb;15<=++this.Lb&&(this.j&&this.j.ma(),this.Lb=0);break}}while(this.l.da)}catch(l){F(this);this.j&&this.j.stop(ra(),dc(this));b=l.stack||l.message;this.l.error=!0;this.C(b);return}if(this.l.da){b=setTimeout;c=this.Nb;this.pa=ra();d=this.Kb;this.Pa&&(d=Math.round(d*this.Pa/ +this.eb));d-=this.pa-this.Wa;if(e=this.pa-this.$)this.oa=Math.round(this.aa/(10*e))/100,864E5<=e&&(this.N=0,bc(this));if(0>d||this.oad&&(this.$-=d),d=0;this.qb+=this.Pa;this.pa+=d;b(c,d)}}};function ac(a){var b;a.l.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.da)a.U(a.toString()+" busy");else{bc(a);a.l.da=!0;a.l.xb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.$,dc(a));setTimeout(a.Nb,0)}}k.Sb=function(){return 0}; +function F(a){var b=!1;if(a.l.da){fc(a);a.N+=a.aa;a.aa=0;a.l.da=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),dc(a));b=!0}a.l.complete=void 0;return b}function gc(a){this.Za=+a.model||1170;this.Gb=a.addrReset||0;Ub.call(this,a,6666667);this.decode=1120==this.Za?hc.bind(this):ic.bind(this);jc(this);this.rb=0;this.O=null;this.l.complete=!1}z(gc,Ub);k=gc.prototype;k.reset=function(){this.status("model "+this.Za);this.l.da&&F(this);jc(this);Zb(this);this.l.error=!1;this.parent.reset.call(this)}; +function jc(a){a.m=65536;a.g=32768;a.h=65535;a.u=32768;a.B=15;a.f=[0,0,0,0,0,0,0,a.Gb];a.Ga=[0,0,0,0,0,0];a.la=[0,0,0,0];a.v=0;a.Ya=0;a.cc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Va=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Qb=[0,0,0,0,0,0,0,0];a.Pb=0;a.s=0;a.A=a.D=0;a.c=a.b=a.lb=0;a.wa=-1;kc(a)}function kc(a){a.Ba=255;a.M=0;a.wb=0;a.w=0;a.Aa=0;a.vb=0;a.Fa=0;a.Sa=0;a.Xa=0;a.Jb=262143;a.O=null;a.i&&Cb(a)}function Cb(a){a.Sa?(a.R=65536,a.J=a.bc,a.V=a.Tc,a.jb=a.Nd,ib(a.i,a.Fa&16?22:18)):(a.R=0,a.J=a.ac,a.V=a.Sc,a.jb=a.Md,ib(a.i,16))}function lc(a,b,c){a.Gb=b;O(a,b);!c&&a.F&&(F(a)||a.F.ma())}k.Fb=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.N,this.qa]);a.set(2,tb(this.i));return a.data()};k.restore=function(a){var b=a[1];this.N=b[1];bc(this,b[3]);a:{b=this.i;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.la[c]=a.f[6],a.f[6]=a.la[a.v]);a.B=b;a.s|=2}function R(a,b){a.s&128||(a.u=a.h=b,a.g=0)}function oc(a,b,c){a.s&128||(a.u=a.h=a.m=b,a.g=c||0)}function pc(a,b,c,d){a.s&128||(a.u=a.h=a.m=b,a.g=(c^b)&(d^b))}function qc(a,b){a.s&128||(a.u=a.h=a.m=b,a.g=a.u^a.m>>1)}function rc(a,b,c,d){a.s&128||(a.u=a.h=a.m=b,a.g=(c^d)&(d^b))} +function J(a,b,c){if(!a.rb){var d=!1;0>a.wa?a.wa=ab(a):a.v||(b=4,d=!0);a.w&57344||(a.Aa=63222,a.vb=b);a.v=0;var e=a.V(b|a.R),f=a.V(b+2&65535|a.R);Eb(a,f&-12289|a.wa>>2&12288);d&&(a.M|=4,a.f[6]=4);sc(a,a.wa);sc(a,a.f[7]);O(a,e);a.s&=-113;a.wa=-1;a.s|=8;if(26!=c)throw b;}}function tc(a){var b=uc(a),c=uc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Eb(a,c);a.s&=-17} +function qb(a,b){var c=b>>13&31;31>c&&a.Fa&32&&(b=a.Va[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function vc(a,b,c){var d,e,f,g=0;d=b>>13;a.Fa&a.cc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.Jb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Xa=a.v,a.Ya=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.w&57344||(a.w=a.w|g|a.Xa<<5|a.Ya<<1),b=!0),a.w&61440||!(4191360> +f||4194239>>a.c].zb(b&a.j,c&255,b)}function uc(a){var b=a.V(a.f[6]|a.R);a.f[6]=a.f[6]+2&65535;return b}function sc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.Aa=a.Aa<<8|246);!a.v&&c<=a.Ba&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-= +8;break;case 6:return e=a.V(nc(a,2)),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=a.V(nc(a,2)),e=e+a.f[c]&65535,e=a.V(e|a.R)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.w&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.Ba||65534<=a.f[6])&&(a.f[6]<=a.Ba-32?(a.M|=4,a.f[6]=4,J(a,4,24)):(a.M|=8,a.s|=64));return e}k.Ua=function(a,b){this.Sa?(this.rb++,wc(this,vc(this,a,5),b),this.rb--):this.i.Ua(a,b)};k.ac=function(a,b,c){return xc(this,a,b,c)}; +k.bc=function(a,b,c){return vc(this,xc(this,a,b,c),c)};k.Sc=function(a){return rb(this.i,a)};k.Tc=function(a){return rb(this.i,vc(this,a,2))};k.Md=function(a,b){sb(this.i,a,b&65535)};k.Nd=function(a,b){sb(this.i,vc(this,a,4),b)};function yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=xc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.V(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.f[d]:a.la[a.B>>12&3];return c} +function zc(a,b,c,d){a.w&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=xc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=vc(a,e|c&65536,4),a.v=a.B>>14&3,sb(a.i,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.f[e]=d:a.la[a.B>>12&3]=d}function Ac(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=pb(a.i,c)):a=a.f[c]&255;return a}function Bc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?rb(a.i,a.J(b,c,2)):a.f[c]}function Cc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return xc(a,b,c,8)} +function Dc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=pb(a.i,c)):a=a.f[c]&255;return a}function Ec(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?rb(a.i,a.J(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.lb=a.J(b,e,7),wc(a,e,d.call(a,c,pb(a.i,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),sb(a.i,e,d.call(a,c,rb(a.i,e)))):a.f[e]=d.call(a,c,a.f[e])} +function Fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?wc(a,a.J(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?sb(a.i,a.J(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} +k.Sb=function(a){this.l.complete=!0;var b=a?this.l.xb?0:1:-1;this.l.xb=!1;this.ua=this.a=a;do{if(this.s){this.s&112&&(this.s&32?J(this,168,28):this.s&64?J(this,4,30):this.s&16&&J(this,12,32),this.s&=-113);if(a=this.s&7){a=!1;if(this.s&2){this.s&=-3;var c=160,d=(this.wb&224)>>5,e=this.O&&this.O.Ia>d?this.O:null;e&&(c=e.Zc,d=e.Ia);d>(this.B&224)>>5?(this.s&4&&(nc(this,2),this.s&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.s&1&&this.s++;a=a&&0>b}if(a)break}this.s=this.s&7|this.B&16;this.decode(mc(this))}while(0>1|b<<16;qc(this,a);return a&65535}function Mc(a,b){a=b&2048|b>>1|b<<8;qc(this,a<<8);return a&255}function Nc(a,b){a=b&~a;R(this,a);return a}function Oc(a,b){a=b&~a;R(this,a<<8);return a}function Pc(a,b){a|=b;R(this,a);return a}function Qc(a,b){a|=b;R(this,a<<8);return a}function Rc(a,b){a=~b|65536;oc(this,a);return a&65535}function Sc(a,b){a=~b|256;oc(this,a<<8);return a&255} +function Tc(a,b){a=b-a;this.s&128||(this.u=this.h=a,this.g=b&(b^a));return a&65535}function Uc(a,b){a=b-a;var c=a<<8;b<<=8;this.s&128||(this.u=this.h=c,this.g=b&(b^c));return a&255}function Vc(a,b){a=b+a;this.s&128||(this.u=this.h=a,this.g=a&(b^a));return a&65535}function Wc(a,b){a=b+a;var c=a<<8;this.s&128||(this.u=this.h=c,this.g=c&(b<<8^c));return a&255}function Xc(a,b){a=-b;oc(this,a,a&b&32768);return a&65535}function Yc(a,b){a=-b;oc(this,a<<8,(a&b&128)<<8);return a&255} +function Zc(a,b){a=b<<1|this.m>>16&1;qc(this,a);return a&65535}function $c(a,b){a=b<<1|this.m>>16&1;qc(this,a<<8);return a&255}function ad(a,b){a=(this.m&65536|b)>>1|b<<16;qc(this,a);return a&65535}function bd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;qc(this,a<<8);return a&255}function cd(a,b){var c=b-a;rc(this,c,a,b);return c&65535}function dd(a,b){var c=b-a;rc(this,c<<8,a<<8,b<<8);return c&255}function ed(a,b){this.s&128||(this.u=this.h=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} +function fd(a,b){a^=b;R(this,a);return a&65535}function gd(a){U(this,a,Bc(this,a),Hc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function hd(a){var b=Ec(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.u=this.h=c;this.a-=(this.c?6:7)+b} +function id(a){var b=Ec(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.u=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function jd(a){V(this,a,!Q(this))}function kd(a){V(this,a,Q(this))} +function ld(a){U(this,a,Bc(this,a),Nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function md(a){T(this,a,Ac(this,a),Oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){U(this,a,Bc(this,a),Pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function od(a){T(this,a,Ac(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function pd(a){R(this,Bc(this,a)&Ec(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function qd(a){R(this,(Ac(this,a)&Dc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function rd(a){V(this,a,this.h&65535?0:4)}function sd(a){V(this,a,!this.ya()==!(this.g&32768))}function td(a){V(this,a,!!(this.h&65535)&&!this.ya()==!(this.g&32768))}function ud(a){V(this,a,!Q(this)&&!!(this.h&65535))} +function vd(a){V(this,a,(this.h&65535?0:4)||!this.ya()!=!(this.g&32768))}function wd(a){V(this,a,Q(this)||(this.h&65535?0:4))}function xd(a){V(this,a,!this.ya()!=!(this.g&32768))}function yd(a){V(this,a,this.ya())}function zd(a){V(this,a,!!(this.h&65535))}function Ad(a){V(this,a,!this.ya())}function Bd(){J(this,12,1);this.a-=5}function Cd(a){V(this,a,!0)}function Dd(a){V(this,a,!(this.g&32768))}function Ed(a){V(this,a,this.g&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.u=0);this.a-=5}function Fd(a){var b=Bc(this,a);a=Ec(this,a);rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){var b=Ac(this,a)<<8;a=Dc(this,a)<<8;rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Hd(a){var b=Ec(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.u=d>>16):(this.g=32768,this.h=d>>15|d,this.u=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.u=0,this.g=32768,this.m=65536,this.a-=7}function Id(){J(this,24,2);this.a-=25} +function Jd(){this.B&49152?(this.M|=128,J(this,4,3)):this.F?this.F.i():F(this);this.a-=7}function Kd(){J(this,16,4);this.a-=25}var Ld=[0,7,7,10,7,11,9,13];function Md(a){this.G=this.a;O(this,Cc(this,a));this.a=this.G-Ld[this.c]}var Nd=[0,14,14,17,14,18,16,20];function Od(a){this.G=this.a;var b=Cc(this,a);a=a>>6&7;sc(this,this.f[a]);this.f[a]=this.f[7];O(this,b);this.a=this.G-Nd[this.c]}var Pd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Qd(a){var b=Bc(this,a);this.G=this.a;R(this,Gc(this,a,b));this.a=this.G-Pd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Rd(a){var b=Ac(this,a);R(this,Fc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Sd=[7,13,13,17,14,18,17,21]; +function Td(a){var b=Ec(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.s&128||(this.u=b>>16,this.h=this.u|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)O(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Zd(a){U(this,a,Bc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function $d(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)}function ae(){J(this,28,5);this.a-=5}function be(){this.s&4||this.j.ma();this.s|=4;nc(this,-2);this.a-=3}function ce(a){U(this,a,Bc(this,a),fd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function hc(a){de[a>>12].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)}function ie(a){je[a>>6&3].call(this,a)}function ke(a){le[a&15].call(this,a)}function me(a){ne[a&15].call(this,a)} +function oe(a){pe[a>>6&3].call(this,a)}function qe(a){re[a>>6&3].call(this,a)}function se(a){te[a>>6&3].call(this,a)} +var de=[function(a){ue[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,gd,Y,function(a){ve[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,Zd,Y],ue=[function(a){we[a>>4&15].call(this,a)},Cd,zd,rd,sd,xd,td,vd,Od,Od,ee,ge,ie,Y,Y,Y],fe=[function(a){oc(this,Gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}],he=[function(a){U(this,a,0, +Xc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Ec(this,a);oc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],je=[function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}], +we=[function(a){xe[a&15].call(this,a)},Y,Y,Y,Md,Md,Md,Md,Xd,Y,ke,me,$d,$d,$d,$d],xe=[Jd,be,Wd,Bd,Kd,Vd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],le=[Ud,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.u=0;this.a-=5},W,W,W,W,W,W,W],ne=[Ud,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.u=32768;this.a-=5},X,X,X,X,X,X,X],ve=[Ad,yd,ud,wd,Dd,Ed,jd,kd,Id,ae,oe,qe,se,Y,Y,Y],pe=[function(a){oc(this, +Fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)}],re=[function(a){T(this,a,0,Yc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Dc(this,a);oc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],te=[function(a){T(this,a,0,bd);this.a-=this.c?9+(this.lb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Mc);this.a-=this.c?9+(this.lb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ic(a){ye[a>>12].call(this,a)} +var ye=[function(a){ze[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,gd,function(a){Ae[a>>8&15].call(this,a)},function(a){Be[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,Zd,Y],ze=[function(a){Ce[a>>4&15].call(this,a)},Cd,zd,rd,sd,xd,td,vd,Od,Od,ee,ge,ie,function(a){De[a>>6&3].call(this,a)},Y,Y],De=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);O(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=yc(this,a,0);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G= +this.a;zc(this,a,0,b);R(this,b);this.a=this.G-Sd[this.c]},function(a){R(this,Gc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ce=[function(a){Ee[a&15].call(this,a)},Y,Y,Y,Md,Md,Md,Md,Xd,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.s|=1),this.a-=5):J(this,8,6)},ke,me,$d,$d,$d,$d],Ee=[Jd,be,Wd,Bd,Kd,Vd,function(){tc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[Td,Td,Hd,Hd,hd,hd,id,id,ce,ce,Y,Y,Y,Y,Yd,Yd],Be=[Ad,yd,ud,wd,Dd,Ed,jd,kd,Id,ae,oe,qe,se,function(a){Fe[a>>6& +3].call(this,a)},Y,Y],Fe=[Y,function(a){a=yc(this,a,65536);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G=this.a;zc(this,a,65536,b);R(this,b);this.a=this.G-Sd[this.c]},Y]; +function Ge(a){x.call(this,"ROM",a,Ge);this.W=this.b=null;this.h=a.addr;this.c=a.size;this.g=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.W=a.W):c.j=null,He(c))})}}z(Ge);Ge.prototype.ha=function(a,b,c,d){this.i=b;this.a=c;this.F=d;He(this)}; +Ge.prototype.ja=function(){this.W&&(this.F&&this.F.a(this.id,this.h,this.c,this.W),delete this.W);return!0};Ge.prototype.ia=function(){return!0}; +function He(a){if(!Va(a)){if(a.j){if(!a.b||!a.i)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")";a.l.error=!0;a.C(b)}else{b=a.h;if(lb(a.i,b,a.c,Lb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,p=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=h,w=n-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ua(p++,b[t++]&255);else p&1?F(a.a):lc(a.a,p,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&zb(e.a,e.$))});this.aa=Bb(52,4);this.O=yb(this.a,function(){e.c|=128;e.c&64&&zb(e.a,e.aa)});vb(b,this,Ne);E(this)}; +k.Hb=function(){if(!this.v){var a=Wb(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Da)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ja=function(a,b){if(!b)if(this.Hb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ia=function(a){return a?this.save():!0};k.reset=function(){Oe(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Oe(this)};function Oe(a){a.w=0;a.b=0;a.c=128;a.h=[];return!0}k.ub=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.u%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.u&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.u+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ab(this.a,this.O,1E3/Math.round(this.I/10))}};var Pe={},Ne=(Pe[65392]=[null,null,Z.prototype.Bc,Z.prototype.vd,"RCSR"],Pe[65394]=[null,null,Z.prototype.Ac,Z.prototype.ud,"RBUF"],Pe[65396]=[null,null,Z.prototype.Vc,Z.prototype.Pd,"XCSR"],Pe[65398]=[null,null,Z.prototype.Uc,Z.prototype.Od,"XBUF"],Pe);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&Se(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Se(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +k.ha=function(a,b,c,d){this.j=a;this.i=b;this.a=c;this.F=d;this.J=Te(a);var e=this;if((this.c=Wb(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Bb(56,4);this.R=yb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var h=0>g&&a.j&&!a.j.l.P;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(Sa(a.na,e,f),(e=ta(e,f))&&bf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.kb=!1;a.m&&(a.m--,a.m||E(a));Ze(a)})}function We(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.T);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ob?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){jf(a,b,c,d)})} +function jf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.P;if(d)a.controller.C('Unable to load disk "'+a.sa+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)u(h[0]);else{a.T=h.length;a.Y=h[0].length;a.S=h[0][0].length;var l=h[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var S=n<<2,ua=w.length;ua>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ka+a.ba&&(a.ba+=f-(a.ka+a.ba)+1):(a.ka=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[h].length||n>=this.a[h][l].length){c="sector (CHS="+h+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.a[h][l][n]){for(l=h.data.length;lb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.sa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=lf(this,a++);)nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.g=a.autoMount||null;this.u=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.Z=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){u("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&of(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,h;h=lf(a,c++);)for(var l=0,n=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";of(this,0)}}return!0};k.ia=function(a){return a?this.save():!0};k.reset=function(){qf(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return qf(this,a[0])};function tf(a,b){b||(a.u=0);if(a.g)for(var c in a.g){var d=a.g[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}vf(a,e,b,c,!1,d)}else uf(a,e)} +function vf(a,b,c,d,e,f){var g=-1,h=a.b[b];h.Ca.toLowerCase()!=d.toLowerCase()&&(g++,uf(a,b,!0),h.nb?a.C("RL11 busy"):(h.nb=!0,e&&(h.mb=!0,a.u++),h.fb=!!f,hf(new df(a,h,"preload"),c,d,f,a.Yb)&&g++));return g} +k.Yb=function(a,b,c,d,e){var f;a.nb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.T||f[1]>a.Y)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.sb)),b=null);b?(a.ca=b,a.sa=c,a.Ca=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.sb),a.mb||e),this.j&&ec(this.j)):a.fb=!1;a.mb&&(a.mb=!1,--this.u||E(this));of(this,a.sb)}; +function sf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.h=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +k.hc=function(a,b,c,d,e,f,g){for(var h=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){h=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){h=5120;break}sb(this.i,f,t|w<<8);if(xb(this.i)){h=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.T)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.cd=function(a,b,c,d,e,f,g){for(var h=0,l=a.ca,n=null,p;e--;){var t=rb(this.i,f);if(xb(this.i)){h=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){h=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){h=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.T)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ec=function(){return this.L&65535}; +k.yd=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.h&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.h=this.c&4?this.h+b:this.h-b,this.c=this.h=this.h&65408|c);break;case 8:this.m=this.h;break;case 12:b=this.hc;case 10:b||(b=this.cd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.T||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.Zb.bind(this)))}a&&(this.L|=129,this.L&64&&zb(this.a,this.G))}};k.Cc=function(){return this.v};k.wd=function(a){this.v=a&65534};k.Fc=function(){return this.c};k.zd=function(a){this.c=a};k.Gc=function(){return this.m};k.Ad=function(a){this.m=a};k.Dc=function(){return this.w};k.xd=function(a){this.w=a&63}; +var wf={},rf=(wf[63744]=[null,null,N.prototype.Ec,N.prototype.yd,"RLCS"],wf[63746]=[null,null,N.prototype.Cc,N.prototype.wd,"RLBA"],wf[65284]=[null,null,N.prototype.Fc,N.prototype.zd,"RLDA"],wf[65286]=[null,null,N.prototype.Gc,N.prototype.Ad,"RLMP"],wf[65288]=[null,null,N.prototype.Dc,N.prototype.xd,"RLBE"],wf); +function xf(a,b,c){x.call(this,"Computer",a,xf);this.l.P=!1;yf(this,b);this.A=Wb(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=zf;this.v=null;this.m=this.I=!1;this.O=Wb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Af(this);if(this.a=Ua("CPU",this.id)){this.F=Ua("Debugger",this.id);this.i=new bb({id:this.na+".bus",busWidth:this.N},this.a,this.F);var d,e=A(this.id);if((this.g=Ua("Panel",this.id))&&this.g.Ra)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bzf){if(Bf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");Bf(this.h)&&(Gf(this,d),a=2,Hf(this.h));this.h.set("timestamp",sa());If(this.h);var e=this.b&&!this.m;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ff(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Bf(d,g):("error"== +f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.U(f+": "+g),Hf(d),Bf(d)?(c=Ff(d),e=!0):c=!1))}e&&Ef(this,c?d:null)}else 2==a&&d.clear()}else Ef(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Jf(this,this.a,b,c,a),this.a.Qa());this.G&&(Gf(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.j=0}; +function Gf(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function Mf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&F(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.P=!1,!1===d&&(e=null)));for(var h=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(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],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Tf(a,b,c)}})}else c(a,null)} +function Uf(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Qf||Ja(!0));l=!1}var g,h,l=!0;Qf++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Rf(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Qf||Ja(!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),--Qf||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Rf(b,a,d,!0,e,n):Sf(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return Uf(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From 99af96a1132e47d255075d6614a610cf7b4b52e9 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 31 Oct 2016 12:56:24 -0700 Subject: [PATCH 09/30] Added paper tape reader (PC11) to more machine configs --- devices/pdp11/machine/1170/monitor/debugger/machine.xml | 1 + devices/pdp11/machine/1170/monitor/machine.xml | 1 + devices/pdp11/machine/1170/vt100/debugger/machine.xml | 1 + devices/pdp11/machine/1170/vt100/machine.xml | 1 + devices/pdp11/panel/1170/debugger/front.xml | 2 +- devices/pdp11/panel/test/debugger/terminal.xml | 2 +- devices/pdp11/panel/test/terminal.xml | 2 +- modules/pdp11/lib/debugger.js | 2 +- 8 files changed, 8 insertions(+), 4 deletions(-) diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index 339ea4f59..e7f6b20ec 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -10,5 +10,6 @@ + diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index a3add530a..db64c1f0a 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -9,5 +9,6 @@ + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index 087a5e7ad..a2a5b2d5c 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -10,5 +10,6 @@ + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 3e8036ef2..af6436216 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -9,5 +9,6 @@ + diff --git a/devices/pdp11/panel/1170/debugger/front.xml b/devices/pdp11/panel/1170/debugger/front.xml index bd940af42..2ac379374 100644 --- a/devices/pdp11/panel/1170/debugger/front.xml +++ b/devices/pdp11/panel/1170/debugger/front.xml @@ -86,7 +86,7 @@
- + Enter diff --git a/devices/pdp11/panel/test/debugger/terminal.xml b/devices/pdp11/panel/test/debugger/terminal.xml index ec502d4eb..0886334fe 100644 --- a/devices/pdp11/panel/test/debugger/terminal.xml +++ b/devices/pdp11/panel/test/debugger/terminal.xml @@ -2,7 +2,7 @@ Control Panel - + Enter diff --git a/devices/pdp11/panel/test/terminal.xml b/devices/pdp11/panel/test/terminal.xml index cc7286b6b..6e4df11d6 100644 --- a/devices/pdp11/panel/test/terminal.xml +++ b/devices/pdp11/panel/test/terminal.xml @@ -2,7 +2,7 @@ Control Panel - + Registers diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index e77540ad9..799cb0fdb 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1239,7 +1239,7 @@ if (DEBUGGER) { DebuggerPDP11.prototype.init = function(fAutoStart) { this.fInit = true; - this.println("Type ? for help with PDP11 Debugger commands"); + this.println("Type ? for help with PDPjs Debugger commands"); this.updateStatus(); if (!fAutoStart) this.setFocus(); if (this.sInitCommands) { From caf0a728f8a51862cb5efe56a18d1b96b83866dd Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 1 Nov 2016 19:02:06 -0700 Subject: [PATCH 10/30] More PDP-11 front panel functionality --- devices/pdp11/panel/1170/debugger/front.xml | 152 ++++-- devices/pdp11/panel/1170/front.xml | 152 ++++-- docs/pcx86/examples/components.css | 31 +- docs/pcx86/examples/components.xsl | 5 +- modules/pdp11/lib/cpu.js | 1 + modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/cpustate.js | 2 + modules/pdp11/lib/defines.js | 2 +- modules/pdp11/lib/device.js | 53 -- modules/pdp11/lib/panel.js | 548 ++++++++++++++++++-- modules/shared/templates/components.css | 31 +- modules/shared/templates/components.xsl | 5 +- versions/pc8080/1.30.2/components.css | 31 +- versions/pc8080/1.30.2/components.xsl | 5 +- versions/pcx86/1.30.2/components.css | 31 +- versions/pcx86/1.30.2/components.xsl | 5 +- versions/pdpjs/1.30.2/components.css | 31 +- versions/pdpjs/1.30.2/components.xsl | 5 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 520 ++++++++++--------- versions/pdpjs/1.30.2/pdp11.js | 386 +++++++------- 20 files changed, 1381 insertions(+), 617 deletions(-) diff --git a/devices/pdp11/panel/1170/debugger/front.xml b/devices/pdp11/panel/1170/debugger/front.xml index 2ac379374..2908d39e2 100644 --- a/devices/pdp11/panel/1170/debugger/front.xml +++ b/devices/pdp11/panel/1170/debugger/front.xml @@ -2,91 +2,181 @@ Control Panel - - ADDRESS + + + + + ADDRESS - - . + + . - - . + + . - - . + + . - - . + + . - - . + + . - - . + + . - - . - + + . + - - DATA + + + + + DATA - - . + + . - - . + + . - - . + + . - - . + + . - - . - + + . + + + + + + START + STEP + ENABLE + + + + + + CONT + DEP + EXAM + + + + + + LOAD + TEST + + + + + 0 + 1 + 2 + + + + + + 3 + 4 + 5 + + + + + + 6 + 7 + 8 + + + + + + 9 + 10 + 11 + + + + + + 12 + 13 + 14 + + + + + + 15 + 16 + 17 + + + + + + 18 + 19 + 20 + + + + + + 21 + - + Enter diff --git a/devices/pdp11/panel/1170/front.xml b/devices/pdp11/panel/1170/front.xml index 6c0c91ca5..616ae5d1d 100644 --- a/devices/pdp11/panel/1170/front.xml +++ b/devices/pdp11/panel/1170/front.xml @@ -2,91 +2,181 @@ Control Panel - - ADDRESS + + + + + ADDRESS - - . + + . - - . + + . - - . + + . - - . + + . - - . + + . - - . + + . - - . - + + . + - - DATA + + + + + DATA - - . + + . - - . + + . - - . + + . - - . + + . - - . - + + . + + + + + + START + STEP + ENABLE + + + + + + CONT + DEP + EXAM + + + + + + LOAD + TEST + + + + + 0 + 1 + 2 + + + + + + 3 + 4 + 5 + + + + + + 6 + 7 + 8 + + + + + + 9 + 10 + 11 + + + + + + 12 + 13 + 14 + + + + + + 15 + 16 + 17 + + + + + + 18 + 19 + 20 + + + + + + 21 + - + Run diff --git a/docs/pcx86/examples/components.css b/docs/pcx86/examples/components.css index 707d508a0..11db5cd24 100644 --- a/docs/pcx86/examples/components.css +++ b/docs/pcx86/examples/components.css @@ -127,11 +127,19 @@ .pcjs-tripled { padding: 1px; } -.pcjs-tripled-label { +.pcjs-ledlbl0 { text-align: right; - padding: 8px; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; } .pcjs-ledpad { + text-align: center; + font-size: x-small; line-height: 32px; background-color: #000000; } @@ -154,6 +162,25 @@ text-align: center; vertical-align: middle; background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 32px; + background-color: #000000; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; } .pcjs-screen { clear: both; diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl index 314f41e5a..4946e4a80 100644 --- a/docs/pcx86/examples/components.xsl +++ b/docs/pcx86/examples/components.xsl @@ -421,7 +421,10 @@ -
+
+
+ +
diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 7f3c485f0..5d484d360 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -186,6 +186,7 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.cmp = cmp; this.bus = bus; this.dbg = dbg; + this.panel = cmp.panel; for (var i = 0; i < CPUPDP11.BUTTONS.length; i++) { var control = this.bindings[CPUPDP11.BUTTONS[i]]; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 3e82980da..fb1e604e6 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1411,8 +1411,8 @@ PDP11.opNOP = function(opCode) PDP11.opRESET = function(opCode) { if (!(this.regPSW & PDP11.PSW.CMODE)) { - this.resetRegs(); this.bus.reset(); + this.resetRegs(); // display.data = this.regsGen[0]; // TODO: Review } this.nStepCycles -= 667; // TODO: Review (but it's definitely a big number) diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 1cc7ca70d..38cc223e8 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -310,6 +310,7 @@ CPUStatePDP11.prototype.setMMR0 = function(newMMR0) this.mmuEnable = mmuEnable; this.setMemoryAccess(); } + if (this.panel) this.panel.updateStatus(); } }; @@ -357,6 +358,7 @@ CPUStatePDP11.prototype.setMMR3 = function(newMMR3) this.regMMR3 = newMMR3; this.mmuMask = (newMMR3 & PDP11.MMR3.MMU_22BIT)? 0x3fffff : 0x3ffff; this.setMemoryAccess(); + if (this.panel) this.panel.updateStatus(); } }; diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 50fa653d3..8a3dafbb3 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -450,7 +450,7 @@ var PDP11 = { XCSR: 0o177564, // Display Terminal: Transmitter Status Register XBUF: 0o177566, // Display Terminal: Transmitter Data Buffer Register - CNSL: 0o177570, // Console Switch and Front Panel Display + CNSW: 0o177570, // Console (Front Panel) Switch Register MMR0: 0o177572, // 777572 17777572 MMR1: 0o177574, // 777574 17777574 diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 3ddbd6331..11eeb48fc 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -49,7 +49,6 @@ if (NODE) { * The Device component implements the following "default" devices: * * KW11 (KW11-L Line Time Clock) - * CNSL (Console Switch and Front Panel Display) * * as well providing access to all the MMU and CPU registers, PSW, etc. * @@ -61,13 +60,6 @@ function DevicePDP11(parmsDevice) { Component.call(this, "Device", parmsDevice, DevicePDP11, MessagesPDP11.DEVICE); - this.console = { // CNSL registers - data: 0, - address: 0, - misc: 0x14, - switches: 0 - }; - this.kw11 = { // LW11 registers csr: 0, timer: -1 // initBus() will initialize this timer ID @@ -146,7 +138,6 @@ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) */ DevicePDP11.prototype.reset = function() { - this.console.misc = (this.console.misc & ~0x77) | 0x14; // kernel 16 bit this.kw11.lks = 0; }; @@ -194,33 +185,6 @@ DevicePDP11.prototype.writeLKS = function(data, addr) this.kw11.lks = data & ~PDP11.KW11.LKS.MON; }; -/** - * readCNSL(addr) - * - * If addr is set, then this a normal read, so we should return normal results (ie, switches); - * if addr is NOT set, then this is a read-before-write, so we must return the value being updated (ie, data). - * - * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.CNSL or 177570) - * @return {number} - */ -DevicePDP11.prototype.readCNSL = function(addr) -{ - return (addr? this.console.switches : this.console.data) & 0xffff; -}; - -/** - * writeCNSL(data, addr) - * - * @this {DevicePDP11} - * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.CNSL or 177570) - */ -DevicePDP11.prototype.writeCNSL = function(data, addr) -{ - this.console.data = data; -}; - /** * readMMR0(addr) * @@ -243,7 +207,6 @@ DevicePDP11.prototype.readMMR0 = function(addr) DevicePDP11.prototype.writeMMR0 = function(data, addr) { this.cpu.setMMR0(data); - this.updateConsoleMode(); }; /** @@ -304,21 +267,6 @@ DevicePDP11.prototype.readMMR3 = function(addr) DevicePDP11.prototype.writeMMR3 = function(data, addr) { this.cpu.setMMR3(data); - this.updateConsoleMode(); -}; - -/** - * updateConsoleMode() - * - * @this {DevicePDP11} - */ -DevicePDP11.prototype.updateConsoleMode = function() -{ - /* - * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) - */ - var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; - this.console.misc = (this.console.misc & ~7) | bit; }; /** @@ -1105,7 +1053,6 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR", 8, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], - [PDP11.UNIBUS.CNSL]: /* 177570 */ [null, null, DevicePDP11.prototype.readCNSL, DevicePDP11.prototype.writeCNSL, "CNSL"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", 1, PDP11.MODEL_1145], diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index be23848e4..09feb0a64 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -54,19 +54,112 @@ if (NODE) { function PanelPDP11(parmsPanel) { Component.call(this, "Panel", parmsPanel, PanelPDP11); + /* * If there are any live registers, LEDs, etc, to display, this will provide a count. + * + * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both). */ this.cLiveRegs = 0; - /* - * TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both) - */ - this.flags.displayLiveRegs = true; + this.fDisplayLiveRegs = true; + this.fLampTest = false; + this.fExamine = this.fDeposit = false; + /* + * regCNSW contains the Console (Front Panel) Switch Register, which is also available as a + * read-only register at 177570 (but only the low 16 bits). + * + * regAddr is an internal register containing the contents of the Front Panel's ADDRESS display, + * and regData corresponds to the DATA display. They are updated by setAddr() and setData(), + * which in turn take care of calling updateLEDArray(). + */ + this.regCNSW = 0; + this.regAddr = this.regData = 0; + this.regMisc = 0x14; + + /* + * Every LED has a simple numeric value, assigned when setBinding() is called: + * + * 0 if off, 1 if on + * + * initBus() will call updateLEDs() to ensure that every LED is set to its initial value. + */ + this.leds = {}; + + /* + * Every switch has an array associated with it: + * + * [0]: initial/current value of switch (0 if down, 1 if up) + * [1]: true if the switch is momentary, false if not + * [2]: true if the switch is currently being pressed, false if not + * [3]: optional handler to call whenever the switch is pressed or released + * [4]: optional switch index (used with CNSW switches 'S0' through 'S21') + * + * initBus() will call updateSwitches() to ensure that every switch is the position represented below. + * + * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a lamp test + * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the address register from the switch + * register when it is momentarily pressed "down". + * + * This means that processLampTest(value) must act when value == 1, whereas processLoadAddr(value) must + * act when value == 0. You can infer all this from the table below, because the initial value of any + * momentary switch is its "passive" value, so the opposite is its "active" value. + */ + this.switches = { + 'START': [1, true, false, this.processStart], + 'STEP': [1, false, false, this.processStep], + 'ENABLE': [1, false, false, this.processEnable], + 'CONT': [1, true, false, this.processContinue], + 'DEP': [0, true, false, this.processDeposit], + 'EXAM': [1, true, false, this.processExamine], + 'LOAD': [1, true, false, this.processLoadAddr], + 'TEST': [0, true, false, this.processLampTest] + }; + for (var i = 0; i < 22; i++) { + this.switches['S'+i] = [0, false, false, this.processSwitchReg, i]; + } } Component.subclass(PanelPDP11); +/* + * To get the current state of a switch; eg:: + * + * this.getSwitch(PanelPDP11.SWITCH.ENABLE) + * + * However, I haven't filled out this table, primarily because the only switches we need to query + * are the non-momentary ones (eg, ENABLE and STEP), and EXAM and DEP (because they have special + * "step" behavior when pressed more than once in a row). + */ +PanelPDP11.SWITCH = { + DEP: 'DEP', + ENABLE: 'ENABLE', + EXAM: 'EXAM', + STEP: 'STEP' +}; + +/** + * getSwitch(name) + * + * @this {PanelPDP11} + * @param {string} name + * @return {number|undefined} 0 if switch is off ("down"), 1 if on ("up"), or undefined if unrecognized + */ +PanelPDP11.prototype.getSwitch = function(name) +{ + return this.switches[name] && this.switches[name][0]; +}; + +/** + * reset() + * + * @this {PanelPDP11} + */ +PanelPDP11.prototype.reset = function() +{ + this.regMisc = (this.regMisc & ~0x77) | 0x14; // kernel 16 bit +}; + /** * setBinding(sType, sBinding, control, sValue) * @@ -93,29 +186,72 @@ PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) if (DEBUGGER && this.dbg && this.dbg.setBinding(sType, sBinding, control, sValue)) { return true; } + switch (sBinding) { - case "R0": - case "R1": - case "R2": - case "R3": - case "R4": - case "R5": - case "R6": - case "R7": - case "NF": - case "ZF": - case "VF": - case "CF": - case "PS": + case 'R0': + case 'R1': + case 'R2': + case 'R3': + case 'R4': + case 'R5': + case 'R6': + case 'R7': + case 'NF': + case 'ZF': + case 'VF': + case 'CF': + case 'PS': this.bindings[sBinding] = control; this.cLiveRegs++; return true; + default: - if (sType == "rled") { + /* + * Square (default) or round LEDs are defined in machine XML files like so: + * + * + * + * Only *type* and *binding* attributes are required; if *value* is omitted, the default value is 0 (off). + */ + if (sType == "led" || sType == "rled") { this.bindings[sBinding] = control; + this.leds[sBinding] = sValue? 1 : 0; this.cLiveRegs++; return true; } + /* + * Switches are defined in machine XML files like so: + * + * + * + * Only *type* and *binding* attributes are required; if *value* is omitted, the default value is 0 ("down"). + * + * Currently, there is no XML attribute to indicate whether a switch is "momentary"; only recognized switches + * in our internal table can have that attribute. + */ + if (sType == "switch") { + /* + * Like LEDs, we allow unrecognized switches to be defined as well, but they won't do anything useful, + * since only recognized switches will have handlers that perform the appropriate operations. + */ + if (this.switches[sBinding] === undefined) { + this.switches[sBinding] = [sValue? 1 : 0]; + } + this.bindings[sBinding] = control; + var parent = control.parentElement || control; + parent = parent.parentElement || parent; + parent.onmousedown = function(panel, sBinding) { + return function onPressSwitch() { + panel.pressSwitch(sBinding); + }; + }(this, sBinding); + parent.onmouseup = parent.onmouseout = function(panel, sBinding) { + return function onReleaseSwitch() { + panel.releaseSwitch(sBinding); + }; + }(this, sBinding); + return true; + } return this.parent.setBinding.call(this, sType, sBinding, control, sValue); } }; @@ -135,6 +271,12 @@ PanelPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.bus = bus; this.cpu = cpu; this.dbg = dbg; + + bus.addIOTable(this, PanelPDP11.UNIBUS_IOTABLE); + bus.addResetHandler(this.reset.bind(this)); + + this.updateLEDs(); + this.updateSwitches(); }; /** @@ -147,7 +289,20 @@ PanelPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) */ PanelPDP11.prototype.powerUp = function(data, fRepower) { - if (!fRepower) PanelPDP11.init(); + if (!fRepower) { + /* + * As noted in init(), our powerUp() method gives us a second opportunity to notify any + * components that that might care (eg, CPU, Keyboard, and Debugger) that we have some controls + * they might want to use. + */ + PanelPDP11.init(); + /* + * TODO: Until we implement a restore() function, all we can do is reset(); however, that's + * currently unnecessary, since we've added reset() to the addResetHandler() list. + * + * this.reset(); + */ + } return true; }; @@ -184,7 +339,7 @@ PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) } var sVal; var nBase = this.dbg && this.dbg.nBase || 8; - if (!this.cpu.isRunning() || this.flags.displayLiveRegs) { + if (!this.cpu.isRunning() || this.fDisplayLiveRegs) { sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch); } else { sVal = "--------".substr(0, cch || 4); @@ -200,39 +355,308 @@ PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) }; /** - * setLED(control, f) + * setLED(sBinding, value) * * @this {PanelPDP11} - * @param {Object} control is an HTML control DOM object - * @param {boolean|number} f is true if the LED represented by control should be "on", false if "off" + * @param {string} sBinding + * @param {boolean|number} value (true if the LED should be on, false if off) */ -PanelPDP11.prototype.setLED = function(control, f) +PanelPDP11.prototype.setLED = function(sBinding, value) { - /* - * TODO: Add support for user-definable LED colors - */ - control.style.backgroundColor = (f? "#ff0000" : "#000000"); + var control = this.bindings[sBinding]; + if (control) { + /* + * TODO: Add support for user-definable LED colors? + */ + control.style.backgroundColor = (value? "#ff0000" : "#000000"); + } }; /** - * updateLEDs(sPrefix, data, nLEDs) + * updateLEDs(override) + * + * @this {PanelPDP11} + * @param {boolean|number|null} [override] (true turn on all LEDs, false to turn off all LEDs, null or undefined for normal LED activity) + */ +PanelPDP11.prototype.updateLEDs = function(override) +{ + for (var sBinding in this.leds) { + this.setLED(sBinding, override != null? override : this.leds[sBinding]); + } +}; + +/** + * updateLEDArray(sPrefix, data, nLEDs) * * @this {PanelPDP11} * @param {string} sPrefix * @param {number} data * @param {number} nLEDs */ -PanelPDP11.prototype.updateLEDs = function(sPrefix, data, nLEDs) +PanelPDP11.prototype.updateLEDArray = function(sPrefix, data, nLEDs) { for (var i = 0; i < nLEDs; i++) { - var id = sPrefix + i; - var control = this.bindings[id]; - if (control) { - this.setLED(control, data & (1 << i)); + var sBinding = sPrefix + i; + this.setLED(sBinding, data & (1 << i)); + } +}; + +/** + * setSwitch(sBinding, value) + * + * @this {PanelPDP11} + * @param {string} sBinding + * @param {boolean|number} value (true if the switch should be "up" (on), false if "down" (off)) + */ +PanelPDP11.prototype.setSwitch = function(sBinding, value) +{ + var control = this.bindings[sBinding]; + if (control) { + control.style.marginTop = (value? "0px" : "20px"); + control.style.backgroundColor = (value? "#00ff00" : "#228B22"); + } +}; + +/** + * pressSwitch(sBinding) + * + * @this {PanelPDP11} + * @param {string} sBinding + */ +PanelPDP11.prototype.pressSwitch = function(sBinding) +{ + var sw = this.switches[sBinding]; + this.setSwitch(sBinding, sw[0] = 1 - sw[0]); + sw[2] = true; + if (sw[3]) sw[3].call(this, sw[0], sw[4]); + this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); + this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); +}; + +/** + * releaseSwitch(sBinding) + * + * @this {PanelPDP11} + * @param {string} sBinding + */ +PanelPDP11.prototype.releaseSwitch = function(sBinding) +{ + /* + * pressSwitch() is simple: flip the switch's current value in sw[0] and marked it "pressed" in sw[2]. + * + * releaseSwitch() is more complicated, because we must handle both mouseUp and mouseOut events. The first time + * we receive EITHER of those events AND the switch is marked momentary (sw[1]) AND the switch is pressed (sw[2]), + * then we must flip the switch back to its original value. + * + * Otherwise, the only thing we have to do is mark the switch as no longer "pressed" (ie, set sw[2] to false). + */ + var sw = this.switches[sBinding]; + if (sw[1] && sw[2]) { + this.setSwitch(sBinding, sw[0] = 1 - sw[0]); + if (sw[3]) sw[3].call(this, sw[0], sw[4]); + } + sw[2] = false; +}; + +/** + * processStart(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processStart = function(value, index) +{ + if (!value && !this.cpu.isRunning()) { + /* + * TODO: Verify what the PDP-11/70 Handbook means when it says that when the 'START' switch + * is depressed, "the computer system will be cleared." I take it to mean that it performs + * the equivalent of a RESET instruction. + */ + this.bus.reset(); + this.cpu.resetRegs(); + /* + * The PDP-11/70 Handbook goes on to say: "If the system needs to be initialized but execution + * is not wanted, the START switch should be depressed while the HALT/ENABLE switch is in the HALT + * position." + */ + if (this.getSwitch(PanelPDP11.SWITCH.ENABLE)) { + this.cpu.startCPU(); } } }; +/** + * processStep(value, index) + * + * If value == 1 (our initial value), then the 'STEP' switch is set to "S INST" (step one instruction); + * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). Note that we don't actually support the + * latter. + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processStep = function(value, index) +{ +}; + +/** + * processEnable(value, index) + * + * If value == 1 (our initial value), then the 'ENABLE'/'HALT' switch is set to 'ENABLE', otherwise 'HALT'. + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processEnable = function(value, index) +{ + /* + * The "down" (0) position is 'HALT', which stops the CPU; however, the "up" (1) position ('ENABLE') + * does NOT start the CPU. You must press 'CONT' to continue execution, which will either continue for + * one instruction if this switch to set to 'HALT' or indefinitely if it is set to 'ENABLE'. + */ + if (!value) { + this.cpu.stopCPU(); + } +}; + +/** + * processContinue(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processContinue = function(value, index) +{ + if (!value && !this.cpu.isRunning()) { + if (!this.getSwitch(PanelPDP11.SWITCH.ENABLE)) { + /* + * TODO: Technically, we're also supposed to check the 'STEP' switch to determine if we should + * step one instruction or just one cycle, but we don't currently have the ability to do the latter. + */ + var dbg = this.dbg; + if (dbg && !dbg.isBusy(true)) { + dbg.setBusy(true); + dbg.stepCPU(0); + dbg.setBusy(false); + } else { + this.cpu.stepCPU(1); + this.updateStatus(); + } + } + else { + this.cpu.startCPU(); + } + } +}; + +/** + * processDeposit(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processDeposit = function(value, index) +{ + if (value && !this.cpu.isRunning()) { + if (this.fDeposit) { + this.setAddr(this.regAddr + 2); + } + this.bus.setWordDirect(this.regAddr, this.setData(this.regCNSW)); + } +}; + +/** + * processExamine(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processExamine = function(value, index) +{ + if (!value && !this.cpu.isRunning()) { + if (this.fExamine) { + this.setAddr(this.regAddr + 2); + } + this.setData(this.bus.getWordDirect(this.regAddr)); + } +}; + +/** + * processLoadAddr(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processLoadAddr = function(value, index) +{ + if (!value && !this.cpu.isRunning()) { + this.setAddr(this.regCNSW); + } +}; + +/** + * processLampTest(value, index) + * + * @this {PanelPDP11} + * @param {number} value + * @param {number} [index] + */ +PanelPDP11.prototype.processLampTest = function(value, index) +{ + this.updateLEDs(value || null); +}; + +/** + * processSwitchReg(value, index) + * + * @this {PanelPDP11} + * @param {number} value (normally 0 or 1, but we only depend on it being zero or non-zero) + * @param {number} index + */ +PanelPDP11.prototype.processSwitchReg = function(value, index) +{ + if (value) { + this.regCNSW |= 1 << index; + } else { + this.regCNSW &= ~(1 << index); + } +}; + +/** + * setAddr(value) + * + * @this {PanelPDP11} + * @param {number} value + * @return {number} + */ +PanelPDP11.prototype.setAddr = function(value) +{ + this.regAddr = value & this.bus.nBusMask; + this.updateLEDArray("A", this.regAddr, 22); + return this.regAddr; +}; + +/** + * setData(value) + * + * @this {PanelPDP11} + * @param {number} value + * @return {number} + */ +PanelPDP11.prototype.setData = function(value) +{ + this.regData = value & 0xffff; + this.updateLEDArray("D", this.regData, 16); + return this.regData; +}; + /** * updateStatus(fForce) * @@ -242,7 +666,7 @@ PanelPDP11.prototype.updateLEDs = function(sPrefix, data, nLEDs) PanelPDP11.prototype.updateStatus = function(fForce) { if (this.cLiveRegs) { - if (fForce || !this.cpu.isRunning() || this.flags.displayLiveRegs) { + if (fForce || !this.cpu.isRunning() || this.fDisplayLiveRegs) { for (var i = 0; i < this.cpu.regsGen.length; i++) { this.updateValue('R'+i, this.cpu.regsGen[i]); } @@ -252,12 +676,62 @@ PanelPDP11.prototype.updateStatus = function(fForce) this.updateValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); this.updateValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); this.updateValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); - this.updateLEDs("D", this.cpu.regsGen[0], 16); - this.updateLEDs("A", this.cpu.regsGen[7], 22); + if (!this.fLampTest) { + this.setData(this.cpu.regsGen[0]); + this.setAddr(this.cpu.regsGen[7]); + /* + * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) + */ + var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; + // this.misc = (this.misc & ~7) | bit; + } } } }; +/** + * updateSwitches() + * + * @this {PanelPDP11} + */ +PanelPDP11.prototype.updateSwitches = function() +{ + for (var sBinding in this.switches) { + this.setSwitch(sBinding, this.switches[sBinding][0]); + } +}; + +/** + * readCNSW(addr) + * + * If addr is set, then this a normal read, so we should return normal results (ie, switches); + * if addr is NOT set, then this is a read-before-write, so we must return the value being updated (ie, data). + * + * @this {PanelPDP11} + * @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570) + * @return {number} + */ +PanelPDP11.prototype.readCNSW = function(addr) +{ + return (addr? this.regCNSW : this.regData) & 0xffff; +}; + +/** + * writeCNSW(data, addr) + * + * @this {PanelPDP11} + * @param {number} data + * @param {number} addr (eg, PDP11.UNIBUS.CNSW or 177570) + */ +PanelPDP11.prototype.writeCNSW = function(data, addr) +{ + this.regData = data; +}; + +PanelPDP11.UNIBUS_IOTABLE = { + [PDP11.UNIBUS.CNSW]: /* 177570 */ [null, null, PanelPDP11.prototype.readCNSW, PanelPDP11.prototype.writeCNSW, "CNSW"] +}; + /** * PanelPDP11.init() * diff --git a/modules/shared/templates/components.css b/modules/shared/templates/components.css index 13163caa8..21f04854f 100644 --- a/modules/shared/templates/components.css +++ b/modules/shared/templates/components.css @@ -132,11 +132,19 @@ .pcjs-tripled { padding: 1px; } -.pcjs-tripled-label { +.pcjs-ledlbl0 { text-align: right; - padding: 8px; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; } .pcjs-ledpad { + text-align: center; + font-size: x-small; line-height: 32px; background-color: #000000; } @@ -159,6 +167,25 @@ text-align: center; vertical-align: middle; background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 32px; + background-color: #000000; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; } .pcjs-screen { clear: both; diff --git a/modules/shared/templates/components.xsl b/modules/shared/templates/components.xsl index d51334e25..5fef032ed 100644 --- a/modules/shared/templates/components.xsl +++ b/modules/shared/templates/components.xsl @@ -422,7 +422,10 @@ -
+
+
+ +
diff --git a/versions/pc8080/1.30.2/components.css b/versions/pc8080/1.30.2/components.css index 707d508a0..11db5cd24 100644 --- a/versions/pc8080/1.30.2/components.css +++ b/versions/pc8080/1.30.2/components.css @@ -127,11 +127,19 @@ .pcjs-tripled { padding: 1px; } -.pcjs-tripled-label { +.pcjs-ledlbl0 { text-align: right; - padding: 8px; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; } .pcjs-ledpad { + text-align: center; + font-size: x-small; line-height: 32px; background-color: #000000; } @@ -154,6 +162,25 @@ text-align: center; vertical-align: middle; background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 32px; + background-color: #000000; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; } .pcjs-screen { clear: both; diff --git a/versions/pc8080/1.30.2/components.xsl b/versions/pc8080/1.30.2/components.xsl index da16eb76d..4af6972cf 100644 --- a/versions/pc8080/1.30.2/components.xsl +++ b/versions/pc8080/1.30.2/components.xsl @@ -421,7 +421,10 @@ -
+
+
+ +
diff --git a/versions/pcx86/1.30.2/components.css b/versions/pcx86/1.30.2/components.css index 707d508a0..11db5cd24 100644 --- a/versions/pcx86/1.30.2/components.css +++ b/versions/pcx86/1.30.2/components.css @@ -127,11 +127,19 @@ .pcjs-tripled { padding: 1px; } -.pcjs-tripled-label { +.pcjs-ledlbl0 { text-align: right; - padding: 8px; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; } .pcjs-ledpad { + text-align: center; + font-size: x-small; line-height: 32px; background-color: #000000; } @@ -154,6 +162,25 @@ text-align: center; vertical-align: middle; background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 32px; + background-color: #000000; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; } .pcjs-screen { clear: both; diff --git a/versions/pcx86/1.30.2/components.xsl b/versions/pcx86/1.30.2/components.xsl index b68b0dc6b..1c3a4aa71 100644 --- a/versions/pcx86/1.30.2/components.xsl +++ b/versions/pcx86/1.30.2/components.xsl @@ -421,7 +421,10 @@ -
+
+
+ +
diff --git a/versions/pdpjs/1.30.2/components.css b/versions/pdpjs/1.30.2/components.css index 707d508a0..11db5cd24 100644 --- a/versions/pdpjs/1.30.2/components.css +++ b/versions/pdpjs/1.30.2/components.css @@ -127,11 +127,19 @@ .pcjs-tripled { padding: 1px; } -.pcjs-tripled-label { +.pcjs-ledlbl0 { text-align: right; - padding: 8px; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; } .pcjs-ledpad { + text-align: center; + font-size: x-small; line-height: 32px; background-color: #000000; } @@ -154,6 +162,25 @@ text-align: center; vertical-align: middle; background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 32px; + background-color: #000000; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; } .pcjs-screen { clear: both; diff --git a/versions/pdpjs/1.30.2/components.xsl b/versions/pdpjs/1.30.2/components.xsl index e25148dcc..cb090c226 100644 --- a/versions/pdpjs/1.30.2/components.xsl +++ b/versions/pdpjs/1.30.2/components.xsl @@ -421,7 +421,10 @@ -
+
+
+ +
diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index e7aa695e8..ce64b8d1a 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -40,274 +40,278 @@ function xa(a,b){return(a+" ").slice(0,b) function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={da:null,ha:null,Ha:null,Ga:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ha=g.load;d.Ga=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ja=g.load;d.Ia=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.cb=this.id:(this.Na=this.id.substr(0,b),this.cb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Ua:!1,Xb:!1,ia:!1,error:!1};this.Nb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var ib,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;ib=kb.exec(ab);)bb[decodeURIComponent(ib[1].replace(jb," "))]=decodeURIComponent(ib[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.mc=b.comment;this.Rc=b;b=this.id.indexOf(".");0>b?this.fb=this.id:(this.Na=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Va:!1,Wb:!1,ja:!1,error:!1};this.Pb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.w=this.xa-1;this.F=this.J/this.xa|0;this.Ta=[];this.f=0;this.B=!1;this.C=[];this.Gc=[Sb,Tb,Ub,Vb];a=new I(this);Wb(a,this.i);this.W=Array(this.F);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ta[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,3);c=255;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Tb(a,b,c){var d=!1,e=this.controller,f=e.Ta[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ta[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,5),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Ub(a,b){var c=-1,d=this.controller;(a=d.Ta[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,2);c=65535;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function Vb(a,b,c){var d=!1,e=this.controller;if(a=e.Ta[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,4),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function Yb(a,b){if(b!=a.v){var c;a.v&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.D)return l.Hb+=l.D-f,l.D=f,!0;if(f>=l.D+l.Hb){n=l.size-(f-m);n>g&&(n=g);l.Hb=f-l.D+n;f=m+a.xa;g-=n;h++;continue}}return cc(1,f,g)}f=new I(a,f,n,a.xa,d,e);Wb(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Rb(a&this.w,a)};k.Pb=function(a){this.B=!1;this.f++;a=this.W[(a&this.g)>>>this.ka].cc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=ec(this.b,a));return this.W[(a&this.g)>>>this.ka].ra(a&this.w,a)};k.pb=function(a){var b=a&this.w,c=(a&this.g)>>>this.ka;this.B=!1;this.f++;a=this.W[c].dc(b,a);this.f--;return a};k.Sb=function(a,b){3932160<=a&&(a=ec(this.b,a));this.W[(a&this.g)>>>this.ka].Vb(a&this.w,b&255,a)};k.jb=function(a,b){this.B=!1;this.f++;this.W[(a&this.g)>>>this.ka].Wb(a&this.w,b&255,a);this.f--}; -k.ab=function(a,b){3932160<=a&&(a=ec(this.b,a));this.W[(a&this.g)>>>this.ka].Ib(a&this.w,b&65535,a)};k.Tb=function(a,b){var c=a&this.w,d=(a&this.g)>>>this.ka;this.B=!1;this.f++;this.W[d].hc(c,b&65535,a);this.f--};function fc(a){for(var b=0,c=[],d=0;da.b.qb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null,n=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var r=f[4],t=0;t>5&3;b.Ka=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Wa!=c&&(b.Wa=c,pc(b))}qc(this)};k.ed=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.fd=function(){return this.b.Fb};k.gd=function(){return this.b.ib};k.$d=function(a){var b=this.b;1170>b.qb&&(a&=-49);b.ib!=a&&(b.ib=a,b.Mb=a&16?4194303:262143,pc(b));qc(this)}; -function qc(a){a.g.Qb=a.g.Qb&-8|(a.b.Wa?a.b.ib&16?1:2:4)}k.Hd=function(a){a=a>>1&63;var b=this.b.Gb[a>>1];return a&1?b>>16:b&65535};k.ze=function(a,b){b=b>>1&63;var c=b>>1;this.b.Gb[c]=b&1?this.b.Gb[c]&65535|(a&63)<<16:this.b.Gb[c]&-65536|a&65534};k.Ad=function(a){return this.b.V[1][a>>1&7]};k.se=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.yd=function(a){return this.b.V[1][(a>>1&7)+8]};k.qe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.zd=function(a){return this.b.wa[1][a>>1&7]}; -k.re=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.xd=function(a){return this.b.wa[1][(a>>1&7)+8]};k.pe=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ad=function(a){return this.b.V[0][a>>1&7]};k.Wd=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.Zc=function(a){return this.b.V[0][(a>>1&7)+8]};k.Ud=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.$c=function(a){return this.b.wa[0][a>>1&7]};k.Vd=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; -k.Yc=function(a){return this.b.wa[0][(a>>1&7)+8]};k.Td=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.Gd=function(a){return this.b.V[3][a>>1&7]};k.ye=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Ed=function(a){return this.b.V[3][(a>>1&7)+8]};k.we=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Fd=function(a){return this.b.wa[3][a>>1&7]};k.xe=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Dd=function(a){return this.b.wa[3][(a>>1&7)+8]}; -k.ve=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.ub=function(a){a&=7;return this.b.M&2048?this.b.Ra[a]:this.b.u[a]};k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Ra[b]=a:this.b.u[b]=a};k.md=function(){return this.b.M&49152?this.b.Fa[0]:this.b.u[6]};k.ee=function(a){this.b.M&49152?this.b.Fa[0]=a:this.b.u[6]=a};k.pd=function(){return this.b.u[7]};k.he=function(a){this.b.u[7]=a};k.vb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ra[a]}; -k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ra[b]=a};k.nd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[1]};k.fe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[1]=a};k.od=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Fa[3]};k.ge=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Fa[3]=a};k.Wc=function(a){return this.b.zc[a-65504>>1]};k.Rd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){}; -k.Cd=function(){return 1};k.ue=function(){};k.Vc=function(){return this.b.fa};k.Qd=function(){this.b.fa=0};k.cd=function(){return this.b.yc};k.Yd=function(a,b){b&1||(a&=255);this.b.yc=a};k.hd=function(a){return a?this.b.fc:0};k.ae=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.fc=a;b.H|=2};k.Bd=function(a){return a?this.b.Za&65280:0};k.te=function(a){this.b.Za=a|255};k.ld=function(){return Cb(this.b)};k.de=function(a){rc(this.b,a&-1809|Cb(this.b)&1808);this.b.H|=128}; -k.Cc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var N={},M=(N[61568]=[null,null,L.prototype.Hd,L.prototype.ze,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Ad,L.prototype.se,"SISDR",8,1145],N[62608]=[null,null,L.prototype.yd,L.prototype.qe,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.zd,L.prototype.re,"SISAR",8,1145],N[62640]=[null,null,L.prototype.xd,L.prototype.pe,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.ad,L.prototype.Wd,"KISDR",8,1145],N[62672]=[null,null,L.prototype.Zc,L.prototype.Ud,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.$c, -L.prototype.Vd,"KISAR",8,1145],N[62704]=[null,null,L.prototype.Yc,L.prototype.Td,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.gd,L.prototype.$d,"MMR3",1,1145],N[65382]=[null,null,L.prototype.bd,L.prototype.Xd,"LKS"],N[65400]=[null,null,L.prototype.Uc,L.prototype.Pd,"CNSL"],N[65402]=[null,null,L.prototype.dd,L.prototype.Zd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.ed,L.prototype.Cc,"MMR1",1,1145],N[65406]=[null,null,L.prototype.fd,L.prototype.Cc,"MMR2",1,1145],N[65408]=[null,null,L.prototype.Gd, -L.prototype.ye,"UISDR",8,1145],N[65424]=[null,null,L.prototype.Ed,L.prototype.we,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.Fd,L.prototype.xe,"UISAR",8,1145],N[65456]=[null,null,L.prototype.Dd,L.prototype.ve,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.ub,L.prototype.yb,"R0SET0"],N[65473]=[null,null,L.prototype.ub,L.prototype.yb,"R1SET0"],N[65474]=[null,null,L.prototype.ub,L.prototype.yb,"R2SET0"],N[65475]=[null,null,L.prototype.ub,L.prototype.yb,"R3SET0"],N[65476]=[null,null,L.prototype.ub, -L.prototype.yb,"R4SET0"],N[65477]=[null,null,L.prototype.ub,L.prototype.yb,"R5SET0"],N[65478]=[null,null,L.prototype.md,L.prototype.ee,"R6KERNEL"],N[65479]=[null,null,L.prototype.pd,L.prototype.he,"R7KERNEL"],N[65480]=[null,null,L.prototype.vb,L.prototype.zb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.vb,L.prototype.zb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.vb,L.prototype.zb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.vb,L.prototype.zb,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.vb, -L.prototype.zb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.vb,L.prototype.zb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.nd,L.prototype.fe,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.od,L.prototype.ge,"R6USER",1,1145],N[65504]=[null,null,L.prototype.Wc,L.prototype.Rd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.wc,L.prototype.Dc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.wc,L.prototype.Dc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Cd,L.prototype.ue,"SYSID",1,1170],N[65526]= -[null,null,L.prototype.Vc,L.prototype.Qd,"CPUERR",1,1170],N[65528]=[null,null,L.prototype.cd,L.prototype.Yd,"MB",1,1170],N[65530]=[null,null,L.prototype.hd,L.prototype.ae,"PIR"],N[65532]=[null,null,L.prototype.Bd,L.prototype.te,"SL"],N[65534]=[null,null,L.prototype.ld,L.prototype.de,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Ic(this,vc?Jc:Kc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&K(this.w,b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24> -a?c&65535:c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},P:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,1,c.L)&&c.ja(!0)}return this.cc(a,b)},Y:function(a,b){if(this.i&&null!=this.D){var c=this.i;Pc(c,this.D+a,2,c.L)&&c.ja(!0)}return this.dc(a, -b)},ma:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,1,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.Wb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.D){var d=this.i;Pc(d,this.D+a,2,d.C)&&d.ja(!0)}this.f?this.v(a,b,c):this.hc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Na:function(a,b){a&1&&K(this.w,b,64,2);return this.F.getUint16(a,!0)},Z:function(a,b){a&1&&K(this.w, -b,64,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Pa=!0},ua:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},cb:function(a,b,c){a&1&&K(this.w,c,64,4);this.F.setUint16(a,b,!0);this.Pa=!0},Ja:function(a,b,c){a&1&&K(this.w,c,64,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+ -J(this.i,b)+")",!0)}};function Wb(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&Oc(a,Nc,!1),(a.B=c.B)&&Mc(a,Nc,!1))}function Qc(a,b){b?--a.B||(a.Vb=a.f?a.v:a.Wb,a.Ib=a.f?a.I:a.hc):--a.g||(a.Rb=a.cc,a.ra=a.dc)}function Mc(a,b,c){c&&a.B||(a.Vb=!a.f&&b[1]||a.v,a.Ib=!a.f&&b[3]||a.I);if(c||void 0===c)a.Wb=b[1]||a.v,a.hc=b[3]||a.I}function Oc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.cc=b[0]||a.K,a.dc=b[2]||a.L}function Ic(a,b){b||(b=Rc);Oc(a,b,void 0);Mc(a,b,void 0)} -var Rc=[],Lc=[I.prototype.S,I.prototype.va,I.prototype.ba,I.prototype.Ka],Nc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Kc=[I.prototype.N,I.prototype.la,I.prototype.Na,I.prototype.cb],Jc=[I.prototype.R,I.prototype.ua,I.prototype.Z,I.prototype.Ja]; -function Sc(a,b){u.call(this,"CPU",a,Sc,1);var c=a.multiplier||1;this.fb=a.cycles||b;this.Xa=c;this.nb=Math.round(this.fb/1E4)/100;this.hb=this.nb*this.Xa;this.A.ga=!1;this.A.Ub=!1;this.A.mb=a.autoStart;this.A.ob=!1;this.Cb=this.ma=0;this.Db=a.csStart;this.rb=a.csInterval;this.sb=a.csStop;this.K=[];this.tc=this.Ld.bind(this);H(this)}z(Sc);var Tc=["power","reset"];k=Sc.prototype; -k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.rb,c=!0);0<=a.sb&&a.sb<=Zc(a)&&(a.rb=a.sb=-1,Wc(a),a.ja(),c=!0);c&&a.j(Zc(a)+" cycles: checksum="+p(a.Cb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.hb?b=1:d=!0;a.Xa=b;b=a.nb*a.Xa;if(a.hb!=b){a.hb=b;b=a.hb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.kb()}ad(a,a.S);a.S=0;a.R=Ba();a.Z=0;bd(a);return d}function lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function nc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.fb*a.Xa/1E3*c|0,a.K[b][0]=c+cd(a))} -function dd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ed(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function cd(a,b){var c=a.ba-=a.b;a.b=a.J=0;b&&(a.ba=0);return c} -k.Ld=function(){if(this.A.ga){this.Ab>=this.fb&&bd(this,!0);this.za=0;this.eb=Ba();if(this.Z){var a=this.eb-this.Z;a>this.Ob&&(this.R+=a,this.R>this.eb&&(this.R=this.eb))}try{do{var b=dd(this,this.A.ob?1:this.bb);try{this.xb(b)}catch(e){if("number"!=typeof e)throw e;}b=cd(this,!0);this.za+=b;this.S+=b;Yc(this,b);ed(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.bb;15<=++this.sc&&(this.B&&this.B.ca(),this.sc=0);break}}while(this.A.ga)}catch(e){this.ja();this.B&&this.B.stop(Ba(),Zc(this));vb(this, -e.stack||e.message);return}if(this.A.ga){a=setTimeout;b=this.tc;this.Z=Ba();var c=this.Ob;this.za&&(c=Math.round(c*this.za/this.bb));var c=c-(this.Z-this.eb),d=this.Z-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.la=0,$c(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Ab+=this.za;this.Z+=c;a(b,c)}}}; -k.wb=function(a){if(ub(this))return!1;if(this.A.ga)return this.j(this.toString()+" busy"),!1;$c(this);this.A.ga=!0;this.A.Ub=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.kb(!0),this.B.start(this.R,Zc(this)));setTimeout(this.tc,0);return!0};k.xb=function(){return 0};k.ja=function(a){var b=!1;if(this.A.ga){cd(this);ad(this,this.S);this.S=0;this.A.ga=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),Zc(this));b=!0}this.A.complete=a;return b}; -function fd(a){this.qb=+a.model||1170;this.Jb=a.addrReset||0;Sc.call(this,a,6666667);this.decode=1120==this.qb?gd.bind(this):hd.bind(this);id(this);this.L=0;this.N=null;this.A.complete=!1}z(fd,Sc);k=fd.prototype;k.reset=function(){this.status("model "+this.qb);this.A.ga&&this.ja();id(this);Vc(this);this.A.error=!1;this.parent.reset.call(this)}; -function id(a){a.T=65536;a.U=32768;a.$=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Jb];a.Ra=[0,0,0,0,0,0];a.Fa=[0,0,0,0];a.v=0;a.Ka=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Gb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.F=a.I=0;a.g=a.f=a.lb=0;a.va=-1;jd(a)}function jd(a){a.Za=255;a.fa=0;a.fc=0;a.C=0;a.Ya=0;a.Fb=0;a.ib=0;a.Wa=0;a.Ja=0;a.Mb=262143;a.N=null;a.w&&pc(a)}function pc(a){a.Wa?(a.P=65536,a.aa=a.Oc,a.ra=a.Id,a.Ib=a.Ae,Yb(a.w,a.ib&16?22:18)):(a.P=0,a.aa=a.Nc,a.ra=a.xc,a.Ib=a.Ec,Yb(a.w,16))}function kd(a,b,c){a.Jb=b;P(a,b);!c&&a.i&&(a.ja()||a.i.ca())}k.pc=function(){return 0}; -k.save=function(){var a=new R(this);a.set(0,[]);a.set(1,[this.la,this.Xa]);a.set(2,fc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];$c(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Fa[c]=a.u[6],a.u[6]=a.Fa[a.v]);a.M=b;a.H|=2}function S(a,b){a.H&128||(a.X=a.$=b,a.U=0)}function qd(a,b,c){a.H&128||(a.X=a.$=a.T=b,a.U=c||0)}function rd(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^b)&(d^b))}function sd(a,b){a.H&128||(a.X=a.$=a.T=b,a.U=a.X^a.T>>1)} -function td(a,b,c,d){a.H&128||(a.X=a.$=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=Cb(this):this.v||(a=4,c=!0);this.C&57344||(this.Ya=63222,this.Fb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);rc(this,e&-12289|this.va>>2&12288);c&&(this.fa|=4,this.u[6]=4);ud(this,this.va);ud(this,this.u[7]);P(this,d);this.H&=-113;this.va=-1;this.H|=8;this.Tc=a;this.Rc=b;if(26!=b)throw a;}}; -function vd(a){var b=wd(a),c=wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);P(a,b);rc(a,c);a.H&=-17}function ec(a,b){var c=b>>13&31;31>c&&a.ib&32&&(b=a.Gb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Od(a,b,c){var d,e,f,g=0;d=b>>13;a.ib&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Ka=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Ka<<1),b=!0),a.C&61440||!(4191360> -f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(pd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(pd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.H|=64));return e}k.Pb=function(a){if(!this.Wa)return this.w.Pb(a);this.L++;a=Pd(this,Od(this,a,3));this.L--;return a}; -k.pb=function(a){if(!this.Wa)return this.w.pb(a);this.L++;a=this.xc(Od(this,a,2));this.L--;return a};k.jb=function(a,b){this.Wa?(this.L++,Qd(this,Od(this,a,5),b),this.L--):this.w.jb(a,b)};k.Tb=function(a,b){this.Wa?(this.L++,this.Ec(Od(this,a,4),b),this.L--):this.w.Tb(a,b)};k.Nc=function(a,b,c){return Rd(this,a,b,c)};k.Oc=function(a,b,c){return Od(this,Rd(this,a,b,c),c)};k.xc=function(a){return this.w.oa(a)};k.Id=function(a){return this.w.oa(Od(this,a,2))};k.Ec=function(a,b){this.w.ab(a,b&65535)}; -k.Ae=function(a,b){this.w.ab(Od(this,a,4),b)};function Sd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Rd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Fa[a.M>>12&3];return c}function Td(a,b,c,d){a.C&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Rd(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Od(a,e|c&65536,4),a.v=a.M>>14&3,a.w.ab(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Fa[a.M>>12&3]=d} -function Ud(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Vd(a,b){b>>=6;var c=a.I=b&7;return(b=a.F=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]}function Wd(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Rd(a,b,c,8)}function Xd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Pd(a,a.aa(b,c,3)):a.u[c]&255}function Yd(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.aa(b,c,2)):a.u[c]} -function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.lb=a.aa(b,e,7),Qd(a,e,d.call(a,c,Pd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.w.ab(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function Zd(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Qd(a,a.aa(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function $d(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ab(a.aa(b,d,4),c):a.u[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.xb=function(a){this.A.complete=!0;var b=this.i&&ae(this.i)?1:this.A.Ub?-1:0,c=a?this.A.Ub?0:1:-1;this.A.Ub=!1;this.ba=this.b=a;do{if(b){if(this.i&&be(this.i,this.u[7],c)){this.ja();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.pa(168,28):this.H&64?this.pa(4,30):this.H&16&&this.pa(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.fc&224)>>5,f=this.N&&this.N.tb>e?this.N:null;f&&(d=f.Od,e=f.tb);e>(this.M&224)>>5?(this.H&4&&(pd(this,2),this.H&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(od(this))}while(0>1|b<<16;sd(this,a);return a&65535}function he(a,b){a=b&2048|b>>1|b<<8;sd(this,a<<8);return a&255}function ie(a,b){a=b&~a;S(this,a);return a}function je(a,b){a=b&~a;S(this,a<<8);return a}function ke(a,b){a|=b;S(this,a);return a}function le(a,b){a|=b;S(this,a<<8);return a} -function me(a,b){a=~b|65536;qd(this,a);return a&65535}function ne(a,b){a=~b|256;qd(this,a<<8);return a&255}function oe(a,b){a=b-a;this.H&128||(this.X=this.$=a,this.U=b&(b^a));return a&65535}function pe(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.X=this.$=c,this.U=b&(b^c));return a&255}function qe(a,b){a=b+a;this.H&128||(this.X=this.$=a,this.U=a&(b^a));return a&65535}function re(a,b){a=b+a;var c=a<<8;this.H&128||(this.X=this.$=c,this.U=c&(b<<8^c));return a&255} -function se(a,b){a=-b;qd(this,a,a&b&32768);return a&65535}function te(a,b){a=-b;qd(this,a<<8,(a&b&128)<<8);return a&255}function ue(a,b){a=b<<1|this.T>>16&1;sd(this,a);return a&65535}function ve(a,b){a=b<<1|this.T>>16&1;sd(this,a<<8);return a&255}function we(a,b){a=(this.T&65536|b)>>1|b<<16;sd(this,a);return a&65535}function xe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;sd(this,a<<8);return a&255}function ye(a,b){var c=b-a;td(this,c,a,b);return c&65535} -function ze(a,b){var c=b-a;td(this,c<<8,a<<8,b<<8);return c&255}function Ae(a,b){this.H&128||(this.X=this.$=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Be(a,b){a^=b;S(this,a);return a&65535}function Ce(a){U(this,a,Vd(this,a),ce);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function De(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.$=c;this.b-=(this.g?6:7)+b} -function Ee(a){var b=Yd(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.$=d>>16|d;this.b-=(this.g?6:7)+b}function Fe(a){V(this,a,!ld(this))}function Ge(a){V(this,a,ld(this))} -function He(a){U(this,a,Vd(this,a),ie);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ie(a){T(this,a,Ud(this,a),je);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Je(a){U(this,a,Vd(this,a),ke);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function Ke(a){T(this,a,Ud(this,a),le);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function Le(a){S(this,Vd(this,a)&Yd(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Me(a){S(this,(Ud(this,a)&Xd(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Ne(a){V(this,a,nd(this))}function Oe(a){V(this,a,!this.Qa()==!md(this))}function Pe(a){V(this,a,!nd(this)&&!this.Qa()==!md(this))}function Qe(a){V(this,a,!ld(this)&&!nd(this))}function Re(a){V(this,a,nd(this)||!this.Qa()!=!md(this))} -function Se(a){V(this,a,ld(this)||nd(this))}function Te(a){V(this,a,!this.Qa()!=!md(this))}function Ue(a){V(this,a,this.Qa())}function Ve(a){V(this,a,!nd(this))}function We(a){V(this,a,!this.Qa())}function Xe(){this.pa(12,1);this.b-=5}function Ye(a){V(this,a,!0)}function Ze(a){V(this,a,!md(this))}function $e(a){V(this,a,md(this))}function W(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.$=1);a&8&&(this.X=0);this.b-=5} -function af(a){var b=Vd(this,a);a=Yd(this,a);td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function bf(a){var b=Ud(this,a)<<8;a=Xd(this,a)<<8;td(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} -function cf(a){var b=Yd(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.$=d>>16|d,this.X=d>>16):(this.U=32768,this.$=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.$=this.X=0,this.U=32768,this.T=65536,this.b-=7}function df(){this.pa(24,2);this.b-=25} -function ef(){this.M&49152?(this.fa|=128,this.pa(4,3)):this.i?jc(this.i):this.ja();this.b-=7}function ff(){this.pa(16,4);this.b-=25}var gf=[0,7,7,10,7,11,9,13];function hf(a){this.J=this.b;P(this,Wd(this,a));this.b=this.J-gf[this.g]}var jf=[0,14,14,17,14,18,16,20];function kf(a){this.J=this.b;var b=Wd(this,a);a=a>>6&7;ud(this,this.u[a]);this.u[a]=this.u[7];P(this,b);this.b=this.J-jf[this.g]}var lf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function mf(a){var b=Vd(this,a);this.J=this.b;S(this,$d(this,a,b));this.b=this.J-lf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function nf(a){var b=Ud(this,a);S(this,Zd(this,a,b,1)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var of=[7,13,13,17,14,18,17,21]; -function pf(a){var b=Yd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.X=b>>16,this.$=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)P(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function wf(a){U(this,a,Vd(this,a),ye);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function xf(a){U(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}function yf(){this.pa(28,5);this.b-=5}function zf(){this.H&4||this.B.ca();this.H|=4;pd(this,-2);this.b-=3}function Af(a){U(this,a,Vd(this,a),Be);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=jc(b);b||this.pa(8,6)}function gd(a){Bf[a>>12].call(this,a)}function Cf(a){Df[a>>6&3].call(this,a)}function Ef(a){Ff[a>>6&3].call(this,a)} -function Gf(a){Hf[a>>6&3].call(this,a)}function If(a){Jf[a&15].call(this,a)}function Kf(a){Lf[a&15].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)}function Qf(a){Rf[a>>6&3].call(this,a)} -var Bf=[function(a){Sf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,X,function(a){Tf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,wf,X],Sf=[function(a){Uf[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Cf,Ef,Gf,X,X,X],Df=[function(a){qd(this,$d(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,oe);this.b-=this.g?9:3+(7==this.f?2:0)}],Ff=[function(a){U(this,a,0, -se);this.b-=this.g?11:6},function(a){U(this,a,ld(this)?1:0,ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,ld(this)?1:0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Yd(this,a);qd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Hf=[function(a){U(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ee);this.b-=this.g?9:3+(7==this.f?2:0)}], -Uf=[function(a){Vf[a&15].call(this,a)},X,X,X,hf,hf,hf,hf,tf,X,If,Kf,xf,xf,xf,xf],Vf=[ef,zf,sf,Xe,ff,rf,X,X,X,X,X,X,X,X,X,X],Jf=[qf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},W,function(){this.$=1;this.b-=5},W,W,W,function(){this.X=0;this.b-=5},W,W,W,W,W,W,W],Lf=[qf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},uf,function(){this.$=0;this.b-=5},uf,uf,uf,function(){this.X=32768;this.b-=5},uf,uf,uf,uf,uf,uf,uf],Tf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,yf,Mf,Of,Qf,X,X, -X],Nf=[function(a){qd(this,Zd(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,pe);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0,te);this.b-=this.g?11:6},function(a){T(this,a,ld(this)?1:0,de);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,ld(this)?1:0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=Xd(this,a);qd(this,a<< -8);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,xe);this.b-=this.g?9+(this.lb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,he);this.b-=this.g?9+(this.lb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,fe);this.b-=this.g?9:3+(7==this.f?2:0)}];function hd(a){Wf[a>>12].call(this,a)} -var Wf=[function(a){Xf[a>>8&15].call(this,a)},mf,af,Le,He,Je,Ce,function(a){Yf[a>>8&15].call(this,a)},function(a){Zf[a>>8&15].call(this,a)},nf,bf,Me,Ie,Ke,wf,X],Xf=[function(a){$f[a>>4&15].call(this,a)},Ye,Ve,Ne,Oe,Te,Pe,Re,kf,kf,Cf,Ef,Gf,function(a){ag[a>>6&3].call(this,a)},X,X],ag=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);P(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Sd(this,a,0);ud(this,a);S(this,a);this.b-=11},function(a){var b=wd(this);this.J= -this.b;Td(this,a,0,b);S(this,b);this.b=this.J-of[this.g]},function(a){S(this,$d(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],$f=[function(a){bg[a&15].call(this,a)},X,X,X,hf,hf,hf,hf,tf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):X.call(this,a)},If,Kf,xf,xf,xf,xf],bg=[ef,zf,sf,Xe,ff,rf,function(){vd(this);this.b-=13},X,X,X,X,X,X,X,X,X],Yf=[pf,pf,cf,cf,De,De,Ee,Ee,Af,Af,X,X,X,X,vf,vf],Zf=[We,Ue,Qe,Se,Ze,$e,Fe,Ge,df,yf,Mf,Of,Qf,function(a){cg[a>> -6&3].call(this,a)},X,X],cg=[X,function(a){a=Sd(this,a,65536);ud(this,a);S(this,a);this.b-=11},function(a){var b=wd(this);this.J=this.b;Td(this,a,65536,b);S(this,b);this.b=this.J-of[this.g]},X]; -function dg(a){u.call(this,"ROM",a,dg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.F=sa(this.B);if(this.B){a=this.B;var b=ta(this.F);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?c.O("Unable to load ROM resource (error "+f+": "+a+")"):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null,eg(c))})}}z(dg);dg.prototype.Ca=function(a,b,c,d){this.w=b;this.b=c;this.i=d;eg(this)}; -dg.prototype.Ea=function(){this.ha&&(this.i&&fg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};dg.prototype.Da=function(){return!0}; -function eg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(ac(a.w,b,a.g,Hc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.jb(n++,b[r++]&255);else n&1?a.b.ja():kd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&mc(e.b,e.la))});this.ma=oc(52,4);this.Z=lc(this.b,function(){e.g|=128;e.g&64&&mc(e.b,e.ma)});hc(b,this,Eg);H(this)}; -k.uc=function(){if(!this.J){var a=Uc(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.cb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ea=function(a,b){if(!b)if(this.uc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Da=function(a){return a?this.save():!0};k.reset=function(){Fg(this)};k.save=function(){var a=new R(this);a.set(0,[]);return a.data()};k.restore=function(){return Fg(this)};function Fg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ec=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.P&&!this.I&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.F){if(10==a||1024<=this.F.length)this.j(this.F), -this.F="";10!=a&&(this.F+=String.fromCharCode(a))}this.g&=-129;nc(this.b,this.Z,1E3/Math.round(this.R/10))}};var Gg={},Eg=(Gg[65392]=[null,null,Y.prototype.rd,Y.prototype.je,"RCSR"],Gg[65394]=[null,null,Y.prototype.qd,Y.prototype.ie,"RBUF"],Gg[65396]=[null,null,Y.prototype.Kd,Y.prototype.Ce,"XCSR"],Gg[65398]=[null,null,Y.prototype.Jd,Y.prototype.Be,"XBUF"],Gg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Jg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Jg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ca=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Kg(a);var e=this;if((this.g=Uc(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=oc(56,4);this.ba=lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Tg(a,b,c,d,e.da,e.Ha, -e.Ga));a.A.Ua=!1;a.F&&(a.F--,a.F||H(a));Qg(a)})}function Ng(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ac?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){$g(a,b,c,d)})} -function $g(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Sa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ia=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Ma+a.Aa&&(a.Aa+=f-(a.Ma+a.Aa)+1):(a.Ma=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Sa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=bh(this,a++);)dh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function dh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){u.call(this,"RL11",a,O,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(O);k=O.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&eh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&fh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[ma(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=bh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";eh(this,0)}}return!0};k.Da=function(a){return a?this.save():!0};k.reset=function(){gh(this)};k.save=function(){return(new R(this)).data()}; -k.restore=function(a){return gh(this,a[0])};function jh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}lh(a,e,b,c,!1,d)}else kh(a,e)} -function lh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.$a.toLowerCase()!=d.toLowerCase()&&(g++,kh(a,b,!0),h.$b?a.O("RL11 busy"):(h.$b=!0,e&&(h.Zb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Kb=!!f,Zg(new Vg(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} -k.Kc=function(a,b,c,d,e){var f;a.$b=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.bc)),b=null);b?(a.Ba=b,a.Sa=c,a.$a=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.bc),a.Zb||e),this.B&&this.B.kb()):a.Kb=!1;a.Zb&&(a.Zb=!1,--this.I||H(this));eh(this,a.bc)}; -function ih(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.F=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.Xc=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.ab(f,r|t<<8);if(kc(this.w)){h=8192;break}f+=2;if(n>=l.Ia&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.Sd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ia&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.ud=function(){return this.ea&65535}; -k.me=function(a){this.ea=this.ea&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.F=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.F=this.C;break;case 12:b=this.Xc;case 10:b||(b=this.Sd),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.F&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.ea|=129,this.ea&64&&mc(this.b,this.P))}};k.sd=function(){return this.J};k.ke=function(a){this.J=a&65534};k.vd=function(){return this.g};k.ne=function(a){this.g=a};k.wd=function(){return this.F};k.oe=function(a){this.F=a};k.td=function(){return this.K};k.le=function(a){this.K=a&63}; -var mh={},hh=(mh[63744]=[null,null,O.prototype.ud,O.prototype.me,"RLCS"],mh[63746]=[null,null,O.prototype.sd,O.prototype.ke,"RLBA"],mh[65284]=[null,null,O.prototype.vd,O.prototype.ne,"RLDA"],mh[65286]=[null,null,O.prototype.wd,O.prototype.oe,"RLMP"],mh[65288]=[null,null,O.prototype.td,O.prototype.le,"RLBE"],mh);function nh(a){u.call(this,"Debugger",a,nh);this.Z=a.base||16;this.za=!1;this.J=0;this.P=!1;this.v=-1;this.g=[];this.S={}}z(nh); -var oh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};nh.prototype.qc=function(){return-1};nh.prototype.rc=function(){}; -function ph(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.P?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function qh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function yb(a){u.call(this,"Panel",a,yb);this.D=0;this.K=this.J=!1;this.g=this.B=this.v=0;this.L=20;this.I={};this.f={START:[1,!0,!1,this.$c],STEP:[1,!1,!1,this.ad],ENABLE:[1,!1,!1,this.Wc],CONT:[1,!0,!1,this.Uc],DEP:[0,!0,!1,this.Vc],EXAM:[1,!0,!1,this.Xc],LOAD:[1,!0,!1,this.Zc],TEST:[0,!0,!1,this.Yc]};for(a=0;22>a;a++)this.f["S"+a]=[0,!1,!1,this.bd,a]}z(yb);k=yb.prototype;k.reset=function(){this.L=this.L&-120|20}; +k.sa=function(a,b,c,d){if(this.C&&this.C.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.I[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.f[b];zb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.J="DEP"==b;a.K="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(zb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.i=d;Ab(b,this,Bb);Cb(b,this.reset.bind(this));Db(this);for(var e in this.f)zb(this,e,this.f[e][0])};k.Fa=function(a,b){b||Eb();return!0};k.Ea=function(){return!0}; +function Fb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.$||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))}function Gb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Db(a,b){for(var c in a.I)Gb(a,c,null!=b?b:a.I[c])}function zb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"} +k.$c=function(a){a||this.b.A.ca||(this.w.reset(),Ub(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.bb())};k.ad=function(){};k.Wc=function(a){a||this.b.ha()};k.Uc=function(a){a||this.b.A.ca||(this.f.ENABLE&&this.f.ENABLE[0]?this.b.bb():(a=this.i)&&!sb(a,!0)?(rb(a,!0),a.cb(0),rb(a,!1)):(this.b.cb(1),this.Z()))};k.Vc=function(a){a&&!this.b.A.ca&&(this.J&&Vb(this,this.g+2),this.w.Ib(this.g,Wb(this,this.v)))};k.Xc=function(a){a||this.b.A.ca||(this.K&&Vb(this,this.g+2),Wb(this,this.w.lb(this.g)))}; +k.Zc=function(a){a||this.b.A.ca||Vb(this,this.v)};k.Yc=function(a){Db(this,a||null)};k.bd=function(a,b){this.v=a?this.v|1<c;c++)Gb(a,"A"+c,b&1<c;c++)Gb(a,"D"+c,b&1<>2;this.w=this.ya-1;this.B=this.I/this.ya|0;this.Ua=[];this.f=0;this.g=!1;this.v=[];this.Gc=[ac,bc,cc,dc];a=new I(this);ec(a,this.i);this.X=Array(this.B);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,3);c=255;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function bc(a,b,c){var d=!1,e=this.controller,f=e.Ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,5),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function cc(a,b){var c=-1,d=this.controller;(a=d.Ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,2);c=65535;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function dc(a,b,c){var d=!1,e=this.controller;if(a=e.Ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,4),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function gc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Kb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Kb){n=l.size-(f-m);n>g&&(n=g);l.Kb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return lc(1,f,g)}f=new I(a,f,n,a.ya,d,e);ec(f,a.i,l);a.X[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Rb(a&this.w,a)};k.Qb=function(a){this.g=!1;this.f++;a=this.X[(a&this.Ra)>>>this.ka].bc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=nc(this.b,a));return this.X[(a&this.Ra)>>>this.ka].ra(a&this.w,a)};k.lb=function(a){var b=a&this.w,c=(a&this.Ra)>>>this.ka;this.g=!1;this.f++;a=this.X[c].cc(b,a);this.f--;return a};k.Sb=function(a,b){3932160<=a&&(a=nc(this.b,a));this.X[(a&this.Ra)>>>this.ka].Ub(a&this.w,b&255,a)};k.nb=function(a,b){this.g=!1;this.f++;this.X[(a&this.Ra)>>>this.ka].Vb(a&this.w,b&255,a);this.f--}; +k.ab=function(a,b){3932160<=a&&(a=nc(this.b,a));this.X[(a&this.Ra)>>>this.ka].Lb(a&this.w,b&65535,a)};k.Ib=function(a,b){var c=a&this.w,d=(a&this.Ra)>>>this.ka;this.g=!1;this.f++;this.X[d].gc(c,b&65535,a);this.f--};function oc(a){for(var b=0,c=[],d=0;da.b.rb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null,n=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var r=f[4],t=0;t>5&3;b.hb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.da!=c&&(b.da=c,wc(b));b.I&&b.I.Z()}};k.od=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.pd=function(){return this.b.Hb};k.qd=function(){return this.b.xb};k.he=function(a){var b=this.b;1170>b.rb&&(a&=-49);b.xb!=a&&(b.xb=a,b.qc=a&16?4194303:262143,wc(b),b.I&&b.I.Z())};k.Qd=function(a){a=a>>1&63;var b=this.b.Jb[a>>1];return a&1?b>>16:b&65535}; +k.He=function(a,b){b=b>>1&63;var c=b>>1;this.b.Jb[c]=b&1?this.b.Jb[c]&65535|(a&63)<<16:this.b.Jb[c]&-65536|a&65534};k.Jd=function(a){return this.b.V[1][a>>1&7]};k.Ae=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Hd=function(a){return this.b.V[1][(a>>1&7)+8]};k.ye=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Id=function(a){return this.b.xa[1][a>>1&7]};k.ze=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Gd=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.xe=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.kd=function(a){return this.b.V[0][a>>1&7]};k.de=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.hd=function(a){return this.b.V[0][(a>>1&7)+8]};k.be=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.jd=function(a){return this.b.xa[0][a>>1&7]};k.ce=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.gd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ae=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Pd=function(a){return this.b.V[3][a>>1&7]};k.Ge=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Nd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ee=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Od=function(a){return this.b.xa[3][a>>1&7]};k.Fe=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Md=function(a){return this.b.xa[3][(a>>1&7)+8]};k.De=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.vb=function(a){a&=7;return this.b.M&2048?this.b.Sa[a]:this.b.u[a]}; +k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Sa[b]=a:this.b.u[b]=a};k.vd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.me=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.yd=function(){return this.b.u[7]};k.pe=function(a){this.b.u[7]=a};k.wb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Sa[a]};k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Sa[b]=a};k.wd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; +k.ne=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.xd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.oe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.ed=function(a){return this.b.zc[a-65504>>1]};k.Zd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){};k.Ld=function(){return 1};k.Ce=function(){};k.dd=function(){return this.b.ga};k.Yd=function(){this.b.ga=0};k.md=function(){return this.b.yc}; +k.fe=function(a,b){b&1||(a&=255);this.b.yc=a};k.rd=function(a){return a?this.b.ec:0};k.ie=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ec=a;b.H|=2};k.Kd=function(a){return a?this.b.Za&65280:0};k.Be=function(a){this.b.Za=a|255};k.ud=function(){return Xb(this.b)};k.le=function(a){xc(this.b,a&-1809|Xb(this.b)&1808);this.b.H|=128};k.Cc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var N={},M=(N[61568]=[null,null,L.prototype.Qd,L.prototype.He,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Jd,L.prototype.Ae,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Hd,L.prototype.ye,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Id,L.prototype.ze,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Gd,L.prototype.xe,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.kd,L.prototype.de,"KISDR",8,1145],N[62672]=[null,null,L.prototype.hd,L.prototype.be,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.jd, +L.prototype.ce,"KISAR",8,1145],N[62704]=[null,null,L.prototype.gd,L.prototype.ae,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.qd,L.prototype.he,"MMR3",1,1145],N[65382]=[null,null,L.prototype.ld,L.prototype.ee,"LKS"],N[65402]=[null,null,L.prototype.nd,L.prototype.ge,"MMR0",1,1145],N[65404]=[null,null,L.prototype.od,L.prototype.Cc,"MMR1",1,1145],N[65406]=[null,null,L.prototype.pd,L.prototype.Cc,"MMR2",1,1145],N[65408]=[null,null,L.prototype.Pd,L.prototype.Ge,"UISDR",8,1145],N[65424]=[null,null,L.prototype.Nd, +L.prototype.Ee,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.Od,L.prototype.Fe,"UISAR",8,1145],N[65456]=[null,null,L.prototype.Md,L.prototype.De,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.vb,L.prototype.yb,"R0SET0"],N[65473]=[null,null,L.prototype.vb,L.prototype.yb,"R1SET0"],N[65474]=[null,null,L.prototype.vb,L.prototype.yb,"R2SET0"],N[65475]=[null,null,L.prototype.vb,L.prototype.yb,"R3SET0"],N[65476]=[null,null,L.prototype.vb,L.prototype.yb,"R4SET0"],N[65477]=[null,null,L.prototype.vb,L.prototype.yb, +"R5SET0"],N[65478]=[null,null,L.prototype.vd,L.prototype.me,"R6KERNEL"],N[65479]=[null,null,L.prototype.yd,L.prototype.pe,"R7KERNEL"],N[65480]=[null,null,L.prototype.wb,L.prototype.zb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.wb,L.prototype.zb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.wb,L.prototype.zb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.wb,L.prototype.zb,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.wb,L.prototype.zb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.wb, +L.prototype.zb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.wd,L.prototype.ne,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.xd,L.prototype.oe,"R6USER",1,1145],N[65504]=[null,null,L.prototype.ed,L.prototype.Zd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.wc,L.prototype.Dc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.wc,L.prototype.Dc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Ld,L.prototype.Ce,"SYSID",1,1170],N[65526]=[null,null,L.prototype.dd,L.prototype.Yd,"CPUERR",1,1170],N[65528]= +[null,null,L.prototype.md,L.prototype.fe,"MB",1,1170],N[65530]=[null,null,L.prototype.rd,L.prototype.ie,"PIR"],N[65532]=[null,null,L.prototype.Kd,L.prototype.Be,"SL"],N[65534]=[null,null,L.prototype.ud,L.prototype.le,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,this.size>>2),Oc(this,Kc?Pc:Qc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&K(this.w,b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24> +a?c&65535:c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},O:function(a,b){if(this.i&&null!=this.F){var c=this.i;Vc(c,this.F+a,1,c.L)&&c.ha(!0)}return this.bc(a,b)},Na:function(a,b){if(this.i&&null!=this.F){var c=this.i;Vc(c,this.F+a,2,c.L)&&c.ha(!0)}return this.cc(a, +b)},ma:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Vc(d,this.F+a,1,d.B)&&d.ha(!0)}this.f?this.v(a,b,c):this.Vb(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Vc(d,this.F+a,2,d.B)&&d.ha(!0)}this.f?this.v(a,b,c):this.gc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},W:function(a,b){a&1&&K(this.w,b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&K(this.w, +b,64,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Pa=!0},ta:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&K(this.w,c,64,4);this.D.setUint16(a,b,!0);this.Pa=!0},fb:function(a,b,c){a&1&&K(this.w,c,64,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+ +J(this.i,b)+")",!0)}};function ec(a,b,c){a.i=b;a.g=a.C=0;c&&((a.g=c.g)&&Uc(a,Tc,!1),(a.C=c.C)&&Sc(a,Tc,!1))}function Wc(a,b){b?--a.C||(a.Ub=a.f?a.v:a.Vb,a.Lb=a.f?a.I:a.gc):--a.g||(a.Rb=a.bc,a.ra=a.cc)}function Sc(a,b,c){c&&a.C||(a.Ub=!a.f&&b[1]||a.v,a.Lb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Vb=b[1]||a.v,a.gc=b[3]||a.I}function Uc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.bc=b[0]||a.K,a.cc=b[2]||a.L}function Oc(a,b){b||(b=Xc);Uc(a,b,void 0);Sc(a,b,void 0)} +var Xc=[],Rc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ha],Tc=[I.prototype.O,I.prototype.ma,I.prototype.Na,I.prototype.Aa];if(wb)var Qc=[I.prototype.N,I.prototype.la,I.prototype.W,I.prototype.wa],Pc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.fb]; +function Yc(a,b){u.call(this,"CPU",a,Yc,1);var c=a.multiplier||1;this.ib=a.cycles||b;this.Xa=c;this.Bb=Math.round(this.ib/1E4)/100;this.mb=this.Bb*this.Xa;this.A.ca=!1;this.A.Tb=!1;this.A.pb=a.autoStart;this.A.qb=!1;this.Eb=this.va=0;this.Fb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.L=[];this.uc=this.Ud.bind(this);H(this)}z(Yc);var Zc=["power","reset"];k=Yc.prototype; +k.Da=function(a,b,c,d){this.C=a;this.w=b;this.i=d;this.I=a.I;for(b=0;b=a.va&&(a.va+=a.sb,c=!0);0<=a.tb&&a.tb<=ed(a)&&(a.sb=a.tb=-1,bd(a),a.ha(),c=!0);c&&a.j(ed(a)+" cycles: checksum="+p(a.Eb))}} +k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.A.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.$/a.mb?b=1:d=!0;a.Xa=b;b=a.Bb*a.Xa;if(a.mb!=b){a.mb=b;b=a.mb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.C&&a.C.ob()}gd(a,a.W);a.W=0;a.S=Ba();a.la=0;hd(a);return d}function sc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function uc(a,b,c){0<=b&&ba.L[b][0]&&(c=a.ib*a.Xa/1E3*c|0,a.L[b][0]=c+id(a))} +function jd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function id(a,b){var c=a.ma-=a.b;a.b=a.K=0;b&&(a.ma=0);return c} +k.Ud=function(){if(this.A.ca){this.Cb>=this.ib&&hd(this,!0);this.Ha=0;this.eb=Ba();if(this.la){var a=this.eb-this.la;a>this.rc&&(this.S+=a,this.S>this.eb&&(this.S=this.eb))}try{do{var b=jd(this,this.A.qb?1:this.kb);try{this.cb(b)}catch(e){if("number"!=typeof e)throw e;}b=id(this,!0);this.Ha+=b;this.W+=b;dd(this,b);kd(this,b);this.wa-=b;if(0>=this.wa){this.wa+=this.kb;15<=++this.tc&&(this.C&&this.C.Z(),this.tc=0);break}}while(this.A.ca)}catch(e){this.ha();this.C&&this.C.stop(Ba(),ed(this));vb(this, +e.stack||e.message);return}if(this.A.ca){a=setTimeout;b=this.uc;this.la=Ba();var c=this.rc;this.Ha&&(c=Math.round(c*this.Ha/this.kb));var c=c-(this.la-this.eb),d=this.la-this.S;d&&(this.$=Math.round(this.W/(10*d))/100,864E5<=d&&(this.ta=0,fd(this)));if(0>c||this.$c&&(this.S-=c),c=0;this.Cb+=this.Ha;this.la+=c;a(b,c)}}}; +k.bb=function(a){if(ub(this))return!1;if(this.A.ca)return this.j(this.toString()+" busy"),!1;fd(this);this.A.ca=!0;this.A.Tb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.ob(!0),this.C.start(this.S,ed(this)));setTimeout(this.uc,0);return!0};k.cb=function(){return 0};k.ha=function(a){var b=!1;if(this.A.ca){id(this);gd(this,this.W);this.W=0;this.A.ca=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Ba(),ed(this));b=!0}this.A.complete=a;return b}; +function ld(a){this.rb=+a.model||1170;this.Ob=a.addrReset||0;Yc.call(this,a,6666667);this.decode=1120==this.rb?md.bind(this):nd.bind(this);od(this);this.N=0;this.O=null;this.A.complete=!1}z(ld,Yc);k=ld.prototype;k.reset=function(){this.status("model "+this.rb);this.A.ca&&this.ha();od(this);ad(this);this.A.error=!1;this.parent.reset.call(this)}; +function od(a){a.T=65536;a.U=32768;a.aa=65535;a.Y=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Sa=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.hb=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Jb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.D=a.J=0;a.g=a.f=a.Ab=0;a.Aa=-1;Ub(a)}function Ub(a){a.Za=255;a.ga=0;a.ec=0;a.B=0;a.Ya=0;a.Hb=0;a.xb=0;a.da=0;a.gb=0;a.qc=262143;a.O=null;a.w&&wc(a)}function wc(a){a.da?(a.R=65536,a.ba=a.Oc,a.ra=a.Rd,a.Lb=a.Ie,gc(a.w,a.xb&16?22:18)):(a.R=0,a.ba=a.Nc,a.ra=a.xc,a.Lb=a.Ec,gc(a.w,16))}function pd(a,b,c){a.Ob=b;P(a,b);!c&&a.i&&(a.ha()||a.i.Z())}k.nc=function(){return 0}; +k.save=function(){var a=new R(this);a.set(0,[]);a.set(1,[this.ta,this.Xa]);a.set(2,oc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ta=b[1];fd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.H|=2}function S(a,b){a.H&128||(a.Y=a.aa=b,a.U=0)}function vd(a,b,c){a.H&128||(a.Y=a.aa=a.T=b,a.U=c||0)}function wd(a,b,c,d){a.H&128||(a.Y=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function xd(a,b){a.H&128||(a.Y=a.aa=a.T=b,a.U=a.Y^a.T>>1)}function yd(a,b,c,d){a.H&128||(a.Y=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.N){var c=!1;0>this.Aa?this.Aa=Xb(this):this.v||(a=4,c=!0);this.B&57344||(this.Ya=63222,this.Hb=a);this.v=0;var d=this.ra(a|this.R),e=this.ra(a+2&65535|this.R);xc(this,e&-12289|this.Aa>>2&12288);c&&(this.ga|=4,this.u[6]=4);zd(this,this.Aa);zd(this,this.u[7]);P(this,d);this.H&=-113;this.Aa=-1;this.H|=8;this.Tc=a;this.Sc=b;if(26!=b)throw a;}}; +function Ad(a){var b=Bd(a),c=Bd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);P(a,b);xc(a,c);a.H&=-17}function nc(a,b){var c=b>>13&31;31>c&&a.xb&32&&(b=a.Jb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Td(a,b,c){var d,e,f,g=0;d=b>>13;a.xb&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.qc;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;b=!1;g&&(g&57344&&(0<=a.Aa&&(g|=128),a.B&57344||(a.B=a.B|g|a.gb<<5|a.hb<<1),b=!0),a.B&61440||!(4191360> +f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(ud(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(ud(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.R)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.B&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.H|=64));return e}k.Qb=function(a){if(!this.da)return this.w.Qb(a);this.N++;a=Ud(this,Td(this,a,3));this.N--;return a}; +k.lb=function(a){if(!this.da)return this.w.lb(a);this.N++;a=this.xc(Td(this,a,2));this.N--;return a};k.nb=function(a,b){this.da?(this.N++,Vd(this,Td(this,a,5),b),this.N--):this.w.nb(a,b)};k.Ib=function(a,b){this.da?(this.N++,this.Ec(Td(this,a,4),b),this.N--):this.w.Ib(a,b)};k.Nc=function(a,b,c){return Wd(this,a,b,c)};k.Oc=function(a,b,c){return Td(this,Wd(this,a,b,c),c)};k.xc=function(a){return this.w.oa(a)};k.Rd=function(a){return this.w.oa(Td(this,a,2))};k.Ec=function(a,b){this.w.ab(a,b&65535)}; +k.Ie=function(a,b){this.w.ab(Td(this,a,4),b)};function Xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Wd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.R),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function Yd(a,b,c,d){a.B&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Wd(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Td(a,e|c&65536,4),a.v=a.M>>14&3,a.w.ab(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} +function Zd(a,b){b>>=6;var c=a.J=b&7;return(b=a.D=(b&56)>>3)?Ud(a,a.ba(b,c,3)):a.u[c]&255}function $d(a,b){b>>=6;var c=a.J=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ae(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Wd(a,b,c,8)}function be(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Ud(a,a.ba(b,c,3)):a.u[c]&255}function ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ab=a.ba(b,e,7),Vd(a,e,d.call(a,c,Ud(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ab(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function de(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Vd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ab(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.cb=function(a){this.A.complete=!0;var b=this.i&&fe(this.i)?1:this.A.Tb?-1:0,c=a?this.A.Tb?0:1:-1;this.A.Tb=!1;this.ma=this.b=a;do{if(b){if(this.i&&ge(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.pa(168,28):this.H&64?this.pa(4,30):this.H&16&&this.pa(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.ec&224)>>5,f=this.O&&this.O.ub>e?this.O:null;f&&(d=f.Wd,e=f.ub);e>(this.M&224)>>5?(this.H&4&&(ud(this,2),this.H&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.O,f==a)this.O=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(td(this))}while(0>1|b<<16;xd(this,a);return a&65535}function me(a,b){a=b&2048|b>>1|b<<8;xd(this,a<<8);return a&255}function ne(a,b){a=b&~a;S(this,a);return a}function oe(a,b){a=b&~a;S(this,a<<8);return a}function pe(a,b){a|=b;S(this,a);return a}function qe(a,b){a|=b;S(this,a<<8);return a} +function re(a,b){a=~b|65536;vd(this,a);return a&65535}function se(a,b){a=~b|256;vd(this,a<<8);return a&255}function te(a,b){a=b-a;this.H&128||(this.Y=this.aa=a,this.U=b&(b^a));return a&65535}function ue(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.Y=this.aa=c,this.U=b&(b^c));return a&255}function ve(a,b){a=b+a;this.H&128||(this.Y=this.aa=a,this.U=a&(b^a));return a&65535}function we(a,b){a=b+a;var c=a<<8;this.H&128||(this.Y=this.aa=c,this.U=c&(b<<8^c));return a&255} +function xe(a,b){a=-b;vd(this,a,a&b&32768);return a&65535}function ye(a,b){a=-b;vd(this,a<<8,(a&b&128)<<8);return a&255}function ze(a,b){a=b<<1|this.T>>16&1;xd(this,a);return a&65535}function Ae(a,b){a=b<<1|this.T>>16&1;xd(this,a<<8);return a&255}function Be(a,b){a=(this.T&65536|b)>>1|b<<16;xd(this,a);return a&65535}function Ce(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;xd(this,a<<8);return a&255}function De(a,b){var c=b-a;yd(this,c,a,b);return c&65535} +function Ee(a,b){var c=b-a;yd(this,c<<8,a<<8,b<<8);return c&255}function Fe(a,b){this.H&128||(this.Y=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ge(a,b){a^=b;S(this,a);return a&65535}function He(a){U(this,a,$d(this,a),he);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ie(a){var b=ce(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.Y=this.aa=c;this.b-=(this.g?6:7)+b} +function Je(a){var b=ce(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ke(a){V(this,a,!qd(this))}function Le(a){V(this,a,qd(this))} +function Me(a){U(this,a,$d(this,a),ne);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ne(a){T(this,a,Zd(this,a),oe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Oe(a){U(this,a,$d(this,a),pe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Pe(a){T(this,a,Zd(this,a),qe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Qe(a){S(this,$d(this,a)&ce(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Re(a){S(this,(Zd(this,a)&be(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Se(a){V(this,a,sd(this))}function Te(a){V(this,a,!this.Qa()==!rd(this))}function Ue(a){V(this,a,!sd(this)&&!this.Qa()==!rd(this))}function Ve(a){V(this,a,!qd(this)&&!sd(this))}function We(a){V(this,a,sd(this)||!this.Qa()!=!rd(this))} +function Xe(a){V(this,a,qd(this)||sd(this))}function Ye(a){V(this,a,!this.Qa()!=!rd(this))}function Ze(a){V(this,a,this.Qa())}function $e(a){V(this,a,!sd(this))}function af(a){V(this,a,!this.Qa())}function bf(){this.pa(12,1);this.b-=5}function cf(a){V(this,a,!0)}function df(a){V(this,a,!rd(this))}function ef(a){V(this,a,rd(this))}function W(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.Y=0);this.b-=5} +function ff(a){var b=$d(this,a);a=ce(this,a);yd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function gf(a){var b=Zd(this,a)<<8;a=be(this,a)<<8;yd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function hf(a){var b=ce(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.Y=d>>16):(this.U=32768,this.aa=d>>15|d,this.Y=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.Y=0,this.U=32768,this.T=65536,this.b-=7}function jf(){this.pa(24,2);this.b-=25} +function kf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qc(this.i):this.ha();this.b-=7}function lf(){this.pa(16,4);this.b-=25}var mf=[0,7,7,10,7,11,9,13];function nf(a){this.K=this.b;P(this,ae(this,a));this.b=this.K-mf[this.g]}var of=[0,14,14,17,14,18,16,20];function pf(a){this.K=this.b;var b=ae(this,a);a=a>>6&7;zd(this,this.u[a]);this.u[a]=this.u[7];P(this,b);this.b=this.K-of[this.g]}var qf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function rf(a){var b=$d(this,a);this.K=this.b;S(this,ee(this,a,b));this.b=this.K-qf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function sf(a){var b=Zd(this,a);S(this,de(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var tf=[7,13,13,17,14,18,17,21]; +function uf(a){var b=ce(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.Y=b>>16,this.aa=this.Y|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)P(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Bf(a){U(this,a,$d(this,a),De);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Cf(a){U(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Df(){this.pa(28,5);this.b-=5}function Ef(){this.H&4||this.C.Z();this.H|=4;ud(this,-2);this.b-=3}function Ff(a){U(this,a,$d(this,a),Ge);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qc(b);b||this.pa(8,6)}function md(a){Gf[a>>12].call(this,a)}function Hf(a){If[a>>6&3].call(this,a)}function Jf(a){Kf[a>>6&3].call(this,a)} +function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a&15].call(this,a)}function Pf(a){Qf[a&15].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} +var Gf=[function(a){Xf[a>>8&15].call(this,a)},rf,ff,Qe,Me,Oe,He,X,function(a){Yf[a>>8&15].call(this,a)},sf,gf,Re,Ne,Pe,Bf,X],Xf=[function(a){Zf[a>>4&15].call(this,a)},cf,$e,Se,Te,Ye,Ue,We,pf,pf,Hf,Jf,Lf,X,X,X],If=[function(a){vd(this,ee(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,te);this.b-=this.g?9:3+(7==this.f?2:0)}],Kf=[function(a){U(this,a,0, +xe);this.b-=this.g?11:6},function(a){U(this,a,qd(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,qd(this)?1:0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ce(this,a);vd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Mf=[function(a){U(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)}], +Zf=[function(a){$f[a&15].call(this,a)},X,X,X,nf,nf,nf,nf,yf,X,Nf,Pf,Cf,Cf,Cf,Cf],$f=[kf,Ef,xf,bf,lf,wf,X,X,X,X,X,X,X,X,X,X],Of=[vf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},W,function(){this.aa=1;this.b-=5},W,W,W,function(){this.Y=0;this.b-=5},W,W,W,W,W,W,W],Qf=[vf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},zf,function(){this.aa=0;this.b-=5},zf,zf,zf,function(){this.Y=32768;this.b-=5},zf,zf,zf,zf,zf,zf,zf],Yf=[af,Ze,Ve,Xe,df,ef,Ke,Le,jf,Df,Rf,Tf,Vf,X, +X,X],Sf=[function(a){vd(this,de(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ue);this.b-=this.g?9:3+(7==this.f?2:0)}],Uf=[function(a){T(this,a,0,ye);this.b-=this.g?11:6},function(a){T(this,a,qd(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,qd(this)?1:0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=be(this,a);vd(this, +a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){T(this,a,0,Ce);this.b-=this.g?9+(this.Ab&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,me);this.b-=this.g?9+(this.Ab&1):3+(7==this.f?2:0)},function(a){T(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)}];function nd(a){ag[a>>12].call(this,a)} +var ag=[function(a){bg[a>>8&15].call(this,a)},rf,ff,Qe,Me,Oe,He,function(a){cg[a>>8&15].call(this,a)},function(a){dg[a>>8&15].call(this,a)},sf,gf,Re,Ne,Pe,Bf,X],bg=[function(a){eg[a>>4&15].call(this,a)},cf,$e,Se,Te,Ye,Ue,We,pf,pf,Hf,Jf,Lf,function(a){fg[a>>6&3].call(this,a)},X,X],fg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.R);P(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Xd(this,a,0);zd(this,a);S(this,a);this.b-=11},function(a){var b=Bd(this);this.K= +this.b;Yd(this,a,0,b);S(this,b);this.b=this.K-tf[this.g]},function(a){S(this,ee(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],eg=[function(a){gg[a&15].call(this,a)},X,X,X,nf,nf,nf,nf,yf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):X.call(this,a)},Nf,Pf,Cf,Cf,Cf,Cf],gg=[kf,Ef,xf,bf,lf,wf,function(){Ad(this);this.b-=13},X,X,X,X,X,X,X,X,X],cg=[uf,uf,hf,hf,Ie,Ie,Je,Je,Ff,Ff,X,X,X,X,Af,Af],dg=[af,Ze,Ve,Xe,df,ef,Ke,Le,jf,Df,Rf,Tf,Vf,function(a){hg[a>> +6&3].call(this,a)},X,X],hg=[X,function(a){a=Xd(this,a,65536);zd(this,a);S(this,a);this.b-=11},function(a){var b=Bd(this);this.K=this.b;Yd(this,a,65536,b);S(this,b);this.b=this.K-tf[this.g]},X]; +function ig(a){u.call(this,"ROM",a,ig);this.ia=this.f=null;this.B=a.addr;this.g=a.size;this.v=a.alias;this.C=a.file;this.D=sa(this.C);if(this.C){a=this.C;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.P("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.C=null);jg(c)})}}z(ig);ig.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;jg(this)}; +ig.prototype.Fa=function(){this.ia&&(this.i&&kg(this.i,this.id,this.B,this.g,this.ia),delete this.ia);return!0};ig.prototype.Ea=function(){return!0}; +function jg(a){if(!tb(a)){if(a.C){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.B;if(jc(a.w,b,a.g,Nc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.nb(n++,b[r++]&255);else n&1?a.b.ha():pd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&tc(e.b,e.la))});this.ma=vc(52,4);this.$=sc(this.b,function(){e.g|=128;e.g&64&&tc(e.b,e.ma)});Ab(b,this,Jg);H(this)}; +k.sc=function(){if(!this.J){var a=$c(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.fb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.sc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ea=function(a){return a?this.save():!0};k.reset=function(){Kg(this)};k.save=function(){var a=new R(this);a.set(0,[]);return a.data()};k.restore=function(){return Kg(this)};function Kg(a){a.K=0;a.f=0;a.g=128;a.B=[];return!0}k.dc=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.O&&!this.I&&c&&(b=String.fromCharCode(this.O)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;uc(this.b,this.$,1E3/Math.round(this.R/10))}};var Lg={},Jg=(Lg[65392]=[null,null,Y.prototype.Ad,Y.prototype.re,"RCSR"],Lg[65394]=[null,null,Y.prototype.zd,Y.prototype.qe,"RBUF"],Lg[65396]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XCSR"],Lg[65398]=[null,null,Y.prototype.Sd,Y.prototype.Je,"XBUF"],Lg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Og(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Og(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Da=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.i=d;this.S=Pg(a);var e=this;if((this.g=$c(this.C,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.W=vc(56,4);this.da=sc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.C&&!a.C.A.ja;g?a.P('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Yg(a,b,c,d,e.ea,e.Ja, +e.Ia));a.A.Va=!1;a.D&&(a.D--,a.D||H(a));Vg(a)})}function Sg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.$b?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){eh(a,b,c,d)})} +function eh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ja;if(d)a.controller.P('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.za=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Ma+a.Ba&&(a.Ba+=f-(a.Ma+a.Ba)+1):(a.Ma=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.P("Unable to restore disk '"+this.Ta+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=gh(this,a++);)ih(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function ih(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){u.call(this,"RL11",a,O,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(O);k=O.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&jh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&kh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[ma(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=gh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";jh(this,0)}}return!0};k.Ea=function(a){return a?this.save():!0};k.reset=function(){lh(this)};k.save=function(){return(new R(this)).data()}; +k.restore=function(a){return lh(this,a[0])};function oh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.P("Unable to load the selected drive");else if(c)if("?"==c)a.P('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}qh(a,e,b,c,!1,d)}else ph(a,e)} +function qh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.$a.toLowerCase()!=d.toLowerCase()&&(g++,ph(a,b,!0),h.Zb?a.P("RL11 busy"):(h.Zb=!0,e&&(h.Yb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Mb=!!f,dh(new $g(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} +k.Kc=function(a,b,c,d,e){var f;a.Zb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.za)&&(this.P('Disk "'+c+'" too large for drive '+("RL"+a.ac)),b=null);b?(a.Ca=b,a.Ta=c,a.$a=d,this.P('Mounted disk "'+c+'" in drive '+("RL"+a.ac),a.Yb||e),this.C&&this.C.ob()):a.Mb=!1;a.Yb&&(a.Yb=!1,--this.I||H(this));jh(this,a.ac)}; +function nh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.B=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.fd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.ab(f,r|t<<8);if(rc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.$d=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(rc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Dd=function(){return this.fa&65535}; +k.ue=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.B&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.B=this.g&4?this.B+b:this.B-b,this.g=this.B=this.B&65408|c);break;case 8:this.D=this.B;break;case 12:b=this.fd;case 10:b||(b=this.$d),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.fa|=129,this.fa&64&&tc(this.b,this.O))}};k.Bd=function(){return this.J};k.se=function(a){this.J=a&65534};k.Ed=function(){return this.g};k.ve=function(a){this.g=a};k.Fd=function(){return this.D};k.we=function(a){this.D=a};k.Cd=function(){return this.K};k.te=function(a){this.K=a&63}; +var rh={},mh=(rh[63744]=[null,null,O.prototype.Dd,O.prototype.ue,"RLCS"],rh[63746]=[null,null,O.prototype.Bd,O.prototype.se,"RLBA"],rh[65284]=[null,null,O.prototype.Ed,O.prototype.ve,"RLDA"],rh[65286]=[null,null,O.prototype.Fd,O.prototype.we,"RLMP"],rh[65288]=[null,null,O.prototype.Cd,O.prototype.te,"RLBE"],rh);function sh(a){u.call(this,"Debugger",a,sh);this.$=a.base||16;this.wa=!1;this.J=0;this.O=!1;this.v=-1;this.g=[];this.S={}}z(sh); +var th={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};sh.prototype.oc=function(){return-1};sh.prototype.pc=function(){}; +function uh(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.O?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function vh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function rh(a,b,c){var d;if(b){b=sh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function vh(a,b){if(b)return uh(a,b,a.S[b]);var c=0;for(b in a.S)uh(a,b,a.S[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ah(a,b){if(b)return zh(a,b,a.S[b]);var c=0;for(b in a.S)zh(a,b,a.S[b]),c++;return 0this.b.qb?Eh:[];Fh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.aa(Gh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=dc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.rc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ra[a-8]:20>a?b=this.b.Fa[a-16]:20==a&&(b=Cb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Fb).D));this.na&1073741824?this.ua.push(a):this.ba&&a==this.ba||(this.ba=a,this.na&-2147483648&&(this.ja(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,cd(a),a.ua=0,a.B.ca()))};function yh(a){var b;if(!ae(a))a.F&&a.F.length&&a.j("instruction history buffer freed"),a.Y=0,a.F=[];else if(!a.F||!a.F.length){a.F=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Nh(this):Oh(this)}};function Mh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ga?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ea=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Da=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){yh(this);this.va=0;this.ba=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ga=!1;Ph(this);a||this.ca()};k.save=function(){var a=new R(this);a.set(0,Ih(this.K));a.set(1,Ih(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.I);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Jh(a[b++]),this.N=Jh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ga=!0;this.Jb=a;this.Mb=b}; -k.stop=function(a,b){if(this.A.ga){this.A.ga=!1;this.J=b-this.Mb;if(!this.R){b="stopped";if(this.J){a-=this.Jb;var c=0d&&(d=a.b.pb(b)),65535!=(d&65535)&&(c=a.F[a.Y],c.D=b,c.La=!1,++a.Y==a.F.length&&(a.Y=0)));return!1}function jc(a){var b=a.b;if(b.A.ga)throw P(b,a.b.Fb),a.ja(),-1;return!1} -function xh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.bb=0}k.gb=function(a,b,c){var d=!0;c||Qh(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.j("invalid address: "+J(this,b.D)),d=!1;else{var f=this.w;f.W[e>>>f.ka].gb(e&f.w,a==this.C)}}d&&(a.push(b),c?b.La=!0:(Rh(this,a,a.length-1,"set"),yh(this)));return d}; -function Qh(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.ka],b==a.C));h.La||yh(a);break}}return f}function Sh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.D-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Lh(y);break;case 8:x="@"+Lh(y);break;case 16:7>y?x="("+Lh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Lh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Lh(y)+")";break;case 40:x="@-("+Lh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Lh(y)+")";7==y&&(x=J(w,A+t.D&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Lh(y)+")",7==y&&(x="@"+J(w,A+t.D&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Lh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ra[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Fa[b-16]):20==b&&(c="PS="+J(a,Cb(d)));c&&(c+=" ");return c}function Xh(a){var b,c="";for(b=0;6>b;b++)c+=Wh(a,b);c=c+"\n"+(Wh(a,6)+Wh(a,7)+Wh(a,20));return c+=Vh(a,"T")+Vh(a,"N")+Vh(a,"Z")+Vh(a,"V")+Vh(a,"C")}k.kc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.kc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Je:b,D:c,Sc:d,ha:e,ic:f})}function Yh(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.Sc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.ca();a.j("updated registers:")}a.j(Xh(a));c&&(a.K=Z(d.u[7]),Oh(a,J(a,a.K.D)))}}function bi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=Uh(a,b,g,f);a.j(f);a.K=b;e-=b.D-l;c++}}} -function Th(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.D)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ba=null;if(tb(a)&&0n||"z"oa.length&&(a.j("note: only "+oa.length+" available"),ba=oa.length);ga-=ba;0>ga&&(null==oa[oa.length-1].D?(ba=ga+ba,ga=0):ga+=oa.length);var zd=[];"call"==ng&&(Eb=1E5,zd=["CALL"]);for(void 0!==mg&&a.j(ba+" instructions earlier:");0=oa.length&&(ga=0);a.lb=ba;pg++;Eb--}}pg||(a.j("no "+og+"history available"),a.lb=void 0)}else{var Gb=Gh(a,na);if(Gb){var wc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||vi),wc=th(a,La)>>>0,65536>4||1;xi--&&0Ac?String.fromCharCode(Ac):".";xc-=zc}Hb&&(Hb+="\n");Hb+=na+" "+Ad+(0==Jb?" "+sg:"")}Hb&&a.j(Hb);a.eb=Gb}}}}break;case "e":if("else"==g[0])break;var hb,Bd,Cd,Dd,Ed=g[0],Fd=g[1];"eb"==Ed?(hb=1,Bd=255,Cd=a.Bb,Dd=a.Sb):"e"==Ed||"ew"==Ed?(hb=2,Bd=65535,Cd=a.oa,Dd=a.ab):Fd=null;if(null==Fd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Bc=Gh(a,Fd);if(Bc)for(var Cc= -2;CcId;){for(var Ma=null,Bi=256;65536>Mb.D>>>0;){Jd.D=a.oa(Mb,2);if(null==Mb.D||!Bi--)break;if(!(Jd.D&1)){for(var Ci=a,Dc=Jd,ug=null,Nb=Dc.D,vg=Nb,Kd=1;6>=Kd&&Nb;Kd++){if(2< -Kd){Dc.D=Nb;var Ec=Uh(Ci,Dc);if(0<=Ec.indexOf("JSR")){var wg=Ec.indexOf(" ");if(Nb+(Ec.indexOf(" ",wg+1)-wg-1)/2==vg){ug=Ec;break}}}Nb-=2}Dc.D=vg;if(Ma=ug)break}}if(!Ma||null==Ma)break;var xg=null;if("ks"==Ai){var yg=Ma.match(/[0-9A-F]+$/);yg&&(xg=ai(a,yg[0]))}Ma=xa(Ma,50)+" ;"+(xg||"stack="+J(a,Mb.D));a.j(Ma);Id++}Id||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ai(a,g[1],!0);break}f=!0;break;case "m":a:{var pa,qa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)qa=!0,G=null;else if("off"==G)qa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(pa in xb)if(G==pa){Da=xb[pa];qa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,qa=!0;else if("off"==g[2]&&(a.na&=~Da,qa=!1,1073741824==Da)){for(var Ld=0;Ld\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bgi){if(ii(d,this.J)){this.C=new R(this,"1.30.2","failsafe");ii(this.C)&&(ni(this,d),a=2,oi(this.C));this.C.set("timestamp",Ca());pi(this.C);var e=this.f&&!this.F;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=mi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ii(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),oi(d),ii(d)?(c=mi(d),e=!0):c=!1))}e&&li(this,c?d:null)}else 2==a&&d.clear()}else li(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ba=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(qi(this,this.b,b,c,a),this.b.mb());this.P&&(ni(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.B=0}; -function ni(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Z;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function di(a,b,c){var d,e="none";if(a.B)return null;a.B--;var f=new R(a,"1.30.2"),g=new R(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Da&&(c&&a.b.ja(),d=a.b.Da(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ii(a,b,c)}})}else c(a,null)} -function Ji(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--ui||Za(!0));l=!1}var g,h,l=!0;ui++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Gi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--ui||Za(!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),--ui||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Gi(b,a,d,!0,e,m):Hi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ji(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Ih=[0],Jh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Bh.prototype; +k.Da=function(a,b,c,d){this.w=b;this.b=c;this.C=a;(a=$c(a,"messages"))&&Eh(this,a);this.kb=Hh;this.Ab=1145>this.b.rb?Jh:[];Kh(this,function(a){a:{var b=d.w.X,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Lh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=mc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Sa[a-8]:20>a?b=this.b.Ga[a-16]:20==a&&(b=Xb(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Hb).F));this.na&1073741824?this.ta.push(a):this.da&&a==this.da||(this.da=a,this.na&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,id(a),a.wa=0,a.C.Z()))};function Dh(a){var b;if(!fe(a))a.D&&a.D.length&&a.j("instruction history buffer freed"),a.W=0,a.D=[];else if(!a.D||!a.D.length){a.D=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Sh(this):Th(this)}};function Rh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ca?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Dh(this);this.va=0;this.da=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ca=!1;Uh(this);a||this.Z()};k.save=function(){var a=new R(this);a.set(0,Nh(this.K));a.set(1,Nh(this.N));a.set(2,[this.g,this.O,this.na]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Oh(a[b++]),this.N=Oh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.O=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ca=!0;this.Bb=a;this.Cb=b}; +k.stop=function(a,b){if(this.A.ca){this.A.ca=!1;this.J=b-this.Cb;if(!this.R){b="stopped";if(this.J){a-=this.Bb;var c=0d&&(d=a.b.lb(b)),65535!=(d&65535)&&(c=a.D[a.W],c.F=b,c.La=!1,++a.W==a.D.length&&(a.W=0)));return!1}function qc(a){var b=a.b;if(b.A.ca)throw P(b,a.b.Hb),a.ha(),-1;return!1} +function Ch(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.B)for(b=1;b>>d.ka],!0);a.B=["bw"];a.eb=0}k.jb=function(a,b,c){var d=!0;c||Vh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.X[e>>>f.ka].jb(e&f.w,a==this.B)}}d&&(a.push(b),c?b.La=!0:(Wh(this,a,a.length-1,"set"),Dh(this)));return d}; +function Vh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.B));h.La||Dh(a);break}}return f}function Xh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Qh(y);break;case 8:x="@"+Qh(y);break;case 16:7>y?x="("+Qh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Qh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Qh(y)+")";break;case 40:x="@-("+Qh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Qh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Qh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Qh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Sa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b&&(c="PS="+J(a,Xb(d)));c&&(c+=" ");return c}function bi(a){var b,c="";for(b=0;6>b;b++)c+=ai(a,b);c=c+"\n"+(ai(a,6)+ai(a,7)+ai(a,20));return c+=$h(a,"T")+$h(a,"N")+$h(a,"Z")+$h(a,"V")+$h(a,"C")}k.jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.jc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Qe:b,F:c,Qc:d,ia:e,hc:f})}function ci(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Qc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.C.Z();a.j("updated registers:")}a.j(bi(a));c&&(a.K=Z(d.u[7]),Th(a,J(a,a.K.F)))}}function gi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=Zh(a,b,g,f);a.j(f);a.K=b;e-=b.F-l;c++}}} +function Yh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.O&&(a.j("ended assemble at "+J(a,a.N.F)),a.K=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.da=null;if(tb(a)&&0n||"z"oa.length&&(a.j("note: only "+oa.length+" available"),ba=oa.length);ga-=ba;0>ga&&(null==oa[oa.length-1].F?(ba=ga+ba,ga=0):ga+=oa.length);var Ed=[];"call"==sg&&(Hb=1E5,Ed=["CALL"]);for(void 0!==rg&&a.j(ba+" instructions earlier:");0=oa.length&&(ga=0);a.ib=ba;ug++;Hb--}}ug||(a.j("no "+tg+"history available"),a.ib=void 0)}else{var Jb=Lh(a,na);if(Jb){var yc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ai),yc=yh(a,La)>>>0,65536>4||1;Ci--&&0Cc?String.fromCharCode(Cc):".";zc-=Bc}Kb&&(Kb+="\n");Kb+=na+" "+Fd+(0==Mb?" "+xg:"")}Kb&&a.j(Kb);a.gb=Jb}}}}break;case "e":if("else"==g[0])break;var jb,Gd,Hd,Id,Jd=g[0],Kd=g[1];"eb"==Jd?(jb=1,Gd=255,Hd=a.Db,Id=a.Sb):"e"==Jd||"ew"==Jd?(jb=2,Gd=65535,Hd=a.oa,Id=a.ab):Kd=null;if(null==Kd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Dc=Lh(a,Kd);if(Dc)for(var Ec= +2;EcNd;){for(var Ma=null,Gi=256;65536>Pb.F>>>0;){Od.F=a.oa(Pb,2);if(null==Pb.F||!Gi--)break;if(!(Od.F&1)){for(var Hi=a,Fc=Od,zg=null,Qb=Fc.F,Ag=Qb,Pd=1;6>=Pd&&Qb;Pd++){if(2< +Pd){Fc.F=Qb;var Gc=Zh(Hi,Fc);if(0<=Gc.indexOf("JSR")){var Bg=Gc.indexOf(" ");if(Qb+(Gc.indexOf(" ",Bg+1)-Bg-1)/2==Ag){zg=Gc;break}}}Qb-=2}Fc.F=Ag;if(Ma=zg)break}}if(!Ma||null==Ma)break;var Cg=null;if("ks"==Fi){var Dg=Ma.match(/[0-9A-F]+$/);Dg&&(Cg=fi(a,Dg[0]))}Ma=xa(Ma,50)+" ;"+(Cg||"stack="+J(a,Pb.F));a.j(Ma);Nd++}Nd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){fi(a,g[1],!0);break}f=!0;break;case "m":a:{var pa,qa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)qa=!0,G=null;else if("off"==G)qa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(pa in xb)if(G==pa){Da=xb[pa];qa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,qa=!0;else if("off"==g[2]&&(a.na&=~Da,qa=!1,1073741824==Da)){for(var Qd=0;Qd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bli){if(ni(d,this.J)){this.v=new R(this,"1.30.2","failsafe");ni(this.v)&&(si(this,d),a=2,ti(this.v));this.v.set("timestamp",Ca());ui(this.v);var e=this.f&&!this.B;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ri(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ni(d,g):("error"== +f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),ti(d),ni(d)?(c=ri(d),e=!0):c=!1))}e&&qi(this,c?d:null)}else 2==a&&d.clear()}else qi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.A.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(vi(this,this.b,b,c,a),this.b.pb());this.O&&(si(this,b),b.clear());!c&&this.v&&(this.v.clear(),delete this.v);this.C=0}; +function si(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ii(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new R(a,"1.30.2"),g=new R(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ea&&(c&&a.b.ha(),d=a.b.Ea(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ni(a,b,c)}})}else c(a,null)} +function Oi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--zi||Za(!0));l=!1}var g,h,l=!0;zi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Li(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--zi||Za(!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),--zi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Li(b,a,d,!0,e,m):Mi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Oi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 8494b3248..985012bc0 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -31,205 +31,211 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function m(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function q(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date}; function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== -typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={K:null,W:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.W=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(h){u("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Da=this.id:(this.na=this.id.substr(0,b),this.Da=this.id.substr(b+1));this[a]=c;this.l={ready:!1,kb:!1,Td:!1,P:!1,error:!1};this.gb=null;this.l.error=!1;this.o={};this.F=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Mb=b.comment;this.tc=b;b=this.id.indexOf(".");0>b?this.Qa=this.id:(this.oa=this.id.substr(0,b),this.Qa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,ob:!1,P:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>2;this.j=this.i-1;this.v=this.D/this.i|0;this.xa=[];this.w=0;this.m=!1;this.u=[];this.Vb=[cb,db,eb,fb];a=new H(this);gb(a,this.F);this.b=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function db(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||I(e,c,16)} -function eb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function fb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||I(e,c,16)}function ib(a,b){if(b!=a.h){var c;a.h&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ha)return l.ib+=l.Ha-f,l.Ha=f,!0;if(f>=l.Ha+l.ib){p=l.size-(f-n);p>g&&(p=g);l.ib=f-l.Ha+p;f=n+a.i;g-=p;h++;continue}}return nb(1,f,g)}f=new H(a,f,p,a.i,d,e);gb(f,a.F,l);a.b[h++]=f;f=n+a.i;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].tb(b&a.j,b)}function rb(a,b){3932160<=b&&(b=qb(a.a,b));return a.b[(b&a.g)>>>a.c].V(b&a.j,b)} -bb.prototype.Ua=function(a,b){this.m=!1;this.w++;this.b[(a&this.g)>>>this.c].Ab(a&this.j,b&255,a);this.w--};function sb(a,b,c){3932160<=b&&(b=qb(a.a,b));a.b[(b&a.g)>>>a.c].jb(b&a.j,c&65535,b)}function tb(a){for(var b=0,c=[],d=0;da.a.Za)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null,p=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&n&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=f[4],w=0;w>5&3;b.Ya=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Sa!=c&&(b.Sa=c,Cb(b))}Db(this)}; -k.pc=function(){var a=this.a.Aa;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qc=function(){return this.a.vb};k.rc=function(){return this.a.Fa};k.ld=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Fa!=a&&(b.Fa=a,b.Jb=a&16?4194303:262143,Cb(b));Db(this)};function Db(a){a.c.hb=a.c.hb&-8|(a.a.Sa?a.a.Fa&16?1:2:4)}k.Rc=function(a){a=a>>1&63;var b=this.a.Va[a>>1];return a&1?b>>16:b&65535};k.Ld=function(a,b){b=b>>1&63;var c=b>>1;this.a.Va[c]=b&1?this.a.Va[c]&65535|(a&63)<<16:this.a.Va[c]&-65536|a&65534}; -k.Kc=function(a){return this.a.H[1][a>>1&7]};k.Ed=function(a,b){this.a.H[1][b>>1&7]=a&65295};k.Ic=function(a){return this.a.H[1][(a>>1&7)+8]};k.Cd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};k.Jc=function(a){return this.a.X[1][a>>1&7]};k.Dd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.H[1][b]&=65295};k.Hc=function(a){return this.a.X[1][(a>>1&7)+8]};k.Bd=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.H[1][b]&=65295};k.lc=function(a){return this.a.H[0][a>>1&7]}; -k.gd=function(a,b){this.a.H[0][b>>1&7]=a&65295};k.jc=function(a){return this.a.H[0][(a>>1&7)+8]};k.ed=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};k.kc=function(a){return this.a.X[0][a>>1&7]};k.fd=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.H[0][b]&=65295};k.ic=function(a){return this.a.X[0][(a>>1&7)+8]};k.dd=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.H[0][b]&=65295};k.Qc=function(a){return this.a.H[3][a>>1&7]};k.Kd=function(a,b){this.a.H[3][b>>1&7]=a&65295}; -k.Oc=function(a){return this.a.H[3][(a>>1&7)+8]};k.Id=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};k.Pc=function(a){return this.a.X[3][a>>1&7]};k.Jd=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.H[3][b]&=65295};k.Nc=function(a){return this.a.X[3][(a>>1&7)+8]};k.Hd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.H[3][b]&=65295};k.Ja=function(a){a&=7;return this.a.B&2048?this.a.Ga[a]:this.a.f[a]};k.La=function(a,b){b&=7;this.a.B&2048?this.a.Ga[b]=a:this.a.f[b]=a}; -k.wc=function(){return this.a.B&49152?this.a.la[0]:this.a.f[6]};k.qd=function(a){this.a.B&49152?this.a.la[0]=a:this.a.f[6]=a};k.zc=function(){return this.a.f[7]};k.td=function(a){this.a.f[7]=a};k.Ka=function(a){a&=7;return this.a.B&2048?this.a.f[a]:this.a.Ga[a]};k.Ma=function(a,b){b&=7;this.a.B&2048?this.a.f[b]=a:this.a.Ga[b]=a};k.xc=function(){return 1==(this.a.B&49152)>>14?this.a.f[6]:this.a.la[1]};k.rd=function(a){1==(this.a.B&49152)>>14?this.a.f[6]=a:this.a.la[1]=a}; -k.yc=function(){return 3==(this.a.B&49152)>>14?this.a.f[6]:this.a.la[3]};k.sd=function(a){3==(this.a.B&49152)>>14?this.a.f[6]=a:this.a.la[3]=a};k.gc=function(a){return this.a.Qb[a-65504>>1]};k.bd=function(a,b){this.a.Qb[b-65504>>1]=a};k.Ob=function(a){return 65520==a?61183:0};k.Ub=function(){};k.Mc=function(){return 1};k.Gd=function(){};k.fc=function(){return this.a.M};k.ad=function(){this.a.M=0};k.nc=function(){return this.a.Pb};k.jd=function(a,b){b&1||(a&=255);this.a.Pb=a}; -k.sc=function(a){return a?this.a.wb:0};k.md=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.wb=a;b.s|=2};k.Lc=function(a){return a?this.a.Ba&65280:0};k.Fd=function(a){this.a.Ba=a|255};k.vc=function(){return ab(this.a)};k.pd=function(a){Eb(this.a,a&-1809|ab(this.a)&1808);this.a.s|=128};k.Tb=function(){}; -var M={},L=(M[61568]=[null,null,K.prototype.Rc,K.prototype.Ld,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kc,K.prototype.Ed,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Ic,K.prototype.Cd,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jc,K.prototype.Dd,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hc,K.prototype.Bd,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.lc,K.prototype.gd,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jc,K.prototype.ed,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kc, -K.prototype.fd,"KISAR",8,1145],M[62704]=[null,null,K.prototype.ic,K.prototype.dd,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rc,K.prototype.ld,"MMR3",1,1145],M[65382]=[null,null,K.prototype.mc,K.prototype.hd,"LKS"],M[65400]=[null,null,K.prototype.ec,K.prototype.$c,"CNSL"],M[65402]=[null,null,K.prototype.oc,K.prototype.kd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pc,K.prototype.Tb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qc,K.prototype.Tb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qc, -K.prototype.Kd,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Oc,K.prototype.Id,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pc,K.prototype.Jd,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nc,K.prototype.Hd,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ja,K.prototype.La,"R0SET0"],M[65473]=[null,null,K.prototype.Ja,K.prototype.La,"R1SET0"],M[65474]=[null,null,K.prototype.Ja,K.prototype.La,"R2SET0"],M[65475]=[null,null,K.prototype.Ja,K.prototype.La,"R3SET0"],M[65476]=[null,null,K.prototype.Ja, -K.prototype.La,"R4SET0"],M[65477]=[null,null,K.prototype.Ja,K.prototype.La,"R5SET0"],M[65478]=[null,null,K.prototype.wc,K.prototype.qd,"R6KERNEL"],M[65479]=[null,null,K.prototype.zc,K.prototype.td,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ka,K.prototype.Ma,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ka,K.prototype.Ma,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ka,K.prototype.Ma,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ka,K.prototype.Ma,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ka, -K.prototype.Ma,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ka,K.prototype.Ma,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xc,K.prototype.rd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yc,K.prototype.sd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gc,K.prototype.bd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Ob,K.prototype.Ub,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Ob,K.prototype.Ub,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Mc,K.prototype.Gd,"SYSID",1,1170],M[65526]= -[null,null,K.prototype.fc,K.prototype.ad,"CPUERR",1,1170],M[65528]=[null,null,K.prototype.nc,K.prototype.jd,"MB",1,1170],M[65530]=[null,null,K.prototype.sc,K.prototype.md,"PIR"],M[65532]=[null,null,K.prototype.Lc,K.prototype.Fd,"SL"],M[65534]=[null,null,K.prototype.vc,K.prototype.pd,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.o,0,this.size>>2),Mb(this,Ib?Nb:Ob);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&I(this.i,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ta:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ra=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.$(a,b)},pa:function(a,b,c){this.j?this.g(a,b,c):this.Ab(a,b,c)},va:function(a,b,c){this.j?this.g(a,b,c):this.wa(a,b,c)},D:function(a){return this.b[a]},J:function(a){return this.b[a]},O:function(a,b){a&1&&I(this.i,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&I(this.i,b,64);return this.u[a>>1]},oa:function(a,b){this.b[a]=b;this.ra=!0},qa:function(a,b){this.b[a]=b;this.ra=!0},ua:function(a,b,c){a&1&&I(this.i, -c,64);this.c.setUint16(a,b,!0);this.ra=!0},Da:function(a,b,c){a&1&&I(this.i,c,64);this.u[a>>1]=b;this.ra=!0}};function gb(a,b,c){a.F=b;a.h=a.m=0;c&&((a.h=c.h)&&Qb(a,Rb,!1),(a.m=c.m)&&Sb(a,Rb,!1))}function Sb(a,b,c){c&&a.m||(a.zb=!a.j&&b[1]||a.g,a.jb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Ab=b[1]||a.g,a.wa=b[3]||a.A}function Qb(a,b,c){c&&a.h||(a.tb=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.$=b[2]||a.w}function Mb(a,b){b||(b=Tb);Qb(a,b,void 0);Sb(a,b,void 0)} -var Tb=[],Pb=[H.prototype.N,H.prototype.ta,H.prototype.na,H.prototype.Ea],Rb=[H.prototype.G,H.prototype.pa,H.prototype.R,H.prototype.va];if(Wa)var Ob=[H.prototype.D,H.prototype.oa,H.prototype.O,H.prototype.ua],Nb=[H.prototype.J,H.prototype.qa,H.prototype.aa,H.prototype.Da]; -function Ub(a,b){x.call(this,"CPU",a,Ub);var c=a.multiplier||1;this.bb=a.cycles||b;this.qa=c;this.pb=Math.round(this.bb/1E4)/100;this.ta=this.pb*this.qa;this.l.da=!1;this.l.xb=!1;this.l.Qa=a.autoStart;this.l.cb=!1;this.$a=this.va=0;this.ab=a.csStart;this.Ea=a.csInterval;this.Na=a.csStop;this.I=[];this.Nb=this.Wc.bind(this);E(this)}z(Ub);var Vb=["power","reset"];k=Ub.prototype; -k.ha=function(a,b,c,d){this.j=a;this.i=b;this.F=d;for(b=0;ba.oa/a.ta&&(b=1);a.qa=b;b=a.pb*a.qa;if(a.ta!=b){a.ta=b;b=a.ta.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.j&&ec(a.j)}a.N+=a.aa;a.aa=0;a.$=ra();a.pa=0;cc(a)}function yb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Ab(a,b,c){0<=b&&ba.I[b][0]&&(c=a.bb*a.qa/1E3*c|0,a.I[b][0]=c+fc(a))}function fc(a,b){var c=a.ua-=a.a;a.a=a.G=0;b&&(a.ua=0);return c} -k.Wc=function(){if(this.l.da){this.qb>=this.bb&&cc(this,!0);this.Pa=0;this.Wa=ra();if(this.pa){var a=this.Wa-this.pa;a>this.Kb&&(this.$+=a,this.$>this.Wa&&(this.$=this.Wa))}try{do{for(var b,c=this.l.cb?1:this.eb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Sb(b)}catch(l){if("number"!=typeof l)throw l;}b=fc(this,!0);this.Pa+=b;this.aa+=b;a=b;if(this.l.cb){var f=!1;this.$a=this.$a+this.Fb()|0;this.va-=a;0>=this.va&&(this.va+=this.Ea,f=!0);0<=this.Na&&this.Na<=dc(this)&& -(this.Ea=this.Na=-1,$b(this),F(this),f=!0);f&&this.U(dc(this)+" cycles: checksum="+m(this.$a))}for(var a=b,g=this.I.length-1;0<=g;g--){var h=this.I[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.Oa-=b;if(0>=this.Oa){this.Oa+=this.eb;15<=++this.Lb&&(this.j&&this.j.ma(),this.Lb=0);break}}while(this.l.da)}catch(l){F(this);this.j&&this.j.stop(ra(),dc(this));b=l.stack||l.message;this.l.error=!0;this.C(b);return}if(this.l.da){b=setTimeout;c=this.Nb;this.pa=ra();d=this.Kb;this.Pa&&(d=Math.round(d*this.Pa/ -this.eb));d-=this.pa-this.Wa;if(e=this.pa-this.$)this.oa=Math.round(this.aa/(10*e))/100,864E5<=e&&(this.N=0,bc(this));if(0>d||this.oad&&(this.$-=d),d=0;this.qb+=this.Pa;this.pa+=d;b(c,d)}}};function ac(a){var b;a.l.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.da)a.U(a.toString()+" busy");else{bc(a);a.l.da=!0;a.l.xb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.$,dc(a));setTimeout(a.Nb,0)}}k.Sb=function(){return 0}; -function F(a){var b=!1;if(a.l.da){fc(a);a.N+=a.aa;a.aa=0;a.l.da=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),dc(a));b=!0}a.l.complete=void 0;return b}function gc(a){this.Za=+a.model||1170;this.Gb=a.addrReset||0;Ub.call(this,a,6666667);this.decode=1120==this.Za?hc.bind(this):ic.bind(this);jc(this);this.rb=0;this.O=null;this.l.complete=!1}z(gc,Ub);k=gc.prototype;k.reset=function(){this.status("model "+this.Za);this.l.da&&F(this);jc(this);Zb(this);this.l.error=!1;this.parent.reset.call(this)}; -function jc(a){a.m=65536;a.g=32768;a.h=65535;a.u=32768;a.B=15;a.f=[0,0,0,0,0,0,0,a.Gb];a.Ga=[0,0,0,0,0,0];a.la=[0,0,0,0];a.v=0;a.Ya=0;a.cc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Va=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Qb=[0,0,0,0,0,0,0,0];a.Pb=0;a.s=0;a.A=a.D=0;a.c=a.b=a.lb=0;a.wa=-1;kc(a)}function kc(a){a.Ba=255;a.M=0;a.wb=0;a.w=0;a.Aa=0;a.vb=0;a.Fa=0;a.Sa=0;a.Xa=0;a.Jb=262143;a.O=null;a.i&&Cb(a)}function Cb(a){a.Sa?(a.R=65536,a.J=a.bc,a.V=a.Tc,a.jb=a.Nd,ib(a.i,a.Fa&16?22:18)):(a.R=0,a.J=a.ac,a.V=a.Sc,a.jb=a.Md,ib(a.i,16))}function lc(a,b,c){a.Gb=b;O(a,b);!c&&a.F&&(F(a)||a.F.ma())}k.Fb=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.N,this.qa]);a.set(2,tb(this.i));return a.data()};k.restore=function(a){var b=a[1];this.N=b[1];bc(this,b[3]);a:{b=this.i;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.la[c]=a.f[6],a.f[6]=a.la[a.v]);a.B=b;a.s|=2}function R(a,b){a.s&128||(a.u=a.h=b,a.g=0)}function oc(a,b,c){a.s&128||(a.u=a.h=a.m=b,a.g=c||0)}function pc(a,b,c,d){a.s&128||(a.u=a.h=a.m=b,a.g=(c^b)&(d^b))}function qc(a,b){a.s&128||(a.u=a.h=a.m=b,a.g=a.u^a.m>>1)}function rc(a,b,c,d){a.s&128||(a.u=a.h=a.m=b,a.g=(c^d)&(d^b))} -function J(a,b,c){if(!a.rb){var d=!1;0>a.wa?a.wa=ab(a):a.v||(b=4,d=!0);a.w&57344||(a.Aa=63222,a.vb=b);a.v=0;var e=a.V(b|a.R),f=a.V(b+2&65535|a.R);Eb(a,f&-12289|a.wa>>2&12288);d&&(a.M|=4,a.f[6]=4);sc(a,a.wa);sc(a,a.f[7]);O(a,e);a.s&=-113;a.wa=-1;a.s|=8;if(26!=c)throw b;}}function tc(a){var b=uc(a),c=uc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Eb(a,c);a.s&=-17} -function qb(a,b){var c=b>>13&31;31>c&&a.Fa&32&&(b=a.Va[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function vc(a,b,c){var d,e,f,g=0;d=b>>13;a.Fa&a.cc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.Jb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.Xa=a.v,a.Ya=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.w&57344||(a.w=a.w|g|a.Xa<<5|a.Ya<<1),b=!0),a.w&61440||!(4191360> -f||4194239>>a.c].zb(b&a.j,c&255,b)}function uc(a){var b=a.V(a.f[6]|a.R);a.f[6]=a.f[6]+2&65535;return b}function sc(a,b){var c=a.f[6]-2&65535;a.f[6]=c;a.w&57344||(a.Aa=a.Aa<<8|246);!a.v&&c<=a.Ba&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.f[c];7!==c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.f[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.f[c]-2&65535;7!==c&&(e|=g);e=a.V(e)|g;a.a-= -8;break;case 6:return e=a.V(nc(a,2)),e=e+a.f[c]&65535|g,a.a-=6,e;case 7:return e=a.V(nc(a,2)),e=e+a.f[c]&65535,e=a.V(e|a.R)|g,a.a-=10,e}a.f[c]=a.f[c]+f&65535;!g||a.w&57344||(a.Aa=a.Aa<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.f[6]<=a.Ba||65534<=a.f[6])&&(a.f[6]<=a.Ba-32?(a.M|=4,a.f[6]=4,J(a,4,24)):(a.M|=8,a.s|=64));return e}k.Ua=function(a,b){this.Sa?(this.rb++,wc(this,vc(this,a,5),b),this.rb--):this.i.Ua(a,b)};k.ac=function(a,b,c){return xc(this,a,b,c)}; -k.bc=function(a,b,c){return vc(this,xc(this,a,b,c),c)};k.Sc=function(a){return rb(this.i,a)};k.Tc=function(a){return rb(this.i,vc(this,a,2))};k.Md=function(a,b){sb(this.i,a,b&65535)};k.Nd=function(a,b){sb(this.i,vc(this,a,4),b)};function yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=xc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.V(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.f[d]:a.la[a.B>>12&3];return c} -function zc(a,b,c,d){a.w&57344||(a.Aa=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=xc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=vc(a,e|c&65536,4),a.v=a.B>>14&3,sb(a.i,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.f[e]=d:a.la[a.B>>12&3]=d}function Ac(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=pb(a.i,c)):a=a.f[c]&255;return a}function Bc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?rb(a.i,a.J(b,c,2)):a.f[c]}function Cc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return xc(a,b,c,8)} -function Dc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=pb(a.i,c)):a=a.f[c]&255;return a}function Ec(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?rb(a.i,a.J(b,c,2)):a.f[c]}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.lb=a.J(b,e,7),wc(a,e,d.call(a,c,pb(a.i,e)))):a.f[e]=a.f[e]&65280|d.call(a,c,a.f[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),sb(a.i,e,d.call(a,c,rb(a.i,e)))):a.f[e]=d.call(a,c,a.f[e])} -function Fc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?wc(a,a.J(b,e,5),c):a.f[e]=c?d&1?c<<24>>24&65535:a.f[e]&-256|c&255:a.f[e]&-256;return c}function Gc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?sb(a.i,a.J(b,d,4),c):a.f[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.f[7]+(b<<24>>23)),a.a-=2);a.a-=3} -k.Sb=function(a){this.l.complete=!0;var b=a?this.l.xb?0:1:-1;this.l.xb=!1;this.ua=this.a=a;do{if(this.s){this.s&112&&(this.s&32?J(this,168,28):this.s&64?J(this,4,30):this.s&16&&J(this,12,32),this.s&=-113);if(a=this.s&7){a=!1;if(this.s&2){this.s&=-3;var c=160,d=(this.wb&224)>>5,e=this.O&&this.O.Ia>d?this.O:null;e&&(c=e.Zc,d=e.Ia);d>(this.B&224)>>5?(this.s&4&&(nc(this,2),this.s&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.s&1&&this.s++;a=a&&0>b}if(a)break}this.s=this.s&7|this.B&16;this.decode(mc(this))}while(0>1|b<<16;qc(this,a);return a&65535}function Mc(a,b){a=b&2048|b>>1|b<<8;qc(this,a<<8);return a&255}function Nc(a,b){a=b&~a;R(this,a);return a}function Oc(a,b){a=b&~a;R(this,a<<8);return a}function Pc(a,b){a|=b;R(this,a);return a}function Qc(a,b){a|=b;R(this,a<<8);return a}function Rc(a,b){a=~b|65536;oc(this,a);return a&65535}function Sc(a,b){a=~b|256;oc(this,a<<8);return a&255} -function Tc(a,b){a=b-a;this.s&128||(this.u=this.h=a,this.g=b&(b^a));return a&65535}function Uc(a,b){a=b-a;var c=a<<8;b<<=8;this.s&128||(this.u=this.h=c,this.g=b&(b^c));return a&255}function Vc(a,b){a=b+a;this.s&128||(this.u=this.h=a,this.g=a&(b^a));return a&65535}function Wc(a,b){a=b+a;var c=a<<8;this.s&128||(this.u=this.h=c,this.g=c&(b<<8^c));return a&255}function Xc(a,b){a=-b;oc(this,a,a&b&32768);return a&65535}function Yc(a,b){a=-b;oc(this,a<<8,(a&b&128)<<8);return a&255} -function Zc(a,b){a=b<<1|this.m>>16&1;qc(this,a);return a&65535}function $c(a,b){a=b<<1|this.m>>16&1;qc(this,a<<8);return a&255}function ad(a,b){a=(this.m&65536|b)>>1|b<<16;qc(this,a);return a&65535}function bd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;qc(this,a<<8);return a&255}function cd(a,b){var c=b-a;rc(this,c,a,b);return c&65535}function dd(a,b){var c=b-a;rc(this,c<<8,a<<8,b<<8);return c&255}function ed(a,b){this.s&128||(this.u=this.h=b&65280,this.g=this.m=0);return(b<<8|b>>8)&65535} -function fd(a,b){a^=b;R(this,a);return a&65535}function gd(a){U(this,a,Bc(this,a),Hc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function hd(a){var b=Ec(this,a);a=a>>6&7;var c=this.f[a];c&32768&&(c|=4294901760);this.m=this.g=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.g=32768)}this.f[a]=c&65535;this.u=this.h=c;this.a-=(this.c?6:7)+b} -function id(a){var b=Ec(this,a);a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.f[a|1]=d&65535;this.u=d>>16;this.h=d>>16|d;this.a-=(this.c?6:7)+b}function jd(a){V(this,a,!Q(this))}function kd(a){V(this,a,Q(this))} -function ld(a){U(this,a,Bc(this,a),Nc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function md(a){T(this,a,Ac(this,a),Oc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){U(this,a,Bc(this,a),Pc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function od(a){T(this,a,Ac(this,a),Qc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function pd(a){R(this,Bc(this,a)&Ec(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function qd(a){R(this,(Ac(this,a)&Dc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function rd(a){V(this,a,this.h&65535?0:4)}function sd(a){V(this,a,!this.ya()==!(this.g&32768))}function td(a){V(this,a,!!(this.h&65535)&&!this.ya()==!(this.g&32768))}function ud(a){V(this,a,!Q(this)&&!!(this.h&65535))} -function vd(a){V(this,a,(this.h&65535?0:4)||!this.ya()!=!(this.g&32768))}function wd(a){V(this,a,Q(this)||(this.h&65535?0:4))}function xd(a){V(this,a,!this.ya()!=!(this.g&32768))}function yd(a){V(this,a,this.ya())}function zd(a){V(this,a,!!(this.h&65535))}function Ad(a){V(this,a,!this.ya())}function Bd(){J(this,12,1);this.a-=5}function Cd(a){V(this,a,!0)}function Dd(a){V(this,a,!(this.g&32768))}function Ed(a){V(this,a,this.g&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.g=0);a&4&&(this.h=1);a&8&&(this.u=0);this.a-=5}function Fd(a){var b=Bc(this,a);a=Ec(this,a);rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){var b=Ac(this,a)<<8;a=Dc(this,a)<<8;rc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Hd(a){var b=Ec(this,a);if(b){a=a>>6&7;var c=this.f[a]<<16|this.f[a|1];this.m=this.g=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.f[a]=d&65535,this.f[a|1]=c-d*b&65535,this.h=d>>16|d,this.u=d>>16):(this.g=32768,this.h=d>>15|d,this.u=c>>16,-1===b&&65534===this.f[a]&&(this.f[a]=this.f[a|1]=1));this.a-=53}else this.h=this.u=0,this.g=32768,this.m=65536,this.a-=7}function Id(){J(this,24,2);this.a-=25} -function Jd(){this.B&49152?(this.M|=128,J(this,4,3)):this.F?this.F.i():F(this);this.a-=7}function Kd(){J(this,16,4);this.a-=25}var Ld=[0,7,7,10,7,11,9,13];function Md(a){this.G=this.a;O(this,Cc(this,a));this.a=this.G-Ld[this.c]}var Nd=[0,14,14,17,14,18,16,20];function Od(a){this.G=this.a;var b=Cc(this,a);a=a>>6&7;sc(this,this.f[a]);this.f[a]=this.f[7];O(this,b);this.a=this.G-Nd[this.c]}var Pd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Qd(a){var b=Bc(this,a);this.G=this.a;R(this,Gc(this,a,b));this.a=this.G-Pd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Rd(a){var b=Ac(this,a);R(this,Fc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Sd=[7,13,13,17,14,18,17,21]; -function Td(a){var b=Ec(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.f[a];c&32768&&(c|=-65536);b=~~(b*c);this.f[a]=b>>16&65535;this.f[a|1]=b&65535;this.s&128||(this.u=b>>16,this.h=this.u|b,this.g=0,this.m=-32768>b||32767>6;if(this.f[b]=this.f[b]-1&65535)O(this,this.f[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Zd(a){U(this,a,Bc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function $d(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)}function ae(){J(this,28,5);this.a-=5}function be(){this.s&4||this.j.ma();this.s|=4;nc(this,-2);this.a-=3}function ce(a){U(this,a,Bc(this,a),fd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function hc(a){de[a>>12].call(this,a)}function ee(a){fe[a>>6&3].call(this,a)}function ge(a){he[a>>6&3].call(this,a)}function ie(a){je[a>>6&3].call(this,a)}function ke(a){le[a&15].call(this,a)}function me(a){ne[a&15].call(this,a)} -function oe(a){pe[a>>6&3].call(this,a)}function qe(a){re[a>>6&3].call(this,a)}function se(a){te[a>>6&3].call(this,a)} -var de=[function(a){ue[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,gd,Y,function(a){ve[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,Zd,Y],ue=[function(a){we[a>>4&15].call(this,a)},Cd,zd,rd,sd,xd,td,vd,Od,Od,ee,ge,ie,Y,Y,Y],fe=[function(a){oc(this,Gc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Tc);this.a-=this.c?9:3+(7==this.b?2:0)}],he=[function(a){U(this,a,0, -Xc);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Hc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Ec(this,a);oc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],je=[function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Lc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Jc);this.a-=this.c?9:3+(7==this.b?2:0)}], -we=[function(a){xe[a&15].call(this,a)},Y,Y,Y,Md,Md,Md,Md,Xd,Y,ke,me,$d,$d,$d,$d],xe=[Jd,be,Wd,Bd,Kd,Vd,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],le=[Ud,function(){this.m=0;this.a-=5},function(){this.g=0;this.a-=5},W,function(){this.h=1;this.a-=5},W,W,W,function(){this.u=0;this.a-=5},W,W,W,W,W,W,W],ne=[Ud,function(){this.m=65536;this.a-=5},function(){this.g=32768;this.a-=5},X,function(){this.h=0;this.a-=5},X,X,X,function(){this.u=32768;this.a-=5},X,X,X,X,X,X,X],ve=[Ad,yd,ud,wd,Dd,Ed,jd,kd,Id,ae,oe,qe,se,Y,Y,Y],pe=[function(a){oc(this, -Fc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Sc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,Uc);this.a-=this.c?9:3+(7==this.b?2:0)}],re=[function(a){T(this,a,0,Yc);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Ic);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Dc(this,a);oc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],te=[function(a){T(this,a,0,bd);this.a-=this.c?9+(this.lb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Mc);this.a-=this.c?9+(this.lb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Kc);this.a-=this.c?9:3+(7==this.b?2:0)}];function ic(a){ye[a>>12].call(this,a)} -var ye=[function(a){ze[a>>8&15].call(this,a)},Qd,Fd,pd,ld,nd,gd,function(a){Ae[a>>8&15].call(this,a)},function(a){Be[a>>8&15].call(this,a)},Rd,Gd,qd,md,od,Zd,Y],ze=[function(a){Ce[a>>4&15].call(this,a)},Cd,zd,rd,sd,xd,td,vd,Od,Od,ee,ge,ie,function(a){De[a>>6&3].call(this,a)},Y,Y],De=[function(a){a=this.f[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);O(this,this.f[5]);this.f[6]=a+2&65535;this.f[5]=b;this.a-=8},function(a){a=yc(this,a,0);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G= -this.a;zc(this,a,0,b);R(this,b);this.a=this.G-Sd[this.c]},function(a){R(this,Gc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ce=[function(a){Ee[a&15].call(this,a)},Y,Y,Y,Md,Md,Md,Md,Xd,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.s|=1),this.a-=5):J(this,8,6)},ke,me,$d,$d,$d,$d],Ee=[Jd,be,Wd,Bd,Kd,Vd,function(){tc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[Td,Td,Hd,Hd,hd,hd,id,id,ce,ce,Y,Y,Y,Y,Yd,Yd],Be=[Ad,yd,ud,wd,Dd,Ed,jd,kd,Id,ae,oe,qe,se,function(a){Fe[a>>6& -3].call(this,a)},Y,Y],Fe=[Y,function(a){a=yc(this,a,65536);sc(this,a);R(this,a);this.a-=11},function(a){var b=uc(this);this.G=this.a;zc(this,a,65536,b);R(this,b);this.a=this.G-Sd[this.c]},Y]; -function Ge(a){x.call(this,"ROM",a,Ge);this.W=this.b=null;this.h=a.addr;this.c=a.size;this.g=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?c.C("Unable to load ROM resource (error "+f+": "+a+")"):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.W=a.W):c.j=null,He(c))})}}z(Ge);Ge.prototype.ha=function(a,b,c,d){this.i=b;this.a=c;this.F=d;He(this)}; -Ge.prototype.ja=function(){this.W&&(this.F&&this.F.a(this.id,this.h,this.c,this.W),delete this.W);return!0};Ge.prototype.ia=function(){return!0}; -function He(a){if(!Va(a)){if(a.j){if(!a.b||!a.i)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")";a.l.error=!0;a.C(b)}else{b=a.h;if(lb(a.i,b,a.c,Lb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,p=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=h,w=n-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ua(p++,b[t++]&255);else p&1?F(a.a):lc(a.a,p,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&zb(e.a,e.$))});this.aa=Bb(52,4);this.O=yb(this.a,function(){e.c|=128;e.c&64&&zb(e.a,e.aa)});vb(b,this,Ne);E(this)}; -k.Hb=function(){if(!this.v){var a=Wb(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Da)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ja=function(a,b){if(!b)if(this.Hb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.ia=function(a){return a?this.save():!0};k.reset=function(){Oe(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Oe(this)};function Oe(a){a.w=0;a.b=0;a.c=128;a.h=[];return!0}k.ub=function(a){if("number"==typeof a)this.h.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.u%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.u&&c&&(b=String.fromCharCode(this.G)+b);this.g.value+=b;this.g.scrollTop=this.g.scrollHeight;this.u+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Ab(this.a,this.O,1E3/Math.round(this.I/10))}};var Pe={},Ne=(Pe[65392]=[null,null,Z.prototype.Bc,Z.prototype.vd,"RCSR"],Pe[65394]=[null,null,Z.prototype.Ac,Z.prototype.ud,"RBUF"],Pe[65396]=[null,null,Z.prototype.Vc,Z.prototype.Pd,"XCSR"],Pe[65398]=[null,null,Z.prototype.Uc,Z.prototype.Od,"XBUF"],Pe);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&Se(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Se(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -k.ha=function(a,b,c,d){this.j=a;this.i=b;this.a=c;this.F=d;this.J=Te(a);var e=this;if((this.c=Wb(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Bb(56,4);this.R=yb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var h=0>g&&a.j&&!a.j.l.P;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(Sa(a.na,e,f),(e=ta(e,f))&&bf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.kb=!1;a.m&&(a.m--,a.m||E(a));Ze(a)})}function We(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.T);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ob?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){jf(a,b,c,d)})} -function jf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.P;if(d)a.controller.C('Unable to load disk "'+a.sa+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)u(h[0]);else{a.T=h.length;a.Y=h[0].length;a.S=h[0][0].length;var l=h[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var S=n<<2,ua=w.length;ua>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ka+a.ba&&(a.ba+=f-(a.ka+a.ba)+1):(a.ka=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[h].length||n>=this.a[h][l].length){c="sector (CHS="+h+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.a[h][l][n]){for(l=h.data.length;lb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.sa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=lf(this,a++);)nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.g=a.autoMount||null;this.u=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.Z=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){u("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&of(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,h;h=lf(a,c++);)for(var l=0,n=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";of(this,0)}}return!0};k.ia=function(a){return a?this.save():!0};k.reset=function(){qf(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return qf(this,a[0])};function tf(a,b){b||(a.u=0);if(a.g)for(var c in a.g){var d=a.g[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}vf(a,e,b,c,!1,d)}else uf(a,e)} -function vf(a,b,c,d,e,f){var g=-1,h=a.b[b];h.Ca.toLowerCase()!=d.toLowerCase()&&(g++,uf(a,b,!0),h.nb?a.C("RL11 busy"):(h.nb=!0,e&&(h.mb=!0,a.u++),h.fb=!!f,hf(new df(a,h,"preload"),c,d,f,a.Yb)&&g++));return g} -k.Yb=function(a,b,c,d,e){var f;a.nb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.T||f[1]>a.Y)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.sb)),b=null);b?(a.ca=b,a.sa=c,a.Ca=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.sb),a.mb||e),this.j&&ec(this.j)):a.fb=!1;a.mb&&(a.mb=!1,--this.u||E(this));of(this,a.sb)}; -function sf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.h=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -k.hc=function(a,b,c,d,e,f,g){for(var h=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){h=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){h=5120;break}sb(this.i,f,t|w<<8);if(xb(this.i)){h=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.T)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.cd=function(a,b,c,d,e,f,g){for(var h=0,l=a.ca,n=null,p;e--;){var t=rb(this.i,f);if(xb(this.i)){h=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){h=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){h=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.T)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ec=function(){return this.L&65535}; -k.yd=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.h&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.h=this.c&4?this.h+b:this.h-b,this.c=this.h=this.h&65408|c);break;case 8:this.m=this.h;break;case 12:b=this.hc;case 10:b||(b=this.cd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.T||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.Zb.bind(this)))}a&&(this.L|=129,this.L&64&&zb(this.a,this.G))}};k.Cc=function(){return this.v};k.wd=function(a){this.v=a&65534};k.Fc=function(){return this.c};k.zd=function(a){this.c=a};k.Gc=function(){return this.m};k.Ad=function(a){this.m=a};k.Dc=function(){return this.w};k.xd=function(a){this.w=a&63}; -var wf={},rf=(wf[63744]=[null,null,N.prototype.Ec,N.prototype.yd,"RLCS"],wf[63746]=[null,null,N.prototype.Cc,N.prototype.wd,"RLBA"],wf[65284]=[null,null,N.prototype.Fc,N.prototype.zd,"RLDA"],wf[65286]=[null,null,N.prototype.Gc,N.prototype.Ad,"RLMP"],wf[65288]=[null,null,N.prototype.Dc,N.prototype.xd,"RLBE"],wf); -function xf(a,b,c){x.call(this,"Computer",a,xf);this.l.P=!1;yf(this,b);this.A=Wb(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=zf;this.v=null;this.m=this.I=!1;this.O=Wb(this,"url")||"";(Math.random()+.1).toString(36);this.c=Af(this);if(this.a=Ua("CPU",this.id)){this.F=Ua("Debugger",this.id);this.i=new bb({id:this.na+".bus",busWidth:this.N},this.a,this.F);var d,e=A(this.id);if((this.g=Ua("Panel",this.id))&&this.g.Ra)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bzf){if(Bf(d,this.v)){this.h=new P(this,"1.30.2","failsafe");Bf(this.h)&&(Gf(this,d),a=2,Hf(this.h));this.h.set("timestamp",sa());If(this.h);var e=this.b&&!this.m;if(1==a||wa("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ff(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Bf(d,g):("error"== -f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.U(f+": "+g),Hf(d),Bf(d)?(c=Ff(d),e=!0):c=!1))}e&&Ef(this,c?d:null)}else 2==a&&d.clear()}else Ef(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Jf(this,this.a,b,c,a),this.a.Qa());this.G&&(Gf(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.j=0}; -function Gf(a,b){if(wa("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Mf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=sa();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&F(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.P=!1,!1===d&&(e=null)));for(var h=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(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],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Tf(a,b,c)}})}else c(a,null)} -function Uf(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Qf||Ja(!0));l=!1}var g,h,l=!0;Qf++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,h){h?Rf(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Qf||Ja(!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),--Qf||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Rf(b,a,d,!0,e,n):Sf(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return Uf(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},$:function(a,b,c){switch(b){case "clear":return this.o[b]||(this.o[b]=c,c.onclick=function(a){return function(){a.o.print&&(a.o.print.value="")}}(this)),!0;case "print":return this.o[b]||(this.Wa=this.o[b]=c,c.value="",this.T=function(a){return function(b,c){8192a;a++)this.b["S"+a]=[0,!1,!1,this.rc,a]}z(Ya);h=Ya.prototype;h.reset=function(){this.A=this.A&-120|20}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.s[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];Za(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(Za(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;$a(b,this,ab);bb(b,this.reset.bind(this));cb(this);for(var e in this.b)Za(this,e,this.b[e][0])};h.ka=function(a,b){b||db();return!0};h.ja=function(){return!0}; +function eb(a,b,c,d){a.o[b]&&(void 0===c&&(a.j.error=!0,a.D("Value for "+b+" is invalid"),F(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))}function fb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function cb(a,b){for(var c in a.s)fb(a,c,null!=b?b:a.s[c])}function Za(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"} +h.pc=function(a){a||this.a.j.U||(this.h.reset(),gb(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&hb(this.a))};h.qc=function(){};h.lc=function(a){a||F(this.a)};h.jc=function(a){if(!a&&!this.a.j.U)if(this.b.ENABLE&&this.b.ENABLE[0])hb(this.a);else{a=this.C;var b;if(b=a)a.j.Ea&&(a.j.ob=!0),b=!a.j.Ea;b?(Va(a,!0),a.lb(0),Va(a,!1)):(this.a.lb(1),this.aa())}};h.kc=function(a){a&&!this.a.j.U&&(this.v&&ib(this,this.c+2),this.h.Bb(this.c,jb(this,this.f)))}; +h.mc=function(a){a||this.a.j.U||(this.w&&ib(this,this.c+2),jb(this,this.h.sb(this.c)))};h.oc=function(a){a||this.a.j.U||ib(this,this.f)};h.nc=function(a){cb(this,a||null)};h.rc=function(a,b){this.f=a?this.f|1<c;c++)fb(a,"A"+c,b&1<c;c++)fb(a,"D"+c,b&1<>2;this.l=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.bc=[nb,ob,pb,qb];a=new H(this);rb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function ob(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||I(e,c,16)} +function pb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function qb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||I(e,c,16)}function tb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.mb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.mb){p=l.size-(f-n);p>g&&(p=g);l.mb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return yb(1,f,g)}f=new H(a,f,p,a.b,d,e);rb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Cb(a,b){3932160<=b&&(b=Bb(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.l,b)} +h.sb=function(a){var b=a&this.l,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Fb(a&this.l,b&255,a);this.f--};function Db(a,b,c){3932160<=b&&(b=Bb(a.a,b));a.h[(b&a.Aa)>>>a.c].nb(b&a.l,c&65535,b)}h.Bb=function(a,b){var c=a&this.l,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; +function Eb(a){for(var b=0,c=[],d=0;da.a.bb)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null,p=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=f[4],w=0;w>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.wa!=c&&(b.wa=c,Lb(b));b.G&&b.G.aa()}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.zb};h.Hc=function(){return this.a.Na}; +h.zd=function(a){var b=this.a;1170>b.bb&&(a&=-49);b.Na!=a&&(b.Na=a,b.Nb=a&16?4194303:262143,Lb(b),b.G&&b.G.aa())};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; +h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Fa[a]:this.a.g[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Fa[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Fa[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Fa[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){return 65520==a?61183:0};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Ab:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.ad=function(a){return a?this.a.Ca&65280:0};h.Td=function(a){this.a.Ca=a|255}; +h.Lc=function(){return kb(this.a)};h.Dd=function(a){Mb(this.a,a&-1809|kb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var M={},L=(M[61568]=[null,null,K.prototype.gd,K.prototype.Zd,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.$c,K.prototype.Sd,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Yc,K.prototype.Qd,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Zc,K.prototype.Rd,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Xc,K.prototype.Pd,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.vd,"KISDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.td,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.Ac, +K.prototype.ud,"KISAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.sd,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.zd,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.wd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.yd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.fd,K.prototype.Yd,"UISDR",8,1145],M[65424]=[null,null,K.prototype.dd, +K.prototype.Wd,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.ed,K.prototype.Xd,"UISAR",8,1145],M[65456]=[null,null,K.prototype.cd,K.prototype.Vd,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.La,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.La,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.La,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.La,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.La,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.La,K.prototype.Oa, +"R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Ed,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Hd,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ma,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ma,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ma,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ma,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ma,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ma, +K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Fd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Gd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.qd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.bd,K.prototype.Ud,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.pd,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.Dc,K.prototype.xd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Ad,"PIR"],M[65532]=[null,null,K.prototype.ad,K.prototype.Td,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Dd,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),Ub(this,Qb?Vb:Wb);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&I(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.$b(a,b,c)},G:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&I(this.h,b,64);return this.c.getUint16(a,!0)},ba:function(a,b){a&1&&I(this.h,b,64);return this.s[a>>1]},la:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&I(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function rb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&Yb(a,Zb,!1),(a.m=c.m)&&$b(a,Zb,!1))}function $b(a,b,c){c&&a.m||(a.Eb=!a.l&&b[1]||a.f,a.nb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function Yb(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function Ub(a,b){b||(b=ac);Yb(a,b,void 0);$b(a,b,void 0)} +var ac=[],Xb=[H.prototype.N,H.prototype.qa,H.prototype.ca,H.prototype.wa],Zb=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Xa)var Wb=[H.prototype.G,H.prototype.la,H.prototype.O,H.prototype.ra],Vb=[H.prototype.J,H.prototype.pa,H.prototype.ba,H.prototype.va]; +function bc(a,b){x.call(this,"CPU",a,bc);var c=a.multiplier||1;this.ib=a.cycles||b;this.ra=c;this.vb=Math.round(this.ib/1E4)/100;this.va=this.vb*this.ra;this.j.U=!1;this.j.Cb=!1;this.j.Va=a.autoStart;this.j.eb=!1;this.fb=this.Ha=0;this.gb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Rb=this.ld.bind(this);E(this)}z(bc);var ec=["power","reset"];h=bc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.C=d;this.G=a.G;for(b=0;ba.pa/a.va&&(b=1);a.ra=b;b=a.vb*a.ra;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&lc(a.l)}a.O+=a.la;a.la=0;a.ca=ra();a.qa=0;jc(a)}function Hb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Jb(a,b,c){0<=b&&ba.J[b][0]&&(c=a.ib*a.ra/1E3*c|0,a.J[b][0]=c+mc(a))}function mc(a,b){var c=a.Ga-=a.a;a.a=a.I=0;b&&(a.Ga=0);return c} +h.ld=function(){if(this.j.U){this.wb>=this.ib&&jc(this,!0);this.Ua=0;this.cb=ra();if(this.qa){var a=this.cb-this.qa;a>this.Pb&&(this.ca+=a,this.ca>this.cb&&(this.ca=this.cb))}try{do{for(var b,c=this.j.eb?1:this.kb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.lb(b)}catch(l){if("number"!=typeof l)throw l;}b=mc(this,!0);this.Ua+=b;this.la+=b;a=b;if(this.j.eb){var f=!1;this.fb=this.fb+this.Jb()|0;this.Ha-=a;0>=this.Ha&&(this.Ha+=this.Ra,f=!0);0<=this.Sa&&this.Sa<= +kc(this)&&(this.Ra=this.Sa=-1,hc(this),F(this),f=!0);f&&this.T(kc(this)+" cycles: checksum="+m(this.fb))}for(var a=b,g=this.J.length-1;0<=g;g--){var k=this.J[g];0>k[0]||(k[0]-=a,0>=k[0]&&(k[0]=-1,k[1]()))}this.Ta-=b;if(0>=this.Ta){this.Ta+=this.kb;15<=++this.Qb&&(this.l&&this.l.aa(),this.Qb=0);break}}while(this.j.U)}catch(l){F(this);this.l&&this.l.stop(ra(),kc(this));b=l.stack||l.message;this.j.error=!0;this.D(b);return}if(this.j.U){b=setTimeout;c=this.Rb;this.qa=ra();d=this.Pb;this.Ua&&(d=Math.round(d* +this.Ua/this.kb));d-=this.qa-this.cb;if(e=this.qa-this.ca)this.pa=Math.round(this.la/(10*e))/100,864E5<=e&&(this.O=0,ic(this));if(0>d||this.pad&&(this.ca-=d),d=0;this.wb+=this.Ua;this.qa+=d;b(c,d)}}};function hb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{ic(a);a.j.U=!0;a.j.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.ca,kc(a));setTimeout(a.Rb,0)}}h.lb=function(){return 0}; +function F(a){var b=!1;if(a.j.U){mc(a);a.O+=a.la;a.la=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),kc(a));b=!0}a.j.complete=void 0;return b}function nc(a){this.bb=+a.model||1170;this.Lb=a.addrReset||0;bc.call(this,a,6666667);this.decode=1120==this.bb?oc.bind(this):pc.bind(this);qc(this);this.sa=0;this.R=null;this.j.complete=!1}z(nc,bc);h=nc.prototype;h.reset=function(){this.status("model "+this.bb);this.j.U&&F(this);qc(this);gc(this);this.j.error=!1;this.parent.reset.call(this)}; +function qc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Lb];a.Fa=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.sc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.F=0;a.c=a.b=a.tb=0;a.Ia=-1;gb(a)}function gb(a){a.Ca=255;a.M=0;a.Ab=0;a.w=0;a.Ba=0;a.zb=0;a.Na=0;a.wa=0;a.$a=0;a.Nb=262143;a.R=null;a.h&&Lb(a)}function Lb(a){a.wa?(a.ba=65536,a.N=a.ic,a.W=a.hd,a.nb=a.$d,tb(a.h,a.Na&16?22:18)):(a.ba=0,a.N=a.hc,a.W=a.Ub,a.nb=a.ac,tb(a.h,16))}function rc(a,b,c){a.Lb=b;O(a,b);!c&&a.C&&(F(a)||a.C.aa())}h.Jb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.O,this.ra]);a.set(2,Eb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.O=b[1];ic(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function uc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function vc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function wc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function xc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function J(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=kb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.zb=b);a.v=0;var e=a.W(b|a.ba),f=a.W(b+2&65535|a.ba);Mb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);yc(a,a.Ia);yc(a,a.g[7]);O(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function zc(a){var b=Ac(a),c=Ac(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Mb(a,c);a.u&=-17} +function Bb(a,b){var c=b>>13&31;31>c&&a.Na&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Bc(a,b,c){var d,e,f,g=0;d=b>>13;a.Na&a.sc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> +f||4194239>>a.c].Eb(b&a.l,c&255,b)}function Ac(a){var b=a.W(a.g[6]|a.ba);a.g[6]=a.g[6]+2&65535;return b}function yc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(tc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(tc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.ba)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.sb=function(a){if(!this.wa)return this.h.sb(a);this.sa++;a=this.Ub(Bc(this,a,2));this.sa--;return a}; +h.Ya=function(a,b){this.wa?(this.sa++,Cc(this,Bc(this,a,5),b),this.sa--):this.h.Ya(a,b)};h.Bb=function(a,b){this.wa?(this.sa++,this.ac(Bc(this,a,4),b),this.sa--):this.h.Bb(a,b)};h.hc=function(a,b,c){return Dc(this,a,b,c)};h.ic=function(a,b,c){return Bc(this,Dc(this,a,b,c),c)};h.Ub=function(a){return Cb(this.h,a)};h.hd=function(a){return Cb(this.h,Bc(this,a,2))};h.ac=function(a,b){Db(this.h,a,b&65535)};h.$d=function(a,b){Db(this.h,Bc(this,a,4),b)}; +function Ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Dc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.ba),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Fc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Dc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Bc(a,e|c&65536,4),a.v=a.B>>14&3,Db(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} +function Gc(a,b){b>>=6;var c=a.F=b&7;(b=a.A=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Hc(a,b){b>>=6;var c=a.F=b&7;return(b=a.A=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]}function Ic(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Dc(a,b,c,8)}function Jc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Kc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]} +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.N(b,e,7),Cc(a,e,d.call(a,c,Ab(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),Db(a.h,e,d.call(a,c,Cb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Lc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Cc(a,a.N(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Db(a.h,a.N(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.lb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.Ga=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.R&&this.R.Ka>d?this.R:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(tc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.R,e==a)this.R=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(sc(this))}while(0>1|b<<16;wc(this,a);return a&65535}function Sc(a,b){a=b&2048|b>>1|b<<8;wc(this,a<<8);return a&255}function Tc(a,b){a=b&~a;R(this,a);return a}function Uc(a,b){a=b&~a;R(this,a<<8);return a}function Vc(a,b){a|=b;R(this,a);return a}function Wc(a,b){a|=b;R(this,a<<8);return a}function Xc(a,b){a=~b|65536;uc(this,a);return a&65535}function Yc(a,b){a=~b|256;uc(this,a<<8);return a&255} +function Zc(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function $c(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function ad(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function bd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function cd(a,b){a=-b;uc(this,a,a&b&32768);return a&65535}function dd(a,b){a=-b;uc(this,a<<8,(a&b&128)<<8);return a&255} +function ed(a,b){a=b<<1|this.m>>16&1;wc(this,a);return a&65535}function fd(a,b){a=b<<1|this.m>>16&1;wc(this,a<<8);return a&255}function gd(a,b){a=(this.m&65536|b)>>1|b<<16;wc(this,a);return a&65535}function hd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;wc(this,a<<8);return a&255}function id(a,b){var c=b-a;xc(this,c,a,b);return c&65535}function jd(a,b){var c=b-a;xc(this,c<<8,a<<8,b<<8);return c&255}function kd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function ld(a,b){a^=b;R(this,a);return a&65535}function md(a){U(this,a,Hc(this,a),Nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function od(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function pd(a){V(this,a,!Q(this))}function qd(a){V(this,a,Q(this))} +function rd(a){U(this,a,Hc(this,a),Tc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function sd(a){S(this,a,Gc(this,a),Uc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function td(a){U(this,a,Hc(this,a),Vc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){S(this,a,Gc(this,a),Wc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function vd(a){R(this,Hc(this,a)&Kc(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function wd(a){R(this,(Gc(this,a)&Jc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function xd(a){V(this,a,this.i&65535?0:4)}function yd(a){V(this,a,!this.ya()==!(this.f&32768))}function zd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Ad(a){V(this,a,!Q(this)&&!!(this.i&65535))} +function Bd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Cd(a){V(this,a,Q(this)||(this.i&65535?0:4))}function Dd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Ed(a){V(this,a,this.ya())}function Fd(a){V(this,a,!!(this.i&65535))}function Gd(a){V(this,a,!this.ya())}function Hd(){J(this,12,1);this.a-=5}function Id(a){V(this,a,!0)}function Jd(a){V(this,a,!(this.f&32768))}function Kd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ld(a){var b=Hc(this,a);a=Kc(this,a);xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Md(a){var b=Gc(this,a)<<8;a=Jc(this,a)<<8;xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Nd(a){var b=Kc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Od(){J(this,24,2);this.a-=25} +function Pd(){this.B&49152?(this.M|=128,J(this,4,3)):this.C?this.C.b():F(this);this.a-=7}function Qd(){J(this,16,4);this.a-=25}var Rd=[0,7,7,10,7,11,9,13];function Sd(a){this.I=this.a;O(this,Ic(this,a));this.a=this.I-Rd[this.c]}var Td=[0,14,14,17,14,18,16,20];function Ud(a){this.I=this.a;var b=Ic(this,a);a=a>>6&7;yc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.I-Td[this.c]}var Vd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Wd(a){var b=Hc(this,a);this.I=this.a;R(this,Mc(this,a,b));this.a=this.I-Vd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Xd(a){var b=Gc(this,a);R(this,Lc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Yd=[7,13,13,17,14,18,17,21]; +function Zd(a){var b=Kc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ee(a){U(this,a,Hc(this,a),id);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function fe(a){U(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)}function ge(){J(this,28,5);this.a-=5}function he(){this.u&4||this.l.aa();this.u|=4;tc(this,-2);this.a-=3}function ie(a){U(this,a,Hc(this,a),ld);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function oc(a){je[a>>12].call(this,a)}function ke(a){le[a>>6&3].call(this,a)}function me(a){ne[a>>6&3].call(this,a)}function oe(a){pe[a>>6&3].call(this,a)}function qe(a){re[a&15].call(this,a)}function se(a){te[a&15].call(this,a)} +function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)} +var je=[function(a){Ae[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,Y,function(a){Be[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Ae=[function(a){Ce[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,Y,Y,Y],le=[function(a){uc(this,Mc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}],ne=[function(a){U(this,a,0, +cd);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Kc(this,a);uc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],pe=[function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Ce=[function(a){De[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,Y,qe,se,fe,fe,fe,fe],De=[Pd,he,be,Hd,Qd,ae,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],re=[$d,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],te=[$d,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Be=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,Y,Y,Y],ve=[function(a){uc(this, +Lc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,$c);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){S(this,a,0,dd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Jc(this,a);uc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],ze=[function(a){S(this,a,0,hd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Sc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)}];function pc(a){Ee[a>>12].call(this,a)} +var Ee=[function(a){Fe[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,function(a){Ge[a>>8&15].call(this,a)},function(a){He[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Fe=[function(a){Ie[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,function(a){Je[a>>6&3].call(this,a)},Y,Y],Je=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.ba);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Ec(this,a,0);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I= +this.a;Fc(this,a,0,b);R(this,b);this.a=this.I-Yd[this.c]},function(a){R(this,Mc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ie=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},qe,se,fe,fe,fe,fe],Ke=[Pd,he,be,Hd,Qd,ae,function(){zc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ge=[Zd,Zd,Nd,Nd,nd,nd,od,od,ie,ie,Y,Y,Y,Y,de,de],He=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,function(a){Le[a>>6& +3].call(this,a)},Y,Y],Le=[Y,function(a){a=Ec(this,a,65536);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I=this.a;Fc(this,a,65536,b);R(this,b);this.a=this.I-Yd[this.c]},Y]; +function Me(a){x.call(this,"ROM",a,Me);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ne(c)})}}z(Me);Me.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ne(this)}; +Me.prototype.ka=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Me.prototype.ja=function(){return!0}; +function Ne(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")";a.j.error=!0;a.D(b)}else{b=a.i;if(wb(a.h,b,a.c,Tb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?F(a.a):rc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Ib(e.a,e.ba))});this.ca=Kb(52,4);this.O=Hb(this.a,function(){e.c|=128;e.c&64&&Ib(e.a,e.ca)});$a(b,this,Te);E(this)}; +h.Kb=function(){if(!this.v){var a=fc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Qa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){Ue(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Ue(this)};function Ue(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Jb(this.a,this.O,1E3/Math.round(this.I/10))}};var Ve={},Te=(Ve[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],Ve[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],Ve[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],Ve[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],Ve);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&Ye(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ye(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;this.J=Ze(a);var e=this;if((this.c=fc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Kb(56,4);this.R=Hb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.P;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&hf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Ea=!1;a.m&&(a.m--,a.m||E(a));ef(a)})}function bf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.rb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){pf(a,b,c,d)})} +function pf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.P;if(d)a.controller.D('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var T=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.da?f=a.ma+a.da&&(a.da+=f-(a.ma+a.da)+1):(a.ma=f,a.da=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.D("Unable to restore disk '"+this.ua+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=rf(this,a++);)tf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function tf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; +h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&uf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&vf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ea){var b;b="";for(var c=0,k;k=rf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";uf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){wf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return wf(this,a[0])};function zf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Bf(a,e,b,c,!1,d)}else Af(a,e)} +function Bf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Af(a,b,!0),k.qb?a.D("RL11 busy"):(k.qb=!0,e&&(k.pb=!0,a.s++),k.hb=!!f,of(new kf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.qb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.ub)),b=null);b?(a.ea=b,a.ua=c,a.Da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.ub),a.pb||e),this.l&&lc(this.l)):a.hb=!1;a.pb&&(a.pb=!1,--this.s||E(this));uf(this,a.ub)}; +function yf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){if(!n){n=a.ea.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ea.read(n,p++))||0>(w=a.ea.read(n,p++))){k=5120;break}Db(this.h,f,t|w<<8);if(Gb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){var t=Cb(this.h,f);if(Gb(this.h)){k=8192;break}f+=2;if(!n){n=a.ea.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ea.write(n,p++,t&255)||!a.ea.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.Md=function(a){this.L=this.L&-1023|a&1022;this.G=this.G&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Ib(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; +var Cf={},xf=(Cf[63744]=[null,null,N.prototype.Uc,N.prototype.Md,"RLCS"],Cf[63746]=[null,null,N.prototype.Sc,N.prototype.Kd,"RLBA"],Cf[65284]=[null,null,N.prototype.Vc,N.prototype.Nd,"RLDA"],Cf[65286]=[null,null,N.prototype.Wc,N.prototype.Od,"RLMP"],Cf[65288]=[null,null,N.prototype.Tc,N.prototype.Ld,"RLBE"],Cf); +function Df(a,b,c){x.call(this,"Computer",a,Df);this.j.P=!1;Ef(this,b);this.w=fc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Ff;this.s=null;this.i=this.I=!1;this.O=fc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Gf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new mb({id:this.oa+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.G=Ua("Panel",this.id))&&this.G.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bFf){if(Hf(d,this.s)){this.f=new P(this,"1.30.2","failsafe");Hf(this.f)&&(Mf(this,d),a=2,Nf(this.f));this.f.set("timestamp",sa());Of(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Lf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Hf(d,g):("error"== +f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Nf(d),Hf(d)?(c=Lf(d),e=!0):c=!1))}e&&Kf(this,c?d:null)}else 2==a&&d.clear()}else Kf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Pf(this,this.a,b,c,a),this.a.Va());this.F&&(Mf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; +function Mf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function Sf(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.P=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Zf(a,b,c)}})}else c(a,null)} +function $f(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Wf||Ja(!0));l=!1}var g,k,l=!0;Wf++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?Xf(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Wf||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Wf||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Xf(b,a,d,!0,e,n):Yf(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return $f(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From d5c7bf0b5dd581c9c976423e794bae0226230d51 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Nov 2016 13:35:50 -0700 Subject: [PATCH 11/30] More Front Panel improvements --- apps/pdp11/boot/monitor/PDPJSMON.json | 171 +-- apps/pdp11/boot/monitor/PDPJSMON.lst | 1044 +++++++++-------- apps/pdp11/boot/monitor/PDPJSMON.mac | 4 +- apps/pdp11/boot/monitor/README.md | 4 +- .../machine/1170/panel/debugger/machine.xml | 2 +- devices/pdp11/panel/1170/debugger/front.xml | 94 +- devices/pdp11/panel/1170/front.xml | 90 +- docs/pcx86/examples/components.css | 13 +- modules/pdp11/lib/bus.js | 41 +- modules/pdp11/lib/cpu.js | 8 +- modules/pdp11/lib/cpuops.js | 2 +- modules/pdp11/lib/cpustate.js | 2 - modules/pdp11/lib/debugger.js | 15 +- modules/pdp11/lib/memory.js | 2 - modules/pdp11/lib/messages.js | 2 + modules/pdp11/lib/panel.js | 346 ++++-- modules/pdp11/lib/rl11.js | 10 +- modules/shared/templates/components.css | 13 +- versions/pc8080/1.30.2/components.css | 13 +- versions/pcx86/1.30.2/components.css | 13 +- versions/pdpjs/1.30.2/components.css | 13 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 530 ++++----- versions/pdpjs/1.30.2/pdp11.js | 381 +++--- 23 files changed, 1523 insertions(+), 1290 deletions(-) diff --git a/apps/pdp11/boot/monitor/PDPJSMON.json b/apps/pdp11/boot/monitor/PDPJSMON.json index 226df4d83..cf008c34c 100644 --- a/apps/pdp11/boot/monitor/PDPJSMON.json +++ b/apps/pdp11/boot/monitor/PDPJSMON.json @@ -1,89 +1,90 @@ {"load":0xC000 /*140000*/,"exec":0xC000 /*140000*/, "words":[ 0x0005 /*000005*/,0x0A1F /*005037*/,0xFFFE /*177776*/,0x15C6 /*012706*/,0xC000 /*140000*/,0x0A1F /*005037*/,0xFF74 /*177564*/,0x15C0 /*012700*/, -0xC251 /*141121*/,0x09F7 /*004767*/,0x0052 /*000122*/,0x15DF /*012737*/,0xC054 /*140124*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, -0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC269 /*141151*/,0x09F7 /*004767*/,0x0038 /*000070*/, -0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006A /*000152*/,0x0A00 /*005000*/,0x0001 /*000001*/,0x0A80 /*005200*/, -0x0BF7 /*005767*/,0x000C /*000014*/,0x03FB /*001773*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/,0x0002 /*000002*/,0x0002 /*000002*/, -0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/,0xFF74 /*177564*/,0x80FD /*100375*/, -0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/, -0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC088 /*140210*/,0x0034 /*000064*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0036 /*000066*/, -0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/,0x0306 /*001406*/,0x9FDF /*117737*/, -0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/,0xFF74 /*177564*/,0x0002 /*000002*/, -0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/,0x15DF /*012737*/,0xC0C0 /*140300*/, -0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF70 /*177560*/,0x0087 /*000207*/, -0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/,0xA017 /*120027*/,0x007F /*000177*/, -0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/,0x0306 /*001406*/,0x0AF7 /*005367*/, -0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC21F /*141037*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/,0xA017 /*120027*/,0x0020 /*000040*/, -0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/,0xA017 /*120027*/,0x007A /*000172*/, -0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/,0x2DD7 /*026727*/,0xFF92 /*177622*/, -0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/,0xFF84 /*177604*/,0x9588 /*112610*/, -0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/,0xFF74 /*177564*/,0x8A08 /*105010*/, -0x15DF /*012737*/,0xC146 /*140506*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/,0x15DF /*012737*/,0x0400 /*002000*/, -0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/,0x1066 /*010146*/,0x10A6 /*010246*/, -0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFF0C /*177414*/,0xB5DF /*132737*/,0x0040 /*000100*/, -0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC223 /*141043*/,0x94C0 /*112300*/,0x0319 /*001431*/,0x1DC2 /*016702*/, -0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA001 /*120001*/,0x0208 /*001010*/, -0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/,0x02F7 /*001367*/,0x0104 /*000404*/, -0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/,0xC1C0 /*140700*/,0x0104 /*000404*/, -0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/,0x15C0 /*012700*/,0xC269 /*141151*/, -0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/,0x1580 /*012600*/,0x0002 /*000002*/, -0xC428 /*142050*/,0xC2A4 /*141244*/,0xC2B0 /*141260*/,0xC2F4 /*141364*/,0xC29A /*141232*/,0x4F43 /*047503*/,0x4D4D /*046515*/,0x4E41 /*047101*/, -0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/,0x4820 /*044040*/,0x4C41 /*046101*/, -0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/,0x5345 /*051505*/,0x2054 /*020124*/, -0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/, -0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/,0x3F4B /*037513*/,0x5220 /*051040*/, -0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/,0x0A0D /*005015*/,0x0800 /*004000*/, -0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/,0x5400 /*052000*/,0x5345 /*051505*/, -0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/,0x0050 /*000120*/,0x5500 /*052400*/, -0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/,0x444E /*042116*/,0x0D0A /*006412*/, -0x5000 /*050000*/,0x5044 /*050104*/,0x312D /*030455*/,0x2031 /*020061*/,0x4F4D /*047515*/,0x494E /*044516*/,0x4F54 /*047524*/,0x2052 /*020122*/, -0x3156 /*030526*/,0x302E /*030056*/,0x0D0A /*006412*/,0x0D0A /*006412*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x3E54 /*037124*/,0x0020 /*000040*/, -0x4E55 /*047125*/,0x4E4B /*047113*/,0x574F /*053517*/,0x204E /*020116*/,0x4F42 /*047502*/,0x544F /*052117*/,0x4420 /*042040*/,0x5645 /*053105*/, -0x4349 /*041511*/,0x0A45 /*005105*/,0x000D /*000015*/,0x2020 /*020040*/,0x2020 /*020040*/,0x2020 /*020040*/,0x4C43 /*046103*/,0x434F /*041517*/, -0x204B /*020113*/,0x4954 /*044524*/,0x4B43 /*045503*/,0x0A53 /*005123*/,0x000D /*000015*/,0x15C0 /*012700*/,0xC1CA /*140712*/,0x09F7 /*004767*/, -0xFDC6 /*176706*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC21C /*141034*/,0x09F7 /*004767*/,0xFDBA /*176672*/,0x0087 /*000207*/, -0x0A37 /*005067*/,0xFD9E /*176636*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/,0x1144 /*010504*/,0x0C84 /*006204*/, -0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/,0x2045 /*020105*/,0x0301 /*001401*/, -0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC28B /*141213*/,0x1DC3 /*016703*/,0xFD74 /*176564*/,0x0A02 /*005002*/, -0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/,0x02F8 /*001370*/,0x09F7 /*004767*/, -0xFD76 /*176566*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/,0x15C0 /*012700*/,0x0008 /*000010*/, -0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/,0x10B1 /*010261*/,0xF4F0 /*172360*/, -0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/,0x10B1 /*010261*/,0xF4B0 /*172260*/, -0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/,0x10F1 /*010361*/,0xFFB0 /*177660*/, -0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4FE /*172376*/, -0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/,0x15DF /*012737*/,0x003F /*000077*/, -0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4A4 /*172244*/,0x15DF /*012737*/, -0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/,0x4080 /*040200*/,0x15C2 /*012702*/, -0xC384 /*141604*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC428 /*142050*/,0x87FB /*103773*/,0x15F7 /*012767*/,0x4080 /*040200*/, -0xFCCE /*176316*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/,0x35DF /*032737*/,0x0001 /*000001*/, -0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/,0x35DF /*032737*/,0x0002 /*000002*/, -0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/,0x1042 /*010102*/,0xE5C2 /*162702*/, -0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/,0x15F3 /*012763*/,0x0001 /*000001*/, -0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/,0x1084 /*010204*/,0x7517 /*072427*/, -0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1084 /*010204*/,0x7517 /*072427*/, -0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/,0x74D7 /*072327*/,0xFFF4 /*177764*/, -0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/, -0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/,0x15C4 /*012704*/,0x0003 /*000003*/, -0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/,0x7F02 /*077402*/,0x1002 /*010002*/, -0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/,0x0365 /*001545*/,0xA057 /*120127*/, -0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/,0xC270 /*141160*/,0x09F7 /*004767*/, -0xFC26 /*176046*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/,0x0020 /*000040*/,0x030B /*001413*/, -0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/, -0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/,0x15D2 /*012722*/,0xC000 /*140000*/, -0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/,0xA057 /*120127*/,0x004C /*000114*/, -0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC23F /*141077*/,0x09F7 /*004767*/,0xFBD8 /*175730*/, -0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/,0x000B /*000013*/,0x0004 /*000004*/, -0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0008 /*000010*/, -0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/,0x003F /*000077*/,0x0A82 /*005202*/, -0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/, -0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0006 /*000006*/,0x8A03 /*105003*/, -0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/,0x00FF /*000377*/,0x0A02 /*005002*/, -0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/, -0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/,0x0A21 /*005041*/,0x15E1 /*012741*/, -0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x8BC9 /*105711*/, -0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/,0x15F1 /*012761*/,0x0020 /*000040*/, -0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/,0x1000 /*010000*/,0x001A /*000032*/, -0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/,0x0006 /*000006*/,0x0A31 /*005061*/, -0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x10C0 /*010300*/,0x0A07 /*005007*/] +0xC255 /*141125*/,0x09F7 /*004767*/,0x0056 /*000126*/,0x15DF /*012737*/,0xC058 /*140130*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, +0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC26D /*141155*/,0x09F7 /*004767*/,0x003C /*000074*/, +0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006E /*000156*/,0x0A00 /*005000*/,0x101F /*010037*/,0xFF78 /*177570*/, +0x0001 /*000001*/,0x0A80 /*005200*/,0x0BF7 /*005767*/,0x000C /*000014*/,0x03F9 /*001771*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/, +0x0002 /*000002*/,0x0002 /*000002*/,0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/, +0xFF74 /*177564*/,0x80FD /*100375*/,0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/, +0xFF74 /*177564*/,0x02FC /*001374*/,0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC08C /*140214*/,0x0034 /*000064*/,0x15DF /*012737*/, +0x0080 /*000200*/,0x0036 /*000066*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/, +0x0306 /*001406*/,0x9FDF /*117737*/,0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/, +0xFF74 /*177564*/,0x0002 /*000002*/,0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/, +0x15DF /*012737*/,0xC0C4 /*140304*/,0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/, +0xFF70 /*177560*/,0x0087 /*000207*/,0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/, +0xA017 /*120027*/,0x007F /*000177*/,0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/, +0x0306 /*001406*/,0x0AF7 /*005367*/,0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC223 /*141043*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/, +0xA017 /*120027*/,0x0020 /*000040*/,0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/, +0xA017 /*120027*/,0x007A /*000172*/,0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/, +0x2DD7 /*026727*/,0xFF92 /*177622*/,0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/, +0xFF84 /*177604*/,0x9588 /*112610*/,0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/, +0xFF74 /*177564*/,0x8A08 /*105010*/,0x15DF /*012737*/,0xC14A /*140512*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/, +0x15DF /*012737*/,0x0400 /*002000*/,0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/, +0x1066 /*010146*/,0x10A6 /*010246*/,0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC220 /*141040*/,0x09F7 /*004767*/,0xFF0C /*177414*/, +0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC227 /*141047*/,0x94C0 /*112300*/, +0x0319 /*001431*/,0x1DC2 /*016702*/,0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/, +0xA001 /*120001*/,0x0208 /*001010*/,0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/, +0x02F7 /*001367*/,0x0104 /*000404*/,0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/, +0xC1C4 /*140704*/,0x0104 /*000404*/,0x15C0 /*012700*/,0xC243 /*141103*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/, +0x15C0 /*012700*/,0xC26D /*141155*/,0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/, +0x1580 /*012600*/,0x0002 /*000002*/,0xC42C /*142054*/,0xC2A8 /*141250*/,0xC2B4 /*141264*/,0xC2F8 /*141370*/,0xC29E /*141236*/,0x4F43 /*047503*/, +0x4D4D /*046515*/,0x4E41 /*047101*/,0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/, +0x4820 /*044040*/,0x4C41 /*046101*/,0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/, +0x5345 /*051505*/,0x2054 /*020124*/,0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/, +0x544F /*052117*/,0x4420 /*042040*/,0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/, +0x3F4B /*037513*/,0x5220 /*051040*/,0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/, +0x0A0D /*005015*/,0x0800 /*004000*/,0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/, +0x5400 /*052000*/,0x5345 /*051505*/,0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/, +0x0050 /*000120*/,0x5500 /*052400*/,0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/, +0x444E /*042116*/,0x0D0A /*006412*/,0x5000 /*050000*/,0x5044 /*050104*/,0x312D /*030455*/,0x2031 /*020061*/,0x4F4D /*047515*/,0x494E /*044516*/, +0x4F54 /*047524*/,0x2052 /*020122*/,0x3156 /*030526*/,0x302E /*030056*/,0x0D0A /*006412*/,0x0D0A /*006412*/,0x4200 /*041000*/,0x4F4F /*047517*/, +0x3E54 /*037124*/,0x0020 /*000040*/,0x4E55 /*047125*/,0x4E4B /*047113*/,0x574F /*053517*/,0x204E /*020116*/,0x4F42 /*047502*/,0x544F /*052117*/, +0x4420 /*042040*/,0x5645 /*053105*/,0x4349 /*041511*/,0x0A45 /*005105*/,0x000D /*000015*/,0x2020 /*020040*/,0x2020 /*020040*/,0x2020 /*020040*/, +0x4C43 /*046103*/,0x434F /*041517*/,0x204B /*020113*/,0x4954 /*044524*/,0x4B43 /*045503*/,0x0A53 /*005123*/,0x000D /*000015*/,0x15C0 /*012700*/, +0xC1CE /*140716*/,0x09F7 /*004767*/,0xFDC6 /*176706*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC220 /*141040*/,0x09F7 /*004767*/, +0xFDBA /*176672*/,0x0087 /*000207*/,0x0A37 /*005067*/,0xFD9E /*176636*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/, +0x1144 /*010504*/,0x0C84 /*006204*/,0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/, +0x2045 /*020105*/,0x0301 /*001401*/,0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC28F /*141217*/,0x1DC3 /*016703*/, +0xFD74 /*176564*/,0x0A02 /*005002*/,0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/, +0x02F8 /*001370*/,0x09F7 /*004767*/,0xFD76 /*176566*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/, +0x15C0 /*012700*/,0x0008 /*000010*/,0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/, +0x10B1 /*010261*/,0xF4F0 /*172360*/,0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/, +0x10B1 /*010261*/,0xF4B0 /*172260*/,0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/, +0x10F1 /*010361*/,0xFFB0 /*177660*/,0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/, +0xFC00 /*176000*/,0xF4FE /*172376*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/, +0x15DF /*012737*/,0x003F /*000077*/,0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/, +0xF4A4 /*172244*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/, +0x4080 /*040200*/,0x15C2 /*012702*/,0xC388 /*141610*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC42C /*142054*/,0x87FB /*103773*/, +0x15F7 /*012767*/,0x4080 /*040200*/,0xFCCE /*176316*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/, +0x35DF /*032737*/,0x0001 /*000001*/,0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/, +0x35DF /*032737*/,0x0002 /*000002*/,0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/, +0x1042 /*010102*/,0xE5C2 /*162702*/,0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/, +0x15F3 /*012763*/,0x0001 /*000001*/,0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/, +0x1084 /*010204*/,0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/, +0x1084 /*010204*/,0x7517 /*072427*/,0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/, +0x74D7 /*072327*/,0xFFF4 /*177764*/,0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/, +0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/, +0x15C4 /*012704*/,0x0003 /*000003*/,0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/, +0x7F02 /*077402*/,0x1002 /*010002*/,0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/, +0x0365 /*001545*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/, +0xC274 /*141164*/,0x09F7 /*004767*/,0xFC26 /*176046*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/, +0x0020 /*000040*/,0x030B /*001413*/,0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/, +0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/, +0x15D2 /*012722*/,0xC000 /*140000*/,0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/, +0xA057 /*120127*/,0x004C /*000114*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC243 /*141103*/, +0x09F7 /*004767*/,0xFBD8 /*175730*/,0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/, +0x000B /*000013*/,0x0004 /*000004*/,0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/, +0x55C3 /*052703*/,0x0008 /*000010*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/, +0x003F /*000077*/,0x0A82 /*005202*/,0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/, +0x8BC9 /*105711*/,0x80FE /*100376*/,0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/, +0x0006 /*000006*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/, +0x00FF /*000377*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/, +0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/, +0x0A21 /*005041*/,0x15E1 /*012741*/,0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/, +0x0A05 /*005005*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/, +0x15F1 /*012761*/,0x0020 /*000040*/,0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/, +0x1000 /*010000*/,0x001A /*000032*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/, +0x0006 /*000006*/,0x0A31 /*005061*/,0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/, +0x10C0 /*010300*/,0x0A07 /*005007*/] } \ No newline at end of file diff --git a/apps/pdp11/boot/monitor/PDPJSMON.lst b/apps/pdp11/boot/monitor/PDPJSMON.lst index 5fda0e322..4cff7f1ac 100644 --- a/apps/pdp11/boot/monitor/PDPJSMON.lst +++ b/apps/pdp11/boot/monitor/PDPJSMON.lst @@ -4,530 +4,532 @@ 4 ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? 5 6 177776 PSW = 177776 - 7 177564 DL11XCSR = 177564 - 8 000064 DL11VEC = 64 - 9 - 10 177546 KW11LKS = 177546 - 11 000100 KW11VEC = 100 - 12 - 13 .ASECT - 14 140000 .=140000 - 15 140000 000005 START: RESET ; 140000 - 16 140002 005037 177776 CLR @#PSW - 17 140006 012706 140000 MOV #START,SP - 18 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR - 19 140016 012700 141121 MOV #BANNER,R0 - 20 140022 004767 140150' JSR PC,PRINT - 21 140026 012737 140124 000100 MOV #CLKAST,@#KW11VEC - 22 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 - 23 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING - 24 - 25 140050 012700 141151 MOV #PROMPT,R0 - 26 140054 004767 140150' JSR PC,PRINT - 27 140060 162706 000256 SUB #256,SP - 28 140064 010600 MOV SP,R0 - 29 140066 004767 140244' JSR PC,INPUT - 30 140072 005000 CLR R0 - 31 140074 000001 1$: WAIT - 32 140076 005200 INC R0 - 33 140100 005767 140120' TST LGHTON - 34 140104 001773 BEQ 1$ - 35 140106 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG - 36 140112 016746 140120' MOV LGHTON,-(SP) ; CALL SUPER LOOP START - 37 140116 000002 RTI - 38 - 39 140120 000000 LGHTON: .WORD 0 - 40 140122 000000 CLKTIC: .WORD 0 - 41 - 42 CLKAST: ; 140124 - 43 140124 005267 140122' INC CLKTIC - 44 140130 000002 RTI - 45 - 46 ONECHR: - 47 140132 105737 177564 TSTB @#DL11XCSR ; 140132 - 48 140136 100375 BPL ONECHR - 49 140140 110037 177566 MOVB R0,@#177566 - 50 140144 000207 RTS PC - 51 - 52 140146 000000 PRTPTR: .WORD 0 ; 140146 + 7 177570 CNSW = 177570 + 8 177564 DL11XCSR = 177564 + 9 000064 DL11VEC = 64 + 10 + 11 177546 KW11LKS = 177546 + 12 000100 KW11VEC = 100 + 13 + 14 .ASECT + 15 140000 .=140000 + 16 140000 000005 START: RESET ; 140000 + 17 140002 005037 177776 CLR @#PSW + 18 140006 012706 140000 MOV #START,SP + 19 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR + 20 140016 012700 141125 MOV #BANNER,R0 + 21 140022 004767 140154' JSR PC,PRINT + 22 140026 012737 140130 000100 MOV #CLKAST,@#KW11VEC + 23 140034 012737 000340 000102 MOV #340,@#KW11VEC+2 + 24 140042 052737 000100 177546 BIS #100,@#KW11LKS ; SET CLOCK TICKING + 25 + 26 140050 012700 141155 MOV #PROMPT,R0 + 27 140054 004767 140154' JSR PC,PRINT + 28 140060 162706 000256 SUB #256,SP + 29 140064 010600 MOV SP,R0 + 30 140066 004767 140250' JSR PC,INPUT + 31 140072 005000 CLR R0 + 32 140074 010037 177570 1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 + 33 140100 000001 WAIT + 34 140102 005200 INC R0 + 35 140104 005767 140124' TST LGHTON + 36 140110 001771 BEQ 1$ + 37 140112 012746 054000 MOV #054000,-(SP) ; SUPER PRIORITY 0 ALT REG + 38 140116 016746 140124' MOV LGHTON,-(SP) ; CALL SUPER LOOP START + 39 140122 000002 RTI + 40 + 41 140124 000000 LGHTON: .WORD 0 + 42 140126 000000 CLKTIC: .WORD 0 + 43 + 44 CLKAST: ; 140124 + 45 140130 005267 140126' INC CLKTIC + 46 140134 000002 RTI + 47 + 48 ONECHR: + 49 140136 105737 177564 TSTB @#DL11XCSR ; 140132 + 50 140142 100375 BPL ONECHR + 51 140144 110037 177566 MOVB R0,@#177566 + 52 140150 000207 RTS PC 53 - 54 PRINT: ; 140150 - 55 140150 132737 000100 177564 BITB #100,@#DL11XCSR - 56 140156 001374 BNE PRINT - 57 140160 010067 140146' MOV R0,PRTPTR - 58 140164 012737 140210 000064 MOV #PRTAST,@#DL11VEC - 59 140172 012737 000200 000066 MOV #200,@#DL11VEC+2 - 60 140200 152737 000100 177564 BISB #100,@#DL11XCSR - 61 140206 000207 RTS PC - 62 - 63 PRTAST: ; 140210 - 64 140210 105777 140146' TSTB @PRTPTR - 65 140214 001406 BEQ 2$ - 66 140216 117737 140146' 177566 MOVB @PRTPTR,@#177566 - 67 140224 005267 140146' INC PRTPTR - 68 140230 000002 RTI - 69 140232 105037 177564 2$: CLRB @#177564 - 70 140236 000002 RTI - 71 - 72 140240 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER - 73 140242 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH - 74 - 75 INPUT: - 76 140244 010067 140240' MOV R0,BUFFER ; 140244 - 77 140250 005067 140242' CLR LENGTH - 78 140254 012737 140300 000060 MOV #INPAST,@#60 - 79 140262 012737 000200 000062 MOV #200,@#62 - 80 140270 152737 000100 177560 BISB #100,@#177560 - 81 140276 000207 RTS PC - 82 - 83 INPAST: ; 140300 - 84 140300 010046 MOV R0,-(SP) - 85 140302 113700 177562 MOVB @#177562,R0 - 86 140306 120027 000015 CMPB R0,#15 - 87 140312 001455 BEQ 7$ ; CARRIAGE RETURN - 88 140314 120027 000177 CMPB R0,#127. - 89 140320 001403 BEQ 2$ ; - 90 140322 120027 000010 CMPB R0,#10 - 91 140326 001012 BNE 4$ ; BACK SPACE - 92 140330 005767 140242' 2$: TST LENGTH ; DATA IN BUFFER? - 93 140334 001406 BEQ 3$ - 94 140336 005367 140242' DEC LENGTH ; LENGTH - 95 140342 012700 141037 MOV #DEL,R0 - 96 140346 004767 140150' JSR PC,PRINT - 97 140352 000453 3$: BR 9$ - 98 140354 120027 000040 4$: CMPB R0,#40 - 99 140360 002450 BLT 9$ ; BELOW SPACE - 100 140362 120027 000177 CMPB R0,#177 - 101 140366 002045 BGE 9$ ; SKIP STUFF TOO BIG - 102 140370 004767 140132' JSR PC,ONECHR ; ECHO CHAR - 103 140374 120027 000172 CMPB R0,#172 - 104 140400 003005 BGT 5$ ; ABOVE Z - 105 140402 120027 000141 CMPB R0,#141 - 106 140406 002402 BLT 5$ ; BELOW A - 107 140410 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE - 108 140414 026727 140242' 000254 5$: CMP LENGTH,#254 - 109 140422 002027 BGE 9$ - 110 140424 110046 MOVB R0,-(SP) - 111 140426 016700 140240' MOV BUFFER,R0 - 112 140432 066700 140242' ADD LENGTH,R0 - 113 140436 112610 MOVB (SP)+,(R0) - 114 140440 005267 140242' INC LENGTH - 115 140444 000416 BR 9$ - 116 - 117 140446 016700 140240' 7$: MOV BUFFER,R0 - 118 140452 066700 140242' ADD LENGTH,R0 - 119 140456 105010 CLRB (R0) - 120 140460 012737 140506 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 - 121 140466 012737 000100 000242 MOV #100,@#242 - 122 140474 012737 002000 177772 MOV #2000,@#177772 - 123 140502 012600 9$: MOV (SP)+,R0 - 124 140504 000002 RTI - 125 - 126 CMD: ; 140506 - 127 140506 005037 177772 CLR @#177772 ; NO MORE PIR CALLS - 128 140512 010046 MOV R0,-(SP) - 129 140514 010146 MOV R1,-(SP) - 130 140516 010246 MOV R2,-(SP) - 131 140520 010346 MOV R3,-(SP) - 132 140522 010446 MOV R4,-(SP) - 133 140524 012700 141034 MOV #EOL,R0 - 134 140530 004767 140150' JSR PC,PRINT - 135 140534 132737 000100 177564 1$: BITB #100,@#177564 - 136 140542 001374 BNE 1$ - 137 140544 005004 CLR R4 - 138 140546 012703 141043 MOV #CMDLST,R3 ; CMD LIST - 139 140552 112300 3$: MOVB (R3)+,R0 - 140 140554 001431 BEQ 13$ - 141 140556 016702 140240' MOV BUFFER,R2 ; USER CMD - 142 140562 112201 4$: MOVB (R2)+,R1 - 143 140564 001431 BEQ 15$ ; NULL COMMAND? - 144 140566 120127 000040 CMPB R1,#40 - 145 140572 001773 BEQ 4$ ; SKIP SPACE - 146 140574 120001 5$: CMPB R0,R1 - 147 140576 001010 BNE 7$ - 148 140600 112300 MOVB (R3)+,R0 - 149 140602 001412 BEQ 9$ - 150 140604 112201 MOVB (R2)+,R1 - 151 140606 001410 BEQ 9$ - 152 140610 120127 000040 CMPB R1,#40 - 153 140614 001367 BNE 5$ - 154 140616 000404 BR 9$ - 155 140620 112300 7$: MOVB (R3)+,R0 - 156 140622 001376 BNE 7$ - 157 140624 005204 INC R4 - 158 140626 000751 BR 3$ - 159 140630 006304 9$: ASL R4 - 160 140632 004774 140700 JSR PC,@CMDTBL(R4) ; EXECUTE - 161 140636 000404 BR 15$ - 162 - 163 140640 012700 141077 13$: MOV #UNKMSG,R0 - 164 140644 004767 140150' JSR PC,PRINT - 165 - 166 140650 005067 140242' 15$: CLR LENGTH - 167 140654 012700 141151 MOV #PROMPT,R0 - 168 140660 004767 140150' JSR PC,PRINT - 169 140664 012604 MOV (SP)+,R4 - 170 140666 012603 MOV (SP)+,R3 - 171 140670 012602 MOV (SP)+,R2 - 172 140672 012601 MOV (SP)+,R1 - 173 140674 012600 MOV (SP)+,R0 - 174 140676 000002 RTI - 175 - 176 - 177 140700 142050 141244 141260 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP - 140706 141364 141232 - 178 140712 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> - 140715 115 101 116 - 140720 104 123 040 - 140723 101 122 105 - 140726 040 102 117 - 140731 117 124 054 - 140734 040 110 101 - 140737 114 124 054 - 140742 040 114 111 - 140745 107 110 124 - 140750 123 054 040 - 140753 124 105 123 - 140756 124 040 101 - 140761 116 104 040 - 140764 110 105 114 - 140767 120 015 012 - 140772 102 117 117 - 140775 124 040 104 - 141000 105 126 111 - 141003 103 105 123 - 141006 040 101 122 - 141011 105 040 122 - 141014 113 077 040 - 141017 122 114 077 - 141022 040 117 122 - 141025 040 122 120 - 141030 077 015 012 - 141033 000 - 179 141034 015 012 000 EOL: .BYTE 15,12,0 - 180 141037 010 040 010 DEL: .BYTE 10,40,10,0 - 141042 000 - 181 141043 102 117 117 CMDLST: .ASCIZ 'BOOT' - 141046 124 000 - 182 141050 110 101 114 .ASCIZ 'HALT' - 141053 124 000 - 183 141055 124 105 123 .ASCIZ 'TEST' - 141060 124 000 - 184 141062 114 111 107 .ASCIZ 'LIGHTS' - 141065 110 124 123 - 141070 000 - 185 141071 110 105 114 .ASCIZ 'HELP' - 141074 120 000 - 186 141076 000 .BYTE 0 - 187 141077 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> - 141102 116 117 127 - 141105 116 040 103 - 141110 117 115 115 - 141113 101 116 104 - 141116 012 015 000 - 188 141121 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> - 141124 055 061 061 - 141127 040 115 117 - 141132 116 111 124 - 141135 117 122 040 - 141140 126 061 056 - 141143 060 012 015 - 141146 012 015 000 - 189 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> - 190 141151 102 117 117 PROMPT: .ASCIZ 'BOOT> ' - 141154 124 076 040 - 141157 000 - 191 141160 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> - 141163 116 117 127 - 141166 116 040 102 - 141171 117 117 124 - 141174 040 104 105 - 141177 126 111 103 - 141202 105 012 015 - 141205 000 - 192 141206 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> - 141211 040 040 040 - 141214 103 114 117 - 141217 103 113 040 - 141222 124 111 103 - 141225 113 123 012 - 141230 015 000 - 193 - 194 .EVEN + 54 140152 000000 PRTPTR: .WORD 0 ; 140146 + 55 + 56 PRINT: ; 140150 + 57 140154 132737 000100 177564 BITB #100,@#DL11XCSR + 58 140162 001374 BNE PRINT + 59 140164 010067 140152' MOV R0,PRTPTR + 60 140170 012737 140214 000064 MOV #PRTAST,@#DL11VEC + 61 140176 012737 000200 000066 MOV #200,@#DL11VEC+2 + 62 140204 152737 000100 177564 BISB #100,@#DL11XCSR + 63 140212 000207 RTS PC + 64 + 65 PRTAST: ; 140210 + 66 140214 105777 140152' TSTB @PRTPTR + 67 140220 001406 BEQ 2$ + 68 140222 117737 140152' 177566 MOVB @PRTPTR,@#177566 + 69 140230 005267 140152' INC PRTPTR + 70 140234 000002 RTI + 71 140236 105037 177564 2$: CLRB @#177564 + 72 140242 000002 RTI + 73 + 74 140244 000000 BUFFER: .WORD 0 ; INPUT BUFFER POINTER + 75 140246 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH + 76 + 77 INPUT: + 78 140250 010067 140244' MOV R0,BUFFER ; 140244 + 79 140254 005067 140246' CLR LENGTH + 80 140260 012737 140304 000060 MOV #INPAST,@#60 + 81 140266 012737 000200 000062 MOV #200,@#62 + 82 140274 152737 000100 177560 BISB #100,@#177560 + 83 140302 000207 RTS PC + 84 + 85 INPAST: ; 140300 + 86 140304 010046 MOV R0,-(SP) + 87 140306 113700 177562 MOVB @#177562,R0 + 88 140312 120027 000015 CMPB R0,#15 + 89 140316 001455 BEQ 7$ ; CARRIAGE RETURN + 90 140320 120027 000177 CMPB R0,#127. + 91 140324 001403 BEQ 2$ ; + 92 140326 120027 000010 CMPB R0,#10 + 93 140332 001012 BNE 4$ ; BACK SPACE + 94 140334 005767 140246' 2$: TST LENGTH ; DATA IN BUFFER? + 95 140340 001406 BEQ 3$ + 96 140342 005367 140246' DEC LENGTH ; LENGTH + 97 140346 012700 141043 MOV #DEL,R0 + 98 140352 004767 140154' JSR PC,PRINT + 99 140356 000453 3$: BR 9$ + 100 140360 120027 000040 4$: CMPB R0,#40 + 101 140364 002450 BLT 9$ ; BELOW SPACE + 102 140366 120027 000177 CMPB R0,#177 + 103 140372 002045 BGE 9$ ; SKIP STUFF TOO BIG + 104 140374 004767 140136' JSR PC,ONECHR ; ECHO CHAR + 105 140400 120027 000172 CMPB R0,#172 + 106 140404 003005 BGT 5$ ; ABOVE Z + 107 140406 120027 000141 CMPB R0,#141 + 108 140412 002402 BLT 5$ ; BELOW A + 109 140414 142700 000040 BICB #40,R0 ; CONVERT TO UPPER CASE + 110 140420 026727 140246' 000254 5$: CMP LENGTH,#254 + 111 140426 002027 BGE 9$ + 112 140430 110046 MOVB R0,-(SP) + 113 140432 016700 140244' MOV BUFFER,R0 + 114 140436 066700 140246' ADD LENGTH,R0 + 115 140442 112610 MOVB (SP)+,(R0) + 116 140444 005267 140246' INC LENGTH + 117 140450 000416 BR 9$ + 118 + 119 140452 016700 140244' 7$: MOV BUFFER,R0 + 120 140456 066700 140246' ADD LENGTH,R0 + 121 140462 105010 CLRB (R0) + 122 140464 012737 140512 000240 MOV #CMD,@#240 ; CALL CMD AT PRIORITY 2 + 123 140472 012737 000100 000242 MOV #100,@#242 + 124 140500 012737 002000 177772 MOV #2000,@#177772 + 125 140506 012600 9$: MOV (SP)+,R0 + 126 140510 000002 RTI + 127 + 128 CMD: ; 140506 + 129 140512 005037 177772 CLR @#177772 ; NO MORE PIR CALLS + 130 140516 010046 MOV R0,-(SP) + 131 140520 010146 MOV R1,-(SP) + 132 140522 010246 MOV R2,-(SP) + 133 140524 010346 MOV R3,-(SP) + 134 140526 010446 MOV R4,-(SP) + 135 140530 012700 141040 MOV #EOL,R0 + 136 140534 004767 140154' JSR PC,PRINT + 137 140540 132737 000100 177564 1$: BITB #100,@#177564 + 138 140546 001374 BNE 1$ + 139 140550 005004 CLR R4 + 140 140552 012703 141047 MOV #CMDLST,R3 ; CMD LIST + 141 140556 112300 3$: MOVB (R3)+,R0 + 142 140560 001431 BEQ 13$ + 143 140562 016702 140244' MOV BUFFER,R2 ; USER CMD + 144 140566 112201 4$: MOVB (R2)+,R1 + 145 140570 001431 BEQ 15$ ; NULL COMMAND? + 146 140572 120127 000040 CMPB R1,#40 + 147 140576 001773 BEQ 4$ ; SKIP SPACE + 148 140600 120001 5$: CMPB R0,R1 + 149 140602 001010 BNE 7$ + 150 140604 112300 MOVB (R3)+,R0 + 151 140606 001412 BEQ 9$ + 152 140610 112201 MOVB (R2)+,R1 + 153 140612 001410 BEQ 9$ + 154 140614 120127 000040 CMPB R1,#40 + 155 140620 001367 BNE 5$ + 156 140622 000404 BR 9$ + 157 140624 112300 7$: MOVB (R3)+,R0 + 158 140626 001376 BNE 7$ + 159 140630 005204 INC R4 + 160 140632 000751 BR 3$ + 161 140634 006304 9$: ASL R4 + 162 140636 004774 140704 JSR PC,@CMDTBL(R4) ; EXECUTE + 163 140642 000404 BR 15$ + 164 + 165 140644 012700 141103 13$: MOV #UNKMSG,R0 + 166 140650 004767 140154' JSR PC,PRINT + 167 + 168 140654 005067 140246' 15$: CLR LENGTH + 169 140660 012700 141155 MOV #PROMPT,R0 + 170 140664 004767 140154' JSR PC,PRINT + 171 140670 012604 MOV (SP)+,R4 + 172 140672 012603 MOV (SP)+,R3 + 173 140674 012602 MOV (SP)+,R2 + 174 140676 012601 MOV (SP)+,R1 + 175 140700 012600 MOV (SP)+,R0 + 176 140702 000002 RTI + 177 + 178 + 179 140704 142054 141250 141264 CMDTBL: .WORD BOOT,HALT,TEST,LIGHTS,HELP + 140712 141370 141236 + 180 140716 103 117 115 HLPMSG: .ASCIZ 'COMMANDS ARE BOOT, HALT, LIGHTS, TEST AND HELP'<15><12>'BOOT DEVICES ARE RK? RL? OR RP?'<15><12> + 140721 115 101 116 + 140724 104 123 040 + 140727 101 122 105 + 140732 040 102 117 + 140735 117 124 054 + 140740 040 110 101 + 140743 114 124 054 + 140746 040 114 111 + 140751 107 110 124 + 140754 123 054 040 + 140757 124 105 123 + 140762 124 040 101 + 140765 116 104 040 + 140770 110 105 114 + 140773 120 015 012 + 140776 102 117 117 + 141001 124 040 104 + 141004 105 126 111 + 141007 103 105 123 + 141012 040 101 122 + 141015 105 040 122 + 141020 113 077 040 + 141023 122 114 077 + 141026 040 117 122 + 141031 040 122 120 + 141034 077 015 012 + 141037 000 + 181 141040 015 012 000 EOL: .BYTE 15,12,0 + 182 141043 010 040 010 DEL: .BYTE 10,40,10,0 + 141046 000 + 183 141047 102 117 117 CMDLST: .ASCIZ 'BOOT' + 141052 124 000 + 184 141054 110 101 114 .ASCIZ 'HALT' + 141057 124 000 + 185 141061 124 105 123 .ASCIZ 'TEST' + 141064 124 000 + 186 141066 114 111 107 .ASCIZ 'LIGHTS' + 141071 110 124 123 + 141074 000 + 187 141075 110 105 114 .ASCIZ 'HELP' + 141100 120 000 + 188 141102 000 .BYTE 0 + 189 141103 125 116 113 UNKMSG: .ASCIZ 'UNKNOWN COMMAND'<12><15> + 141106 116 117 127 + 141111 116 040 103 + 141114 117 115 115 + 141117 101 116 104 + 141122 012 015 000 + 190 141125 120 104 120 BANNER: .ASCIZ 'PDP-11 MONITOR V1.0'<12><15><12><15> + 141130 055 061 061 + 141133 040 115 117 + 141136 116 111 124 + 141141 117 122 040 + 141144 126 061 056 + 141147 060 012 015 + 141152 012 015 000 + 191 ; 'ADAPTED FROM CODE BY PAUL NANKERVIS '<12><15><12><15> + 192 141155 102 117 117 PROMPT: .ASCIZ 'BOOT> ' + 141160 124 076 040 + 141163 000 + 193 141164 125 116 113 BADBOO: .ASCIZ 'UNKNOWN BOOT DEVICE'<12><15> + 141167 116 117 127 + 141172 116 040 102 + 141175 117 117 124 + 141200 040 104 105 + 141203 126 111 103 + 141206 105 012 015 + 141211 000 + 194 141212 040 040 040 PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> + 141215 040 040 040 + 141220 103 114 117 + 141223 103 113 040 + 141226 124 111 103 + 141231 113 123 012 + 141234 015 000 195 - 196 HELP: ; 141244 - 197 141232 012700 140712 MOV #HLPMSG,R0 - 198 141236 004767 140150' JSR PC,PRINT - 199 141242 000207 RTS PC - 200 - 201 HALT: ; 141260 - 202 141244 000000 HALT - 203 141246 012700 141034 MOV #EOL,R0 - 204 141252 004767 140150' JSR PC,PRINT - 205 141256 000207 RTS PC - 206 - 207 TEST: ; 141272 - 208 141260 005067 140122' CLR CLKTIC - 209 - 210 141264 012705 015000 MOV #15000,R5 - 211 141270 010537 177570 10$: MOV R5,@#177570 ; DISPLAY - 212 141274 010504 MOV R5,R4 - 213 141276 006204 ASR R4 - 214 141300 005000 15$: CLR R0 - 215 141302 010501 MOV R5,R1 - 216 141304 071004 DIV R4,R0 - 217 141306 010002 MOV R0,R2 - 218 141310 070204 MUL R4,R2 - 219 141312 060301 ADD R3,R1 - 220 141314 020105 CMP R1,R5 - 221 141316 001401 BEQ 20$ - 222 141320 000000 HALT - 223 141322 077412 20$: SOB R4,15$ - 224 141324 077517 SOB R5,10$ - 225 - 226 141326 012700 141213 MOV #PERMSG+5,R0 - 227 141332 016703 140122' MOV CLKTIC,R3 - 228 - 229 141336 005002 25$: CLR R2 ; 141350 - 230 141340 071227 000010 DIV #10,R2 - 231 141344 062703 000060 ADD #'0,R3 - 232 141350 110340 MOVB R3,-(R0) - 233 141352 010203 MOV R2,R3 - 234 141354 001370 BNE 25$ - 235 - 236 141356 004767 140150' JSR PC,PRINT - 237 141362 000207 RTS PC - 238 - 239 - 240 177572 MMR0=177572 - 241 177574 MMR1=177574 - 242 177576 MMR2=177576 - 243 172516 MMR3=172516 - 244 - 245 LIGHTS: ; 141376 - 246 141364 012703 077406 MOV #77406,R3 ; DEFAULT PDR - 247 141370 005002 CLR R2 - 248 141372 005001 CLR R1 - 249 141374 012700 000010 MOV #8.,R0 - 250 141400 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR - 251 141404 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR - 252 141410 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR - 253 141414 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR - 254 141420 010361 172200 MOV R3,172200(R1) ; SUPER I PDR - 255 141424 010261 172240 MOV R2,172240(R1) ; SUPER I PAR - 256 141430 010361 172220 MOV R3,172220(R1) ; SUPER D PDR - 257 141434 010261 172260 MOV R2,172260(R1) ; SUPER D PAR - 258 141440 010361 177600 MOV R3,177600(R1) ; USER I PDR - 259 141444 010261 177640 MOV R2,177640(R1) ; USER I PAR - 260 141450 010361 177620 MOV R3,177620(R1) ; USER D PDR - 261 141454 010361 177660 MOV R3,177660(R1) ; USER D PAR - 262 141460 062702 000200 ADD #200,R2 - 263 141464 062701 000002 ADD #2,R1 - 264 141470 077035 SOB R0,1$ - 265 141472 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE - 266 141500 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE - 267 141506 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE - 268 141514 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT - 269 141522 012737 000001 177572 MOV #1,@#MMR0 - 270 - 271 141530 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 - 272 141536 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 - 273 141544 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER - 274 - 275 141552 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS - 276 141556 012702 141604 MOV #SUPERS,R2 ; ADDRESS SUPER CODE - 277 141562 012246 10$: MOV (R2)+,-(SP) - 278 141564 006623 MTPI (R3)+ - 279 141566 020227 142050 CMP R2,#SUPERE - 280 141572 103773 BLO 10$ - 281 - 282 141574 012767 040200 140120' MOV #40200,LGHTON ; CHANGE IDLE TASK - 283 141602 000207 RTS PC - 284 - 285 ; - 286 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 - 287 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS - 288 ; - 289 SUPERS: ; 141616 - 290 141604 012700 000037 MOV #37,R0 ; LOAD PATTERN - 291 141610 012701 174000 MOV #174000,R1 - 292 141614 032737 000001 177570 BIT #1,@#177570 - 293 141622 001414 BEQ 10$ - 294 141624 012700 007417 MOV #7417,R0 - 295 141630 010001 MOV R0,R1 - 296 141632 005101 COM R1 - 297 141634 032737 000002 177570 BIT #2,@#177570 - 298 141642 001404 BEQ 10$ - 299 141644 012700 036163 MOV #36163,R0 - 300 141650 012701 037000 MOV #37000,R1 - 301 141654 010102 10$: MOV R1,R2 - 302 141656 162702 000002 SUB #2,R2 - 303 141662 042702 000001 BIC #1,R2 ; WAIT ADDRESS - 304 141666 010203 MOV R2,R3 - 305 141670 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET - 306 141674 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT - 307 141702 062703 000002 ADD #2,R3 - 308 141706 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) - 309 - 310 141714 010204 MOV R2,R4 - 311 141716 072427 177772 ASH #-6,R4 - 312 141722 042704 177600 BIC #177600,R4 - 313 141726 012705 001700 MOV #1700,R5 - 314 141732 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT - 315 141734 010204 MOV R2,R4 - 316 141736 072427 177764 ASH #-12.,R4 - 317 141742 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET - 318 141746 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE - 319 - 320 141752 010103 MOV R1,R3 - 321 141754 072327 177764 ASH #-12.,R3 - 322 141760 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET - 323 141764 020304 CMP R3,R4 ; SAME PAR - 324 141766 001412 BEQ 30$ - 325 141770 010104 MOV R1,R4 - 326 141772 072427 177772 ASH #-6,R4 - 327 141776 042704 177600 BIC #177600,R4 - 328 142002 012705 001700 MOV #1700,R5 - 329 142006 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP - 330 142010 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE - 331 30$: - 332 142014 012704 000003 MOV #3,R4 - 333 142020 063704 177570 ADD @#177570,R4 - 334 142024 012703 000002 MOV #2,R3 - 335 142030 060703 ADD PC,R3 - 336 142032 000112 40$: JMP (R2) - 337 142034 077402 SOB R4,40$ - 338 142036 010002 MOV R0,R2 - 339 142040 006002 ROR R2 ; ROTATE PATTERN - 340 142042 006101 ROL R1 - 341 142044 006000 ROR R0 - 342 142046 000702 BR 10$ - 343 SUPERE: - 344 - 345 BOOT: ; 142062 - 346 142050 005003 CLR R3 ; UNIT - 347 142052 112201 1$: MOVB (R2)+,R1 - 348 142054 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 - 349 142056 120127 000040 CMPB R1,#40 - 350 142062 001773 BEQ 1$ - 351 142064 120127 000122 CMPB R1,#'R - 352 142070 001405 BEQ 5$ - 353 - 354 142072 012700 141160 MOV #BADBOO,R0 - 355 142076 004767 140150' JSR PC,PRINT - 356 142102 000207 RTS PC - 357 - 358 142104 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P - 359 142106 112200 7$: MOVB (R2)+,R0 ; DIGIT - 360 142110 001416 BEQ 9$ - 361 142112 120027 000040 CMPB R0,#40 - 362 142116 001413 BEQ 9$ - 363 142120 120027 000067 CMPB R0,#'7 - 364 142124 003031 BGT 11$ - 365 142126 162700 000060 SUB #'0,R0 - 366 142132 002426 BLT 11$ - 367 142134 006303 ASL R3 - 368 142136 006303 ASL R3 + 196 .EVEN + 197 + 198 HELP: ; 141244 + 199 141236 012700 140716 MOV #HLPMSG,R0 + 200 141242 004767 140154' JSR PC,PRINT + 201 141246 000207 RTS PC + 202 + 203 HALT: ; 141260 + 204 141250 000000 HALT + 205 141252 012700 141040 MOV #EOL,R0 + 206 141256 004767 140154' JSR PC,PRINT + 207 141262 000207 RTS PC + 208 + 209 TEST: ; 141272 + 210 141264 005067 140126' CLR CLKTIC + 211 + 212 141270 012705 015000 MOV #15000,R5 + 213 141274 010537 177570 10$: MOV R5,@#177570 ; DISPLAY + 214 141300 010504 MOV R5,R4 + 215 141302 006204 ASR R4 + 216 141304 005000 15$: CLR R0 + 217 141306 010501 MOV R5,R1 + 218 141310 071004 DIV R4,R0 + 219 141312 010002 MOV R0,R2 + 220 141314 070204 MUL R4,R2 + 221 141316 060301 ADD R3,R1 + 222 141320 020105 CMP R1,R5 + 223 141322 001401 BEQ 20$ + 224 141324 000000 HALT + 225 141326 077412 20$: SOB R4,15$ + 226 141330 077517 SOB R5,10$ + 227 + 228 141332 012700 141217 MOV #PERMSG+5,R0 + 229 141336 016703 140126' MOV CLKTIC,R3 + 230 + 231 141342 005002 25$: CLR R2 ; 141350 + 232 141344 071227 000010 DIV #10,R2 + 233 141350 062703 000060 ADD #'0,R3 + 234 141354 110340 MOVB R3,-(R0) + 235 141356 010203 MOV R2,R3 + 236 141360 001370 BNE 25$ + 237 + 238 141362 004767 140154' JSR PC,PRINT + 239 141366 000207 RTS PC + 240 + 241 + 242 177572 MMR0=177572 + 243 177574 MMR1=177574 + 244 177576 MMR2=177576 + 245 172516 MMR3=172516 + 246 + 247 LIGHTS: ; 141376 + 248 141370 012703 077406 MOV #77406,R3 ; DEFAULT PDR + 249 141374 005002 CLR R2 + 250 141376 005001 CLR R1 + 251 141400 012700 000010 MOV #8.,R0 + 252 141404 010361 172300 1$: MOV R3,172300(R1) ; KERNEL I PDR + 253 141410 010261 172340 MOV R2,172340(R1) ; KERNEL I PAR + 254 141414 010361 172320 MOV R3,172320(R1) ; KERNEL D PDR + 255 141420 010261 172360 MOV R2,172360(R1) ; KERNEL D PAR + 256 141424 010361 172200 MOV R3,172200(R1) ; SUPER I PDR + 257 141430 010261 172240 MOV R2,172240(R1) ; SUPER I PAR + 258 141434 010361 172220 MOV R3,172220(R1) ; SUPER D PDR + 259 141440 010261 172260 MOV R2,172260(R1) ; SUPER D PAR + 260 141444 010361 177600 MOV R3,177600(R1) ; USER I PDR + 261 141450 010261 177640 MOV R2,177640(R1) ; USER I PAR + 262 141454 010361 177620 MOV R3,177620(R1) ; USER D PDR + 263 141460 010361 177660 MOV R3,177660(R1) ; USER D PAR + 264 141464 062702 000200 ADD #200,R2 + 265 141470 062701 000002 ADD #2,R1 + 266 141474 077035 SOB R0,1$ + 267 141476 052737 176000 172376 BIS #176000,@#172376 ; KERNEL D POINTS TO I/O SPACE + 268 141504 052737 176000 172276 BIS #176000,@#172276 ; SUPER D POINTS TO I/O SPACE + 269 141512 052737 176000 177676 BIS #176000,@#177676 ; USER D POINTS TO I/O SPACE + 270 141520 012737 000077 172516 MOV #77,@#MMR3 ; 77 FOR 22 BIT + 271 141526 012737 000001 177572 MOV #1,@#MMR0 + 272 + 273 141534 012737 001700 172244 MOV #1700,@#172244 ; BASE SUPER I (PAR 2) #40000 AT #170000 + 274 141542 012737 001700 172264 MOV #1700,@#172264 ; BASE SUPER D (PAR 2) #40000 AT #170000 + 275 141550 012737 010000 177776 MOV #010000,@#177776 ; SET PM TO SUPER + 276 + 277 141556 012703 040200 MOV #40200,R3 ; SUPER CODE ADDRESS + 278 141562 012702 141610 MOV #SUPERS,R2 ; ADDRESS SUPER CODE + 279 141566 012246 10$: MOV (R2)+,-(SP) + 280 141570 006623 MTPI (R3)+ + 281 141572 020227 142054 CMP R2,#SUPERE + 282 141576 103773 BLO 10$ + 283 + 284 141600 012767 040200 140124' MOV #40200,LGHTON ; CHANGE IDLE TASK + 285 141606 000207 RTS PC + 286 + 287 ; + 288 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 + 289 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS + 290 ; + 291 SUPERS: ; 141616 + 292 141610 012700 000037 MOV #37,R0 ; LOAD PATTERN + 293 141614 012701 174000 MOV #174000,R1 + 294 141620 032737 000001 177570 BIT #1,@#177570 + 295 141626 001414 BEQ 10$ + 296 141630 012700 007417 MOV #7417,R0 + 297 141634 010001 MOV R0,R1 + 298 141636 005101 COM R1 + 299 141640 032737 000002 177570 BIT #2,@#177570 + 300 141646 001404 BEQ 10$ + 301 141650 012700 036163 MOV #36163,R0 + 302 141654 012701 037000 MOV #37000,R1 + 303 141660 010102 10$: MOV R1,R2 + 304 141662 162702 000002 SUB #2,R2 + 305 141666 042702 000001 BIC #1,R2 ; WAIT ADDRESS + 306 141672 010203 MOV R2,R3 + 307 141674 042703 177701 BIC #177701,R3 ; ADDRESS OFFSET + 308 141700 012763 000001 040000 MOV #0000001,40000(R3) ; WRITE WAIT + 309 141706 062703 000002 ADD #2,R3 + 310 141712 012763 000113 040000 MOV #0000113,40000(R3) ; WRITE JMP (R3) + 311 + 312 141720 010204 MOV R2,R4 + 313 141722 072427 177772 ASH #-6,R4 + 314 141726 042704 177600 BIC #177600,R4 + 315 141732 012705 001700 MOV #1700,R5 + 316 141736 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR WAIT + 317 141740 010204 MOV R2,R4 + 318 141742 072427 177764 ASH #-12.,R4 + 319 141746 042704 177761 BIC #177761,R4 ; PAR SELECT OFFSET + 320 141752 010564 172240 MOV R5,172240(R4) ; SUPER I SPACE + 321 + 322 141756 010103 MOV R1,R3 + 323 141760 072327 177764 ASH #-12.,R3 + 324 141764 042703 177761 BIC #177761,R3 ; PAR SELECT OFFSET + 325 141770 020304 CMP R3,R4 ; SAME PAR + 326 141772 001412 BEQ 30$ + 327 141774 010104 MOV R1,R4 + 328 141776 072427 177772 ASH #-6,R4 + 329 142002 042704 177600 BIC #177600,R4 + 330 142006 012705 001700 MOV #1700,R5 + 331 142012 160405 SUB R4,R5 ; PAR ADDRESS BASE FOR JMP + 332 142014 010563 172240 MOV R5,172240(R3) ; SUPER I SPACE + 333 30$: + 334 142020 012704 000003 MOV #3,R4 + 335 142024 063704 177570 ADD @#177570,R4 + 336 142030 012703 000002 MOV #2,R3 + 337 142034 060703 ADD PC,R3 + 338 142036 000112 40$: JMP (R2) + 339 142040 077402 SOB R4,40$ + 340 142042 010002 MOV R0,R2 + 341 142044 006002 ROR R2 ; ROTATE PATTERN + 342 142046 006101 ROL R1 + 343 142050 006000 ROR R0 + 344 142052 000702 BR 10$ + 345 SUPERE: + 346 + 347 BOOT: ; 142062 + 348 142054 005003 CLR R3 ; UNIT + 349 142056 112201 1$: MOVB (R2)+,R1 + 350 142060 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 + 351 142062 120127 000040 CMPB R1,#40 + 352 142066 001773 BEQ 1$ + 353 142070 120127 000122 CMPB R1,#'R + 354 142074 001405 BEQ 5$ + 355 + 356 142076 012700 141164 MOV #BADBOO,R0 + 357 142102 004767 140154' JSR PC,PRINT + 358 142106 000207 RTS PC + 359 + 360 142110 112201 5$: MOVB (R2)+,R1 ; HOPEFULLY K, L OR P + 361 142112 112200 7$: MOVB (R2)+,R0 ; DIGIT + 362 142114 001416 BEQ 9$ + 363 142116 120027 000040 CMPB R0,#40 + 364 142122 001413 BEQ 9$ + 365 142124 120027 000067 CMPB R0,#'7 + 366 142130 003031 BGT 11$ + 367 142132 162700 000060 SUB #'0,R0 + 368 142136 002426 BLT 11$ 369 142140 006303 ASL R3 - 370 142142 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT - 371 142144 000760 BR 7$ - 372 142146 005002 9$: CLR R2 - 373 142150 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 - 374 142154 012722 140000 MOV #START,(R2)+ - 375 142160 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 - 376 142164 005022 CLR (R2)+ - 377 142166 120127 000113 CMPB R1,#'K - 378 142172 001476 BEQ BOOTRK - 379 142174 120127 000114 CMPB R1,#'L - 380 142200 001410 BEQ BOOTRL - 381 142202 120127 000120 CMPB R1,#'P - 382 142206 001517 BEQ BOOTRP - 383 - 384 142210 012700 141077 11$: MOV #UNKMSG,R0 - 385 142214 004767 140150' JSR PC,PRINT - 386 142220 000207 RTS PC - 387 - 388 174400 RLCS=174400 - 389 BOOTRL: ; 142326 - 390 142222 000005 RESET - 391 142224 000303 SWAB R3 ; UNIT NUMBER - 392 142226 012701 174400 MOV #RLCS,R1 ; CSR - 393 142232 012761 000013 000004 MOV #13,4(R1) ; CLR ERR - 394 142240 052703 000004 BIS #4,R3 ; UNIT+GSTAT - 395 142244 010311 MOV R3,(R1) ; ISSUE CMD - 396 142246 105711 TSTB (R1) ; WAIT - 397 142250 100376 BPL .-2 - 398 142252 105003 CLRB R3 - 399 142254 052703 000010 BIS #10,R3 ; UNIT+RDHDR - 400 142260 010311 MOV R3,(R1) ; ISSUE CMD - 401 142262 105711 TSTB (R1) ; WAIT - 402 142264 100376 BPL .-2 - 403 142266 016102 000006 MOV 6(R1),R2 ; GET HDR - 404 142272 042702 000077 BIC #77,R2 ; CLR SECTOR - 405 142276 005202 INC R2 ; MAGIC BIT - 406 142300 010261 000004 MOV R2,4(R1) ; SEEK TO 0 - 407 142304 105003 CLRB R3 - 408 142306 052703 000006 BIS #6,R3 ; UNIT+SEEK - 409 142312 010311 MOV R3,(R1) ; ISSUE CMD - 410 142314 105711 TSTB (R1) ; WAIT - 411 142316 100376 BPL .-2 - 412 142320 005061 000002 CLR 2(R1) ; CLR BA - 413 142324 005061 000004 CLR 4(R1) ; CLR DA - 414 142330 012761 177000 000006 MOV #-512.,6(R1) ; SET WC - 415 142336 105003 CLRB R3 - 416 142340 052703 000014 BIS #14,R3 ; UNIT+READ - 417 142344 010311 MOV R3,(R1) ; ISSUE CMD - 418 142346 105711 TSTB (R1) ; WAIT - 419 142350 100376 BPL .-2 - 420 142352 042711 000377 BIC #377,(R1) - 421 142356 005002 CLR R2 - 422 142360 005003 CLR R3 - 423 142362 005004 CLR R4 - 424 142364 005005 CLR R5 - 425 142366 005007 CLR PC - 426 - 427 177412 RKDA=177412 - 428 000005 READGO=5 - 429 BOOTRK: - 430 142370 000005 RESET ; 142402 - 431 142372 000303 SWAB R3 ; UNIT NUMBER - 432 142374 006303 ASL R3 - 433 142376 006303 ASL R3 + 370 142142 006303 ASL R3 + 371 142144 006303 ASL R3 + 372 142146 050003 BIS R0,R3 ; PUT DIGIT INTO UNIT + 373 142150 000760 BR 7$ + 374 142152 005002 9$: CLR R2 + 375 142154 012722 000137 MOV #137,(R2)+ ; STORE "JMP @#140000" INSTRUCTION AT ADDRESS 0 + 376 142160 012722 140000 MOV #START,(R2)+ + 377 142164 012722 140000 MOV #START,(R2)+ ; STORE #140000 IN VECTOR 4, IN CASE OF TRAP TO 4 + 378 142170 005022 CLR (R2)+ + 379 142172 120127 000113 CMPB R1,#'K + 380 142176 001476 BEQ BOOTRK + 381 142200 120127 000114 CMPB R1,#'L + 382 142204 001410 BEQ BOOTRL + 383 142206 120127 000120 CMPB R1,#'P + 384 142212 001517 BEQ BOOTRP + 385 + 386 142214 012700 141103 11$: MOV #UNKMSG,R0 + 387 142220 004767 140154' JSR PC,PRINT + 388 142224 000207 RTS PC + 389 + 390 174400 RLCS=174400 + 391 BOOTRL: ; 142326 + 392 142226 000005 RESET + 393 142230 000303 SWAB R3 ; UNIT NUMBER + 394 142232 012701 174400 MOV #RLCS,R1 ; CSR + 395 142236 012761 000013 000004 MOV #13,4(R1) ; CLR ERR + 396 142244 052703 000004 BIS #4,R3 ; UNIT+GSTAT + 397 142250 010311 MOV R3,(R1) ; ISSUE CMD + 398 142252 105711 TSTB (R1) ; WAIT + 399 142254 100376 BPL .-2 + 400 142256 105003 CLRB R3 + 401 142260 052703 000010 BIS #10,R3 ; UNIT+RDHDR + 402 142264 010311 MOV R3,(R1) ; ISSUE CMD + 403 142266 105711 TSTB (R1) ; WAIT + 404 142270 100376 BPL .-2 + 405 142272 016102 000006 MOV 6(R1),R2 ; GET HDR + 406 142276 042702 000077 BIC #77,R2 ; CLR SECTOR + 407 142302 005202 INC R2 ; MAGIC BIT + 408 142304 010261 000004 MOV R2,4(R1) ; SEEK TO 0 + 409 142310 105003 CLRB R3 + 410 142312 052703 000006 BIS #6,R3 ; UNIT+SEEK + 411 142316 010311 MOV R3,(R1) ; ISSUE CMD + 412 142320 105711 TSTB (R1) ; WAIT + 413 142322 100376 BPL .-2 + 414 142324 005061 000002 CLR 2(R1) ; CLR BA + 415 142330 005061 000004 CLR 4(R1) ; CLR DA + 416 142334 012761 177000 000006 MOV #-512.,6(R1) ; SET WC + 417 142342 105003 CLRB R3 + 418 142344 052703 000014 BIS #14,R3 ; UNIT+READ + 419 142350 010311 MOV R3,(R1) ; ISSUE CMD + 420 142352 105711 TSTB (R1) ; WAIT + 421 142354 100376 BPL .-2 + 422 142356 042711 000377 BIC #377,(R1) + 423 142362 005002 CLR R2 + 424 142364 005003 CLR R3 + 425 142366 005004 CLR R4 + 426 142370 005005 CLR R5 + 427 142372 005007 CLR PC + 428 + 429 177412 RKDA=177412 + 430 000005 READGO=5 + 431 BOOTRK: + 432 142374 000005 RESET ; 142402 + 433 142376 000303 SWAB R3 ; UNIT NUMBER 434 142400 006303 ASL R3 435 142402 006303 ASL R3 436 142404 006303 ASL R3 - 437 142406 012701 177412 MOV #RKDA,R1 ; CSR - 438 142412 010311 MOV R3,(R1) ; LOAD DA - 439 142414 005041 CLR -(R1) ; CLEAR BA - 440 142416 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC - 441 142422 012741 000005 MOV #READGO,-(R1) ; READ & GO - 442 142426 005002 CLR R2 - 443 142430 005003 CLR R3 - 444 142432 005004 CLR R4 - 445 142434 005005 CLR R5 - 446 142436 105711 TSTB (R1) - 447 142440 100376 BPL .-2 - 448 142442 105011 CLRB (R1) - 449 142444 005007 CLR PC - 450 - 451 176700 RPCSR=0176700 - 452 BOOTRP: ; 142460 - 453 142446 000005 RESET - 454 142450 012701 176700 MOV #RPCSR, R1 - 455 142454 012761 000040 000010 MOV #0000040, 10(R1) ; RESET - 456 142462 010361 000010 MOV R3, 10(R1) ; SET UNIT - 457 142466 012711 000021 MOV #0000021, (R1) ; PACK ACK - 458 142472 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE - 459 142500 012761 177000 000002 MOV #-512., 2(R1) ; SET WC - 460 142506 005061 000004 CLR 4(R1) ; CLR BA - 461 142512 005061 000006 CLR 6(R1) ; CLR DA - 462 142516 005061 000034 CLR 34(R1) ; CLR CYL - 463 142522 012711 000071 MOV #0000071, (R1) ; READ - 464 142526 105711 TSTB (R1) ; WAIT - 465 142530 100376 BPL .-2 - 466 142532 105011 CLRB (R1) - 467 142534 010300 MOV R3,R0 - 468 142536 005007 CLR PC - 469 - 470 .END START - 470 + 437 142406 006303 ASL R3 + 438 142410 006303 ASL R3 + 439 142412 012701 177412 MOV #RKDA,R1 ; CSR + 440 142416 010311 MOV R3,(R1) ; LOAD DA + 441 142420 005041 CLR -(R1) ; CLEAR BA + 442 142422 012741 177000 MOV #-256.*2,-(R1) ; LOAD WC + 443 142426 012741 000005 MOV #READGO,-(R1) ; READ & GO + 444 142432 005002 CLR R2 + 445 142434 005003 CLR R3 + 446 142436 005004 CLR R4 + 447 142440 005005 CLR R5 + 448 142442 105711 TSTB (R1) + 449 142444 100376 BPL .-2 + 450 142446 105011 CLRB (R1) + 451 142450 005007 CLR PC + 452 + 453 176700 RPCSR=0176700 + 454 BOOTRP: ; 142460 + 455 142452 000005 RESET + 456 142454 012701 176700 MOV #RPCSR, R1 + 457 142460 012761 000040 000010 MOV #0000040, 10(R1) ; RESET + 458 142466 010361 000010 MOV R3, 10(R1) ; SET UNIT + 459 142472 012711 000021 MOV #0000021, (R1) ; PACK ACK + 460 142476 012761 010000 000032 MOV #0010000, 32(R1) ; 16B MODE + 461 142504 012761 177000 000002 MOV #-512., 2(R1) ; SET WC + 462 142512 005061 000004 CLR 4(R1) ; CLR BA + 463 142516 005061 000006 CLR 6(R1) ; CLR DA + 464 142522 005061 000034 CLR 34(R1) ; CLR CYL + 465 142526 012711 000071 MOV #0000071, (R1) ; READ + 466 142532 105711 TSTB (R1) ; WAIT + 467 142534 100376 BPL .-2 + 468 142536 105011 CLRB (R1) + 469 142540 010300 MOV R3,R0 + 470 142542 005007 CLR PC + 471 + 472 .END START + 472 diff --git a/apps/pdp11/boot/monitor/PDPJSMON.mac b/apps/pdp11/boot/monitor/PDPJSMON.mac index 22a1da5f1..4aa1e2456 100644 --- a/apps/pdp11/boot/monitor/PDPJSMON.mac +++ b/apps/pdp11/boot/monitor/PDPJSMON.mac @@ -4,6 +4,7 @@ ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? PSW = 177776 +CNSW = 177570 DL11XCSR = 177564 DL11VEC = 64 @@ -28,7 +29,8 @@ START: RESET ; 140000 MOV SP,R0 JSR PC,INPUT CLR R0 -1$: WAIT +1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 + WAIT INC R0 TST LGHTON BEQ 1$ diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index a4983b42f..eb8d34ad5 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -26,6 +26,7 @@ The **PDPJSMON.mac** source code is shown below. ; WANT PERFORMANCE COUNTER - CLOCK TICKS TO DO SOMETHING? PSW = 177776 + CNSW = 177570 DL11XCSR = 177564 DL11VEC = 64 @@ -50,7 +51,8 @@ The **PDPJSMON.mac** source code is shown below. MOV SP,R0 JSR PC,INPUT CLR R0 - 1$: WAIT + 1$: MOV R0,@#CNSW ; UPDATE THE FRONT PANEL DATA DISPLAY WITH R0 + WAIT INC R0 TST LGHTON BEQ 1$ diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index dcac05d60..846aab7b4 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -9,7 +9,7 @@ - + diff --git a/devices/pdp11/panel/1170/debugger/front.xml b/devices/pdp11/panel/1170/debugger/front.xml index 2908d39e2..205904fa4 100644 --- a/devices/pdp11/panel/1170/debugger/front.xml +++ b/devices/pdp11/panel/1170/debugger/front.xml @@ -2,105 +2,133 @@ Control Panel - - - - + + 16 + 18 + 22 + + + + + + KRNL + SUPR + USER + + + + + + ADDRESS - + . - + . - + . - + . - + . - + . - + . - - - - + + LED1 + LED2 + LED3 + + + + + + LED4 + LED5 + LED6 + + + + + + DATA - + . - + . - + . - + . - + . - - START + + STRT STEP - ENABLE + E/H - + CONT DEP EXAM @@ -108,13 +136,13 @@ - + LOAD TEST - + 0 1 2 @@ -122,7 +150,7 @@ - + 3 4 5 @@ -130,7 +158,7 @@ - + 6 7 8 @@ -138,7 +166,7 @@ - + 9 10 11 @@ -146,7 +174,7 @@ - + 12 13 14 @@ -154,7 +182,7 @@ - + 15 16 17 @@ -162,7 +190,7 @@ - + 18 19 20 @@ -170,7 +198,7 @@ - + 21 diff --git a/devices/pdp11/panel/1170/front.xml b/devices/pdp11/panel/1170/front.xml index 616ae5d1d..5aad69e5e 100644 --- a/devices/pdp11/panel/1170/front.xml +++ b/devices/pdp11/panel/1170/front.xml @@ -2,97 +2,125 @@ Control Panel - - - - + + 16 + 18 + 22 + + + + + + KRNL + SUPR + USER + + + + + + ADDRESS - + . - + . - + . - + . - + . - + . - + . - - - - + + LED1 + LED2 + LED3 + + + + + + LED4 + LED5 + LED6 + + + + + + DATA - + . - + . - + . - + . - + . - + START STEP ENABLE @@ -100,7 +128,7 @@ - + CONT DEP EXAM @@ -108,13 +136,13 @@ - + LOAD TEST - + 0 1 2 @@ -122,7 +150,7 @@ - + 3 4 5 @@ -130,7 +158,7 @@ - + 6 7 8 @@ -138,7 +166,7 @@ - + 9 10 11 @@ -146,7 +174,7 @@ - + 12 13 14 @@ -154,7 +182,7 @@ - + 15 16 17 @@ -162,7 +190,7 @@ - + 18 19 20 @@ -170,7 +198,7 @@ - + 21 diff --git a/docs/pcx86/examples/components.css b/docs/pcx86/examples/components.css index 11db5cd24..b40fd1375 100644 --- a/docs/pcx86/examples/components.css +++ b/docs/pcx86/examples/components.css @@ -124,9 +124,14 @@ color: #ffffff; background-color: #404040; } -.pcjs-tripled { +.pcjs-triplet { padding: 1px; } +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} .pcjs-ledlbl0 { text-align: right; font-size: 50%; @@ -142,6 +147,8 @@ font-size: x-small; line-height: 32px; background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; } .pcjs-led { float: left; @@ -168,8 +175,10 @@ .pcjs-swlbl { text-align: center; font-size: 40%; - line-height: 32px; + line-height: 16px; background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; } .pcjs-swpad { height: 32px; diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index feb47dcc3..db6e78d7f 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -117,14 +117,16 @@ function BusPDP11(parmsBus, cpu, dbg) * Memory access handlers must service the entire block; see the setAccess() function in the Memory * component for details. * - * Finally, for debugging purposes, if an I/O address has a symbolic name, it will be saved here: + * Finally, for debugging purposes, if an I/O address has a symbolic name and message category, + * they will be saved here: * * [4]: symbolic name of I/O address + * [5]: message category * * UPDATE: The Debugger wants to piggy-back on these arrays to indicate addresses for which it wants * notification. In those cases, the following additional element will be set: * - * [5]: true to break on I/O, false to ignore I/O + * [6]: true to break on I/O, false to ignore I/O * * The false case is important if fIOBreakAll is set, because it allows the Debugger to selectively * ignore specific addresses. @@ -183,7 +185,9 @@ BusPDP11.IOHANDLER = { WRITE_BYTE: 1, READ_WORD: 2, WRITE_WORD: 3, - NAME: 4 + NAME: 4, + MSG_CATEGORY: 5, + DBG_BREAK: 6 }; /* @@ -257,14 +261,14 @@ BusPDP11.IOController = { } } if (b >= 0) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); } return b; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_BYTE); b = 0xff; - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } return b; @@ -331,13 +335,13 @@ BusPDP11.IOController = { } } if (fWrite) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_BYTE); - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); } }, @@ -363,14 +367,14 @@ BusPDP11.IOController = { } } if (w >= 0) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); } return w; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_WORD); w = 0xffff; - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } return w; @@ -400,13 +404,13 @@ BusPDP11.IOController = { } } if (fWrite) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_WORD); - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); } } @@ -1172,8 +1176,9 @@ BusPDP11.prototype.restoreMemory = function(a) * @param {function(number)|null|undefined} fnReadWord * @param {function(number,number)|null|undefined} fnWriteWord * @param {string} [sName] + * @param {number} [msgCategory] */ -BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName) +BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName, msgCategory) { for (var addr = start; addr <= end; addr += 2) { var off = addr & BusPDP11.IOPAGE_MASK; @@ -1181,21 +1186,22 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, Component.warning("I/O address already registered: " + str.toHexLong(addr)); continue; } - this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", false]; + this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", msgCategory, false]; if (MAXDEBUG) this.log("addIOHandlers(" + str.toHexLong(addr) + ")"); } }; /** - * addIOTable(component, table) + * addIOTable(component, table, msgCategory) * * Add I/O notification handlers from the specified table (a batch version of addIOHandlers). * * @this {BusPDP11} * @param {Component} component * @param {Object} table + * @param {number} [msgCategory] (default is BUS) */ -BusPDP11.prototype.addIOTable = function(component, table) +BusPDP11.prototype.addIOTable = function(component, table, msgCategory) { for (var port in table) { var addr = +port; @@ -1237,7 +1243,7 @@ BusPDP11.prototype.addIOTable = function(component, table) var sReg = afn[4]; for (var iReg = 0; iReg < nRegs; iReg++, addr += 2) { if (sReg && nRegs > 1) sReg = afn[4] + iReg; - this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sReg); + this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sReg, msgCategory || MessagesPDP11.BUS); } } }; @@ -1267,9 +1273,8 @@ BusPDP11.prototype.fault = function(addr, err, access) { this.fFault = true; if (!this.nDisableFaults) { - if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) { + if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.FAULT)) { this.dbg.printMessage("memory fault (" + access + ") on address " + this.dbg.toStrBase(addr), true, true); - this.dbg.stopInstruction(); } if (err) this.cpu.regErr |= err; this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index 5d484d360..c94e8886c 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -186,7 +186,6 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.cmp = cmp; this.bus = bus; this.dbg = dbg; - this.panel = cmp.panel; for (var i = 0; i < CPUPDP11.BUTTONS.length; i++) { var control = this.bindings[CPUPDP11.BUTTONS[i]]; @@ -283,6 +282,9 @@ CPUPDP11.prototype.powerUp = function(data, fRepower) * is now responsible for managing a component's fPowered flag, not us. * * this.flags.powered = true; + * + * And we don't have to worry whether this.cmp is set, because powerUp() handlers are never called + * before initBus() handlers. */ this.cmp.updateStatus(); return true; @@ -1077,7 +1079,7 @@ CPUPDP11.prototype.runCPU = function() nCycles = this.endBurst(true); /* - * Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU first started). + * Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU started). */ this.nCyclesThisRun += nCycles; this.nRunCycles += nCycles; @@ -1207,7 +1209,7 @@ CPUPDP11.prototype.yieldCPU = function() * odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not, * so I've added this call to try to keep things looking synchronized. */ - this.cmp.updateStatus(); + if (this.cmp) this.cmp.updateStatus(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index fb1e604e6..c5b2a0a1e 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1760,7 +1760,7 @@ PDP11.opWAIT = function(opCode) /* * Since here we're actually transitioning to WAIT, let's update the Panel's LEDs (well, OK, among other things). */ - this.cmp.updateStatus(); + if (this.cmp) this.cmp.updateStatus(); } this.opFlags |= PDP11.OPFLAG.WAIT; this.advancePC(-2); diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 38cc223e8..1cc7ca70d 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -310,7 +310,6 @@ CPUStatePDP11.prototype.setMMR0 = function(newMMR0) this.mmuEnable = mmuEnable; this.setMemoryAccess(); } - if (this.panel) this.panel.updateStatus(); } }; @@ -358,7 +357,6 @@ CPUStatePDP11.prototype.setMMR3 = function(newMMR3) this.regMMR3 = newMMR3; this.mmuMask = (newMMR3 & PDP11.MMR3.MMU_22BIT)? 0x3fffff : 0x3ffff; this.setMemoryAccess(); - if (this.panel) this.panel.updateStatus(); } }; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 799cb0fdb..cf73a1112 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -43,8 +43,8 @@ if (DEBUGGER) { var State = require("../../shared/lib/state"); var PDP11 = require("./defines"); var CPUPDP11 = require("./cpu"); - var MessagesPDP11 = require("./messages"); var MemoryPDP11 = require("./memory"); + var MessagesPDP11 = require("./messages"); } } @@ -1212,7 +1212,7 @@ if (DEBUGGER) { if (this.sMessagePrev && sMessage == this.sMessagePrev) return; this.sMessagePrev = sMessage; - if (this.bitsMessage & MessagesPDP11.HALT) { + if ((this.bitsMessage & MessagesPDP11.HALT) && this.cpu && this.cpu.isRunning()) { this.stopCPU(); sMessage += " (cpu halted)"; } @@ -1334,7 +1334,7 @@ if (DEBUGGER) { nCycles = this.cpu.getBurstCycles(nCycles); var nCyclesStep = this.cpu.stepCPU(nCycles); if (nCyclesStep > 0) { - this.cpu.updateTimers(nCycles); + this.cpu.updateTimers(nCyclesStep); this.nCycles += nCyclesStep; this.cpu.addCycles(nCyclesStep, true); this.cpu.updateChecksum(nCyclesStep); @@ -1358,7 +1358,13 @@ if (DEBUGGER) { * and then update our own state. Normally, the only time fUpdateStatus will be false is when doTrace() * is calling us in a loop, in which case it will perform its own updateStatus() when it's done. */ - if (fUpdateStatus !== false) this.cmp.updateStatus(); + if (fUpdateStatus !== false) { + /* + * Make an effort to keep any Front Panel in sync with us. + */ + if (this.cmp.panel && this.cmp.panel.stop) this.cmp.panel.stop(); + this.cmp.updateStatus(); + } this.updateStatus(fRegs || false); return (this.nCycles > 0); @@ -3660,6 +3666,7 @@ if (DEBUGGER) { * with displayLiveRegs enabled, so once the repeat count has been exhausted, we must * perform a final updateStatus(). */ + if (dbg.cmp.panel && dbg.cmp.panel.stop) dbg.cmp.panel.stop(); dbg.cmp.updateStatus(); dbg.setBusy(false); } diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 4282183f0..550782b80 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -590,7 +590,6 @@ MemoryPDP11.prototype = { readNone: function readNone(off, addr) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY) /* && !off */) { this.dbg.printMessage("attempt to read invalid address " + this.dbg.toStrBase(addr), true); - this.dbg.stopInstruction(); } this.bus.fault(addr, PDP11.CPUERR.NOMEMORY, PDP11.ACCESS.READ); return 0xff; @@ -606,7 +605,6 @@ MemoryPDP11.prototype = { writeNone: function writeNone(off, v, addr) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.MEMORY) /* && !off */) { this.dbg.printMessage("attempt to write " + this.dbg.toStrBase(v) + " to invalid addresses " + this.dbg.toStrBase(addr), true); - this.dbg.stopInstruction(); } this.bus.fault(addr, PDP11.CPUERR.NOMEMORY, PDP11.ACCESS.WRITE); }, diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index da6ef0375..cde75534d 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -35,6 +35,7 @@ var MessagesPDP11 = { CPU: 0x00000001, TRAP: 0x00000010, + FAULT: 0x00000020, BUS: 0x00000040, MEMORY: 0x00000080, DEVICE: 0x00000100, @@ -67,6 +68,7 @@ var MessagesPDP11 = { MessagesPDP11.CATEGORIES = { "cpu": MessagesPDP11.CPU, "trap": MessagesPDP11.TRAP, + "fault": MessagesPDP11.FAULT, "bus": MessagesPDP11.BUS, "memory": MessagesPDP11.MEMORY, "device": MessagesPDP11.DEVICE, diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 09feb0a64..92aa6ba57 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -71,7 +71,7 @@ function PanelPDP11(parmsPanel) * * regAddr is an internal register containing the contents of the Front Panel's ADDRESS display, * and regData corresponds to the DATA display. They are updated by setAddr() and setData(), - * which in turn take care of calling updateLEDArray(). + * which in turn take care of calling setLEDArray(). */ this.regCNSW = 0; this.regAddr = this.regData = 0; @@ -82,28 +82,28 @@ function PanelPDP11(parmsPanel) * * 0 if off, 1 if on * - * initBus() will call updateLEDs() to ensure that every LED is set to its initial value. + * initBus() will call displayLEDs() to ensure that every LED is set to its initial value. */ this.leds = {}; /* * Every switch has an array associated with it: * - * [0]: initial/current value of switch (0 if down, 1 if up) + * [0]: initial/current value of switch (0 if "down", 1 if "up") * [1]: true if the switch is momentary, false if not - * [2]: true if the switch is currently being pressed, false if not + * [2]: true if the switch is currently pressed, false if released * [3]: optional handler to call whenever the switch is pressed or released * [4]: optional switch index (used with CNSW switches 'S0' through 'S21') * - * initBus() will call updateSwitches() to ensure that every switch is the position represented below. + * initBus() will call displaySwitches() to ensure that every switch is the position represented below. * * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a lamp test - * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the address register from the switch + * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the ADDRESS register from the SWITCH * register when it is momentarily pressed "down". * - * This means that processLampTest(value) must act when value == 1, whereas processLoadAddr(value) must - * act when value == 0. You can infer all this from the table below, because the initial value of any - * momentary switch is its "passive" value, so the opposite is its "active" value. + * This means that processLampTest(value) must act when value == 1 ("up"), whereas processLoadAddr(value) + * must act when value == 0 ("down"). You can infer all this from the table below, because the initial value + * of any momentary switch is its "inactive" value, so the opposite is its "active" value. */ this.switches = { 'START': [1, true, false, this.processStart], @@ -127,9 +127,9 @@ Component.subclass(PanelPDP11); * * this.getSwitch(PanelPDP11.SWITCH.ENABLE) * - * However, I haven't filled out this table, primarily because the only switches we need to query - * are the non-momentary ones (eg, ENABLE and STEP), and EXAM and DEP (because they have special - * "step" behavior when pressed more than once in a row). + * I haven't filled out this table, primarily it only needs to list switches we actually query + * (eg, non-momentary ones like 'ENABLE' and 'STEP', and 'EXAM' and 'DEP' since they have special + * "step" behavior when pressed more than once in a row). Ditto for the LED table. */ PanelPDP11.SWITCH = { DEP: 'DEP', @@ -138,6 +138,12 @@ PanelPDP11.SWITCH = { STEP: 'STEP' }; +PanelPDP11.LED = { + B16: 'B16', + B18: 'B18', + B22: 'B22' +}; + /** * getSwitch(name) * @@ -275,8 +281,8 @@ PanelPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) bus.addIOTable(this, PanelPDP11.UNIBUS_IOTABLE); bus.addResetHandler(this.reset.bind(this)); - this.updateLEDs(); - this.updateSwitches(); + this.displayLEDs(); + this.displaySwitches(); }; /** @@ -301,7 +307,11 @@ PanelPDP11.prototype.powerUp = function(data, fRepower) * currently unnecessary, since we've added reset() to the addResetHandler() list. * * this.reset(); + * + * In the meantime, simulate a call to our stop() handler, to update the panel's ADDRESS register + * with the new PC. */ + this.stop(); } return true; }; @@ -320,7 +330,66 @@ PanelPDP11.prototype.powerDown = function(fSave, fShutdown) }; /** - * updateValue(sLabel, nValue, cch) + * displayLED(sBinding, value) + * + * @this {PanelPDP11} + * @param {string} sBinding + * @param {boolean|number} value (true or non-zero if the LED should be on, false or zero if off) + */ +PanelPDP11.prototype.displayLED = function(sBinding, value) +{ + var control = this.bindings[sBinding]; + if (control) { + /* + * TODO: Add support for user-definable LED colors? + */ + control.style.backgroundColor = (value? "#ff0000" : "#000000"); + } +}; + +/** + * displayLEDs(override) + * + * @this {PanelPDP11} + * @param {boolean|number|null} [override] (true turn on all LEDs, false to turn off all LEDs, null or undefined for normal LED activity) + */ +PanelPDP11.prototype.displayLEDs = function(override) +{ + for (var sBinding in this.leds) { + this.displayLED(sBinding, override != null? override : this.leds[sBinding]); + } +}; + +/** + * displaySwitch(sBinding, value) + * + * @this {PanelPDP11} + * @param {string} sBinding + * @param {boolean|number} value (true if the switch should be "up" (on), false if "down" (off)) + */ +PanelPDP11.prototype.displaySwitch = function(sBinding, value) +{ + var control = this.bindings[sBinding]; + if (control) { + control.style.marginTop = (value? "0px" : "20px"); + control.style.backgroundColor = (value? "#00ff00" : "#228B22"); + } +}; + +/** + * displaySwitches() + * + * @this {PanelPDP11} + */ +PanelPDP11.prototype.displaySwitches = function() +{ + for (var sBinding in this.switches) { + this.displaySwitch(sBinding, this.switches[sBinding][0]); + } +}; + +/** + * displayValue(sLabel, nValue, cch) * * This is principally for displaying register values, but in reality, it can be used to display any * numeric value bound to the given label. @@ -330,7 +399,7 @@ PanelPDP11.prototype.powerDown = function(fSave, fShutdown) * @param {number} nValue * @param {number} [cch] */ -PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) +PanelPDP11.prototype.displayValue = function(sLabel, nValue, cch) { if (this.bindings[sLabel]) { if (nValue === undefined) { @@ -354,69 +423,6 @@ PanelPDP11.prototype.updateValue = function(sLabel, nValue, cch) } }; -/** - * setLED(sBinding, value) - * - * @this {PanelPDP11} - * @param {string} sBinding - * @param {boolean|number} value (true if the LED should be on, false if off) - */ -PanelPDP11.prototype.setLED = function(sBinding, value) -{ - var control = this.bindings[sBinding]; - if (control) { - /* - * TODO: Add support for user-definable LED colors? - */ - control.style.backgroundColor = (value? "#ff0000" : "#000000"); - } -}; - -/** - * updateLEDs(override) - * - * @this {PanelPDP11} - * @param {boolean|number|null} [override] (true turn on all LEDs, false to turn off all LEDs, null or undefined for normal LED activity) - */ -PanelPDP11.prototype.updateLEDs = function(override) -{ - for (var sBinding in this.leds) { - this.setLED(sBinding, override != null? override : this.leds[sBinding]); - } -}; - -/** - * updateLEDArray(sPrefix, data, nLEDs) - * - * @this {PanelPDP11} - * @param {string} sPrefix - * @param {number} data - * @param {number} nLEDs - */ -PanelPDP11.prototype.updateLEDArray = function(sPrefix, data, nLEDs) -{ - for (var i = 0; i < nLEDs; i++) { - var sBinding = sPrefix + i; - this.setLED(sBinding, data & (1 << i)); - } -}; - -/** - * setSwitch(sBinding, value) - * - * @this {PanelPDP11} - * @param {string} sBinding - * @param {boolean|number} value (true if the switch should be "up" (on), false if "down" (off)) - */ -PanelPDP11.prototype.setSwitch = function(sBinding, value) -{ - var control = this.bindings[sBinding]; - if (control) { - control.style.marginTop = (value? "0px" : "20px"); - control.style.backgroundColor = (value? "#00ff00" : "#228B22"); - } -}; - /** * pressSwitch(sBinding) * @@ -426,9 +432,22 @@ PanelPDP11.prototype.setSwitch = function(sBinding, value) PanelPDP11.prototype.pressSwitch = function(sBinding) { var sw = this.switches[sBinding]; - this.setSwitch(sBinding, sw[0] = 1 - sw[0]); + + /* + * Set the new switch value in sw[0] and then immediately display it + */ + this.displaySwitch(sBinding, (sw[0] = 1 - sw[0])); + + /* + * Mark the switch as "pressed" + */ sw[2] = true; + + /* + * Call the appropriate process handler with the current switch value (sw[0]) + */ if (sw[3]) sw[3].call(this, sw[0], sw[4]); + this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); }; @@ -448,13 +467,23 @@ PanelPDP11.prototype.releaseSwitch = function(sBinding) * we receive EITHER of those events AND the switch is marked momentary (sw[1]) AND the switch is pressed (sw[2]), * then we must flip the switch back to its original value. * - * Otherwise, the only thing we have to do is mark the switch as no longer "pressed" (ie, set sw[2] to false). + * Otherwise, the only thing we have to do is mark the switch as "released" (ie, set sw[2] to false). */ var sw = this.switches[sBinding]; if (sw[1] && sw[2]) { - this.setSwitch(sBinding, sw[0] = 1 - sw[0]); + /* + * Set the new switch value in sw[0] and then immediately display it + */ + this.displaySwitch(sBinding, (sw[0] = 1 - sw[0])); + + /* + * Call the appropriate process handler with the current switch value (sw[0]) + */ if (sw[3]) sw[3].call(this, sw[0], sw[4]); } + /* + * Mark the switch as "released" + */ sw[2] = false; }; @@ -499,6 +528,10 @@ PanelPDP11.prototype.processStart = function(value, index) */ PanelPDP11.prototype.processStep = function(value, index) { + /* + * There's really nothing for us to do here, because the normal press and release handlers + * already record the state of this switch, so it can be queried as needed, using getSwitch(). + */ }; /** @@ -532,20 +565,60 @@ PanelPDP11.prototype.processEnable = function(value, index) PanelPDP11.prototype.processContinue = function(value, index) { if (!value && !this.cpu.isRunning()) { + /* + * TODO: Technically, we're also supposed to check the 'STEP' switch to determine if we should + * step one instruction or just one cycle, but we don't currently have the ability to do the latter. + */ if (!this.getSwitch(PanelPDP11.SWITCH.ENABLE)) { /* - * TODO: Technically, we're also supposed to check the 'STEP' switch to determine if we should - * step one instruction or just one cycle, but we don't currently have the ability to do the latter. + * Using the Debugger's stepCPU() function is more convenient, and has the pleasant side-effect + * of updating the debugger's display; however, not all machines with a Front Panel will necessarily + * also have the Debugger loaded. */ var dbg = this.dbg; if (dbg && !dbg.isBusy(true)) { dbg.setBusy(true); dbg.stepCPU(0); dbg.setBusy(false); - } else { - this.cpu.stepCPU(1); - this.updateStatus(); } + else { + /* + * For this tiny single-instruction burst, mimic what runCPU() does. + */ + try { + var nCyclesStep = this.cpu.stepCPU(1); + if (nCyclesStep > 0) { + this.cpu.updateTimers(nCyclesStep); + this.cpu.addCycles(nCyclesStep, true); + this.cpu.updateChecksum(nCyclesStep); + } + } + catch(exception) { + /* + * We assume that any numeric exception was explicitly thrown by the CPU to interrupt the + * current instruction. For all other exceptions, we attempt a stack dump. + */ + if (typeof exception != "number") { + var e = exception; + this.cpu.setError(e.stack || e.message); + } + } + } + + /* + * Simulate a call to our stop() handler, to update the panel's ADDRESS register with the new PC. + */ + this.stop(); + + /* + * Going through the normal channels (ie, the Computer's updateStatus() interface) ensures that ALL + * updateStatus() handlers will be called, including ours. + * + * NOTE: If we used the Debugger's stepCPU() function, then that includes a call to updateStatus(); + * unfortunately, it will have happened BEFORE we called stop() to update the ADDRESS register, so we + * still need to call it again. + */ + if (this.cmp) this.cmp.updateStatus(); } else { this.cpu.startCPU(); @@ -610,7 +683,7 @@ PanelPDP11.prototype.processLoadAddr = function(value, index) */ PanelPDP11.prototype.processLampTest = function(value, index) { - this.updateLEDs(value || null); + this.displayLEDs(value || null); }; /** @@ -639,7 +712,7 @@ PanelPDP11.prototype.processSwitchReg = function(value, index) PanelPDP11.prototype.setAddr = function(value) { this.regAddr = value & this.bus.nBusMask; - this.updateLEDArray("A", this.regAddr, 22); + this.setLEDArray("A", this.regAddr, 22); return this.regAddr; }; @@ -653,13 +726,64 @@ PanelPDP11.prototype.setAddr = function(value) PanelPDP11.prototype.setData = function(value) { this.regData = value & 0xffff; - this.updateLEDArray("D", this.regData, 16); + this.setLEDArray("D", this.regData, 16); return this.regData; }; +/** + * setLED(sBinding, value) + * + * @this {PanelPDP11} + * @param {string} sBinding + * @param {number} value + * @return {number} + */ +PanelPDP11.prototype.setLED = function(sBinding, value) +{ + this.leds[sBinding] = value; + if (!this.fLampTest) this.displayLED(sBinding, value); + return value; +}; + +/** + * setLEDArray(sPrefix, data, nLEDs) + * + * @this {PanelPDP11} + * @param {string} sPrefix + * @param {number} data + * @param {number} nLEDs + */ +PanelPDP11.prototype.setLEDArray = function(sPrefix, data, nLEDs) +{ + for (var i = 0; i < nLEDs; i++) { + var sBinding = sPrefix + i; + this.setLED(sBinding, data & (1 << i)); + } +}; + +/** + * stop(ms, nCycles) + * + * This is a notification handler, called by the Computer, to inform us the CPU has now stopped. + * + * @this {PanelPDP11} + * @param {number} [ms] + * @param {number} [nCycles] + */ +PanelPDP11.prototype.stop = function(ms, nCycles) +{ + this.setAddr(this.cpu.regsGen[7]); + /* + * TODO: Consider an option to call setData() with the current opcode as well; presumably that wouldn't be + * normal Front Panel behavior, but it could be useful for debugging. + */ +}; + /** * updateStatus(fForce) * + * Called by the Computer component at appropriate intervals to update any register displays, LEDs, etc. + * * @this {PanelPDP11} * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) */ @@ -668,39 +792,27 @@ PanelPDP11.prototype.updateStatus = function(fForce) if (this.cLiveRegs) { if (fForce || !this.cpu.isRunning() || this.fDisplayLiveRegs) { for (var i = 0; i < this.cpu.regsGen.length; i++) { - this.updateValue('R'+i, this.cpu.regsGen[i]); + this.displayValue('R'+i, this.cpu.regsGen[i]); } var regPSW = this.cpu.getPSW(); - this.updateValue("PS", regPSW); - this.updateValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); - this.updateValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); - this.updateValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); - this.updateValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); - if (!this.fLampTest) { - this.setData(this.cpu.regsGen[0]); - this.setAddr(this.cpu.regsGen[7]); - /* - * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) - */ - var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; - // this.misc = (this.misc & ~7) | bit; - } + this.displayValue("PS", regPSW); + this.displayValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); + this.displayValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); + this.displayValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); + this.displayValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); + this.setLEDArray("D", this.regData, 16); + this.setLEDArray("A", this.regAddr, 22); + /* + * Set bit to 1 (22-bit), 2 (18-bit), or 4 (16-bit) + */ + var bit = this.cpu.mmuEnable? ((this.cpu.regMMR3 & PDP11.MMR3.MMU_22BIT)? 1 : 2) : 4; + this.setLED(PanelPDP11.LED.B22, bit & 1); + this.setLED(PanelPDP11.LED.B18, bit & 2); + this.setLED(PanelPDP11.LED.B16, bit & 4); } } }; -/** - * updateSwitches() - * - * @this {PanelPDP11} - */ -PanelPDP11.prototype.updateSwitches = function() -{ - for (var sBinding in this.switches) { - this.setSwitch(sBinding, this.switches[sBinding][0]); - } -}; - /** * readCNSW(addr) * diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index cd5c9db5e..108924e4b 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -55,16 +55,16 @@ function RL11(parms) Component.call(this, "RL11", parms, RL11, MessagesPDP11.DISK); /* - * We record any 'autoMount' object now, but we no longer parse it until initBus(), because the - * Computer's getMachineParm() service may have an override for us. + * We record any 'autoMount' object now, but we no longer parse it until initBus(), + * because the Computer's getMachineParm() service may have an override for us. */ this.configMount = parms['autoMount'] || null; this.cAutoMount = 0; /* - * TODO: Make this configurable + * The RL11 has two Drive Select bits, representing up to four drives. */ - this.nDrives = 1; + this.nDrives = 4; this.aDrives = new Array(this.nDrives); this.fLocalDisks = (!web.isMobile() && window && 'FileReader' in window); @@ -282,7 +282,7 @@ RL11.prototype.initBus = function(cmp, bus, cpu, dbg) this.triggerInterrupt = this.cpu.addTrigger(PDP11.RL11.VEC, PDP11.RL11.PRI); - bus.addIOTable(this, RL11.UNIBUS_IOTABLE); + bus.addIOTable(this, RL11.UNIBUS_IOTABLE, MessagesPDP11.DISK); this.addDisk("None", RL11.SOURCE.NONE, true); if (this.fLocalDisks) this.addDisk("Local Disk", RL11.SOURCE.LOCAL); diff --git a/modules/shared/templates/components.css b/modules/shared/templates/components.css index 21f04854f..440d2b8b7 100644 --- a/modules/shared/templates/components.css +++ b/modules/shared/templates/components.css @@ -129,9 +129,14 @@ color: #ffffff; background-color: #404040; } -.pcjs-tripled { +.pcjs-triplet { padding: 1px; } +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} .pcjs-ledlbl0 { text-align: right; font-size: 50%; @@ -147,6 +152,8 @@ font-size: x-small; line-height: 32px; background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; } .pcjs-led { float: left; @@ -173,8 +180,10 @@ .pcjs-swlbl { text-align: center; font-size: 40%; - line-height: 32px; + line-height: 16px; background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; } .pcjs-swpad { height: 32px; diff --git a/versions/pc8080/1.30.2/components.css b/versions/pc8080/1.30.2/components.css index 11db5cd24..b40fd1375 100644 --- a/versions/pc8080/1.30.2/components.css +++ b/versions/pc8080/1.30.2/components.css @@ -124,9 +124,14 @@ color: #ffffff; background-color: #404040; } -.pcjs-tripled { +.pcjs-triplet { padding: 1px; } +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} .pcjs-ledlbl0 { text-align: right; font-size: 50%; @@ -142,6 +147,8 @@ font-size: x-small; line-height: 32px; background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; } .pcjs-led { float: left; @@ -168,8 +175,10 @@ .pcjs-swlbl { text-align: center; font-size: 40%; - line-height: 32px; + line-height: 16px; background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; } .pcjs-swpad { height: 32px; diff --git a/versions/pcx86/1.30.2/components.css b/versions/pcx86/1.30.2/components.css index 11db5cd24..b40fd1375 100644 --- a/versions/pcx86/1.30.2/components.css +++ b/versions/pcx86/1.30.2/components.css @@ -124,9 +124,14 @@ color: #ffffff; background-color: #404040; } -.pcjs-tripled { +.pcjs-triplet { padding: 1px; } +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} .pcjs-ledlbl0 { text-align: right; font-size: 50%; @@ -142,6 +147,8 @@ font-size: x-small; line-height: 32px; background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; } .pcjs-led { float: left; @@ -168,8 +175,10 @@ .pcjs-swlbl { text-align: center; font-size: 40%; - line-height: 32px; + line-height: 16px; background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; } .pcjs-swpad { height: 32px; diff --git a/versions/pdpjs/1.30.2/components.css b/versions/pdpjs/1.30.2/components.css index 11db5cd24..b40fd1375 100644 --- a/versions/pdpjs/1.30.2/components.css +++ b/versions/pdpjs/1.30.2/components.css @@ -124,9 +124,14 @@ color: #ffffff; background-color: #404040; } -.pcjs-tripled { +.pcjs-triplet { padding: 1px; } +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} .pcjs-ledlbl0 { text-align: right; font-size: 50%; @@ -142,6 +147,8 @@ font-size: x-small; line-height: 32px; background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; } .pcjs-led { float: left; @@ -168,8 +175,10 @@ .pcjs-swlbl { text-align: center; font-size: 40%; - line-height: 32px; + line-height: 16px; background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; } .pcjs-swpad { height: 32px; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index ce64b8d1a..2b68aaadb 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -31,287 +31,287 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} function Fa(a,b){var c,d={ea:null,ia:null,Ja:null,Ia:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ja=g.load;d.Ia=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.fb=this.id:(this.Na=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,Va:!1,Wb:!1,ja:!1,error:!1};this.Pb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.oc=b.comment;this.Rc=b;b=this.id.indexOf(".");0>b?this.ib=this.id:(this.Pa=this.id.substr(0,b),this.ib=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Xa:!1,Zb:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,!1,!1,this.bd,a]}z(yb);k=yb.prototype;k.reset=function(){this.L=this.L&-120|20}; -k.sa=function(a,b,c,d){if(this.C&&this.C.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.I[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.f[b];zb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.J="DEP"==b;a.K="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(zb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.i=d;Ab(b,this,Bb);Cb(b,this.reset.bind(this));Db(this);for(var e in this.f)zb(this,e,this.f[e][0])};k.Fa=function(a,b){b||Eb();return!0};k.Ea=function(){return!0}; -function Fb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.$||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))}function Gb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Db(a,b){for(var c in a.I)Gb(a,c,null!=b?b:a.I[c])}function zb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"} -k.$c=function(a){a||this.b.A.ca||(this.w.reset(),Ub(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.bb())};k.ad=function(){};k.Wc=function(a){a||this.b.ha()};k.Uc=function(a){a||this.b.A.ca||(this.f.ENABLE&&this.f.ENABLE[0]?this.b.bb():(a=this.i)&&!sb(a,!0)?(rb(a,!0),a.cb(0),rb(a,!1)):(this.b.cb(1),this.Z()))};k.Vc=function(a){a&&!this.b.A.ca&&(this.J&&Vb(this,this.g+2),this.w.Ib(this.g,Wb(this,this.v)))};k.Xc=function(a){a||this.b.A.ca||(this.K&&Vb(this,this.g+2),Wb(this,this.w.lb(this.g)))}; -k.Zc=function(a){a||this.b.A.ca||Vb(this,this.v)};k.Yc=function(a){Db(this,a||null)};k.bd=function(a,b){this.v=a?this.v|1<c;c++)Gb(a,"A"+c,b&1<c;c++)Gb(a,"D"+c,b&1<>2;this.w=this.ya-1;this.B=this.I/this.ya|0;this.Ua=[];this.f=0;this.g=!1;this.v=[];this.Gc=[ac,bc,cc,dc];a=new I(this);ec(a,this.i);this.X=Array(this.B);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ua[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,64)&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,3);c=255;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function bc(a,b,c){var d=!1,e=this.controller,f=e.Ua[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ua[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,64)&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,5),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function cc(a,b){var c=-1,d=this.controller;(a=d.Ua[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,64)&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;K(d,b,16,2);c=65535;this.i&&F(this.i,64)&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function dc(a,b,c){var d=!1,e=this.controller;if(a=e.Ua[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,64)&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(K(e,c,16,4),this.i&&F(this.i,64)&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function gc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Kb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Kb){n=l.size-(f-m);n>g&&(n=g);l.Kb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return lc(1,f,g)}f=new I(a,f,n,a.ya,d,e);ec(f,a.i,l);a.X[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Rb(a&this.w,a)};k.Qb=function(a){this.g=!1;this.f++;a=this.X[(a&this.Ra)>>>this.ka].bc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=nc(this.b,a));return this.X[(a&this.Ra)>>>this.ka].ra(a&this.w,a)};k.lb=function(a){var b=a&this.w,c=(a&this.Ra)>>>this.ka;this.g=!1;this.f++;a=this.X[c].cc(b,a);this.f--;return a};k.Sb=function(a,b){3932160<=a&&(a=nc(this.b,a));this.X[(a&this.Ra)>>>this.ka].Ub(a&this.w,b&255,a)};k.nb=function(a,b){this.g=!1;this.f++;this.X[(a&this.Ra)>>>this.ka].Vb(a&this.w,b&255,a);this.f--}; -k.ab=function(a,b){3932160<=a&&(a=nc(this.b,a));this.X[(a&this.Ra)>>>this.ka].Lb(a&this.w,b&65535,a)};k.Ib=function(a,b){var c=a&this.w,d=(a&this.Ra)>>>this.ka;this.g=!1;this.f++;this.X[d].gc(c,b&65535,a);this.f--};function oc(a){for(var b=0,c=[],d=0;da.b.rb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null,n=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var r=f[4],t=0;t>5&3;b.hb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.da!=c&&(b.da=c,wc(b));b.I&&b.I.Z()}};k.od=function(){var a=this.b.Ya;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.pd=function(){return this.b.Hb};k.qd=function(){return this.b.xb};k.he=function(a){var b=this.b;1170>b.rb&&(a&=-49);b.xb!=a&&(b.xb=a,b.qc=a&16?4194303:262143,wc(b),b.I&&b.I.Z())};k.Qd=function(a){a=a>>1&63;var b=this.b.Jb[a>>1];return a&1?b>>16:b&65535}; -k.He=function(a,b){b=b>>1&63;var c=b>>1;this.b.Jb[c]=b&1?this.b.Jb[c]&65535|(a&63)<<16:this.b.Jb[c]&-65536|a&65534};k.Jd=function(a){return this.b.V[1][a>>1&7]};k.Ae=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Hd=function(a){return this.b.V[1][(a>>1&7)+8]};k.ye=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Id=function(a){return this.b.xa[1][a>>1&7]};k.ze=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Gd=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.xe=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.kd=function(a){return this.b.V[0][a>>1&7]};k.de=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.hd=function(a){return this.b.V[0][(a>>1&7)+8]};k.be=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.jd=function(a){return this.b.xa[0][a>>1&7]};k.ce=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.gd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ae=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Pd=function(a){return this.b.V[3][a>>1&7]};k.Ge=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Nd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ee=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Od=function(a){return this.b.xa[3][a>>1&7]};k.Fe=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Md=function(a){return this.b.xa[3][(a>>1&7)+8]};k.De=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.vb=function(a){a&=7;return this.b.M&2048?this.b.Sa[a]:this.b.u[a]}; -k.yb=function(a,b){b&=7;this.b.M&2048?this.b.Sa[b]=a:this.b.u[b]=a};k.vd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.me=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.yd=function(){return this.b.u[7]};k.pe=function(a){this.b.u[7]=a};k.wb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Sa[a]};k.zb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Sa[b]=a};k.wd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; -k.ne=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.xd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.oe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.ed=function(a){return this.b.zc[a-65504>>1]};k.Zd=function(a,b){this.b.zc[b-65504>>1]=a};k.wc=function(a){return 65520==a?61183:0};k.Dc=function(){};k.Ld=function(){return 1};k.Ce=function(){};k.dd=function(){return this.b.ga};k.Yd=function(){this.b.ga=0};k.md=function(){return this.b.yc}; -k.fe=function(a,b){b&1||(a&=255);this.b.yc=a};k.rd=function(a){return a?this.b.ec:0};k.ie=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ec=a;b.H|=2};k.Kd=function(a){return a?this.b.Za&65280:0};k.Be=function(a){this.b.Za=a|255};k.ud=function(){return Xb(this.b)};k.le=function(a){xc(this.b,a&-1809|Xb(this.b)&1808);this.b.H|=128};k.Cc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var N={},M=(N[61568]=[null,null,L.prototype.Qd,L.prototype.He,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Jd,L.prototype.Ae,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Hd,L.prototype.ye,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Id,L.prototype.ze,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Gd,L.prototype.xe,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.kd,L.prototype.de,"KISDR",8,1145],N[62672]=[null,null,L.prototype.hd,L.prototype.be,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.jd, -L.prototype.ce,"KISAR",8,1145],N[62704]=[null,null,L.prototype.gd,L.prototype.ae,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.qd,L.prototype.he,"MMR3",1,1145],N[65382]=[null,null,L.prototype.ld,L.prototype.ee,"LKS"],N[65402]=[null,null,L.prototype.nd,L.prototype.ge,"MMR0",1,1145],N[65404]=[null,null,L.prototype.od,L.prototype.Cc,"MMR1",1,1145],N[65406]=[null,null,L.prototype.pd,L.prototype.Cc,"MMR2",1,1145],N[65408]=[null,null,L.prototype.Pd,L.prototype.Ge,"UISDR",8,1145],N[65424]=[null,null,L.prototype.Nd, -L.prototype.Ee,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.Od,L.prototype.Fe,"UISAR",8,1145],N[65456]=[null,null,L.prototype.Md,L.prototype.De,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.vb,L.prototype.yb,"R0SET0"],N[65473]=[null,null,L.prototype.vb,L.prototype.yb,"R1SET0"],N[65474]=[null,null,L.prototype.vb,L.prototype.yb,"R2SET0"],N[65475]=[null,null,L.prototype.vb,L.prototype.yb,"R3SET0"],N[65476]=[null,null,L.prototype.vb,L.prototype.yb,"R4SET0"],N[65477]=[null,null,L.prototype.vb,L.prototype.yb, -"R5SET0"],N[65478]=[null,null,L.prototype.vd,L.prototype.me,"R6KERNEL"],N[65479]=[null,null,L.prototype.yd,L.prototype.pe,"R7KERNEL"],N[65480]=[null,null,L.prototype.wb,L.prototype.zb,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.wb,L.prototype.zb,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.wb,L.prototype.zb,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.wb,L.prototype.zb,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.wb,L.prototype.zb,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.wb, -L.prototype.zb,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.wd,L.prototype.ne,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.xd,L.prototype.oe,"R6USER",1,1145],N[65504]=[null,null,L.prototype.ed,L.prototype.Zd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.wc,L.prototype.Dc,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.wc,L.prototype.Dc,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.Ld,L.prototype.Ce,"SYSID",1,1170],N[65526]=[null,null,L.prototype.dd,L.prototype.Yd,"CPUERR",1,1170],N[65528]= -[null,null,L.prototype.md,L.prototype.fe,"MB",1,1170],N[65530]=[null,null,L.prototype.rd,L.prototype.ie,"PIR"],N[65532]=[null,null,L.prototype.Kd,L.prototype.Be,"SL"],N[65534]=[null,null,L.prototype.ud,L.prototype.le,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,this.size>>2),Oc(this,Kc?Pc:Qc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&K(this.w,b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24> -a?c&65535:c&255|(this.b[b+1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},O:function(a,b){if(this.i&&null!=this.F){var c=this.i;Vc(c,this.F+a,1,c.L)&&c.ha(!0)}return this.bc(a,b)},Na:function(a,b){if(this.i&&null!=this.F){var c=this.i;Vc(c,this.F+a,2,c.L)&&c.ha(!0)}return this.cc(a, -b)},ma:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Vc(d,this.F+a,1,d.B)&&d.ha(!0)}this.f?this.v(a,b,c):this.Vb(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Vc(d,this.F+a,2,d.B)&&d.ha(!0)}this.f?this.v(a,b,c):this.gc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},W:function(a,b){a&1&&K(this.w,b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&K(this.w, -b,64,2);a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Pa=!0},ta:function(a,b,c){this.G[a]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&K(this.w,c,64,4);this.D.setUint16(a,b,!0);this.Pa=!0},fb:function(a,b,c){a&1&&K(this.w,c,64,4);this.J[a>>1]=b;this.Pa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+ -J(this.i,b)+")",!0)}};function ec(a,b,c){a.i=b;a.g=a.C=0;c&&((a.g=c.g)&&Uc(a,Tc,!1),(a.C=c.C)&&Sc(a,Tc,!1))}function Wc(a,b){b?--a.C||(a.Ub=a.f?a.v:a.Vb,a.Lb=a.f?a.I:a.gc):--a.g||(a.Rb=a.bc,a.ra=a.cc)}function Sc(a,b,c){c&&a.C||(a.Ub=!a.f&&b[1]||a.v,a.Lb=!a.f&&b[3]||a.I);if(c||void 0===c)a.Vb=b[1]||a.v,a.gc=b[3]||a.I}function Uc(a,b,c){c&&a.g||(a.Rb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.bc=b[0]||a.K,a.cc=b[2]||a.L}function Oc(a,b){b||(b=Xc);Uc(a,b,void 0);Sc(a,b,void 0)} -var Xc=[],Rc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ha],Tc=[I.prototype.O,I.prototype.ma,I.prototype.Na,I.prototype.Aa];if(wb)var Qc=[I.prototype.N,I.prototype.la,I.prototype.W,I.prototype.wa],Pc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.fb]; -function Yc(a,b){u.call(this,"CPU",a,Yc,1);var c=a.multiplier||1;this.ib=a.cycles||b;this.Xa=c;this.Bb=Math.round(this.ib/1E4)/100;this.mb=this.Bb*this.Xa;this.A.ca=!1;this.A.Tb=!1;this.A.pb=a.autoStart;this.A.qb=!1;this.Eb=this.va=0;this.Fb=a.csStart;this.sb=a.csInterval;this.tb=a.csStop;this.L=[];this.uc=this.Ud.bind(this);H(this)}z(Yc);var Zc=["power","reset"];k=Yc.prototype; -k.Da=function(a,b,c,d){this.C=a;this.w=b;this.i=d;this.I=a.I;for(b=0;b=a.va&&(a.va+=a.sb,c=!0);0<=a.tb&&a.tb<=ed(a)&&(a.sb=a.tb=-1,bd(a),a.ha(),c=!0);c&&a.j(ed(a)+" cycles: checksum="+p(a.Eb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.C)if(a=d.C,a.A.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.$/a.mb?b=1:d=!0;a.Xa=b;b=a.Bb*a.Xa;if(a.mb!=b){a.mb=b;b=a.mb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.C&&a.C.ob()}gd(a,a.W);a.W=0;a.S=Ba();a.la=0;hd(a);return d}function sc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function uc(a,b,c){0<=b&&ba.L[b][0]&&(c=a.ib*a.Xa/1E3*c|0,a.L[b][0]=c+id(a))} -function jd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function id(a,b){var c=a.ma-=a.b;a.b=a.K=0;b&&(a.ma=0);return c} -k.Ud=function(){if(this.A.ca){this.Cb>=this.ib&&hd(this,!0);this.Ha=0;this.eb=Ba();if(this.la){var a=this.eb-this.la;a>this.rc&&(this.S+=a,this.S>this.eb&&(this.S=this.eb))}try{do{var b=jd(this,this.A.qb?1:this.kb);try{this.cb(b)}catch(e){if("number"!=typeof e)throw e;}b=id(this,!0);this.Ha+=b;this.W+=b;dd(this,b);kd(this,b);this.wa-=b;if(0>=this.wa){this.wa+=this.kb;15<=++this.tc&&(this.C&&this.C.Z(),this.tc=0);break}}while(this.A.ca)}catch(e){this.ha();this.C&&this.C.stop(Ba(),ed(this));vb(this, -e.stack||e.message);return}if(this.A.ca){a=setTimeout;b=this.uc;this.la=Ba();var c=this.rc;this.Ha&&(c=Math.round(c*this.Ha/this.kb));var c=c-(this.la-this.eb),d=this.la-this.S;d&&(this.$=Math.round(this.W/(10*d))/100,864E5<=d&&(this.ta=0,fd(this)));if(0>c||this.$c&&(this.S-=c),c=0;this.Cb+=this.Ha;this.la+=c;a(b,c)}}}; -k.bb=function(a){if(ub(this))return!1;if(this.A.ca)return this.j(this.toString()+" busy"),!1;fd(this);this.A.ca=!0;this.A.Tb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.ob(!0),this.C.start(this.S,ed(this)));setTimeout(this.uc,0);return!0};k.cb=function(){return 0};k.ha=function(a){var b=!1;if(this.A.ca){id(this);gd(this,this.W);this.W=0;this.A.ca=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Ba(),ed(this));b=!0}this.A.complete=a;return b}; -function ld(a){this.rb=+a.model||1170;this.Ob=a.addrReset||0;Yc.call(this,a,6666667);this.decode=1120==this.rb?md.bind(this):nd.bind(this);od(this);this.N=0;this.O=null;this.A.complete=!1}z(ld,Yc);k=ld.prototype;k.reset=function(){this.status("model "+this.rb);this.A.ca&&this.ha();od(this);ad(this);this.A.error=!1;this.parent.reset.call(this)}; -function od(a){a.T=65536;a.U=32768;a.aa=65535;a.Y=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Sa=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.hb=0;a.Pc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Jb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.zc=[0,0,0,0,0,0,0,0];a.yc=0;a.H=0;a.D=a.J=0;a.g=a.f=a.Ab=0;a.Aa=-1;Ub(a)}function Ub(a){a.Za=255;a.ga=0;a.ec=0;a.B=0;a.Ya=0;a.Hb=0;a.xb=0;a.da=0;a.gb=0;a.qc=262143;a.O=null;a.w&&wc(a)}function wc(a){a.da?(a.R=65536,a.ba=a.Oc,a.ra=a.Rd,a.Lb=a.Ie,gc(a.w,a.xb&16?22:18)):(a.R=0,a.ba=a.Nc,a.ra=a.xc,a.Lb=a.Ec,gc(a.w,16))}function pd(a,b,c){a.Ob=b;P(a,b);!c&&a.i&&(a.ha()||a.i.Z())}k.nc=function(){return 0}; -k.save=function(){var a=new R(this);a.set(0,[]);a.set(1,[this.ta,this.Xa]);a.set(2,oc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ta=b[1];fd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.H|=2}function S(a,b){a.H&128||(a.Y=a.aa=b,a.U=0)}function vd(a,b,c){a.H&128||(a.Y=a.aa=a.T=b,a.U=c||0)}function wd(a,b,c,d){a.H&128||(a.Y=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function xd(a,b){a.H&128||(a.Y=a.aa=a.T=b,a.U=a.Y^a.T>>1)}function yd(a,b,c,d){a.H&128||(a.Y=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.N){var c=!1;0>this.Aa?this.Aa=Xb(this):this.v||(a=4,c=!0);this.B&57344||(this.Ya=63222,this.Hb=a);this.v=0;var d=this.ra(a|this.R),e=this.ra(a+2&65535|this.R);xc(this,e&-12289|this.Aa>>2&12288);c&&(this.ga|=4,this.u[6]=4);zd(this,this.Aa);zd(this,this.u[7]);P(this,d);this.H&=-113;this.Aa=-1;this.H|=8;this.Tc=a;this.Sc=b;if(26!=b)throw a;}}; -function Ad(a){var b=Bd(a),c=Bd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);P(a,b);xc(a,c);a.H&=-17}function nc(a,b){var c=b>>13&31;31>c&&a.xb&32&&(b=a.Jb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Td(a,b,c){var d,e,f,g=0;d=b>>13;a.xb&a.Pc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.qc;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.gb=a.v,a.hb=d;b=!1;g&&(g&57344&&(0<=a.Aa&&(g|=128),a.B&57344||(a.B=a.B|g|a.gb<<5|a.hb<<1),b=!0),a.B&61440||!(4191360> -f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(ud(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(ud(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.R)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.B&57344||(a.Ya=a.Ya<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.Za||65534<=a.u[6])&&(a.u[6]<=a.Za-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.H|=64));return e}k.Qb=function(a){if(!this.da)return this.w.Qb(a);this.N++;a=Ud(this,Td(this,a,3));this.N--;return a}; -k.lb=function(a){if(!this.da)return this.w.lb(a);this.N++;a=this.xc(Td(this,a,2));this.N--;return a};k.nb=function(a,b){this.da?(this.N++,Vd(this,Td(this,a,5),b),this.N--):this.w.nb(a,b)};k.Ib=function(a,b){this.da?(this.N++,this.Ec(Td(this,a,4),b),this.N--):this.w.Ib(a,b)};k.Nc=function(a,b,c){return Wd(this,a,b,c)};k.Oc=function(a,b,c){return Td(this,Wd(this,a,b,c),c)};k.xc=function(a){return this.w.oa(a)};k.Rd=function(a){return this.w.oa(Td(this,a,2))};k.Ec=function(a,b){this.w.ab(a,b&65535)}; -k.Ie=function(a,b){this.w.ab(Td(this,a,4),b)};function Xd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Wd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.R),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function Yd(a,b,c,d){a.B&57344||(a.Ya=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Wd(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Td(a,e|c&65536,4),a.v=a.M>>14&3,a.w.ab(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} -function Zd(a,b){b>>=6;var c=a.J=b&7;return(b=a.D=(b&56)>>3)?Ud(a,a.ba(b,c,3)):a.u[c]&255}function $d(a,b){b>>=6;var c=a.J=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ae(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Wd(a,b,c,8)}function be(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Ud(a,a.ba(b,c,3)):a.u[c]&255}function ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Ab=a.ba(b,e,7),Vd(a,e,d.call(a,c,Ud(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function U(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ab(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function de(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Vd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ab(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.cb=function(a){this.A.complete=!0;var b=this.i&&fe(this.i)?1:this.A.Tb?-1:0,c=a?this.A.Tb?0:1:-1;this.A.Tb=!1;this.ma=this.b=a;do{if(b){if(this.i&&ge(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.H){this.H&112&&(this.H&32?this.pa(168,28):this.H&64?this.pa(4,30):this.H&16&&this.pa(12,32),this.H&=-113);if(a=this.H&7){a=!1;if(this.H&2){this.H&=-3;var d=160,e=(this.ec&224)>>5,f=this.O&&this.O.ub>e?this.O:null;f&&(d=f.Wd,e=f.ub);e>(this.M&224)>>5?(this.H&4&&(ud(this,2),this.H&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.O,f==a)this.O=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.H&1&&this.H++;a=a&&0>c}if(a)break}this.H=this.H&7|this.M&16;this.decode(td(this))}while(0>1|b<<16;xd(this,a);return a&65535}function me(a,b){a=b&2048|b>>1|b<<8;xd(this,a<<8);return a&255}function ne(a,b){a=b&~a;S(this,a);return a}function oe(a,b){a=b&~a;S(this,a<<8);return a}function pe(a,b){a|=b;S(this,a);return a}function qe(a,b){a|=b;S(this,a<<8);return a} -function re(a,b){a=~b|65536;vd(this,a);return a&65535}function se(a,b){a=~b|256;vd(this,a<<8);return a&255}function te(a,b){a=b-a;this.H&128||(this.Y=this.aa=a,this.U=b&(b^a));return a&65535}function ue(a,b){a=b-a;var c=a<<8;b<<=8;this.H&128||(this.Y=this.aa=c,this.U=b&(b^c));return a&255}function ve(a,b){a=b+a;this.H&128||(this.Y=this.aa=a,this.U=a&(b^a));return a&65535}function we(a,b){a=b+a;var c=a<<8;this.H&128||(this.Y=this.aa=c,this.U=c&(b<<8^c));return a&255} -function xe(a,b){a=-b;vd(this,a,a&b&32768);return a&65535}function ye(a,b){a=-b;vd(this,a<<8,(a&b&128)<<8);return a&255}function ze(a,b){a=b<<1|this.T>>16&1;xd(this,a);return a&65535}function Ae(a,b){a=b<<1|this.T>>16&1;xd(this,a<<8);return a&255}function Be(a,b){a=(this.T&65536|b)>>1|b<<16;xd(this,a);return a&65535}function Ce(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;xd(this,a<<8);return a&255}function De(a,b){var c=b-a;yd(this,c,a,b);return c&65535} -function Ee(a,b){var c=b-a;yd(this,c<<8,a<<8,b<<8);return c&255}function Fe(a,b){this.H&128||(this.Y=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ge(a,b){a^=b;S(this,a);return a&65535}function He(a){U(this,a,$d(this,a),he);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ie(a){var b=ce(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.Y=this.aa=c;this.b-=(this.g?6:7)+b} -function Je(a){var b=ce(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.Y=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ke(a){V(this,a,!qd(this))}function Le(a){V(this,a,qd(this))} -function Me(a){U(this,a,$d(this,a),ne);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ne(a){T(this,a,Zd(this,a),oe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Oe(a){U(this,a,$d(this,a),pe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Pe(a){T(this,a,Zd(this,a),qe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Qe(a){S(this,$d(this,a)&ce(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Re(a){S(this,(Zd(this,a)&be(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Se(a){V(this,a,sd(this))}function Te(a){V(this,a,!this.Qa()==!rd(this))}function Ue(a){V(this,a,!sd(this)&&!this.Qa()==!rd(this))}function Ve(a){V(this,a,!qd(this)&&!sd(this))}function We(a){V(this,a,sd(this)||!this.Qa()!=!rd(this))} -function Xe(a){V(this,a,qd(this)||sd(this))}function Ye(a){V(this,a,!this.Qa()!=!rd(this))}function Ze(a){V(this,a,this.Qa())}function $e(a){V(this,a,!sd(this))}function af(a){V(this,a,!this.Qa())}function bf(){this.pa(12,1);this.b-=5}function cf(a){V(this,a,!0)}function df(a){V(this,a,!rd(this))}function ef(a){V(this,a,rd(this))}function W(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.Y=0);this.b-=5} -function ff(a){var b=$d(this,a);a=ce(this,a);yd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function gf(a){var b=Zd(this,a)<<8;a=be(this,a)<<8;yd(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function hf(a){var b=ce(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.Y=d>>16):(this.U=32768,this.aa=d>>15|d,this.Y=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.Y=0,this.U=32768,this.T=65536,this.b-=7}function jf(){this.pa(24,2);this.b-=25} -function kf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qc(this.i):this.ha();this.b-=7}function lf(){this.pa(16,4);this.b-=25}var mf=[0,7,7,10,7,11,9,13];function nf(a){this.K=this.b;P(this,ae(this,a));this.b=this.K-mf[this.g]}var of=[0,14,14,17,14,18,16,20];function pf(a){this.K=this.b;var b=ae(this,a);a=a>>6&7;zd(this,this.u[a]);this.u[a]=this.u[7];P(this,b);this.b=this.K-of[this.g]}var qf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function rf(a){var b=$d(this,a);this.K=this.b;S(this,ee(this,a,b));this.b=this.K-qf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function sf(a){var b=Zd(this,a);S(this,de(this,a,b,1)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var tf=[7,13,13,17,14,18,17,21]; -function uf(a){var b=ce(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.H&128||(this.Y=b>>16,this.aa=this.Y|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)P(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Bf(a){U(this,a,$d(this,a),De);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Cf(a){U(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)}function Df(){this.pa(28,5);this.b-=5}function Ef(){this.H&4||this.C.Z();this.H|=4;ud(this,-2);this.b-=3}function Ff(a){U(this,a,$d(this,a),Ge);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qc(b);b||this.pa(8,6)}function md(a){Gf[a>>12].call(this,a)}function Hf(a){If[a>>6&3].call(this,a)}function Jf(a){Kf[a>>6&3].call(this,a)} -function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a&15].call(this,a)}function Pf(a){Qf[a&15].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} -var Gf=[function(a){Xf[a>>8&15].call(this,a)},rf,ff,Qe,Me,Oe,He,X,function(a){Yf[a>>8&15].call(this,a)},sf,gf,Re,Ne,Pe,Bf,X],Xf=[function(a){Zf[a>>4&15].call(this,a)},cf,$e,Se,Te,Ye,Ue,We,pf,pf,Hf,Jf,Lf,X,X,X],If=[function(a){vd(this,ee(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,1,te);this.b-=this.g?9:3+(7==this.f?2:0)}],Kf=[function(a){U(this,a,0, -xe);this.b-=this.g?11:6},function(a){U(this,a,qd(this)?1:0,he);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,qd(this)?1:0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ce(this,a);vd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Mf=[function(a){U(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){U(this,a,0,je);this.b-=this.g?9:3+(7==this.f?2:0)}], -Zf=[function(a){$f[a&15].call(this,a)},X,X,X,nf,nf,nf,nf,yf,X,Nf,Pf,Cf,Cf,Cf,Cf],$f=[kf,Ef,xf,bf,lf,wf,X,X,X,X,X,X,X,X,X,X],Of=[vf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},W,function(){this.aa=1;this.b-=5},W,W,W,function(){this.Y=0;this.b-=5},W,W,W,W,W,W,W],Qf=[vf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},zf,function(){this.aa=0;this.b-=5},zf,zf,zf,function(){this.Y=32768;this.b-=5},zf,zf,zf,zf,zf,zf,zf],Yf=[af,Ze,Ve,Xe,df,ef,Ke,Le,jf,Df,Rf,Tf,Vf,X, -X,X],Sf=[function(a){vd(this,de(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ue);this.b-=this.g?9:3+(7==this.f?2:0)}],Uf=[function(a){T(this,a,0,ye);this.b-=this.g?11:6},function(a){T(this,a,qd(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,qd(this)?1:0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=be(this,a);vd(this, -a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){T(this,a,0,Ce);this.b-=this.g?9+(this.Ab&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,me);this.b-=this.g?9+(this.Ab&1):3+(7==this.f?2:0)},function(a){T(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)}];function nd(a){ag[a>>12].call(this,a)} -var ag=[function(a){bg[a>>8&15].call(this,a)},rf,ff,Qe,Me,Oe,He,function(a){cg[a>>8&15].call(this,a)},function(a){dg[a>>8&15].call(this,a)},sf,gf,Re,Ne,Pe,Bf,X],bg=[function(a){eg[a>>4&15].call(this,a)},cf,$e,Se,Te,Ye,Ue,We,pf,pf,Hf,Jf,Lf,function(a){fg[a>>6&3].call(this,a)},X,X],fg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.R);P(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Xd(this,a,0);zd(this,a);S(this,a);this.b-=11},function(a){var b=Bd(this);this.K= -this.b;Yd(this,a,0,b);S(this,b);this.b=this.K-tf[this.g]},function(a){S(this,ee(this,a,this.Qa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],eg=[function(a){gg[a&15].call(this,a)},X,X,X,nf,nf,nf,nf,yf,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.H|=1),this.b-=5):X.call(this,a)},Nf,Pf,Cf,Cf,Cf,Cf],gg=[kf,Ef,xf,bf,lf,wf,function(){Ad(this);this.b-=13},X,X,X,X,X,X,X,X,X],cg=[uf,uf,hf,hf,Ie,Ie,Je,Je,Ff,Ff,X,X,X,X,Af,Af],dg=[af,Ze,Ve,Xe,df,ef,Ke,Le,jf,Df,Rf,Tf,Vf,function(a){hg[a>> -6&3].call(this,a)},X,X],hg=[X,function(a){a=Xd(this,a,65536);zd(this,a);S(this,a);this.b-=11},function(a){var b=Bd(this);this.K=this.b;Yd(this,a,65536,b);S(this,b);this.b=this.K-tf[this.g]},X]; -function ig(a){u.call(this,"ROM",a,ig);this.ia=this.f=null;this.B=a.addr;this.g=a.size;this.v=a.alias;this.C=a.file;this.D=sa(this.C);if(this.C){a=this.C;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.P("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(nb(c.Na,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.C=null);jg(c)})}}z(ig);ig.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;jg(this)}; -ig.prototype.Fa=function(){this.ia&&(this.i&&kg(this.i,this.id,this.B,this.g,this.ia),delete this.ia);return!0};ig.prototype.Ea=function(){return!0}; -function jg(a){if(!tb(a)){if(a.C){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.B;if(jc(a.w,b,a.g,Nc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.nb(n++,b[r++]&255);else n&1?a.b.ha():pd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&tc(e.b,e.la))});this.ma=vc(52,4);this.$=sc(this.b,function(){e.g|=128;e.g&64&&tc(e.b,e.ma)});Ab(b,this,Jg);H(this)}; -k.sc=function(){if(!this.J){var a=$c(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.fb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.sc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ea=function(a){return a?this.save():!0};k.reset=function(){Kg(this)};k.save=function(){var a=new R(this);a.set(0,[]);return a.data()};k.restore=function(){return Kg(this)};function Kg(a){a.K=0;a.f=0;a.g=128;a.B=[];return!0}k.dc=function(a){if("number"==typeof a)this.B.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.I%a,this.S&&(b=xa("",c)));this.O&&!this.I&&c&&(b=String.fromCharCode(this.O)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.I+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;uc(this.b,this.$,1E3/Math.round(this.R/10))}};var Lg={},Jg=(Lg[65392]=[null,null,Y.prototype.Ad,Y.prototype.re,"RCSR"],Lg[65394]=[null,null,Y.prototype.zd,Y.prototype.qe,"RBUF"],Lg[65396]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XCSR"],Lg[65398]=[null,null,Y.prototype.Sd,Y.prototype.Je,"XBUF"],Lg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Og(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Og(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Da=function(a,b,c,d){this.C=a;this.w=b;this.b=c;this.i=d;this.S=Pg(a);var e=this;if((this.g=$c(this.C,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.W=vc(56,4);this.da=sc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.C&&!a.C.A.ja;g?a.P('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Na,e,f),(e=Fa(e,f))&&Yg(a,b,c,d,e.ea,e.Ja, -e.Ia));a.A.Va=!1;a.D&&(a.D--,a.D||H(a));Vg(a)})}function Sg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.$b?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){eh(a,b,c,d)})} -function eh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ja;if(d)a.controller.P('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{nb(a.controller.Na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.za=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Ma+a.Ba&&(a.Ba+=f-(a.Ma+a.Ba)+1):(a.Ma=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.P("Unable to restore disk '"+this.Ta+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=gh(this,a++);)ih(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function ih(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){u.call(this,"RL11",a,O,2097152);this.v=a.autoMount||null;this.I=0;this.f=Array(1);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(O);k=O.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&jh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&kh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[ma(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=gh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";jh(this,0)}}return!0};k.Ea=function(a){return a?this.save():!0};k.reset=function(){lh(this)};k.save=function(){return(new R(this)).data()}; -k.restore=function(a){return lh(this,a[0])};function oh(a,b){b||(a.I=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.P("Unable to load the selected drive");else if(c)if("?"==c)a.P('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}qh(a,e,b,c,!1,d)}else ph(a,e)} -function qh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.$a.toLowerCase()!=d.toLowerCase()&&(g++,ph(a,b,!0),h.Zb?a.P("RL11 busy"):(h.Zb=!0,e&&(h.Yb=!0,a.I++,F(a)&&E(a,"auto-loading disk: "+c)),h.Mb=!!f,dh(new $g(a,h,"preload"),c,d,f,a.Kc)&&g++));return g} -k.Kc=function(a,b,c,d,e){var f;a.Zb=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.za)&&(this.P('Disk "'+c+'" too large for drive '+("RL"+a.ac)),b=null);b?(a.Ca=b,a.Ta=c,a.$a=d,this.P('Mounted disk "'+c+'" in drive '+("RL"+a.ac),a.Yb||e),this.C&&this.C.ob()):a.Mb=!1;a.Yb&&(a.Yb=!1,--this.I||H(this));jh(this,a.ac)}; -function nh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.B=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.fd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.ab(f,r|t<<8);if(rc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.$d=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(rc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Dd=function(){return this.fa&65535}; -k.ue=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.B&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.B=this.g&4?this.B+b:this.B-b,this.g=this.B=this.B&65408|c);break;case 8:this.D=this.B;break;case 12:b=this.fd;case 10:b||(b=this.$d),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Lc.bind(this)))}a&&(this.fa|=129,this.fa&64&&tc(this.b,this.O))}};k.Bd=function(){return this.J};k.se=function(a){this.J=a&65534};k.Ed=function(){return this.g};k.ve=function(a){this.g=a};k.Fd=function(){return this.D};k.we=function(a){this.D=a};k.Cd=function(){return this.K};k.te=function(a){this.K=a&63}; -var rh={},mh=(rh[63744]=[null,null,O.prototype.Dd,O.prototype.ue,"RLCS"],rh[63746]=[null,null,O.prototype.Bd,O.prototype.se,"RLBA"],rh[65284]=[null,null,O.prototype.Ed,O.prototype.ve,"RLDA"],rh[65286]=[null,null,O.prototype.Fd,O.prototype.we,"RLMP"],rh[65288]=[null,null,O.prototype.Cd,O.prototype.te,"RLBE"],rh);function sh(a){u.call(this,"Debugger",a,sh);this.$=a.base||16;this.wa=!1;this.J=0;this.O=!1;this.v=-1;this.g=[];this.S={}}z(sh); -var th={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};sh.prototype.oc=function(){return-1};sh.prototype.pc=function(){}; -function uh(a,b,c,d){if(c)if(b){0>a.v&&a.g.length&&(a.v=0);if(0>a.v||b!=a.g[a.v])a.g.splice(0,0,b),a.v=0;a.v--}else a.O?b="end":b=a.g[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function vh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,fault:32,bus:64,memory:128,device:256,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function yb(a){u.call(this,"Panel",a,yb);this.H=0;this.K=this.J=!1;this.g=this.C=this.w=0;this.L=20;this.D={};this.f={START:[1,!0,!1,this.ad],STEP:[1,!1,!1,this.bd],ENABLE:[1,!1,!1,this.Xc],CONT:[1,!0,!1,this.Vc],DEP:[0,!0,!1,this.Wc],EXAM:[1,!0,!1,this.Yc],LOAD:[1,!0,!1,this.$c],TEST:[0,!0,!1,this.Zc]};for(a=0;22>a;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);k=yb.prototype;k.reset=function(){this.L=this.L&-120|20}; +k.sa=function(a,b,c,d){if(this.u&&this.u.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.H++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.D[b]=d?1:0,this.H++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.f[b];zb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.J="DEP"==b;a.K="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(zb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.b=c;this.i=d;Ab(b,this,Bb);Cb(b,this.reset.bind(this));Db(this);for(var e in this.f)zb(this,e,this.f[e][0])};k.Ga=function(a,b){b||(Eb(),this.stop());return!0}; +k.Fa=function(){return!0};function Fb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Db(a,b){for(var c in a.D)Fb(a,c,null!=b?b:a.D[c])}function zb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Tb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.$||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.ad=function(a){a||this.b.B.Z||(this.A.reset(),Ub(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.fb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.fb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.gb(0),rb(a,!1);else try{var b=this.b.gb(1);0>2;this.A=this.xa-1;this.C=this.H/this.xa|0;this.Wa=[];this.u=0;this.f=!1;this.w=[];this.Hc=[fc,gc,hc,ic];a=new I(this);jc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Wa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function gc(a,b,c){var d=!1,e=this.controller,f=e.Wa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Wa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function hc(a,b){var c=-1,d=this.controller;(a=d.Wa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function ic(a,b,c){var d=!1,e=this.controller;if(a=e.Wa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function lc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return qc(1,f,g)}f=new I(a,f,n,a.xa,d,e);jc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Ub(a&this.A,a)};k.Tb=function(a){this.f=!1;this.u++;a=this.W[(a&this.Ta)>>>this.ka].ec(a&this.A,a);this.u--;return a}; +k.oa=function(a){3932160<=a&&(a=sc(this.b,a));return this.W[(a&this.Ta)>>>this.ka].ra(a&this.A,a)};k.mb=function(a){var b=a&this.A,c=(a&this.Ta)>>>this.ka;this.f=!1;this.u++;a=this.W[c].fc(b,a);this.u--;return a};k.Vb=function(a,b){3932160<=a&&(a=sc(this.b,a));this.W[(a&this.Ta)>>>this.ka].Xb(a&this.A,b&255,a)};k.pb=function(a,b){this.f=!1;this.u++;this.W[(a&this.Ta)>>>this.ka].Yb(a&this.A,b&255,a);this.u--}; +k.eb=function(a,b){3932160<=a&&(a=sc(this.b,a));this.W[(a&this.Ta)>>>this.ka].Mb(a&this.A,b&65535,a)};k.Jb=function(a,b){var c=a&this.A,d=(a&this.Ta)>>>this.ka;this.f=!1;this.u++;this.W[d].jc(c,b&65535,a);this.u--};function tc(a){for(var b=0,c=[],d=0;da.b.vb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Za!=c&&(b.Za=c,Jc(b))}};k.pd=function(){var a=this.b.ab;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Ib};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.vb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Jc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; +k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.U[1][a>>1&7]};k.Be=function(a,b){this.b.U[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.U[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.U[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.U[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; +k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.U[1][b]&=65295};k.ld=function(a){return this.b.U[0][a>>1&7]};k.ee=function(a,b){this.b.U[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.U[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.U[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.U[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.U[0][b]&=65295}; +k.Qd=function(a){return this.b.U[3][a>>1&7]};k.He=function(a,b){this.b.U[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.U[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.U[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.U[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.U[3][b]&=65295};k.zb=function(a){a&=7;return this.b.M&2048?this.b.Ua[a]:this.b.v[a]}; +k.Bb=function(a,b){b&=7;this.b.M&2048?this.b.Ua[b]=a:this.b.v[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.v[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.v[6]=a};k.zd=function(){return this.b.v[7]};k.qe=function(a){this.b.v[7]=a};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.v[a]:this.b.Ua[a]};k.Cb=function(a,b){b&=7;this.b.M&2048?this.b.v[b]=a:this.b.Ua[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.v[6]:this.b.Ha[1]}; +k.oe=function(a){1==(this.b.M&49152)>>14?this.b.v[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.v[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.v[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; +k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.hc:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.hc=a;b.I|=2};k.Ld=function(a){return a?this.b.bb&65280:0};k.Ce=function(a){this.b.bb=a|255};k.vd=function(){return bc(this.b)};k.me=function(a){Kc(this.b,a&-1809|bc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, +K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, +K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.zb,K.prototype.Bb,"R0SET0"],M[65473]=[null,null,K.prototype.zb,K.prototype.Bb,"R1SET0"],M[65474]=[null,null,K.prototype.zb,K.prototype.Bb,"R2SET0"],M[65475]=[null,null,K.prototype.zb,K.prototype.Bb,"R3SET0"],M[65476]=[null,null,K.prototype.zb,K.prototype.Bb,"R4SET0"],M[65477]=[null,null,K.prototype.zb,K.prototype.Bb, +"R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ab,K.prototype.Cb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ab,K.prototype.Cb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ab,K.prototype.Cb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ab,K.prototype.Cb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ab,K.prototype.Cb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ab, +K.prototype.Cb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Sc(this,Oc?Tc:Uc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.A.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;Zc(c,this.F+a,1,c.L)&&c.ha(!0)}return this.ec(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;Zc(c,this.F+a,2,c.L)&&c.ha(!0)}return this.fc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;Zc(d,this.F+a,1,d.C)&&d.ha(!0)}this.u?this.w(a,b,c):this.Yb(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Zc(d,this.F+a,2,d.C)&&d.ha(!0)}this.u?this.w(a,b,c):this.jc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.A.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.A.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Ra=!0},ua:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},ib:function(a,b,c){a&1&&this.A.Da(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},La:function(a,b,c){a&1&&this.A.Da(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function jc(a,b,c){a.i=b;a.f=a.g=0;c&&((a.f=c.f)&&Yc(a,Xc,!1),(a.g=c.g)&&Wc(a,Xc,!1))}function $c(a,b){b?--a.g||(a.Xb=a.u?a.w:a.Yb,a.Mb=a.u?a.H:a.jc):--a.f||(a.Ub=a.ec,a.ra=a.fc)}function Wc(a,b,c){c&&a.g||(a.Xb=!a.u&&b[1]||a.w,a.Mb=!a.u&&b[3]||a.H);if(c||void 0===c)a.Yb=b[1]||a.w,a.jc=b[3]||a.H}function Yc(a,b,c){c&&a.f||(a.Ub=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.ec=b[0]||a.K,a.fc=b[2]||a.L}function Sc(a,b){b||(b=ad);Yc(a,b,void 0);Wc(a,b,void 0)} +var ad=[],Vc=[I.prototype.V,I.prototype.va,I.prototype.da,I.prototype.Ma],Xc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var Uc=[I.prototype.N,I.prototype.la,I.prototype.Pa,I.prototype.ib],Tc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.La]; +function bd(a,b){u.call(this,"CPU",a,bd,1);var c=a.multiplier||1;this.kb=a.cycles||b;this.$a=c;this.tb=Math.round(this.kb/1E4)/100;this.nb=this.tb*this.$a;this.B.Z=!1;this.B.Wb=!1;this.B.sb=a.autoStart;this.B.ub=!1;this.Fb=this.ma=0;this.Gb=a.csStart;this.wb=a.csInterval;this.xb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(bd);var cd=["power","reset"];k=bd.prototype; +k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.wb,c=!0);0<=a.xb&&a.xb<=hd(a)&&(a.wb=a.xb=-1,fd(a),a.ha(),c=!0);c&&a.j(hd(a)+" cycles: checksum="+p(a.Fb))}} +k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.u)if(a=d.u,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.$a=b;b=a.tb*a.$a;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.u&&a.u.qb()}Wb(a,a.V);a.V=0;a.R=Ba();a.$=0;jd(a);return d}function wc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function yc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.kb*a.$a/1E3*c|0,a.K[b][0]=c+kd(a))} +function ld(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Vb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function kd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Vd=function(){if(this.B.Z){this.Db>=this.kb&&jd(this,!0);this.Aa=0;this.jb=Ba();if(this.$){var a=this.jb-this.$;a>this.Sb&&(this.R+=a,this.R>this.jb&&(this.R=this.jb))}try{do{var b=ld(this,this.B.ub?1:this.hb);try{this.gb(b)}catch(e){if("number"!=typeof e)throw e;}b=kd(this,!0);this.Aa+=b;this.V+=b;Xb(this,b);Vb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.hb;15<=++this.tc&&(this.u&&this.u.ca(),this.tc=0);break}}while(this.B.Z)}catch(e){this.ha();this.u&&this.u.stop(Ba(),hd(this));vb(this,e.stack|| +e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.Aa&&(c=Math.round(c*this.Aa/this.hb));var c=c-(this.$-this.jb),d=this.$-this.R;d&&(this.Y=Math.round(this.V/(10*d))/100,864E5<=d&&(this.la=0,id(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Db+=this.Aa;this.$+=c;a(b,c)}}}; +k.fb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;id(this);this.B.Z=!0;this.B.Wb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.u&&(a&&this.u.qb(!0),this.u.start(this.R,hd(this)));setTimeout(this.uc,0);return!0};k.gb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){kd(this);Wb(this,this.V);this.V=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.u&&this.u.stop(Ba(),hd(this));b=!0}this.B.complete=a;return b}; +function md(a){this.vb=+a.model||1170;this.Nb=a.addrReset||0;bd.call(this,a,6666667);this.decode=1120==this.vb?nd.bind(this):od.bind(this);pd(this);this.L=0;this.N=null;this.B.complete=!1}z(md,bd);k=md.prototype;k.reset=function(){this.status("model "+this.vb);this.B.Z&&this.ha();pd(this);ed(this);this.B.error=!1;this.parent.reset.call(this)}; +function pd(a){a.S=65536;a.T=32768;a.aa=65535;a.X=32768;a.M=15;a.v=[0,0,0,0,0,0,0,a.Nb];a.Ua=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.w=0;a.Ma=0;a.Qc=[4,2,0,1];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Ub(a)}function Ub(a){a.bb=255;a.ga=0;a.hc=0;a.C=0;a.ab=0;a.Ib=0;a.ob=0;a.Za=0;a.La=0;a.Qb=262143;a.N=null;a.A&&Jc(a)}function Jc(a){a.Za?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,lc(a.A,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,lc(a.A,16))}function qd(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.qc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.la,this.$a]);a.set(2,tc(this.A));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];id(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.w!=c&&(a.Ha[c]=a.v[6],a.v[6]=a.Ha[a.w]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.T=0)}function wd(a,b,c){a.I&128||(a.X=a.aa=a.S=b,a.T=c||0)}function xd(a,b,c,d){a.I&128||(a.X=a.aa=a.S=b,a.T=(c^b)&(d^b))} +function yd(a,b){a.I&128||(a.X=a.aa=a.S=b,a.T=a.X^a.S>>1)}function zd(a,b,c,d){a.I&128||(a.X=a.aa=a.S=b,a.T=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=bc(this):this.w||(a=4,c=!0);this.C&57344||(this.ab=63222,this.Ib=a);this.w=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Kc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.v[6]=4);Ad(this,this.va);Ad(this,this.v[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; +function Bd(a){var b=Td(a),c=Td(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Kc(a,c);a.I&=-17}function sc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Ud(a,b,c){var d,e,f,g=0;d=b>>13;a.ob&a.Qc[a.w]||(d&=7);e=a.U[a.w][d];f=(a.wa[a.w][d]<<6)+(b&8191)&a.Qb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.U[a.w][d]=e;if(4194170!==f||a.w)a.La=a.w,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.La<<5|a.Ma<<1),b=!0),a.C&61440||!(4191360> +f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.v[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.v[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.v[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(vd(a,2)),e=e+a.v[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(vd(a,2)),e=e+a.v[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.v[c]=a.v[c]+f&65535;!g||a.C&57344||(a.ab=a.ab<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.v[6]<=a.bb||65534<=a.v[6])&&(a.v[6]<=a.bb-32?(a.ga|=4,a.v[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Za)return this.A.Tb(a);this.L++;a=Vd(this,Ud(this,a,3));this.L--;return a}; +k.mb=function(a){if(!this.Za)return this.A.mb(a);this.L++;a=this.yc(Ud(this,a,2));this.L--;return a};k.pb=function(a,b){this.Za?(this.L++,Wd(this,Ud(this,a,5),b),this.L--):this.A.pb(a,b)};k.Jb=function(a,b){this.Za?(this.L++,this.Fc(Ud(this,a,4),b),this.L--):this.A.Jb(a,b)};k.Oc=function(a,b,c){return Xd(this,a,b,c)};k.Pc=function(a,b,c){return Ud(this,Xd(this,a,b,c),c)};k.yc=function(a){return this.A.oa(a)};k.Sd=function(a){return this.A.oa(Ud(this,a,2))};k.Fc=function(a,b){this.A.eb(a,b&65535)}; +k.Je=function(a,b){this.A.eb(Ud(this,a,4),b)};function Yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Xd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.w=a.M>>12&3,c=a.ra(d|c&a.P),a.w=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.v[d]:a.Ha[a.M>>12&3];return c}function Zd(a,b,c,d){a.C&57344||(a.ab=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Xd(a,b,e,4),c&65536||(e&=65535),a.w=a.M>>12&3,e=Ud(a,e|c&65536,4),a.w=a.M>>14&3,a.A.eb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.v[e]=d:a.Ha[a.M>>12&3]=d} +function $d(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Vd(a,a.ba(b,c,3)):a.v[c]&255}function ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.A.oa(a.ba(b,c,2)):a.v[c]}function be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Xd(a,b,c,8)}function ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Vd(a,a.ba(b,c,3)):a.v[c]&255}function de(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.A.oa(a.ba(b,c,2)):a.v[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Wd(a,e,d.call(a,c,Vd(a,e)))):a.v[e]=a.v[e]&65280|d.call(a,c,a.v[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.A.eb(e,d.call(a,c,a.A.oa(e)))):a.v[e]=d.call(a,c,a.v[e])}function ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Wd(a,a.ba(b,e,5),c):a.v[e]=c?d&1?c<<24>>24&65535:a.v[e]&-256|c&255:a.v[e]&-256;return c} +function fe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.A.eb(a.ba(b,d,4),c):a.v[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.v[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.gb=function(a){this.B.complete=!0;var b=this.i&&ge(this.i)?1:this.B.Wb?-1:0,c=a?this.B.Wb?0:1:-1;this.B.Wb=!1;this.da=this.b=a;do{if(b){if(this.i&&he(this.i,this.v[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.hc&224)>>5,f=this.N&&this.N.yb>e?this.N:null;f&&(d=f.Xd,e=f.yb);e>(this.M&224)>>5?(this.I&4&&(vd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(ud(this))}while(0>1|b<<16;yd(this,a);return a&65535}function ne(a,b){a=b&2048|b>>1|b<<8;yd(this,a<<8);return a&255}function oe(a,b){a=b&~a;R(this,a);return a}function pe(a,b){a=b&~a;R(this,a<<8);return a}function qe(a,b){a|=b;R(this,a);return a}function re(a,b){a|=b;R(this,a<<8);return a} +function se(a,b){a=~b|65536;wd(this,a);return a&65535}function te(a,b){a=~b|256;wd(this,a<<8);return a&255}function ue(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.T=b&(b^a));return a&65535}function ve(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.T=b&(b^c));return a&255}function we(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.T=a&(b^a));return a&65535}function xe(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.T=c&(b<<8^c));return a&255} +function ye(a,b){a=-b;wd(this,a,a&b&32768);return a&65535}function ze(a,b){a=-b;wd(this,a<<8,(a&b&128)<<8);return a&255}function Ae(a,b){a=b<<1|this.S>>16&1;yd(this,a);return a&65535}function Be(a,b){a=b<<1|this.S>>16&1;yd(this,a<<8);return a&255}function Ce(a,b){a=(this.S&65536|b)>>1|b<<16;yd(this,a);return a&65535}function De(a,b){a=((this.S&65536)>>8|b)>>1|b<<8;yd(this,a<<8);return a&255}function Ee(a,b){var c=b-a;zd(this,c,a,b);return c&65535} +function Fe(a,b){var c=b-a;zd(this,c<<8,a<<8,b<<8);return c&255}function Ge(a,b){this.I&128||(this.X=this.aa=b&65280,this.T=this.S=0);return(b<<8|b>>8)&65535}function He(a,b){a^=b;R(this,a);return a&65535}function Ie(a){T(this,a,ae(this,a),ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Je(a){var b=de(this,a);a=a>>6&7;var c=this.v[a];c&32768&&(c|=4294901760);this.S=this.T=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.T=32768)}this.v[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Ke(a){var b=de(this,a);a=a>>6&7;var c=this.v[a]<<16|this.v[a|1];this.S=this.T=0;b&=63;if(b&32){b=64-b;32>b-1;this.S=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.v[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Le(a){U(this,a,!rd(this))}function Me(a){U(this,a,rd(this))} +function Ne(a){T(this,a,ae(this,a),oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Oe(a){S(this,a,$d(this,a),pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Pe(a){T(this,a,ae(this,a),qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Qe(a){S(this,a,$d(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Re(a){R(this,ae(this,a)&de(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Se(a){R(this,($d(this,a)&ce(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Te(a){U(this,a,td(this))}function Ue(a){U(this,a,!this.Sa()==!sd(this))}function Ve(a){U(this,a,!td(this)&&!this.Sa()==!sd(this))}function We(a){U(this,a,!rd(this)&&!td(this))}function Xe(a){U(this,a,td(this)||!this.Sa()!=!sd(this))} +function Ye(a){U(this,a,rd(this)||td(this))}function Ze(a){U(this,a,!this.Sa()!=!sd(this))}function $e(a){U(this,a,this.Sa())}function af(a){U(this,a,!td(this))}function bf(a){U(this,a,!this.Sa())}function cf(){this.pa(12,1);this.b-=5}function df(a){U(this,a,!0)}function ef(a){U(this,a,!sd(this))}function ff(a){U(this,a,sd(this))}function V(a){a&1&&(this.S=0);a&2&&(this.T=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function gf(a){var b=ae(this,a);a=de(this,a);zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function hf(a){var b=$d(this,a)<<8;a=ce(this,a)<<8;zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function jf(a){var b=de(this,a);if(b){a=a>>6&7;var c=this.v[a]<<16|this.v[a|1];this.S=this.T=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.v[a]=d&65535,this.v[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.T=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.v[a]&&(this.v[a]=this.v[a|1]=1));this.b-=53}else this.aa=this.X=0,this.T=32768,this.S=65536,this.b-=7}function kf(){this.pa(24,2);this.b-=25} +function lf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?mf(this.i):this.ha();this.b-=7}function nf(){this.pa(16,4);this.b-=25}var of=[0,7,7,10,7,11,9,13];function pf(a){this.J=this.b;O(this,be(this,a));this.b=this.J-of[this.g]}var qf=[0,14,14,17,14,18,16,20];function rf(a){this.J=this.b;var b=be(this,a);a=a>>6&7;Ad(this,this.v[a]);this.v[a]=this.v[7];O(this,b);this.b=this.J-qf[this.g]}var sf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function tf(a){var b=ae(this,a);this.J=this.b;R(this,fe(this,a,b));this.b=this.J-sf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function uf(a){var b=$d(this,a);R(this,ee(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var vf=[7,13,13,17,14,18,17,21]; +function wf(a){var b=de(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.v[a];c&32768&&(c|=-65536);b=~~(b*c);this.v[a]=b>>16&65535;this.v[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.T=0,this.S=-32768>b||32767>6;if(this.v[b]=this.v[b]-1&65535)O(this,this.v[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Cf(a){T(this,a,ae(this,a),Ee);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Df(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Ef(){this.pa(28,5);this.b-=5}function Ff(){this.I&4||this.u&&this.u.ca();this.I|=4;vd(this,-2);this.b-=3}function Gf(a){T(this,a,ae(this,a),He);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=mf(b);b||this.pa(8,6)}function nd(a){Hf[a>>12].call(this,a)}function If(a){Jf[a>>6&3].call(this,a)}function Kf(a){Lf[a>>6&3].call(this,a)} +function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a&15].call(this,a)}function Qf(a){Rf[a&15].call(this,a)}function Sf(a){Tf[a>>6&3].call(this,a)}function Uf(a){Vf[a>>6&3].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)} +var Hf=[function(a){Yf[a>>8&15].call(this,a)},tf,gf,Re,Ne,Pe,Ie,W,function(a){Zf[a>>8&15].call(this,a)},uf,hf,Se,Oe,Qe,Cf,W],Yf=[function(a){$f[a>>4&15].call(this,a)},df,af,Te,Ue,Ze,Ve,Xe,rf,rf,If,Kf,Mf,W,W,W],Jf=[function(a){wd(this,fe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ue);this.b-=this.g?9:3+(7==this.f?2:0)}],Lf=[function(a){T(this,a,0, +ye);this.b-=this.g?11:6},function(a){T(this,a,rd(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,rd(this)?1:0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=de(this,a);wd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Nf=[function(a){T(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)}], +$f=[function(a){ag[a&15].call(this,a)},W,W,W,pf,pf,pf,pf,Af,W,Of,Qf,Df,Df,Df,Df],ag=[lf,Ff,zf,cf,nf,yf,W,W,W,W,W,W,W,W,W,W],Pf=[xf,function(){this.S=0;this.b-=5},function(){this.T=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Rf=[xf,function(){this.S=65536;this.b-=5},function(){this.T=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],Zf=[bf,$e,We,Ye,ef,ff,Le,Me,kf,Ef,Sf,Uf,Wf,W,W,W],Tf=[function(a){wd(this, +ee(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ve);this.b-=this.g?9:3+(7==this.f?2:0)}],Vf=[function(a){S(this,a,0,ze);this.b-=this.g?11:6},function(a){S(this,a,rd(this)?1:0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,rd(this)?1:0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ce(this,a);wd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],Xf=[function(a){S(this,a,0,De);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ne);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,le);this.b-=this.g?9:3+(7==this.f?2:0)}];function od(a){bg[a>>12].call(this,a)} +var bg=[function(a){cg[a>>8&15].call(this,a)},tf,gf,Re,Ne,Pe,Ie,function(a){dg[a>>8&15].call(this,a)},function(a){eg[a>>8&15].call(this,a)},uf,hf,Se,Oe,Qe,Cf,W],cg=[function(a){fg[a>>4&15].call(this,a)},df,af,Te,Ue,Ze,Ve,Xe,rf,rf,If,Kf,Mf,function(a){gg[a>>6&3].call(this,a)},W,W],gg=[function(a){a=this.v[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.v[5]);this.v[6]=a+2&65535;this.v[5]=b;this.b-=8},function(a){a=Yd(this,a,0);Ad(this,a);R(this,a);this.b-=11},function(a){var b=Td(this);this.J= +this.b;Zd(this,a,0,b);R(this,b);this.b=this.J-vf[this.g]},function(a){R(this,fe(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],fg=[function(a){hg[a&15].call(this,a)},W,W,W,pf,pf,pf,pf,Af,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Of,Qf,Df,Df,Df,Df],hg=[lf,Ff,zf,cf,nf,yf,function(){Bd(this);this.b-=13},W,W,W,W,W,W,W,W,W],dg=[wf,wf,jf,jf,Je,Je,Ke,Ke,Gf,Gf,W,W,W,W,Bf,Bf],eg=[bf,$e,We,Ye,ef,ff,Le,Me,kf,Ef,Sf,Uf,Wf,function(a){ig[a>> +6&3].call(this,a)},W,W],ig=[W,function(a){a=Yd(this,a,65536);Ad(this,a);R(this,a);this.b-=11},function(a){var b=Td(this);this.J=this.b;Zd(this,a,65536,b);R(this,b);this.b=this.J-vf[this.g]},W]; +function jg(a){u.call(this,"ROM",a,jg);this.ia=this.u=null;this.C=a.addr;this.f=a.size;this.w=a.alias;this.g=a.file;this.D=sa(this.g);if(this.g){a=this.g;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.u=a.ea,c.ia=a.ia):c.g=null);kg(c)})}}z(jg);jg.prototype.Ea=function(a,b,c,d){this.A=b;this.b=c;this.i=d;kg(this)}; +jg.prototype.Ga=function(){this.ia&&(this.i&&lg(this.i,this.id,this.C,this.f,this.ia),delete this.ia);return!0};jg.prototype.Fa=function(){return!0}; +function kg(a){if(!tb(a)){if(a.g){if(!a.u||!a.A)return;a.f||(a.f=a.u.length);if(a.u.length!=a.f)vb(a,"ROM size ("+p(a.u.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;b=a.C;if(oc(a.A,b,a.f,Rc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():qd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&xc(e.b,e.la))});this.ma=Ic(52,4);this.$=wc(this.b,function(){e.g|=128;e.g&64&&xc(e.b,e.ma)});Ab(b,this,Kg);H(this)}; +k.vc=function(){if(!this.J){var a=dd(this.u,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.ib)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Fa=function(a){return a?this.save():!0};k.reset=function(){Lg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Lg(this)};function Lg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.gc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.V||8,c=a-this.H%a,this.V&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;yc(this.b,this.$,1E3/Math.round(this.R/10))}};var Mg={},Kg=(Mg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Mg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Mg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Mg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Mg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Pg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.b=c;this.i=d;this.V=Qg(a);var e=this;if((this.g=dd(this.u,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Ic(56,4);this.da=wc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.u&&!a.u.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&Zg(a,b,c,d,e.ea,e.Ja, +e.Ia));a.B.Xa=!1;a.D&&(a.D--,a.D||H(a));Wg(a)})}function Tg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.cc?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){fh(a,b,c,d)})} +function fh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.u&&!a.u.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Va+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Oa+a.Ba&&(a.Ba+=f-(a.Oa+a.Ba)+1):(a.Oa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Va+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=hh(this,a++);)jh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function jh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.w=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&kh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&lh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=hh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";kh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){mh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return mh(this,a[0])};function ph(a,b){b||(a.H=0);if(a.w)for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}rh(a,e,b,c,!1,d)}else qh(a,e)} +function rh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.cb.toLowerCase()!=d.toLowerCase()&&(g++,qh(a,b,!0),h.bc?a.O("RL11 busy"):(h.bc=!0,e&&(h.ac=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,eh(new ah(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} +k.Lc=function(a,b,c,d,e){var f;a.bc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.dc)),b=null);b?(a.Ca=b,a.Va=c,a.cb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.dc),a.ac||e),this.u&&this.u.qb()):a.Ob=!1;a.ac&&(a.ac=!1,--this.H||H(this));kh(this,a.dc)}; +function oh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.A.eb(f,r|t<<8);if(vc(this.A)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.A.oa(f);if(vc(this.A)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; +k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&xc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; +var sh={},nh=(sh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],sh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],sh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],sh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],sh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],sh);function th(a){u.call(this,"Debugger",a,th);this.$=a.base||16;this.Aa=!1;this.J=0;this.P=!1;this.w=-1;this.g=[];this.V={}}z(th); +var uh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};th.prototype.rc=function(){return-1};th.prototype.sc=function(){}; +function vh(a,b,c,d){if(c)if(b){0>a.w&&a.g.length&&(a.w=0);if(0>a.w||b!=a.g[a.w])a.g.splice(0,0,b),a.w=0;a.w--}else a.P?b="end":b=a.g[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function wh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function wh(a,b,c){var d;if(b){b=xh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ah(a,b){if(b)return zh(a,b,a.S[b]);var c=0;for(b in a.S)zh(a,b,a.S[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Bh(a,b){if(b)return Ah(a,b,a.V[b]);var c=0;for(b in a.V)Ah(a,b,a.V[b]),c++;return 0this.b.rb?Jh:[];Kh(this,function(a){a:{var b=d.w.X,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Lh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=mc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.pc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Sa[a-8]:20>a?b=this.b.Ga[a-16]:20==a&&(b=Xb(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Hb).F));this.na&1073741824?this.ta.push(a):this.da&&a==this.da||(this.da=a,this.na&-2147483648&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,id(a),a.wa=0,a.C.Z()))};function Dh(a){var b;if(!fe(a))a.D&&a.D.length&&a.j("instruction history buffer freed"),a.W=0,a.D=[];else if(!a.D||!a.D.length){a.D=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.u[7]);a&&1!=this.R?Sh(this):Th(this)}};function Rh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.ca?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Dh(this);this.va=0;this.da=null;this.J=0;this.K=Z(this.b.u[7]);this.A.ca=!1;Uh(this);a||this.Z()};k.save=function(){var a=new R(this);a.set(0,Nh(this.K));a.set(1,Nh(this.N));a.set(2,[this.g,this.O,this.na]);a.set(3,this.I);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Oh(a[b++]),this.N=Oh(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.O=a[b][1],this.na|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.A.ca=!0;this.Bb=a;this.Cb=b}; -k.stop=function(a,b){if(this.A.ca){this.A.ca=!1;this.J=b-this.Cb;if(!this.R){b="stopped";if(this.J){a-=this.Bb;var c=0d&&(d=a.b.lb(b)),65535!=(d&65535)&&(c=a.D[a.W],c.F=b,c.La=!1,++a.W==a.D.length&&(a.W=0)));return!1}function qc(a){var b=a.b;if(b.A.ca)throw P(b,a.b.Hb),a.ha(),-1;return!1} -function Ch(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.B)for(b=1;b>>d.ka],!0);a.B=["bw"];a.eb=0}k.jb=function(a,b,c){var d=!0;c||Vh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.X[e>>>f.ka].jb(e&f.w,a==this.B)}}d&&(a.push(b),c?b.La=!0:(Wh(this,a,a.length-1,"set"),Dh(this)));return d}; -function Vh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.B));h.La||Dh(a);break}}return f}function Xh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Qh(y);break;case 8:x="@"+Qh(y);break;case 16:7>y?x="("+Qh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Qh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Qh(y)+")";break;case 40:x="@-("+Qh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Qh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Qh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Qh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Sa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b&&(c="PS="+J(a,Xb(d)));c&&(c+=" ");return c}function bi(a){var b,c="";for(b=0;6>b;b++)c+=ai(a,b);c=c+"\n"+(ai(a,6)+ai(a,7)+ai(a,20));return c+=$h(a,"T")+$h(a,"N")+$h(a,"Z")+$h(a,"V")+$h(a,"C")}k.jc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.jc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Qe:b,F:c,Qc:d,ia:e,hc:f})}function ci(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Qc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.C.Z();a.j("updated registers:")}a.j(bi(a));c&&(a.K=Z(d.u[7]),Th(a,J(a,a.K.F)))}}function gi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=Zh(a,b,g,f);a.j(f);a.K=b;e-=b.F-l;c++}}} -function Yh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.O&&(a.j("ended assemble at "+J(a,a.N.F)),a.K=a.N,a.O=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.da=null;if(tb(a)&&0n||"z"oa.length&&(a.j("note: only "+oa.length+" available"),ba=oa.length);ga-=ba;0>ga&&(null==oa[oa.length-1].F?(ba=ga+ba,ga=0):ga+=oa.length);var Ed=[];"call"==sg&&(Hb=1E5,Ed=["CALL"]);for(void 0!==rg&&a.j(ba+" instructions earlier:");0=oa.length&&(ga=0);a.ib=ba;ug++;Hb--}}ug||(a.j("no "+tg+"history available"),a.ib=void 0)}else{var Jb=Lh(a,na);if(Jb){var yc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ai),yc=yh(a,La)>>>0,65536>4||1;Ci--&&0Cc?String.fromCharCode(Cc):".";zc-=Bc}Kb&&(Kb+="\n");Kb+=na+" "+Fd+(0==Mb?" "+xg:"")}Kb&&a.j(Kb);a.gb=Jb}}}}break;case "e":if("else"==g[0])break;var jb,Gd,Hd,Id,Jd=g[0],Kd=g[1];"eb"==Jd?(jb=1,Gd=255,Hd=a.Db,Id=a.Sb):"e"==Jd||"ew"==Jd?(jb=2,Gd=65535,Hd=a.oa,Id=a.ab):Kd=null;if(null==Kd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Dc=Lh(a,Kd);if(Dc)for(var Ec= -2;EcNd;){for(var Ma=null,Gi=256;65536>Pb.F>>>0;){Od.F=a.oa(Pb,2);if(null==Pb.F||!Gi--)break;if(!(Od.F&1)){for(var Hi=a,Fc=Od,zg=null,Qb=Fc.F,Ag=Qb,Pd=1;6>=Pd&&Qb;Pd++){if(2< -Pd){Fc.F=Qb;var Gc=Zh(Hi,Fc);if(0<=Gc.indexOf("JSR")){var Bg=Gc.indexOf(" ");if(Qb+(Gc.indexOf(" ",Bg+1)-Bg-1)/2==Ag){zg=Gc;break}}}Qb-=2}Fc.F=Ag;if(Ma=zg)break}}if(!Ma||null==Ma)break;var Cg=null;if("ks"==Fi){var Dg=Ma.match(/[0-9A-F]+$/);Dg&&(Cg=fi(a,Dg[0]))}Ma=xa(Ma,50)+" ;"+(Cg||"stack="+J(a,Pb.F));a.j(Ma);Nd++}Nd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){fi(a,g[1],!0);break}f=!0;break;case "m":a:{var pa,qa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)qa=!0,G=null;else if("off"==G)qa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(pa in xb)if(G==pa){Da=xb[pa];qa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,qa=!0;else if("off"==g[2]&&(a.na&=~Da,qa=!1,1073741824==Da)){for(var Qd=0;Qd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bli){if(ni(d,this.J)){this.v=new R(this,"1.30.2","failsafe");ni(this.v)&&(si(this,d),a=2,ti(this.v));this.v.set("timestamp",Ca());ui(this.v);var e=this.f&&!this.B;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ri(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ni(d,g):("error"== -f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.g=null)):this.j(f+": "+g),ti(d),ni(d)?(c=ri(d),e=!0):c=!1))}e&&qi(this,c?d:null)}else 2==a&&d.clear()}else qi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.A.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(vi(this,this.b,b,c,a),this.b.pb());this.O&&(si(this,b),b.clear());!c&&this.v&&(this.v.clear(),delete this.v);this.C=0}; -function si(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ii(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new R(a,"1.30.2"),g=new R(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ea&&(c&&a.b.ha(),d=a.b.Ea(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ni(a,b,c)}})}else c(a,null)} -function Oi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--zi||Za(!0));l=!1}var g,h,l=!0;zi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Li(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--zi||Za(!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),--zi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Li(b,a,d,!0,e,m):Mi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Oi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Jh=[0],Kh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Ch.prototype; +k.Ea=function(a,b,c,d){this.A=b;this.b=c;this.u=a;(a=dd(a,"messages"))&&Fh(this,a);this.tb=Ih;this.Db=1145>this.b.vb?Kh:[];Lh(this,function(a){a:{var b=d.A.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Mh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.A.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=rc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.sc=function(a){var b;0<=a&&(8>a?b=this.b.v[a]:16>a?b=this.b.Ua[a-8]:20>a?b=this.b.Ha[a-16]:20==a&&(b=bc(this.b)));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Ib).F));this.na&1073741824?this.ua.push(a):this.da&&a==this.da||(this.da=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,kd(a),a.ua=0,a.u&&a.u.ca()))};function Eh(a){var b;if(!ge(a))a.D&&a.D.length&&a.j("instruction history buffer freed"),a.Y=0,a.D=[];else if(!a.D||!a.D.length){a.D=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.v[7]);a&&1!=this.R?Th(this):Uh(this)}};function Sh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Eh(this);this.va=0;this.da=null;this.J=0;this.K=Z(this.b.v[7]);this.B.Z=!1;Vh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Oh(this.K));a.set(1,Oh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.H);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Ph(a[b++]),this.N=Ph(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.H=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.B.Z=!0;this.Nb=a;this.Qb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.J=b-this.Qb;if(!this.R){b="stopped";if(this.J){a-=this.Nb;var c=0d&&(d=a.b.mb(b)),65535!=(d&65535)&&(c=a.D[a.Y],c.F=b,c.Na=!1,++a.Y==a.D.length&&(a.Y=0)));return!1}function mf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Ib),a.ha(),-1;return!1} +function Dh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.hb=0}k.lb=function(a,b,c){var d=!0;c||Wh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.A;f.W[e>>>f.ka].lb(e&f.A,a==this.C)}}d&&(a.push(b),c?b.Na=!0:(Xh(this,a,a.length-1,"set"),Eh(this)));return d}; +function Wh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.C));h.Na||Eh(a);break}}return f}function Yh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Rh(y);break;case 8:x="@"+Rh(y);break;case 16:7>y?x="("+Rh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Rh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Rh(y)+")";break;case 40:x="@-("+Rh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Rh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Rh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Rh(b),c+="="+J(a,d.v[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ua[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b&&(c="PS="+J(a,bc(d)));c&&(c+=" ");return c}function ci(a){var b,c="";for(b=0;6>b;b++)c+=bi(a,b);c=c+"\n"+(bi(a,6)+bi(a,7)+bi(a,20));return c+=ai(a,"T")+ai(a,"N")+ai(a,"Z")+ai(a,"V")+ai(a,"C")}k.mc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.mc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Re:b,F:c,Tc:d,ia:e,kc:f})}function di(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb)){d.v[b]=f&65535;break}a.j("unknown register: "+e);return}a.u.ca();a.j("updated registers:")}a.j(ci(a));c&&(a.K=Z(d.v[7]),Uh(a,J(a,a.K.F)))}}function hi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=$h(a,b,g,f);a.j(f);a.K=b;e-=b.F-l;c++}}} +function Zh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.F)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.da=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Ed=[];"call"==tg&&(Gb=1E5,Ed=["CALL"]);for(void 0!==sg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.rb=aa;vg++;Gb--}}vg||(a.j("no "+ug+"history available"),a.rb=void 0)}else{var Ib=Mh(a,ma);if(Ib){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Bi),zc=zh(a,Ka)>>>0,65536>4||1;Di--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Jb&&(Jb+="\n");Jb+=ma+" "+Fd+(0==Lb?" "+yg:"")}Jb&&a.j(Jb);a.jb=Ib}}}}break;case "e":if("else"==g[0])break;var ib,Gd,Hd,Id,Jd=g[0],Kd=g[1];"eb"==Jd?(ib=1,Gd=255,Hd=a.Eb,Id=a.Vb):"e"==Jd||"ew"==Jd?(ib=2,Gd=65535,Hd=a.oa,Id=a.eb):Kd=null;if(null==Kd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Mh(a,Kd);if(Ec)for(var Fc= +2;FcNd;){for(var La=null,Hi=256;65536>Ob.F>>>0;){Od.F=a.oa(Ob,2);if(null==Ob.F||!Hi--)break;if(!(Od.F&1)){for(var Ii=a,Gc=Od,Ag=null,Pb=Gc.F,Bg=Pb,Pd=1;6>=Pd&&Pb;Pd++){if(2< +Pd){Gc.F=Pb;var Hc=$h(Ii,Gc);if(0<=Hc.indexOf("JSR")){var Cg=Hc.indexOf(" ");if(Pb+(Hc.indexOf(" ",Cg+1)-Cg-1)/2==Bg){Ag=Hc;break}}}Pb-=2}Gc.F=Bg;if(La=Ag)break}}if(!La||null==La)break;var Dg=null;if("ks"==Gi){var Eg=La.match(/[0-9A-F]+$/);Eg&&(Dg=gi(a,Eg[0]))}La=xa(La,50)+" ;"+(Dg||"stack="+J(a,Ob.F));a.j(La);Nd++}Nd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){gi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== +G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Qd=0;Qd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bmi){if(oi(d,this.H)){this.w=new P(this,"1.30.2","failsafe");oi(this.w)&&(ti(this,d),a=2,ui(this.w));this.w.set("timestamp",Da());vi(this.w);var e=this.u&&!this.C;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=si(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?oi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.f=null)):this.j(f+": "+g),ui(d),oi(d)?(c=si(d),e=!0):c=!1))}e&&ri(this,c?d:null)}else 2==a&&d.clear()}else ri(this);delete this.H;delete this.J}e=ob(this.id);for(f=0;fa[1];a=a[2];this.$=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(wi(this,this.b,b,c,a),this.b.sb());this.N&&(ti(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.g=0}; +function ti(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.f||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Y;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ji(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Oi(a,b,c)}})}else c(a,null)} +function Pi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ai||Za(!0));l=!1}var g,h,l=!0;Ai++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Mi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ai||Za(!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),--Ai||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Mi(b,a,d,!0,e,m):Ni(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Pi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 985012bc0..ba641b160 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -40,202 +40,203 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={K:null,X:null,ga:null,fa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Qa=this.id:(this.oa=this.id.substr(0,b),this.Qa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,ob:!1,P:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Ea:!1,nb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.rc,a]}z(Ya);h=Ya.prototype;h.reset=function(){this.A=this.A&-120|20}; -h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.m++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.s[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];Za(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(Za(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;$a(b,this,ab);bb(b,this.reset.bind(this));cb(this);for(var e in this.b)Za(this,e,this.b[e][0])};h.ka=function(a,b){b||db();return!0};h.ja=function(){return!0}; -function eb(a,b,c,d){a.o[b]&&(void 0===c&&(a.j.error=!0,a.D("Value for "+b+" is invalid"),F(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))}function fb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function cb(a,b){for(var c in a.s)fb(a,c,null!=b?b:a.s[c])}function Za(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"} -h.pc=function(a){a||this.a.j.U||(this.h.reset(),gb(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&hb(this.a))};h.qc=function(){};h.lc=function(a){a||F(this.a)};h.jc=function(a){if(!a&&!this.a.j.U)if(this.b.ENABLE&&this.b.ENABLE[0])hb(this.a);else{a=this.C;var b;if(b=a)a.j.Ea&&(a.j.ob=!0),b=!a.j.Ea;b?(Va(a,!0),a.lb(0),Va(a,!1)):(this.a.lb(1),this.aa())}};h.kc=function(a){a&&!this.a.j.U&&(this.v&&ib(this,this.c+2),this.h.Bb(this.c,jb(this,this.f)))}; -h.mc=function(a){a||this.a.j.U||(this.w&&ib(this,this.c+2),jb(this,this.h.sb(this.c)))};h.oc=function(a){a||this.a.j.U||ib(this,this.f)};h.nc=function(a){cb(this,a||null)};h.rc=function(a,b){this.f=a?this.f|1<c;c++)fb(a,"A"+c,b&1<c;c++)fb(a,"D"+c,b&1<>2;this.l=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.bc=[nb,ob,pb,qb];a=new H(this);rb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function ob(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||I(e,c,16)} -function pb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function qb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||I(e,c,16)}function tb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.mb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.mb){p=l.size-(f-n);p>g&&(p=g);l.mb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return yb(1,f,g)}f=new H(a,f,p,a.b,d,e);rb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Cb(a,b){3932160<=b&&(b=Bb(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.l,b)} -h.sb=function(a){var b=a&this.l,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Fb(a&this.l,b&255,a);this.f--};function Db(a,b,c){3932160<=b&&(b=Bb(a.a,b));a.h[(b&a.Aa)>>>a.c].nb(b&a.l,c&65535,b)}h.Bb=function(a,b){var c=a&this.l,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; -function Eb(a){for(var b=0,c=[],d=0;da.a.bb)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null,p=f[5]||1;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=f[4],w=0;w>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.wa!=c&&(b.wa=c,Lb(b));b.G&&b.G.aa()}};h.Fc=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.zb};h.Hc=function(){return this.a.Na}; -h.zd=function(a){var b=this.a;1170>b.bb&&(a&=-49);b.Na!=a&&(b.Na=a,b.Nb=a&16?4194303:262143,Lb(b),b.G&&b.G.aa())};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; -h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Fa[a]:this.a.g[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Fa[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Fa[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Fa[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){return 65520==a?61183:0};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Ab:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.ad=function(a){return a?this.a.Ca&65280:0};h.Td=function(a){this.a.Ca=a|255}; -h.Lc=function(){return kb(this.a)};h.Dd=function(a){Mb(this.a,a&-1809|kb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; -var M={},L=(M[61568]=[null,null,K.prototype.gd,K.prototype.Zd,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.$c,K.prototype.Sd,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Yc,K.prototype.Qd,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Zc,K.prototype.Rd,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Xc,K.prototype.Pd,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.vd,"KISDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.td,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.Ac, -K.prototype.ud,"KISAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.sd,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.zd,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.wd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.yd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.fd,K.prototype.Yd,"UISDR",8,1145],M[65424]=[null,null,K.prototype.dd, -K.prototype.Wd,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.ed,K.prototype.Xd,"UISAR",8,1145],M[65456]=[null,null,K.prototype.cd,K.prototype.Vd,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.La,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.La,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.La,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.La,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.La,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.La,K.prototype.Oa, -"R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Ed,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Hd,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ma,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ma,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ma,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ma,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ma,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ma, -K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Fd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Gd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.qd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.bd,K.prototype.Ud,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.pd,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.Dc,K.prototype.xd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Ad,"PIR"],M[65532]=[null,null,K.prototype.ad,K.prototype.Td,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Dd,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),Ub(this,Qb?Vb:Wb);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&I(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.l?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.$b(a,b,c)},G:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&I(this.h,b,64);return this.c.getUint16(a,!0)},ba:function(a,b){a&1&&I(this.h,b,64);return this.s[a>>1]},la:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&I(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function rb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&Yb(a,Zb,!1),(a.m=c.m)&&$b(a,Zb,!1))}function $b(a,b,c){c&&a.m||(a.Eb=!a.l&&b[1]||a.f,a.nb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function Yb(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function Ub(a,b){b||(b=ac);Yb(a,b,void 0);$b(a,b,void 0)} -var ac=[],Xb=[H.prototype.N,H.prototype.qa,H.prototype.ca,H.prototype.wa],Zb=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Xa)var Wb=[H.prototype.G,H.prototype.la,H.prototype.O,H.prototype.ra],Vb=[H.prototype.J,H.prototype.pa,H.prototype.ba,H.prototype.va]; -function bc(a,b){x.call(this,"CPU",a,bc);var c=a.multiplier||1;this.ib=a.cycles||b;this.ra=c;this.vb=Math.round(this.ib/1E4)/100;this.va=this.vb*this.ra;this.j.U=!1;this.j.Cb=!1;this.j.Va=a.autoStart;this.j.eb=!1;this.fb=this.Ha=0;this.gb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Rb=this.ld.bind(this);E(this)}z(bc);var ec=["power","reset"];h=bc.prototype; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.C=d;this.G=a.G;for(b=0;ba.pa/a.va&&(b=1);a.ra=b;b=a.vb*a.ra;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&lc(a.l)}a.O+=a.la;a.la=0;a.ca=ra();a.qa=0;jc(a)}function Hb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Jb(a,b,c){0<=b&&ba.J[b][0]&&(c=a.ib*a.ra/1E3*c|0,a.J[b][0]=c+mc(a))}function mc(a,b){var c=a.Ga-=a.a;a.a=a.I=0;b&&(a.Ga=0);return c} -h.ld=function(){if(this.j.U){this.wb>=this.ib&&jc(this,!0);this.Ua=0;this.cb=ra();if(this.qa){var a=this.cb-this.qa;a>this.Pb&&(this.ca+=a,this.ca>this.cb&&(this.ca=this.cb))}try{do{for(var b,c=this.j.eb?1:this.kb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.lb(b)}catch(l){if("number"!=typeof l)throw l;}b=mc(this,!0);this.Ua+=b;this.la+=b;a=b;if(this.j.eb){var f=!1;this.fb=this.fb+this.Jb()|0;this.Ha-=a;0>=this.Ha&&(this.Ha+=this.Ra,f=!0);0<=this.Sa&&this.Sa<= -kc(this)&&(this.Ra=this.Sa=-1,hc(this),F(this),f=!0);f&&this.T(kc(this)+" cycles: checksum="+m(this.fb))}for(var a=b,g=this.J.length-1;0<=g;g--){var k=this.J[g];0>k[0]||(k[0]-=a,0>=k[0]&&(k[0]=-1,k[1]()))}this.Ta-=b;if(0>=this.Ta){this.Ta+=this.kb;15<=++this.Qb&&(this.l&&this.l.aa(),this.Qb=0);break}}while(this.j.U)}catch(l){F(this);this.l&&this.l.stop(ra(),kc(this));b=l.stack||l.message;this.j.error=!0;this.D(b);return}if(this.j.U){b=setTimeout;c=this.Rb;this.qa=ra();d=this.Pb;this.Ua&&(d=Math.round(d* -this.Ua/this.kb));d-=this.qa-this.cb;if(e=this.qa-this.ca)this.pa=Math.round(this.la/(10*e))/100,864E5<=e&&(this.O=0,ic(this));if(0>d||this.pad&&(this.ca-=d),d=0;this.wb+=this.Ua;this.qa+=d;b(c,d)}}};function hb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{ic(a);a.j.U=!0;a.j.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.ca,kc(a));setTimeout(a.Rb,0)}}h.lb=function(){return 0}; -function F(a){var b=!1;if(a.j.U){mc(a);a.O+=a.la;a.la=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),kc(a));b=!0}a.j.complete=void 0;return b}function nc(a){this.bb=+a.model||1170;this.Lb=a.addrReset||0;bc.call(this,a,6666667);this.decode=1120==this.bb?oc.bind(this):pc.bind(this);qc(this);this.sa=0;this.R=null;this.j.complete=!1}z(nc,bc);h=nc.prototype;h.reset=function(){this.status("model "+this.bb);this.j.U&&F(this);qc(this);gc(this);this.j.error=!1;this.parent.reset.call(this)}; -function qc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Lb];a.Fa=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.sc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.F=0;a.c=a.b=a.tb=0;a.Ia=-1;gb(a)}function gb(a){a.Ca=255;a.M=0;a.Ab=0;a.w=0;a.Ba=0;a.zb=0;a.Na=0;a.wa=0;a.$a=0;a.Nb=262143;a.R=null;a.h&&Lb(a)}function Lb(a){a.wa?(a.ba=65536,a.N=a.ic,a.W=a.hd,a.nb=a.$d,tb(a.h,a.Na&16?22:18)):(a.ba=0,a.N=a.hc,a.W=a.Ub,a.nb=a.ac,tb(a.h,16))}function rc(a,b,c){a.Lb=b;O(a,b);!c&&a.C&&(F(a)||a.C.aa())}h.Jb=function(){return 0}; -h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.O,this.ra]);a.set(2,Eb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.O=b[1];ic(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function uc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function vc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function wc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function xc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function J(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=kb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.zb=b);a.v=0;var e=a.W(b|a.ba),f=a.W(b+2&65535|a.ba);Mb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);yc(a,a.Ia);yc(a,a.g[7]);O(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function zc(a){var b=Ac(a),c=Ac(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Mb(a,c);a.u&=-17} -function Bb(a,b){var c=b>>13&31;31>c&&a.Na&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Bc(a,b,c){var d,e,f,g=0;d=b>>13;a.Na&a.sc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> -f||4194239>>a.c].Eb(b&a.l,c&255,b)}function Ac(a){var b=a.W(a.g[6]|a.ba);a.g[6]=a.g[6]+2&65535;return b}function yc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(tc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(tc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.ba)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.sb=function(a){if(!this.wa)return this.h.sb(a);this.sa++;a=this.Ub(Bc(this,a,2));this.sa--;return a}; -h.Ya=function(a,b){this.wa?(this.sa++,Cc(this,Bc(this,a,5),b),this.sa--):this.h.Ya(a,b)};h.Bb=function(a,b){this.wa?(this.sa++,this.ac(Bc(this,a,4),b),this.sa--):this.h.Bb(a,b)};h.hc=function(a,b,c){return Dc(this,a,b,c)};h.ic=function(a,b,c){return Bc(this,Dc(this,a,b,c),c)};h.Ub=function(a){return Cb(this.h,a)};h.hd=function(a){return Cb(this.h,Bc(this,a,2))};h.ac=function(a,b){Db(this.h,a,b&65535)};h.$d=function(a,b){Db(this.h,Bc(this,a,4),b)}; -function Ec(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Dc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.ba),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Fc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Dc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Bc(a,e|c&65536,4),a.v=a.B>>14&3,Db(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} -function Gc(a,b){b>>=6;var c=a.F=b&7;(b=a.A=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Hc(a,b){b>>=6;var c=a.F=b&7;return(b=a.A=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]}function Ic(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Dc(a,b,c,8)}function Jc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Ab(a.h,c)):a=a.g[c]&255;return a}function Kc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Cb(a.h,a.N(b,c,2)):a.g[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.N(b,e,7),Cc(a,e,d.call(a,c,Ab(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),Db(a.h,e,d.call(a,c,Cb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Lc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Cc(a,a.N(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Db(a.h,a.N(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.lb=function(a){this.j.complete=!0;var b=a?this.j.Cb?0:1:-1;this.j.Cb=!1;this.Ga=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.R&&this.R.Ka>d?this.R:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(tc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.R,e==a)this.R=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(sc(this))}while(0>1|b<<16;wc(this,a);return a&65535}function Sc(a,b){a=b&2048|b>>1|b<<8;wc(this,a<<8);return a&255}function Tc(a,b){a=b&~a;R(this,a);return a}function Uc(a,b){a=b&~a;R(this,a<<8);return a}function Vc(a,b){a|=b;R(this,a);return a}function Wc(a,b){a|=b;R(this,a<<8);return a}function Xc(a,b){a=~b|65536;uc(this,a);return a&65535}function Yc(a,b){a=~b|256;uc(this,a<<8);return a&255} -function Zc(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function $c(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function ad(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function bd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function cd(a,b){a=-b;uc(this,a,a&b&32768);return a&65535}function dd(a,b){a=-b;uc(this,a<<8,(a&b&128)<<8);return a&255} -function ed(a,b){a=b<<1|this.m>>16&1;wc(this,a);return a&65535}function fd(a,b){a=b<<1|this.m>>16&1;wc(this,a<<8);return a&255}function gd(a,b){a=(this.m&65536|b)>>1|b<<16;wc(this,a);return a&65535}function hd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;wc(this,a<<8);return a&255}function id(a,b){var c=b-a;xc(this,c,a,b);return c&65535}function jd(a,b){var c=b-a;xc(this,c<<8,a<<8,b<<8);return c&255}function kd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function ld(a,b){a^=b;R(this,a);return a&65535}function md(a){U(this,a,Hc(this,a),Nc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function nd(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function od(a){var b=Kc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function pd(a){V(this,a,!Q(this))}function qd(a){V(this,a,Q(this))} -function rd(a){U(this,a,Hc(this,a),Tc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function sd(a){S(this,a,Gc(this,a),Uc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function td(a){U(this,a,Hc(this,a),Vc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){S(this,a,Gc(this,a),Wc);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function vd(a){R(this,Hc(this,a)&Kc(this,a));this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function wd(a){R(this,(Gc(this,a)&Jc(this,a))<<8);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function xd(a){V(this,a,this.i&65535?0:4)}function yd(a){V(this,a,!this.ya()==!(this.f&32768))}function zd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Ad(a){V(this,a,!Q(this)&&!!(this.i&65535))} -function Bd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Cd(a){V(this,a,Q(this)||(this.i&65535?0:4))}function Dd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Ed(a){V(this,a,this.ya())}function Fd(a){V(this,a,!!(this.i&65535))}function Gd(a){V(this,a,!this.ya())}function Hd(){J(this,12,1);this.a-=5}function Id(a){V(this,a,!0)}function Jd(a){V(this,a,!(this.f&32768))}function Kd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ld(a){var b=Hc(this,a);a=Kc(this,a);xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Md(a){var b=Gc(this,a)<<8;a=Jc(this,a)<<8;xc(this,b-a,a,b);this.a-=this.c?4+(this.F&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Nd(a){var b=Kc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Od(){J(this,24,2);this.a-=25} -function Pd(){this.B&49152?(this.M|=128,J(this,4,3)):this.C?this.C.b():F(this);this.a-=7}function Qd(){J(this,16,4);this.a-=25}var Rd=[0,7,7,10,7,11,9,13];function Sd(a){this.I=this.a;O(this,Ic(this,a));this.a=this.I-Rd[this.c]}var Td=[0,14,14,17,14,18,16,20];function Ud(a){this.I=this.a;var b=Ic(this,a);a=a>>6&7;yc(this,this.g[a]);this.g[a]=this.g[7];O(this,b);this.a=this.I-Td[this.c]}var Vd=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Wd(a){var b=Hc(this,a);this.I=this.a;R(this,Mc(this,a,b));this.a=this.I-Vd[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function Xd(a){var b=Gc(this,a);R(this,Lc(this,a,b,1)<<8);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var Yd=[7,13,13,17,14,18,17,21]; -function Zd(a){var b=Kc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)O(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ee(a){U(this,a,Hc(this,a),id);this.a-=this.c?9+(this.F&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function fe(a){U(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)}function ge(){J(this,28,5);this.a-=5}function he(){this.u&4||this.l.aa();this.u|=4;tc(this,-2);this.a-=3}function ie(a){U(this,a,Hc(this,a),ld);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function oc(a){je[a>>12].call(this,a)}function ke(a){le[a>>6&3].call(this,a)}function me(a){ne[a>>6&3].call(this,a)}function oe(a){pe[a>>6&3].call(this,a)}function qe(a){re[a&15].call(this,a)}function se(a){te[a&15].call(this,a)} -function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)} -var je=[function(a){Ae[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,Y,function(a){Be[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Ae=[function(a){Ce[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,Y,Y,Y],le=[function(a){uc(this,Mc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}],ne=[function(a){U(this,a,0, -cd);this.a-=this.c?11:6},function(a){U(this,a,Q(this)?1:0,Nc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,Q(this)?1:0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Kc(this,a);uc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],pe=[function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Rc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Pc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Ce=[function(a){De[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,Y,qe,se,fe,fe,fe,fe],De=[Pd,he,be,Hd,Qd,ae,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],re=[$d,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],te=[$d,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Be=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,Y,Y,Y],ve=[function(a){uc(this, -Lc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,$c);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){S(this,a,0,dd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Oc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Jc(this,a);uc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],ze=[function(a){S(this,a,0,hd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,Sc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,Qc);this.a-=this.c?9:3+(7==this.b?2:0)}];function pc(a){Ee[a>>12].call(this,a)} -var Ee=[function(a){Fe[a>>8&15].call(this,a)},Wd,Ld,vd,rd,td,md,function(a){Ge[a>>8&15].call(this,a)},function(a){He[a>>8&15].call(this,a)},Xd,Md,wd,sd,ud,ee,Y],Fe=[function(a){Ie[a>>4&15].call(this,a)},Id,Fd,xd,yd,Dd,zd,Bd,Ud,Ud,ke,me,oe,function(a){Je[a>>6&3].call(this,a)},Y,Y],Je=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.ba);O(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Ec(this,a,0);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I= -this.a;Fc(this,a,0,b);R(this,b);this.a=this.I-Yd[this.c]},function(a){R(this,Mc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ie=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Sd,Sd,Sd,Sd,ce,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},qe,se,fe,fe,fe,fe],Ke=[Pd,he,be,Hd,Qd,ae,function(){zc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ge=[Zd,Zd,Nd,Nd,nd,nd,od,od,ie,ie,Y,Y,Y,Y,de,de],He=[Gd,Ed,Ad,Cd,Jd,Kd,pd,qd,Od,ge,ue,we,ye,function(a){Le[a>>6& -3].call(this,a)},Y,Y],Le=[Y,function(a){a=Ec(this,a,65536);yc(this,a);R(this,a);this.a-=11},function(a){var b=Ac(this);this.I=this.a;Fc(this,a,65536,b);R(this,b);this.a=this.I-Yd[this.c]},Y]; -function Me(a){x.call(this,"ROM",a,Me);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.D("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ne(c)})}}z(Me);Me.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ne(this)}; -Me.prototype.ka=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Me.prototype.ja=function(){return!0}; -function Ne(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c){var b="ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")";a.j.error=!0;a.D(b)}else{b=a.i;if(wb(a.h,b,a.c,Tb)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?F(a.a):rc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Ib(e.a,e.ba))});this.ca=Kb(52,4);this.O=Hb(this.a,function(){e.c|=128;e.c&64&&Ib(e.a,e.ca)});$a(b,this,Te);E(this)}; -h.Kb=function(){if(!this.v){var a=fc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Qa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){Ue(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return Ue(this)};function Ue(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Jb(this.a,this.O,1E3/Math.round(this.I/10))}};var Ve={},Te=(Ve[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],Ve[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],Ve[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],Ve[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],Ve);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&Ye(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ye(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.C=d;this.J=Ze(a);var e=this;if((this.c=fc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Kb(56,4);this.R=Hb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.P;g?a.D('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&hf(a,b,c,d,e.K,e.ga,e.fa)); -a.j.Ea=!1;a.m&&(a.m--,a.m||E(a));ef(a)})}function bf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.rb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){pf(a,b,c,d)})} -function pf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.P;if(d)a.controller.D('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var T=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.da?f=a.ma+a.da&&(a.da+=f-(a.ma+a.da)+1):(a.ma=f,a.da=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.D("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=rf(this,a++);)tf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function tf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(1);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&uf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&vf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ea){var b;b="";for(var c=0,k;k=rf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";uf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){wf(this)};h.save=function(){return(new P(this)).data()}; -h.restore=function(a){return wf(this,a[0])};function zf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.D("Unable to load the selected drive");else if(c)if("?"==c)a.D('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Bf(a,e,b,c,!1,d)}else Af(a,e)} -function Bf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Af(a,b,!0),k.qb?a.D("RL11 busy"):(k.qb=!0,e&&(k.pb=!0,a.s++),k.hb=!!f,of(new kf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.qb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.D('Disk "'+c+'" too large for drive '+("RL"+a.ub)),b=null);b?(a.ea=b,a.ua=c,a.Da=d,this.D('Mounted disk "'+c+'" in drive '+("RL"+a.ub),a.pb||e),this.l&&lc(this.l)):a.hb=!1;a.pb&&(a.pb=!1,--this.s||E(this));uf(this,a.ub)}; -function yf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){if(!n){n=a.ea.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ea.read(n,p++))||0>(w=a.ea.read(n,p++))){k=5120;break}Db(this.h,f,t|w<<8);if(Gb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ea,n=null,p;e--;){var t=Cb(this.h,f);if(Gb(this.h)){k=8192;break}f+=2;if(!n){n=a.ea.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ea.write(n,p++,t&255)||!a.ea.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; -h.Md=function(a){this.L=this.L&-1023|a&1022;this.G=this.G&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Ib(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; -var Cf={},xf=(Cf[63744]=[null,null,N.prototype.Uc,N.prototype.Md,"RLCS"],Cf[63746]=[null,null,N.prototype.Sc,N.prototype.Kd,"RLBA"],Cf[65284]=[null,null,N.prototype.Vc,N.prototype.Nd,"RLDA"],Cf[65286]=[null,null,N.prototype.Wc,N.prototype.Od,"RLMP"],Cf[65288]=[null,null,N.prototype.Tc,N.prototype.Ld,"RLBE"],Cf); -function Df(a,b,c){x.call(this,"Computer",a,Df);this.j.P=!1;Ef(this,b);this.w=fc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Ff;this.s=null;this.i=this.I=!1;this.O=fc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Gf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new mb({id:this.oa+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.G=Ua("Panel",this.id))&&this.G.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bFf){if(Hf(d,this.s)){this.f=new P(this,"1.30.2","failsafe");Hf(this.f)&&(Mf(this,d),a=2,Nf(this.f));this.f.set("timestamp",sa());Of(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Lf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Hf(d,g):("error"== -f&&"no machine state"!=g?(this.D("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Nf(d),Hf(d)?(c=Lf(d),e=!0):c=!1))}e&&Kf(this,c?d:null)}else 2==a&&d.clear()}else Kf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Pf(this,this.a,b,c,a),this.a.Va());this.F&&(Mf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; -function Mf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Sf(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.P=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Zf(a,b,c)}})}else c(a,null)} -function $f(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--Wf||Ja(!0));l=!1}var g,k,l=!0;Wf++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?Xf(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--Wf||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Wf||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Xf(b,a,d,!0,e,n):Yf(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return $f(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +x.prototype={constructor:x,parent:null,toString:function(){return this.name?this.name:this.id||this.type},$:function(a,b,c){switch(b){case "clear":return this.o[b]||(this.o[b]=c,c.onclick=function(a){return function(){a.o.print&&(a.o.print.value="")}}(this)),!0;case "print":return this.o[b]||(this.Va=this.o[b]=c,c.value="",this.T=function(a){return function(b,c){8192a;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);h=Za.prototype;h.reset=function(){this.A=this.A&-120|20}; +h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];$a(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&($a(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;ab(b,this,bb);cb(b,this.reset.bind(this));db(this);for(var e in this.b)$a(this,e,this.b[e][0])};h.ja=function(a,b){b||(eb(),this.stop());return!0};h.ia=function(){return!0}; +function fb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function db(a,b){for(var c in a.m)fb(a,c,null!=b?b:a.m[c])}function $a(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.l.U||(this.h.reset(),hb(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&ib(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])ib(this.a);else{a=this.C;var b;if(b=a)a.l.Ea&&(a.l.nb=!0),b=!a.l.Ea;if(b)Va(a,!0),a.kb(0),Va(a,!1);else try{var c=this.a.kb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.ac=[tb,ub,vb,wb];a=new I(this);xb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function ub(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function vb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function wb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function zb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.lb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.lb){p=l.size-(f-n);p>g&&(p=g);l.lb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Eb(1,f,g)}f=new I(a,f,p,a.b,d,e);xb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].wb(b&a.j,b)}function Ib(a,b){3932160<=b&&(b=Hb(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.j,b)} +h.tb=function(a){var b=a&this.j,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Jb(a,b,c){3932160<=b&&(b=Hb(a.a,b));a.h[(b&a.Aa)>>>a.c].mb(b&a.j,c&65535,b)}h.Ab=function(a,b){var c=a&this.j,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Kb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Fa!=c&&(b.Fa=c,Sb(b))}};h.Ec=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.yb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Sb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; +h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; +h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.zb:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.zb=a;b.u|=2};h.$c=function(a){return a?this.a.Ca&65280:0};h.Sd=function(a){this.a.Ca=a|255}; +h.Kc=function(){return qb(this.a)};h.Cd=function(a){Tb(this.a,a&-1809|qb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, +L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, +L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, +"R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, +L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= +[null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ac(this,Xb?bc:cc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function xb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&ec(a,gc,!1),(a.m=c.m)&&hc(a,gc,!1))}function hc(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.mb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ec(a,b,c){c&&a.i||(a.wb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function ac(a,b){b||(b=ic);ec(a,b,void 0);hc(a,b,void 0)} +var ic=[],dc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.wa],gc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var cc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],bc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.va]; +function jc(a,b){x.call(this,"CPU",a,jc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.sb=Math.round(this.gb/1E4)/100;this.va=this.sb*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.wa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(jc);var kc=["power","reset"];h=jc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.wa&&(a.wa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=oc(a)&&(a.Qa=a.Ra=-1,nc(a),G(a),c=!0);c&&a.T(oc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.va&&(b=1);a.qa=b;b=a.sb*a.qa;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&rc(a.j)}kb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;qc(a)}function Nb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Pb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+sc(a))} +function jb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function sc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} +h.kd=function(){if(this.l.U){this.ub>=this.gb&&qc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.kb(b)}catch(f){if("number"!=typeof f)throw f;}b=sc(this,!0);this.Ta+=b;this.aa+=b;lb(this,b);jb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),oc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,pc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.ub+=this.Ta;this.oa+=c;a(b,c)}}}; +function ib(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{pc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,oc(a));setTimeout(a.Qb,0)}}h.kb=function(){return 0};function G(a){var b=!1;if(a.l.U){sc(a);kb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),oc(a));b=!0}a.l.complete=void 0;return b} +function tc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;jc.call(this,a,6666667);this.decode=1120==this.Za?uc.bind(this):vc.bind(this);wc(this);this.ra=0;this.N=null;this.l.complete=!1}z(tc,jc);h=tc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);wc(this);mc(this);this.l.error=!1;this.parent.reset.call(this)}; +function wc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.rb=0;a.Ia=-1;hb(a)}function hb(a){a.Ca=255;a.M=0;a.zb=0;a.w=0;a.Ba=0;a.yb=0;a.Ga=0;a.Fa=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Sb(a)}function Sb(a){a.Fa?(a.P=65536,a.J=a.hc,a.W=a.gd,a.mb=a.Zd,zb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.mb=a.$b,zb(a.h,16))}function xc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Kb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];pc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ac(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Bc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Cc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=qb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.yb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Tb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ec(a,a.Ia);Ec(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Fc(a){var b=Gc(a),c=Gc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Tb(a,c);a.u&=-17} +function Hb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Hc(a,b,c){var d,e,f,g=0;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> +f||4194239>>a.c].Db(b&a.j,c&255,b)}function Gc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ec(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(zc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(zc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.tb=function(a){if(!this.Fa)return this.h.tb(a);this.ra++;a=this.Tb(Hc(this,a,2));this.ra--;return a}; +h.Xa=function(a,b){this.Fa?(this.ra++,Ic(this,Hc(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.Ab=function(a,b){this.Fa?(this.ra++,this.$b(Hc(this,a,4),b),this.ra--):this.h.Ab(a,b)};h.gc=function(a,b,c){return Jc(this,a,b,c)};h.hc=function(a,b,c){return Hc(this,Jc(this,a,b,c),c)};h.Tb=function(a){return Ib(this.h,a)};h.gd=function(a){return Ib(this.h,Hc(this,a,2))};h.$b=function(a,b){Jb(this.h,a,b&65535)};h.Zd=function(a,b){Jb(this.h,Hc(this,a,4),b)}; +function Kc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Jc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Lc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Jc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Hc(a,e|c&65536,4),a.v=a.B>>14&3,Jb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Mc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Gb(a.h,c)):a=a.g[c]&255;return a}function Nc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Ib(a.h,a.J(b,c,2)):a.g[c]}function Oc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Jc(a,b,c,8)}function Pc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Gb(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Ib(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Ic(a,e,d.call(a,c,Gb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Jb(a.h,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Rc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Ic(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Sc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.kb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.zb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(zc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(yc(this))}while(0>1|b<<16;Cc(this,a);return a&65535}function Yc(a,b){a=b&2048|b>>1|b<<8;Cc(this,a<<8);return a&255}function Zc(a,b){a=b&~a;S(this,a);return a}function $c(a,b){a=b&~a;S(this,a<<8);return a}function ad(a,b){a|=b;S(this,a);return a}function bd(a,b){a|=b;S(this,a<<8);return a}function cd(a,b){a=~b|65536;Ac(this,a);return a&65535}function dd(a,b){a=~b|256;Ac(this,a<<8);return a&255} +function ed(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function fd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function gd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function hd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function id(a,b){a=-b;Ac(this,a,a&b&32768);return a&65535}function jd(a,b){a=-b;Ac(this,a<<8,(a&b&128)<<8);return a&255} +function kd(a,b){a=b<<1|this.m>>16&1;Cc(this,a);return a&65535}function ld(a,b){a=b<<1|this.m>>16&1;Cc(this,a<<8);return a&255}function md(a,b){a=(this.m&65536|b)>>1|b<<16;Cc(this,a);return a&65535}function nd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Cc(this,a<<8);return a&255}function od(a,b){var c=b-a;Dc(this,c,a,b);return c&65535}function pd(a,b){var c=b-a;Dc(this,c<<8,a<<8,b<<8);return c&255}function qd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function rd(a,b){a^=b;S(this,a);return a&65535}function sd(a){U(this,a,Nc(this,a),Tc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function td(a){var b=Qc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function ud(a){var b=Qc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function vd(a){V(this,a,!R(this))}function wd(a){V(this,a,R(this))} +function xd(a){U(this,a,Nc(this,a),Zc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function yd(a){T(this,a,Mc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){U(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Mc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Bd(a){S(this,Nc(this,a)&Qc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Cd(a){S(this,(Mc(this,a)&Pc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){V(this,a,this.i&65535?0:4)}function Ed(a){V(this,a,!this.ya()==!(this.f&32768))}function Fd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Gd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Hd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Id(a){V(this,a,R(this)||(this.i&65535?0:4))}function Jd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Kd(a){V(this,a,this.ya())}function Ld(a){V(this,a,!!(this.i&65535))}function Md(a){V(this,a,!this.ya())}function Nd(){K(this,12,1);this.a-=5}function Od(a){V(this,a,!0)}function Pd(a){V(this,a,!(this.f&32768))}function Qd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Rd(a){var b=Nc(this,a);a=Qc(this,a);Dc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Sd(a){var b=Mc(this,a)<<8;a=Pc(this,a)<<8;Dc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Td(a){var b=Qc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Ud(){K(this,24,2);this.a-=25} +function Vd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Wd(){K(this,16,4);this.a-=25}var Xd=[0,7,7,10,7,11,9,13];function Yd(a){this.G=this.a;P(this,Oc(this,a));this.a=this.G-Xd[this.c]}var Zd=[0,14,14,17,14,18,16,20];function $d(a){this.G=this.a;var b=Oc(this,a);a=a>>6&7;Ec(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-Zd[this.c]}var ae=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function be(a){var b=Nc(this,a);this.G=this.a;S(this,Sc(this,a,b));this.a=this.G-ae[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ce(a){var b=Mc(this,a);S(this,Rc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var de=[7,13,13,17,14,18,17,21]; +function ee(a){var b=Qc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ke(a){U(this,a,Nc(this,a),od);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function le(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)}function me(){K(this,28,5);this.a-=5}function ne(){this.u&4||this.j&&this.j.ka();this.u|=4;zc(this,-2);this.a-=3}function oe(a){U(this,a,Nc(this,a),rd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function uc(a){pe[a>>12].call(this,a)}function qe(a){re[a>>6&3].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a&15].call(this,a)} +function ye(a){ze[a&15].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)} +var pe=[function(a){Ge[a>>8&15].call(this,a)},be,Rd,Bd,xd,zd,sd,Y,function(a){He[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,ke,Y],Ge=[function(a){Ie[a>>4&15].call(this,a)},Od,Ld,Dd,Ed,Jd,Fd,Hd,$d,$d,qe,se,ue,Y,Y,Y],re=[function(a){Ac(this,Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,ed);this.a-=this.c?9:3+(7==this.b?2:0)}],te=[function(a){U(this,a,0, +id);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Ac(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Ie=[function(a){Je[a&15].call(this,a)},Y,Y,Y,Yd,Yd,Yd,Yd,ie,Y,we,ye,le,le,le,le],Je=[Vd,ne,he,Nd,Wd,ge,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],xe=[fe,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],ze=[fe,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],He=[Md,Kd,Gd,Id,Pd,Qd,vd,wd,Ud,me,Ae,Ce,Ee,Y,Y,Y],Be=[function(a){Ac(this, +Rc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,fd);this.a-=this.c?9:3+(7==this.b?2:0)}],De=[function(a){T(this,a,0,jd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Pc(this,a);Ac(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Fe=[function(a){T(this,a,0,nd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}];function vc(a){Ke[a>>12].call(this,a)} +var Ke=[function(a){Le[a>>8&15].call(this,a)},be,Rd,Bd,xd,zd,sd,function(a){Me[a>>8&15].call(this,a)},function(a){Ne[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,ke,Y],Le=[function(a){Oe[a>>4&15].call(this,a)},Od,Ld,Dd,Ed,Jd,Fd,Hd,$d,$d,qe,se,ue,function(a){Pe[a>>6&3].call(this,a)},Y,Y],Pe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Kc(this,a,0);Ec(this,a);S(this,a);this.a-=11},function(a){var b=Gc(this);this.G= +this.a;Lc(this,a,0,b);S(this,b);this.a=this.G-de[this.c]},function(a){S(this,Sc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Oe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,Yd,Yd,Yd,Yd,ie,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},we,ye,le,le,le,le],Qe=[Vd,ne,he,Nd,Wd,ge,function(){Fc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Me=[ee,ee,Td,Td,td,td,ud,ud,oe,oe,Y,Y,Y,Y,je,je],Ne=[Md,Kd,Gd,Id,Pd,Qd,vd,wd,Ud,me,Ae,Ce,Ee,function(a){Re[a>>6& +3].call(this,a)},Y,Y],Re=[Y,function(a){a=Kc(this,a,65536);Ec(this,a);S(this,a);this.a-=11},function(a){var b=Gc(this);this.G=this.a;Lc(this,a,65536,b);S(this,b);this.a=this.G-de[this.c]},Y]; +function Se(a){x.call(this,"ROM",a,Se);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Te(c)})}}z(Se);Se.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Te(this)}; +Se.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Se.prototype.ia=function(){return!0}; +function Te(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Cb(a.h,b,a.c,$b)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):xc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Ob(e.a,e.aa))});this.da=Qb(52,4);this.P=Nb(this.a,function(){e.c|=128;e.c&64&&Ob(e.a,e.da)});ab(b,this,Ze);F(this)}; +h.Kb=function(){if(!this.v){var a=lc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ia=function(a){return a?this.save():!0};h.reset=function(){$e(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return $e(this)};function $e(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.xb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Pb(this.a,this.P,1E3/Math.round(this.I/10))}};var af={},Ze=(af[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],af[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],af[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],af[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],af);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&df(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;df(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ef(a);var e=this;if((this.c=lc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Qb(56,4);this.R=Nb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&of(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Ea=!1;a.m&&(a.m--,a.m||F(a));lf(a)})}function hf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.qb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){vf(a,b,c,d)})} +function vf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.ua+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=xf(this,a++);)zf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function zf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; +h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Af(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Bf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=xf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Af(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Cf(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Cf(this,a[0])};function Ff(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Hf(a,e,b,c,!1,d)}else Gf(a,e)} +function Hf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Gf(a,b,!0),k.pb?a.F("RL11 busy"):(k.pb=!0,e&&(k.ob=!0,a.s++),k.ib=!!f,uf(new qf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.pb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.vb)),b=null);b?(a.ca=b,a.ua=c,a.Da=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.vb),a.ob||e),this.j&&rc(this.j)):a.ib=!1;a.ob&&(a.ob=!1,--this.s||F(this));Af(this,a.vb)}; +function Ef(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Jb(this.h,f,t|w<<8);if(Mb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Ib(this.h,f);if(Mb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.Ld=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Ob(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; +var If={},Df=(If[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],If[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],If[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],If[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],If[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],If); +function Jf(a,b,c){x.call(this,"Computer",a,Jf);this.l.O=!1;Kf(this,b);this.A=lc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Lf;this.v=null;this.m=this.I=!1;this.P=lc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Mf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new sb({id:this.na+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bLf){if(Nf(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Nf(this.i)&&(Sf(this,d),a=2,Tf(this.i));this.i.set("timestamp",sa());Uf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Rf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Nf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Tf(d),Nf(d)?(c=Rf(d),e=!0):c=!1))}e&&Qf(this,c?d:null)}else 2==a&&d.clear()}else Qf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Vf(this,this.a,b,c,a),this.a.Ua());this.G&&(Sf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Sf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function Yf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);eg(a,b,c)}})}else c(a,null)} +function fg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--bg||Ja(!0));l=!1}var g,k,l=!0;bg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?cg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--bg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--bg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?cg(b,a,d,!0,e,n):dg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return fg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From b3bf213cd9ba234098072edf7d4d66dc42287d2c Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Nov 2016 19:41:29 -0700 Subject: [PATCH 12/30] Enable the Debugger to get/set front panel switches as register SW --- docs/pcx86/examples/pcx86-dbg.js | 3 +- modules/pdp11/lib/debugger.js | 28 +- modules/pdp11/lib/panel.js | 134 +++++-- modules/shared/lib/debugger.js | 2 +- versions/pc8080/1.30.2/pc8080-dbg.js | 2 +- versions/pcx86/1.30.2/pcx86-dbg.js | 3 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 507 ++++++++++++++------------- versions/pdpjs/1.30.2/pdp11.js | 338 +++++++++--------- 8 files changed, 563 insertions(+), 454 deletions(-) diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 5a7c9859f..f0585cb0c 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -709,7 +709,8 @@ case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d function pq(a,b,c){var d;if(b){b=qq(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0>=1;g=p+g;d>>=8}d=t(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function He(a,b){if(b)return Fe(a,b,a.ea[b]);var c=0;for(b in a.ea)Fe(a,b,a.ea[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0b?this.ib=this.id:(this.Pa=this.id.substr(0,b),this.ib=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Xa:!1,Zb:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.pc=b.comment;this.Rc=b;b=this.id.indexOf(".");0>b?this.kb=this.id:(this.Oa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Ya:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);k=yb.prototype;k.reset=function(){this.L=this.L&-120|20}; -k.sa=function(a,b,c,d){if(this.u&&this.u.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.H++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.D[b]=d?1:0,this.H++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.f[b];zb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.J="DEP"==b;a.K="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(zb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.b=c;this.i=d;Ab(b,this,Bb);Cb(b,this.reset.bind(this));Db(this);for(var e in this.f)zb(this,e,this.f[e][0])};k.Ga=function(a,b){b||(Eb(),this.stop());return!0}; -k.Fa=function(){return!0};function Fb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Db(a,b){for(var c in a.D)Fb(a,c,null!=b?b:a.D[c])}function zb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Tb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.$||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.ad=function(a){a||this.b.B.Z||(this.A.reset(),Ub(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.fb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.fb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.gb(0),rb(a,!1);else try{var b=this.b.gb(1);0>2;this.A=this.xa-1;this.C=this.H/this.xa|0;this.Wa=[];this.u=0;this.f=!1;this.w=[];this.Hc=[fc,gc,hc,ic];a=new I(this);jc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Wa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function gc(a,b,c){var d=!1,e=this.controller,f=e.Wa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Wa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function hc(a,b){var c=-1,d=this.controller;(a=d.Wa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function ic(a,b,c){var d=!1,e=this.controller;if(a=e.Wa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function lc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return qc(1,f,g)}f=new I(a,f,n,a.xa,d,e);jc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Ub(a&this.A,a)};k.Tb=function(a){this.f=!1;this.u++;a=this.W[(a&this.Ta)>>>this.ka].ec(a&this.A,a);this.u--;return a}; -k.oa=function(a){3932160<=a&&(a=sc(this.b,a));return this.W[(a&this.Ta)>>>this.ka].ra(a&this.A,a)};k.mb=function(a){var b=a&this.A,c=(a&this.Ta)>>>this.ka;this.f=!1;this.u++;a=this.W[c].fc(b,a);this.u--;return a};k.Vb=function(a,b){3932160<=a&&(a=sc(this.b,a));this.W[(a&this.Ta)>>>this.ka].Xb(a&this.A,b&255,a)};k.pb=function(a,b){this.f=!1;this.u++;this.W[(a&this.Ta)>>>this.ka].Yb(a&this.A,b&255,a);this.u--}; -k.eb=function(a,b){3932160<=a&&(a=sc(this.b,a));this.W[(a&this.Ta)>>>this.ka].Mb(a&this.A,b&65535,a)};k.Jb=function(a,b){var c=a&this.A,d=(a&this.Ta)>>>this.ka;this.f=!1;this.u++;this.W[d].jc(c,b&65535,a);this.u--};function tc(a){for(var b=0,c=[],d=0;da.b.vb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Za!=c&&(b.Za=c,Jc(b))}};k.pd=function(){var a=this.b.ab;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Ib};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.vb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Jc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; -k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.U[1][a>>1&7]};k.Be=function(a,b){this.b.U[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.U[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.U[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.U[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; -k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.U[1][b]&=65295};k.ld=function(a){return this.b.U[0][a>>1&7]};k.ee=function(a,b){this.b.U[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.U[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.U[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.U[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.U[0][b]&=65295}; -k.Qd=function(a){return this.b.U[3][a>>1&7]};k.He=function(a,b){this.b.U[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.U[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.U[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.U[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.U[3][b]&=65295};k.zb=function(a){a&=7;return this.b.M&2048?this.b.Ua[a]:this.b.v[a]}; -k.Bb=function(a,b){b&=7;this.b.M&2048?this.b.Ua[b]=a:this.b.v[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.v[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.v[6]=a};k.zd=function(){return this.b.v[7]};k.qe=function(a){this.b.v[7]=a};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.v[a]:this.b.Ua[a]};k.Cb=function(a,b){b&=7;this.b.M&2048?this.b.v[b]=a:this.b.Ua[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.v[6]:this.b.Ha[1]}; -k.oe=function(a){1==(this.b.M&49152)>>14?this.b.v[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.v[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.v[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; -k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.hc:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.hc=a;b.I|=2};k.Ld=function(a){return a?this.b.bb&65280:0};k.Ce=function(a){this.b.bb=a|255};k.vd=function(){return bc(this.b)};k.me=function(a){Kc(this.b,a&-1809|bc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +function yb(a){u.call(this,"Panel",a,yb);this.g=this.v=this.Ta=this.D=0;this.H=this.J=!1;this.K=zb;this.C={};this.f={START:[1,!0,!1,this.ad],STEP:[1,!1,!1,this.bd],ENABLE:[1,!1,!1,this.Xc],CONT:[1,!0,!1,this.Vc],DEP:[0,!0,!1,this.Wc],EXAM:[1,!0,!1,this.Yc],LOAD:[1,!0,!1,this.$c],TEST:[0,!0,!1,this.Zc]};for(a=0;22>a;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;k=yb.prototype;k.reset=function(){}; +k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.f[b];Ab(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.H="DEP"==b;a.J="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(Ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Bb(b,this,Cb);Db(b,this.reset.bind(this));Eb(this);Fb(this)};k.Fa=function(a,b){b||(Gb(),this.stop());return!0};k.Ea=function(){return!0}; +function Ub(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Eb(a,b){for(var c in a.C)Ub(a,c,null!=b?b:a.C[c])}function Ab(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Fb(a){for(var b in a.f)Ab(a,b,a.f[b][0])}function Vb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Wb(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Xa=[];this.f=0;this.g=!1;this.v=[];this.Hc=[ic,jc,kc,lc];a=new I(this);mc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function jc(a,b,c){var d=!1,e=this.controller,f=e.Xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function kc(a,b){var c=-1,d=this.controller;(a=d.Xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function lc(a,b,c){var d=!1,e=this.controller;if(a=e.Xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function oc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return tc(1,f,g)}f=new I(a,f,n,a.xa,d,e);mc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Sa)>>>this.la].fc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=vc(this.b,a));return this.W[(a&this.Sa)>>>this.la].ra(a&this.w,a)};k.Za=function(a){var b=a&this.w,c=(a&this.Sa)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Sa)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Sa)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; +k.gb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Sa)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Sa)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function wc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.La=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.ab!=c&&(b.ab=c,Mc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Mc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; +k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; +k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; +k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Ua[a]:this.b.u[a]}; +k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Ua[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ua[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ua[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; +k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; +k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return ec(this.b)};k.me=function(a){Nc(this.b,a&-1809|ec(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, -K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.zb,K.prototype.Bb,"R0SET0"],M[65473]=[null,null,K.prototype.zb,K.prototype.Bb,"R1SET0"],M[65474]=[null,null,K.prototype.zb,K.prototype.Bb,"R2SET0"],M[65475]=[null,null,K.prototype.zb,K.prototype.Bb,"R3SET0"],M[65476]=[null,null,K.prototype.zb,K.prototype.Bb,"R4SET0"],M[65477]=[null,null,K.prototype.zb,K.prototype.Bb, -"R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Ab,K.prototype.Cb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Ab,K.prototype.Cb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Ab,K.prototype.Cb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Ab,K.prototype.Cb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Ab,K.prototype.Cb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Ab, -K.prototype.Cb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= +K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],M[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],M[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],M[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],M[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],M[65477]=[null,null,K.prototype.Ab,K.prototype.Db, +"R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Bb, +K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Sc(this,Oc?Tc:Uc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},V:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.A.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;Zc(c,this.F+a,1,c.L)&&c.ha(!0)}return this.ec(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;Zc(c,this.F+a,2,c.L)&&c.ha(!0)}return this.fc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;Zc(d,this.F+a,1,d.C)&&d.ha(!0)}this.u?this.w(a,b,c):this.Yb(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;Zc(d,this.F+a,2,d.C)&&d.ha(!0)}this.u?this.w(a,b,c):this.jc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.A.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.A.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},la:function(a,b){this.G[a]=b;this.Ra=!0},ua:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},ib:function(a,b,c){a&1&&this.A.Da(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},La:function(a,b,c){a&1&&this.A.Da(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function jc(a,b,c){a.i=b;a.f=a.g=0;c&&((a.f=c.f)&&Yc(a,Xc,!1),(a.g=c.g)&&Wc(a,Xc,!1))}function $c(a,b){b?--a.g||(a.Xb=a.u?a.w:a.Yb,a.Mb=a.u?a.H:a.jc):--a.f||(a.Ub=a.ec,a.ra=a.fc)}function Wc(a,b,c){c&&a.g||(a.Xb=!a.u&&b[1]||a.w,a.Mb=!a.u&&b[3]||a.H);if(c||void 0===c)a.Yb=b[1]||a.w,a.jc=b[3]||a.H}function Yc(a,b,c){c&&a.f||(a.Ub=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.ec=b[0]||a.K,a.fc=b[2]||a.L}function Sc(a,b){b||(b=ad);Yc(a,b,void 0);Wc(a,b,void 0)} -var ad=[],Vc=[I.prototype.V,I.prototype.va,I.prototype.da,I.prototype.Ma],Xc=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var Uc=[I.prototype.N,I.prototype.la,I.prototype.Pa,I.prototype.ib],Tc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.La]; -function bd(a,b){u.call(this,"CPU",a,bd,1);var c=a.multiplier||1;this.kb=a.cycles||b;this.$a=c;this.tb=Math.round(this.kb/1E4)/100;this.nb=this.tb*this.$a;this.B.Z=!1;this.B.Wb=!1;this.B.sb=a.autoStart;this.B.ub=!1;this.Fb=this.ma=0;this.Gb=a.csStart;this.wb=a.csInterval;this.xb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(bd);var cd=["power","reset"];k=bd.prototype; -k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.wb,c=!0);0<=a.xb&&a.xb<=hd(a)&&(a.wb=a.xb=-1,fd(a),a.ha(),c=!0);c&&a.j(hd(a)+" cycles: checksum="+p(a.Fb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.u)if(a=d.u,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.$a=b;b=a.tb*a.$a;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.u&&a.u.qb()}Wb(a,a.V);a.V=0;a.R=Ba();a.$=0;jd(a);return d}function wc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function yc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.kb*a.$a/1E3*c|0,a.K[b][0]=c+kd(a))} -function ld(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Vb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function kd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.Db>=this.kb&&jd(this,!0);this.Aa=0;this.jb=Ba();if(this.$){var a=this.jb-this.$;a>this.Sb&&(this.R+=a,this.R>this.jb&&(this.R=this.jb))}try{do{var b=ld(this,this.B.ub?1:this.hb);try{this.gb(b)}catch(e){if("number"!=typeof e)throw e;}b=kd(this,!0);this.Aa+=b;this.V+=b;Xb(this,b);Vb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.hb;15<=++this.tc&&(this.u&&this.u.ca(),this.tc=0);break}}while(this.B.Z)}catch(e){this.ha();this.u&&this.u.stop(Ba(),hd(this));vb(this,e.stack|| -e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.Aa&&(c=Math.round(c*this.Aa/this.hb));var c=c-(this.$-this.jb),d=this.$-this.R;d&&(this.Y=Math.round(this.V/(10*d))/100,864E5<=d&&(this.la=0,id(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.Db+=this.Aa;this.$+=c;a(b,c)}}}; -k.fb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;id(this);this.B.Z=!0;this.B.Wb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.u&&(a&&this.u.qb(!0),this.u.start(this.R,hd(this)));setTimeout(this.uc,0);return!0};k.gb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){kd(this);Wb(this,this.V);this.V=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.u&&this.u.stop(Ba(),hd(this));b=!0}this.B.complete=a;return b}; -function md(a){this.vb=+a.model||1170;this.Nb=a.addrReset||0;bd.call(this,a,6666667);this.decode=1120==this.vb?nd.bind(this):od.bind(this);pd(this);this.L=0;this.N=null;this.B.complete=!1}z(md,bd);k=md.prototype;k.reset=function(){this.status("model "+this.vb);this.B.Z&&this.ha();pd(this);ed(this);this.B.error=!1;this.parent.reset.call(this)}; -function pd(a){a.S=65536;a.T=32768;a.aa=65535;a.X=32768;a.M=15;a.v=[0,0,0,0,0,0,0,a.Nb];a.Ua=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.w=0;a.Ma=0;a.Qc=[4,2,0,1];a.U=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Ub(a)}function Ub(a){a.bb=255;a.ga=0;a.hc=0;a.C=0;a.ab=0;a.Ib=0;a.ob=0;a.Za=0;a.La=0;a.Qb=262143;a.N=null;a.A&&Jc(a)}function Jc(a){a.Za?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,lc(a.A,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,lc(a.A,16))}function qd(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.qc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.la,this.$a]);a.set(2,tc(this.A));return a.data()};k.restore=function(a){var b=a[1];this.la=b[1];id(this,b[3]);a:{b=this.A;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.w!=c&&(a.Ha[c]=a.v[6],a.v[6]=a.Ha[a.w]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.T=0)}function wd(a,b,c){a.I&128||(a.X=a.aa=a.S=b,a.T=c||0)}function xd(a,b,c,d){a.I&128||(a.X=a.aa=a.S=b,a.T=(c^b)&(d^b))} -function yd(a,b){a.I&128||(a.X=a.aa=a.S=b,a.T=a.X^a.S>>1)}function zd(a,b,c,d){a.I&128||(a.X=a.aa=a.S=b,a.T=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=bc(this):this.w||(a=4,c=!0);this.C&57344||(this.ab=63222,this.Ib=a);this.w=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Kc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.v[6]=4);Ad(this,this.va);Ad(this,this.v[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; -function Bd(a){var b=Td(a),c=Td(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Kc(a,c);a.I&=-17}function sc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Ud(a,b,c){var d,e,f,g=0;d=b>>13;a.ob&a.Qc[a.w]||(d&=7);e=a.U[a.w][d];f=(a.wa[a.w][d]<<6)+(b&8191)&a.Qb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.U[a.w][d]=e;if(4194170!==f||a.w)a.La=a.w,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.La<<5|a.Ma<<1),b=!0),a.C&61440||!(4191360> -f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.v[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.v[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.v[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(vd(a,2)),e=e+a.v[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(vd(a,2)),e=e+a.v[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.v[c]=a.v[c]+f&65535;!g||a.C&57344||(a.ab=a.ab<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.v[6]<=a.bb||65534<=a.v[6])&&(a.v[6]<=a.bb-32?(a.ga|=4,a.v[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Za)return this.A.Tb(a);this.L++;a=Vd(this,Ud(this,a,3));this.L--;return a}; -k.mb=function(a){if(!this.Za)return this.A.mb(a);this.L++;a=this.yc(Ud(this,a,2));this.L--;return a};k.pb=function(a,b){this.Za?(this.L++,Wd(this,Ud(this,a,5),b),this.L--):this.A.pb(a,b)};k.Jb=function(a,b){this.Za?(this.L++,this.Fc(Ud(this,a,4),b),this.L--):this.A.Jb(a,b)};k.Oc=function(a,b,c){return Xd(this,a,b,c)};k.Pc=function(a,b,c){return Ud(this,Xd(this,a,b,c),c)};k.yc=function(a){return this.A.oa(a)};k.Sd=function(a){return this.A.oa(Ud(this,a,2))};k.Fc=function(a,b){this.A.eb(a,b&65535)}; -k.Je=function(a,b){this.A.eb(Ud(this,a,4),b)};function Yd(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Xd(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.w=a.M>>12&3,c=a.ra(d|c&a.P),a.w=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.v[d]:a.Ha[a.M>>12&3];return c}function Zd(a,b,c,d){a.C&57344||(a.ab=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Xd(a,b,e,4),c&65536||(e&=65535),a.w=a.M>>12&3,e=Ud(a,e|c&65536,4),a.w=a.M>>14&3,a.A.eb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.v[e]=d:a.Ha[a.M>>12&3]=d} -function $d(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Vd(a,a.ba(b,c,3)):a.v[c]&255}function ae(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.A.oa(a.ba(b,c,2)):a.v[c]}function be(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Xd(a,b,c,8)}function ce(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Vd(a,a.ba(b,c,3)):a.v[c]&255}function de(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.A.oa(a.ba(b,c,2)):a.v[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Wd(a,e,d.call(a,c,Vd(a,e)))):a.v[e]=a.v[e]&65280|d.call(a,c,a.v[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.A.eb(e,d.call(a,c,a.A.oa(e)))):a.v[e]=d.call(a,c,a.v[e])}function ee(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Wd(a,a.ba(b,e,5),c):a.v[e]=c?d&1?c<<24>>24&65535:a.v[e]&-256|c&255:a.v[e]&-256;return c} -function fe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.A.eb(a.ba(b,d,4),c):a.v[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.v[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.gb=function(a){this.B.complete=!0;var b=this.i&&ge(this.i)?1:this.B.Wb?-1:0,c=a?this.B.Wb?0:1:-1;this.B.Wb=!1;this.da=this.b=a;do{if(b){if(this.i&&he(this.i,this.v[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.hc&224)>>5,f=this.N&&this.N.yb>e?this.N:null;f&&(d=f.Xd,e=f.yb);e>(this.M&224)>>5?(this.I&4&&(vd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(ud(this))}while(0>1|b<<16;yd(this,a);return a&65535}function ne(a,b){a=b&2048|b>>1|b<<8;yd(this,a<<8);return a&255}function oe(a,b){a=b&~a;R(this,a);return a}function pe(a,b){a=b&~a;R(this,a<<8);return a}function qe(a,b){a|=b;R(this,a);return a}function re(a,b){a|=b;R(this,a<<8);return a} -function se(a,b){a=~b|65536;wd(this,a);return a&65535}function te(a,b){a=~b|256;wd(this,a<<8);return a&255}function ue(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.T=b&(b^a));return a&65535}function ve(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.T=b&(b^c));return a&255}function we(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.T=a&(b^a));return a&65535}function xe(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.T=c&(b<<8^c));return a&255} -function ye(a,b){a=-b;wd(this,a,a&b&32768);return a&65535}function ze(a,b){a=-b;wd(this,a<<8,(a&b&128)<<8);return a&255}function Ae(a,b){a=b<<1|this.S>>16&1;yd(this,a);return a&65535}function Be(a,b){a=b<<1|this.S>>16&1;yd(this,a<<8);return a&255}function Ce(a,b){a=(this.S&65536|b)>>1|b<<16;yd(this,a);return a&65535}function De(a,b){a=((this.S&65536)>>8|b)>>1|b<<8;yd(this,a<<8);return a&255}function Ee(a,b){var c=b-a;zd(this,c,a,b);return c&65535} -function Fe(a,b){var c=b-a;zd(this,c<<8,a<<8,b<<8);return c&255}function Ge(a,b){this.I&128||(this.X=this.aa=b&65280,this.T=this.S=0);return(b<<8|b>>8)&65535}function He(a,b){a^=b;R(this,a);return a&65535}function Ie(a){T(this,a,ae(this,a),ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Je(a){var b=de(this,a);a=a>>6&7;var c=this.v[a];c&32768&&(c|=4294901760);this.S=this.T=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.T=32768)}this.v[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Ke(a){var b=de(this,a);a=a>>6&7;var c=this.v[a]<<16|this.v[a|1];this.S=this.T=0;b&=63;if(b&32){b=64-b;32>b-1;this.S=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.v[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Le(a){U(this,a,!rd(this))}function Me(a){U(this,a,rd(this))} -function Ne(a){T(this,a,ae(this,a),oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Oe(a){S(this,a,$d(this,a),pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Pe(a){T(this,a,ae(this,a),qe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Qe(a){S(this,a,$d(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Re(a){R(this,ae(this,a)&de(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Se(a){R(this,($d(this,a)&ce(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Te(a){U(this,a,td(this))}function Ue(a){U(this,a,!this.Sa()==!sd(this))}function Ve(a){U(this,a,!td(this)&&!this.Sa()==!sd(this))}function We(a){U(this,a,!rd(this)&&!td(this))}function Xe(a){U(this,a,td(this)||!this.Sa()!=!sd(this))} -function Ye(a){U(this,a,rd(this)||td(this))}function Ze(a){U(this,a,!this.Sa()!=!sd(this))}function $e(a){U(this,a,this.Sa())}function af(a){U(this,a,!td(this))}function bf(a){U(this,a,!this.Sa())}function cf(){this.pa(12,1);this.b-=5}function df(a){U(this,a,!0)}function ef(a){U(this,a,!sd(this))}function ff(a){U(this,a,sd(this))}function V(a){a&1&&(this.S=0);a&2&&(this.T=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function gf(a){var b=ae(this,a);a=de(this,a);zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function hf(a){var b=$d(this,a)<<8;a=ce(this,a)<<8;zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function jf(a){var b=de(this,a);if(b){a=a>>6&7;var c=this.v[a]<<16|this.v[a|1];this.S=this.T=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.v[a]=d&65535,this.v[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.T=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.v[a]&&(this.v[a]=this.v[a|1]=1));this.b-=53}else this.aa=this.X=0,this.T=32768,this.S=65536,this.b-=7}function kf(){this.pa(24,2);this.b-=25} -function lf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?mf(this.i):this.ha();this.b-=7}function nf(){this.pa(16,4);this.b-=25}var of=[0,7,7,10,7,11,9,13];function pf(a){this.J=this.b;O(this,be(this,a));this.b=this.J-of[this.g]}var qf=[0,14,14,17,14,18,16,20];function rf(a){this.J=this.b;var b=be(this,a);a=a>>6&7;Ad(this,this.v[a]);this.v[a]=this.v[7];O(this,b);this.b=this.J-qf[this.g]}var sf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function tf(a){var b=ae(this,a);this.J=this.b;R(this,fe(this,a,b));this.b=this.J-sf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function uf(a){var b=$d(this,a);R(this,ee(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var vf=[7,13,13,17,14,18,17,21]; -function wf(a){var b=de(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.v[a];c&32768&&(c|=-65536);b=~~(b*c);this.v[a]=b>>16&65535;this.v[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.T=0,this.S=-32768>b||32767>6;if(this.v[b]=this.v[b]-1&65535)O(this,this.v[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Cf(a){T(this,a,ae(this,a),Ee);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Df(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)}function Ef(){this.pa(28,5);this.b-=5}function Ff(){this.I&4||this.u&&this.u.ca();this.I|=4;vd(this,-2);this.b-=3}function Gf(a){T(this,a,ae(this,a),He);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=mf(b);b||this.pa(8,6)}function nd(a){Hf[a>>12].call(this,a)}function If(a){Jf[a>>6&3].call(this,a)}function Kf(a){Lf[a>>6&3].call(this,a)} -function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a&15].call(this,a)}function Qf(a){Rf[a&15].call(this,a)}function Sf(a){Tf[a>>6&3].call(this,a)}function Uf(a){Vf[a>>6&3].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)} -var Hf=[function(a){Yf[a>>8&15].call(this,a)},tf,gf,Re,Ne,Pe,Ie,W,function(a){Zf[a>>8&15].call(this,a)},uf,hf,Se,Oe,Qe,Cf,W],Yf=[function(a){$f[a>>4&15].call(this,a)},df,af,Te,Ue,Ze,Ve,Xe,rf,rf,If,Kf,Mf,W,W,W],Jf=[function(a){wd(this,fe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ue);this.b-=this.g?9:3+(7==this.f?2:0)}],Lf=[function(a){T(this,a,0, -ye);this.b-=this.g?11:6},function(a){T(this,a,rd(this)?1:0,ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,rd(this)?1:0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=de(this,a);wd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Nf=[function(a){T(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ke);this.b-=this.g?9:3+(7==this.f?2:0)}], -$f=[function(a){ag[a&15].call(this,a)},W,W,W,pf,pf,pf,pf,Af,W,Of,Qf,Df,Df,Df,Df],ag=[lf,Ff,zf,cf,nf,yf,W,W,W,W,W,W,W,W,W,W],Pf=[xf,function(){this.S=0;this.b-=5},function(){this.T=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Rf=[xf,function(){this.S=65536;this.b-=5},function(){this.T=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],Zf=[bf,$e,We,Ye,ef,ff,Le,Me,kf,Ef,Sf,Uf,Wf,W,W,W],Tf=[function(a){wd(this, -ee(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ve);this.b-=this.g?9:3+(7==this.f?2:0)}],Vf=[function(a){S(this,a,0,ze);this.b-=this.g?11:6},function(a){S(this,a,rd(this)?1:0,je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,rd(this)?1:0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ce(this,a);wd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],Xf=[function(a){S(this,a,0,De);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ne);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,le);this.b-=this.g?9:3+(7==this.f?2:0)}];function od(a){bg[a>>12].call(this,a)} -var bg=[function(a){cg[a>>8&15].call(this,a)},tf,gf,Re,Ne,Pe,Ie,function(a){dg[a>>8&15].call(this,a)},function(a){eg[a>>8&15].call(this,a)},uf,hf,Se,Oe,Qe,Cf,W],cg=[function(a){fg[a>>4&15].call(this,a)},df,af,Te,Ue,Ze,Ve,Xe,rf,rf,If,Kf,Mf,function(a){gg[a>>6&3].call(this,a)},W,W],gg=[function(a){a=this.v[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.v[5]);this.v[6]=a+2&65535;this.v[5]=b;this.b-=8},function(a){a=Yd(this,a,0);Ad(this,a);R(this,a);this.b-=11},function(a){var b=Td(this);this.J= -this.b;Zd(this,a,0,b);R(this,b);this.b=this.J-vf[this.g]},function(a){R(this,fe(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],fg=[function(a){hg[a&15].call(this,a)},W,W,W,pf,pf,pf,pf,Af,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Of,Qf,Df,Df,Df,Df],hg=[lf,Ff,zf,cf,nf,yf,function(){Bd(this);this.b-=13},W,W,W,W,W,W,W,W,W],dg=[wf,wf,jf,jf,Je,Je,Ke,Ke,Gf,Gf,W,W,W,W,Bf,Bf],eg=[bf,$e,We,Ye,ef,ff,Le,Me,kf,Ef,Sf,Uf,Wf,function(a){ig[a>> -6&3].call(this,a)},W,W],ig=[W,function(a){a=Yd(this,a,65536);Ad(this,a);R(this,a);this.b-=11},function(a){var b=Td(this);this.J=this.b;Zd(this,a,65536,b);R(this,b);this.b=this.J-vf[this.g]},W]; -function jg(a){u.call(this,"ROM",a,jg);this.ia=this.u=null;this.C=a.addr;this.f=a.size;this.w=a.alias;this.g=a.file;this.D=sa(this.g);if(this.g){a=this.g;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.u=a.ea,c.ia=a.ia):c.g=null);kg(c)})}}z(jg);jg.prototype.Ea=function(a,b,c,d){this.A=b;this.b=c;this.i=d;kg(this)}; -jg.prototype.Ga=function(){this.ia&&(this.i&&lg(this.i,this.id,this.C,this.f,this.ia),delete this.ia);return!0};jg.prototype.Fa=function(){return!0}; -function kg(a){if(!tb(a)){if(a.g){if(!a.u||!a.A)return;a.f||(a.f=a.u.length);if(a.u.length!=a.f)vb(a,"ROM size ("+p(a.u.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;b=a.C;if(oc(a.A,b,a.f,Rc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():qd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&xc(e.b,e.la))});this.ma=Ic(52,4);this.$=wc(this.b,function(){e.g|=128;e.g&64&&xc(e.b,e.ma)});Ab(b,this,Kg);H(this)}; -k.vc=function(){if(!this.J){var a=dd(this.u,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.ib)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Fa=function(a){return a?this.save():!0};k.reset=function(){Lg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Lg(this)};function Lg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.gc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.V||8,c=a-this.H%a,this.V&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.w.value+=b;this.w.scrollTop=this.w.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;yc(this.b,this.$,1E3/Math.round(this.R/10))}};var Mg={},Kg=(Mg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Mg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Mg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Mg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Mg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Pg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.u=a;this.A=b;this.b=c;this.i=d;this.V=Qg(a);var e=this;if((this.g=dd(this.u,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Ic(56,4);this.da=wc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.u&&!a.u.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&Zg(a,b,c,d,e.ea,e.Ja, -e.Ia));a.B.Xa=!1;a.D&&(a.D--,a.D||H(a));Wg(a)})}function Tg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ta);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.cc?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){fh(a,b,c,d)})} -function fh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.u&&!a.u.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Va+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ta=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Oa+a.Ba&&(a.Ba+=f-(a.Oa+a.Ba)+1):(a.Oa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Va+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=hh(this,a++);)jh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function jh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.w=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&kh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&lh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=hh(a,c++);)for(var l=0,m=h.length;l>1),this.b=new Int32Array(this.C,0,this.size>>2),Vc(this,Rc?Wc:Xc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Qa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Oa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Ca(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Qa=!0},ta:function(a,b,c){this.G[a]=b;this.Qa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Qa=!0},Ha:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Qa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function mc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&ad(a,$c,!1),(a.A=c.A)&&Zc(a,$c,!1))}function cd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function Zc(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function ad(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Vc(a,b){b||(b=dd);ad(a,b,void 0);Zc(a,b,void 0)} +var dd=[],Yc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.La],$c=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Xc=[I.prototype.N,I.prototype.ka,I.prototype.Oa,I.prototype.kb],Wc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.Ha]; +function ed(a,b){u.call(this,"CPU",a,ed,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(ed);var fd=["power","reset"];k=ed.prototype; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=kd(a)&&(a.xb=a.yb=-1,id(a),a.ha(),c=!0);c&&a.j(kd(a)+" cycles: checksum="+p(a.Gb))}} +k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Yb(a,a.S);a.S=0;a.R=Ba();a.$=0;md(a);return d}function zc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+nd(a))} +function od(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Xb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function nd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&md(this,!0);this.za=0;this.Wa=Ba();if(this.$){var a=this.Wa-this.$;a>this.Sb&&(this.R+=a,this.R>this.Wa&&(this.R=this.Wa))}try{do{var b=od(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.za+=b;this.S+=b;Zb(this,b);Xb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.ca(),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),kd(this));vb(this,e.stack|| +e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.$-this.Wa),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,ld(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.$+=c;a(b,c)}}}; +k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;ld(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,kd(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){nd(this);Yb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),kd(this));b=!0}this.B.complete=a;return b}; +function pd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;ed.call(this,a,6666667);this.decode=1120==this.wb?qd.bind(this):rd.bind(this);sd(this);this.L=0;this.N=null;this.B.complete=!1}z(pd,ed);k=pd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();sd(this);hd(this);this.B.error=!1;this.parent.reset.call(this)}; +function sd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Ua=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.La=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Wb(a)}function Wb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.ab=0;a.Ha=0;a.Qb=262143;a.N=null;a.w&&Mc(a)}function Mc(a){a.ab?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,oc(a.w,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,oc(a.w,16))}function td(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.rc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,wc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];ld(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function zd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ad(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Bd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Cd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=ec(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Nc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Dd(this,this.va);Dd(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; +function Vd(a){var b=Wd(a),c=Wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Nc(a,c);a.I&=-17}function vc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Xd(a,b,c){var d,e,f,g=0;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ha=a.v,a.La=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ha<<5|a.La<<1),b=!0),a.C&61440||!(4191360> +f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.ab)return this.w.Tb(a);this.L++;a=Yd(this,Xd(this,a,3));this.L--;return a}; +k.Za=function(a){if(!this.ab)return this.w.Za(a);this.L++;a=this.yc(Xd(this,a,2));this.L--;return a};k.pb=function(a,b){this.ab?(this.L++,Zd(this,Xd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.ab?(this.L++,this.Fc(Xd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return $d(this,a,b,c)};k.Pc=function(a,b,c){return Xd(this,$d(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Xd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; +k.Je=function(a,b){this.w.gb(Xd(this,a,4),b)};function ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=$d(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function be(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=$d(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Xd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} +function ce(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return $d(a,b,c,8)}function fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Zd(a,e,d.call(a,c,Yd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function he(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Zd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function ie(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.ib=function(a){this.B.complete=!0;var b=this.i&&je(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&ke(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(yd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(xd(this))}while(0>1|b<<16;Bd(this,a);return a&65535}function qe(a,b){a=b&2048|b>>1|b<<8;Bd(this,a<<8);return a&255}function re(a,b){a=b&~a;R(this,a);return a}function se(a,b){a=b&~a;R(this,a<<8);return a}function te(a,b){a|=b;R(this,a);return a}function ue(a,b){a|=b;R(this,a<<8);return a} +function ve(a,b){a=~b|65536;zd(this,a);return a&65535}function we(a,b){a=~b|256;zd(this,a<<8);return a&255}function xe(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function ye(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function ze(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ae(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Be(a,b){a=-b;zd(this,a,a&b&32768);return a&65535}function Ce(a,b){a=-b;zd(this,a<<8,(a&b&128)<<8);return a&255}function De(a,b){a=b<<1|this.T>>16&1;Bd(this,a);return a&65535}function Ee(a,b){a=b<<1|this.T>>16&1;Bd(this,a<<8);return a&255}function Fe(a,b){a=(this.T&65536|b)>>1|b<<16;Bd(this,a);return a&65535}function Ge(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Bd(this,a<<8);return a&255}function He(a,b){var c=b-a;Cd(this,c,a,b);return c&65535} +function Ie(a,b){var c=b-a;Cd(this,c<<8,a<<8,b<<8);return c&255}function Je(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ke(a,b){a^=b;R(this,a);return a&65535}function Le(a){T(this,a,de(this,a),le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Me(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Ne(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Oe(a){U(this,a,!ud(this))}function Pe(a){U(this,a,ud(this))} +function Qe(a){T(this,a,de(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Re(a){S(this,a,ce(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){T(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ce(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ue(a){R(this,de(this,a)&ge(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ve(a){R(this,(ce(this,a)&fe(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){U(this,a,wd(this))}function Xe(a){U(this,a,!this.Ra()==!vd(this))}function Ye(a){U(this,a,!wd(this)&&!this.Ra()==!vd(this))}function Ze(a){U(this,a,!ud(this)&&!wd(this))}function $e(a){U(this,a,wd(this)||!this.Ra()!=!vd(this))} +function af(a){U(this,a,ud(this)||wd(this))}function bf(a){U(this,a,!this.Ra()!=!vd(this))}function cf(a){U(this,a,this.Ra())}function df(a){U(this,a,!wd(this))}function ef(a){U(this,a,!this.Ra())}function ff(){this.pa(12,1);this.b-=5}function gf(a){U(this,a,!0)}function hf(a){U(this,a,!vd(this))}function jf(a){U(this,a,vd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function kf(a){var b=de(this,a);a=ge(this,a);Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function lf(a){var b=ce(this,a)<<8;a=fe(this,a)<<8;Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function mf(a){var b=ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function nf(){this.pa(24,2);this.b-=25} +function of(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?pf(this.i):this.ha();this.b-=7}function qf(){this.pa(16,4);this.b-=25}var rf=[0,7,7,10,7,11,9,13];function sf(a){this.J=this.b;O(this,ee(this,a));this.b=this.J-rf[this.g]}var tf=[0,14,14,17,14,18,16,20];function uf(a){this.J=this.b;var b=ee(this,a);a=a>>6&7;Dd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-tf[this.g]}var vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function wf(a){var b=de(this,a);this.J=this.b;R(this,ie(this,a,b));this.b=this.J-vf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function xf(a){var b=ce(this,a);R(this,he(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var yf=[7,13,13,17,14,18,17,21]; +function zf(a){var b=ge(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ff(a){T(this,a,de(this,a),He);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Gf(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)}function Hf(){this.pa(28,5);this.b-=5}function If(){this.I&4||this.A&&this.A.ca();this.I|=4;yd(this,-2);this.b-=3}function Jf(a){T(this,a,de(this,a),Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=pf(b);b||this.pa(8,6)}function qd(a){Kf[a>>12].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)} +function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a&15].call(this,a)}function Tf(a){Uf[a&15].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)} +var Kf=[function(a){ag[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,W,function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],ag=[function(a){cg[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,W,W,W],Mf=[function(a){zd(this,ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,xe);this.b-=this.g?9:3+(7==this.f?2:0)}],Of=[function(a){T(this,a,0, +Be);this.b-=this.g?11:6},function(a){T(this,a,ud(this)?1:0,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,ud(this)?1:0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);zd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Qf=[function(a){T(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)}], +cg=[function(a){dg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,W,Rf,Tf,Gf,Gf,Gf,Gf],dg=[of,If,Cf,ff,qf,Bf,W,W,W,W,W,W,W,W,W,W],Sf=[Af,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Uf=[Af,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],bg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,W,W,W],Wf=[function(a){zd(this, +he(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Yf=[function(a){S(this,a,0,Ce);this.b-=this.g?11:6},function(a){S(this,a,ud(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ud(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=fe(this,a);zd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],$f=[function(a){S(this,a,0,Ge);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}];function rd(a){eg[a>>12].call(this,a)} +var eg=[function(a){fg[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,function(a){gg[a>>8&15].call(this,a)},function(a){hg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],fg=[function(a){ig[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,function(a){jg[a>>6&3].call(this,a)},W,W],jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ae(this,a,0);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J= +this.b;be(this,a,0,b);R(this,b);this.b=this.J-yf[this.g]},function(a){R(this,ie(this,a,this.Ra?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ig=[function(a){kg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Rf,Tf,Gf,Gf,Gf,Gf],kg=[of,If,Cf,ff,qf,Bf,function(){Vd(this);this.b-=13},W,W,W,W,W,W,W,W,W],gg=[zf,zf,mf,mf,Me,Me,Ne,Ne,Jf,Jf,W,W,W,W,Ef,Ef],hg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,function(a){lg[a>> +6&3].call(this,a)},W,W],lg=[W,function(a){a=ae(this,a,65536);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J=this.b;be(this,a,65536,b);R(this,b);this.b=this.J-yf[this.g]},W]; +function mg(a){u.call(this,"ROM",a,mg);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Oa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);ng(c)})}}z(mg);mg.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;ng(this)}; +mg.prototype.Fa=function(){this.ia&&(this.i&&og(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};mg.prototype.Ea=function(){return!0}; +function ng(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(rc(a.w,b,a.g,Uc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():td(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.ka))});this.ma=Lc(52,4);this.$=zc(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.ma)});Bb(b,this,Ng);H(this)}; +k.vc=function(){if(!this.J){var a=gd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ea=function(a){return a?this.save():!0};k.reset=function(){Og(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Og(this)};function Og(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.$,1E3/Math.round(this.R/10))}};var Pg={},Ng=(Pg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Pg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Pg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Pg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Pg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Sg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Sg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Tg(a);var e=this;if((this.g=gd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Lc(56,4);this.da=zc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Oa,e,f),(e=Fa(e,f))&&bh(a,b,c,d,e.ea,e.Ja, +e.Ia));a.B.Ya=!1;a.D&&(a.D--,a.D||H(a));Zg(a)})}function Wg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){ih(a,b,c,d)})} +function ih(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Va+'" (error '+d+": "+b+")",f);else{nb(a.controller.Oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Na+a.Aa&&(a.Aa+=f-(a.Na+a.Aa)+1):(a.Na=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Va+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=kh(this,a++);)mh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function mh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&nh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&oh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=kh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";kh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){mh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return mh(this,a[0])};function ph(a,b){b||(a.H=0);if(a.w)for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}rh(a,e,b,c,!1,d)}else qh(a,e)} -function rh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.cb.toLowerCase()!=d.toLowerCase()&&(g++,qh(a,b,!0),h.bc?a.O("RL11 busy"):(h.bc=!0,e&&(h.ac=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,eh(new ah(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.bc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ta||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.dc)),b=null);b?(a.Ca=b,a.Va=c,a.cb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.dc),a.ac||e),this.u&&this.u.qb()):a.Ob=!1;a.ac&&(a.ac=!1,--this.H||H(this));kh(this,a.dc)}; -function oh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nh(this,0)}}return!0};k.Ea=function(a){return a?this.save():!0};k.reset=function(){ph(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return ph(this,a[0])};function sh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}uh(a,e,b,c,!1,d)}else th(a,e)} +function uh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,th(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,hh(new dh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} +k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Va=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));nh(this,a.ec)}; +function rh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.A.eb(f,r|t<<8);if(vc(this.A)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.A.oa(f);if(vc(this.A)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ta)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; -k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ta||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&xc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; -var sh={},nh=(sh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],sh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],sh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],sh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],sh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],sh);function th(a){u.call(this,"Debugger",a,th);this.$=a.base||16;this.Aa=!1;this.J=0;this.P=!1;this.w=-1;this.g=[];this.V={}}z(th); -var uh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};th.prototype.rc=function(){return-1};th.prototype.sc=function(){}; -function vh(a,b,c,d){if(c)if(b){0>a.w&&a.g.length&&(a.w=0);if(0>a.w||b!=a.g[a.w])a.g.splice(0,0,b),a.w=0;a.w--}else a.P?b="end":b=a.g[a.w+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function wh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(yc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(yc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; +k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; +var vh={},qh=(vh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],vh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],vh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],vh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],vh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],vh);function wh(a){u.call(this,"Debugger",a,wh);this.da=a.base||16;this.Ha=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(wh); +var xh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};wh.prototype.sc=function(){return-1};wh.prototype.tc=function(){}; +function yh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function zh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function xh(a,b,c){var d;if(b){b=yh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Bh(a,b){if(b)return Ah(a,b,a.V[b]);var c=0;for(b in a.V)Ah(a,b,a.V[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Eh(a,b){if(b)return Dh(a,b,a.Y[b]);var c=0;for(b in a.Y)Dh(a,b,a.Y[b]),c++;return 0this.b.vb?Kh:[];Lh(this,function(a){a:{var b=d.A.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Mh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.A.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=rc[c],n&&d.j(p(n.id,8)+" %"+p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.sc=function(a){var b;0<=a&&(8>a?b=this.b.v[a]:16>a?b=this.b.Ua[a-8]:20>a?b=this.b.Ha[a-16]:20==a&&(b=bc(this.b)));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Ib).F));this.na&1073741824?this.ua.push(a):this.da&&a==this.da||(this.da=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,kd(a),a.ua=0,a.u&&a.u.ca()))};function Eh(a){var b;if(!ge(a))a.D&&a.D.length&&a.j("instruction history buffer freed"),a.Y=0,a.D=[];else if(!a.D||!a.D.length){a.D=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.K=Z(this.b.v[7]);a&&1!=this.R?Th(this):Uh(this)}};function Sh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Eh(this);this.va=0;this.da=null;this.J=0;this.K=Z(this.b.v[7]);this.B.Z=!1;Vh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Oh(this.K));a.set(1,Oh(this.N));a.set(2,[this.g,this.P,this.na]);a.set(3,this.H);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.K=Ph(a[b++]),this.N=Ph(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.P=a[b][1],this.na|=a[b][2]);a[3]&&(this.H=a[3]);return!0};k.start=function(a,b){this.R||this.j("running");this.B.Z=!0;this.Nb=a;this.Qb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.J=b-this.Qb;if(!this.R){b="stopped";if(this.J){a-=this.Nb;var c=0d&&(d=a.b.mb(b)),65535!=(d&65535)&&(c=a.D[a.Y],c.F=b,c.Na=!1,++a.Y==a.D.length&&(a.Y=0)));return!1}function mf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Ib),a.ha(),-1;return!1} -function Dh(a){var b,c;a.f=["bp"];if(a.L)for(b=1;b>>d.ka],!1)}a.L=["br"];if(a.C)for(b=1;b>>d.ka],!0);a.C=["bw"];a.hb=0}k.lb=function(a,b,c){var d=!0;c||Wh(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.A;f.W[e>>>f.ka].lb(e&f.A,a==this.C)}}d&&(a.push(b),c?b.Na=!0:(Xh(this,a,a.length-1,"set"),Eh(this)));return d}; -function Wh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.C));h.Na||Eh(a);break}}return f}function Yh(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Rh(y);break;case 8:x="@"+Rh(y);break;case 16:7>y?x="("+Rh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Rh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Rh(y)+")";break;case 40:x="@-("+Rh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Rh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Rh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Rh(b),c+="="+J(a,d.v[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ua[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b&&(c="PS="+J(a,bc(d)));c&&(c+=" ");return c}function ci(a){var b,c="";for(b=0;6>b;b++)c+=bi(a,b);c=c+"\n"+(bi(a,6)+bi(a,7)+bi(a,20));return c+=ai(a,"T")+ai(a,"N")+ai(a,"Z")+ai(a,"V")+ai(a,"C")}k.mc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.mc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.H.push({Re:b,F:c,Tc:d,ia:e,kc:f})}function di(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb)){d.v[b]=f&65535;break}a.j("unknown register: "+e);return}a.u.ca();a.j("updated registers:")}a.j(ci(a));c&&(a.K=Z(d.v[7]),Uh(a,J(a,a.K.F)))}}function hi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=$h(a,b,g,f);a.j(f);a.K=b;e-=b.F-l;c++}}} -function Zh(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.P&&(a.j("ended assemble at "+J(a,a.N.F)),a.K=a.N,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.da=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Ed=[];"call"==tg&&(Gb=1E5,Ed=["CALL"]);for(void 0!==sg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.rb=aa;vg++;Gb--}}vg||(a.j("no "+ug+"history available"),a.rb=void 0)}else{var Ib=Mh(a,ma);if(Ib){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Bi),zc=zh(a,Ka)>>>0,65536>4||1;Di--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Jb&&(Jb+="\n");Jb+=ma+" "+Fd+(0==Lb?" "+yg:"")}Jb&&a.j(Jb);a.jb=Ib}}}}break;case "e":if("else"==g[0])break;var ib,Gd,Hd,Id,Jd=g[0],Kd=g[1];"eb"==Jd?(ib=1,Gd=255,Hd=a.Eb,Id=a.Vb):"e"==Jd||"ew"==Jd?(ib=2,Gd=65535,Hd=a.oa,Id=a.eb):Kd=null;if(null==Kd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Mh(a,Kd);if(Ec)for(var Fc= -2;FcNd;){for(var La=null,Hi=256;65536>Ob.F>>>0;){Od.F=a.oa(Ob,2);if(null==Ob.F||!Hi--)break;if(!(Od.F&1)){for(var Ii=a,Gc=Od,Ag=null,Pb=Gc.F,Bg=Pb,Pd=1;6>=Pd&&Pb;Pd++){if(2< -Pd){Gc.F=Pb;var Hc=$h(Ii,Gc);if(0<=Hc.indexOf("JSR")){var Cg=Hc.indexOf(" ");if(Pb+(Hc.indexOf(" ",Cg+1)-Cg-1)/2==Bg){Ag=Hc;break}}}Pb-=2}Gc.F=Bg;if(La=Ag)break}}if(!La||null==La)break;var Dg=null;if("ks"==Gi){var Eg=La.match(/[0-9A-F]+$/);Eg&&(Dg=gi(a,Eg[0]))}La=xa(La,50)+" ;"+(Dg||"stack="+J(a,Ob.F));a.j(La);Nd++}Nd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){gi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== -G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Qd=0;Qd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bmi){if(oi(d,this.H)){this.w=new P(this,"1.30.2","failsafe");oi(this.w)&&(ti(this,d),a=2,ui(this.w));this.w.set("timestamp",Da());vi(this.w);var e=this.u&&!this.C;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=si(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?oi(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.f=null)):this.j(f+": "+g),ui(d),oi(d)?(c=si(d),e=!0):c=!1))}e&&ri(this,c?d:null)}else 2==a&&d.clear()}else ri(this);delete this.H;delete this.J}e=ob(this.id);for(f=0;fa[1];a=a[2];this.$=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(wi(this,this.b,b,c,a),this.b.sb());this.N&&(ti(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.g=0}; -function ti(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.f||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.Y;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ji(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lthis.b.wb?Nh:[];Oh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Ph(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=uc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ua[a-8]:20>a?b=this.b.Ga[a-16]:20==a?b=ec(this.b):21==a&&this.f&&dc(this.f)&&(b=this.f.Ta));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,nd(a),a.ta=0,a.A&&a.A.ca()))};function Hh(a){var b;if(!je(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Wh(this):Xh(this)}};function Vh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Hh(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Yh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Rh(this.L));a.set(1,Rh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Sh(a[b++]),this.P=Sh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.Za(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Ma=!1,++a.$==a.H.length&&(a.$=0)));return!1}function pf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} +function Gh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||Zh(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Ma=!0:($h(this,a,a.length-1,"set"),Hh(this)));return d}; +function Zh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.D));h.Ma||Hh(a);break}}return f}function ai(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Uh(y);break;case 8:x="@"+Uh(y);break;case 16:7>y?x="("+Uh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Uh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Uh(y)+")";break;case 40:x="@-("+Uh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Uh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Uh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Uh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ua[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b?c="PS="+J(a,ec(d)):21==b&&a.f&&dc(a.f)&&(c="SW="+J(a,a.f.Ta,3));c&&(c+=" ");return c}function fi(a){var b,c="";for(b=0;6>b;b++)c+=ei(a,b);c=c+"\n"+(ei(a,6)+ei(a,7));c+=ei(a,20)+ei(a,21);return c+=di(a,"T")+di(a,"N")+di(a,"Z")+di(a,"V")+di(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function gi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.f["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.ca();a.j("updated registers:")}a.j(fi(a));c&&(a.L=Z(d.u[7]),Xh(a,J(a,a.L.F)))}}function ki(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ci(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function bi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Gd=[];"call"==wg&&(Hb=1E5,Gd=["CALL"]);for(void 0!==vg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;yg++;Hb--}}yg||(a.j("no "+xg+"history available"),a.tb=void 0)}else{var Jb=Ph(a,ma);if(Jb){var Ac=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Ei),Ac=Ch(a,Ka)>>>0,65536>4||1;Gi--&&0Ec?String.fromCharCode(Ec):".";Bc-=Dc}Kb&&(Kb+="\n");Kb+=ma+" "+Hd+(0==Mb?" "+Bg:"")}Kb&&a.j(Kb);a.lb=Jb}}}}break;case "e":if("else"==g[0])break;var ib,Id,Jd,Kd,Ld=g[0],Md=g[1];"eb"==Ld?(ib=1,Id=255,Jd=a.Fb,Kd=a.Wb):"e"==Ld||"ew"==Ld?(ib=2,Id=65535,Jd=a.oa,Kd=a.gb):Md=null;if(null==Md)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Ph(a,Md);if(Fc)for(var Gc= +2;GcPd;){for(var La=null,Ki=256;65536>Pb.F>>>0;){Qd.F=a.oa(Pb,2);if(null==Pb.F||!Ki--)break;if(!(Qd.F&1)){for(var Li=a,Hc=Qd,Dg=null,Qb=Hc.F,Eg=Qb,Rd=1;6>=Rd&&Qb;Rd++){if(2< +Rd){Hc.F=Qb;var Ic=ci(Li,Hc);if(0<=Ic.indexOf("JSR")){var Fg=Ic.indexOf(" ");if(Qb+(Ic.indexOf(" ",Fg+1)-Fg-1)/2==Eg){Dg=Ic;break}}}Qb-=2}Hc.F=Eg;if(La=Dg)break}}if(!La||null==La)break;var Gg=null;if("ks"==Ji){var Hg=La.match(/[0-9A-F]+$/);Hg&&(Gg=ji(a,Hg[0]))}La=xa(La,50)+" ;"+(Gg||"stack="+J(a,Pb.F));a.j(La);Pd++}Pd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ji(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== +G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Sd=0;Sd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bpi){if(ri(d,this.J)){this.C=new P(this,"1.30.2","failsafe");ri(this.C)&&(wi(this,d),a=2,xi(this.C));this.C.set("timestamp",Da());yi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=vi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ri(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),xi(d),ri(d)?(c=vi(d),e=!0):c=!1))}e&&ui(this,c?d:null)}else 2==a&&d.clear()}else ui(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(zi(this,this.b,b,c,a),this.b.sb());this.P&&(wi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function wi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function mi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ea&&(c&&a.b.ha(),d=a.b.Ea(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Oi(a,b,c)}})}else c(a,null)} -function Pi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ai||Za(!0));l=!1}var g,h,l=!0;Ai++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Mi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ai||Za(!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),--Ai||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Mi(b,a,d,!0,e,m):Ni(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Pi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +k.sa=function(a,b,c){var d=this;switch(b){case "power":return this.G[b]=c,c.onclick=function(){d.v||(d.B.ja?mi(d,!1,!0):ti(d,d.Ib))},!0;case "reset":return this.G[b]=c,c.onclick=function(){if(d.B.ja&&!d.v)if(d.g&&!d.H){var a=Ha("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");mi(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.qc=!0),d.Ib(pi),d.qc=!1)}else d.reset(),d.b&&d.b.sb()},!0;case "save":if(ua(Ga(),"pcjs.org"))c.parentNode.removeChild(c); +else return this.G[b]=c,c.onclick=function(){var a=qi(d,!0);if(a){var b=!!(d.g&&!d.H||d.N),c=mi(d,b);b?Ai(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1}; +function qi(a,b){var c=a.A;c||((c=Na("user"),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=Bi(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c} +function Bi(a,b){a.A=null;b=Ea(Ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Oa("user",b.data),a.A=b.data)}catch(d){q(d.message+" ("+c+")")}return a.A}function si(a){var b=null;a.A&&(b=Ga()+"/api/v1/user?req=load&user="+a.A+"&state="+Ci(a,"1.30.2"));return b} +function Ai(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Ci(a,"1.30.2");d.data=c;b=Ea(Ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ri(a,b,c)}})}else c(a,null)} +function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Di||Za(!0));l=!1}var g,h,l=!0;Di++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Di||Za(!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),--Di||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index ba641b160..53b21f31e 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -45,198 +45,198 @@ d.K[f++]=e[c]>>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function u(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}xa=a}return xa} function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ca={init:[],show:[],exit:[]},Da=!1,Ea=!1,Fa=!0; function Ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ha(a){Ca.init.push(a)}function Ia(a){if(Fa)try{for(var b=0;bb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Ea:!1,nb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Ea:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);h=Za.prototype;h.reset=function(){this.A=this.A&-120|20}; -h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];$a(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&($a(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;ab(b,this,bb);cb(b,this.reset.bind(this));db(this);for(var e in this.b)$a(this,e,this.b[e][0])};h.ja=function(a,b){b||(eb(),this.stop());return!0};h.ia=function(){return!0}; -function fb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function db(a,b){for(var c in a.m)fb(a,c,null!=b?b:a.m[c])}function $a(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),hb(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&ib(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])ib(this.a);else{a=this.C;var b;if(b=a)a.l.Ea&&(a.l.nb=!0),b=!a.l.Ea;if(b)Va(a,!0),a.kb(0),Va(a,!1);else try{var c=this.a.kb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.ac=[tb,ub,vb,wb];a=new I(this);xb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function ub(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function vb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function wb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function zb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.lb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.lb){p=l.size-(f-n);p>g&&(p=g);l.lb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Eb(1,f,g)}f=new I(a,f,p,a.b,d,e);xb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].wb(b&a.j,b)}function Ib(a,b){3932160<=b&&(b=Hb(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.j,b)} -h.tb=function(a){var b=a&this.j,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Jb(a,b,c){3932160<=b&&(b=Hb(a.a,b));a.h[(b&a.Aa)>>>a.c].mb(b&a.j,c&65535,b)}h.Ab=function(a,b){var c=a&this.j,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Kb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Fa!=c&&(b.Fa=c,Sb(b))}};h.Ec=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.yb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Sb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +function Za(a){x.call(this,"Panel",a,Za);this.c=this.f=this.i=this.s=0;this.v=this.w=!1;this.A=$a;this.m={};this.b={START:[1,!0,!1,this.qc],STEP:[1,!1,!1,this.rc],ENABLE:[1,!1,!1,this.mc],CONT:[1,!0,!1,this.kc],DEP:[0,!0,!1,this.lc],EXAM:[1,!0,!1,this.nc],LOAD:[1,!0,!1,this.pc],TEST:[0,!0,!1,this.oc]};for(a=0;22>a;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;h=Za.prototype;h.reset=function(){}; +h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];ab(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;bb(b,this,cb);db(b,this.reset.bind(this));eb(this);for(var e in this.b)ab(this,e,this.b[e][0])};h.ja=function(a,b){b||(fb(),this.stop());return!0};h.ia=function(){return!0}; +function gb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function eb(a,b){for(var c in a.m)gb(a,c,null!=b?b:a.m[c])}function ab(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.l.U||(this.h.reset(),ib(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&jb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])jb(this.a);else{a=this.C;var b;if(b=a)a.l.Ea&&(a.l.pb=!0),b=!a.l.Ea;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.ac=[ub,vb,wb,xb];a=new I(this);yb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function vb(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function wb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function xb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Ab(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Fb(1,f,g)}f=new I(a,f,p,a.b,d,e);yb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Jb(a,b){3932160<=b&&(b=Ib(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.j,b)} +h.kb=function(a){var b=a&this.j,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Kb(a,b,c){3932160<=b&&(b=Ib(a.a,b));a.h[(b&a.Aa)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){var c=a&this.j,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Lb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Fa!=c&&(b.Fa=c,Tb(b))}};h.Ec=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Tb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; -h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.zb:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.zb=a;b.u|=2};h.$c=function(a){return a?this.a.Ca&65280:0};h.Sd=function(a){this.a.Ca=a|255}; -h.Kc=function(){return qb(this.a)};h.Cd=function(a){Tb(this.a,a&-1809|qb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Ca&65280:0};h.Sd=function(a){this.a.Ca=a|255}; +h.Kc=function(){return rb(this.a)};h.Cd=function(a){Ub(this.a,a&-1809|rb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, "R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= [null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ac(this,Xb?bc:cc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>1),this.a=new Int32Array(this.b,0,this.size>>2),bc(this,Yb?cc:dc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function xb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&ec(a,gc,!1),(a.m=c.m)&&hc(a,gc,!1))}function hc(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.mb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ec(a,b,c){c&&a.i||(a.wb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function ac(a,b){b||(b=ic);ec(a,b,void 0);hc(a,b,void 0)} -var ic=[],dc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.wa],gc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var cc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],bc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.va]; -function jc(a,b){x.call(this,"CPU",a,jc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.sb=Math.round(this.gb/1E4)/100;this.va=this.sb*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.wa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(jc);var kc=["power","reset"];h=jc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.wa&&(a.wa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=oc(a)&&(a.Qa=a.Ra=-1,nc(a),G(a),c=!0);c&&a.T(oc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.va&&(b=1);a.qa=b;b=a.sb*a.qa;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&rc(a.j)}kb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;qc(a)}function Nb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Pb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+sc(a))} -function jb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function sc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} -h.kd=function(){if(this.l.U){this.ub>=this.gb&&qc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.kb(b)}catch(f){if("number"!=typeof f)throw f;}b=sc(this,!0);this.Ta+=b;this.aa+=b;lb(this,b);jb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),oc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,pc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.ub+=this.Ta;this.oa+=c;a(b,c)}}}; -function ib(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{pc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,oc(a));setTimeout(a.Qb,0)}}h.kb=function(){return 0};function G(a){var b=!1;if(a.l.U){sc(a);kb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),oc(a));b=!0}a.l.complete=void 0;return b} -function tc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;jc.call(this,a,6666667);this.decode=1120==this.Za?uc.bind(this):vc.bind(this);wc(this);this.ra=0;this.N=null;this.l.complete=!1}z(tc,jc);h=tc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);wc(this);mc(this);this.l.error=!1;this.parent.reset.call(this)}; -function wc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.rb=0;a.Ia=-1;hb(a)}function hb(a){a.Ca=255;a.M=0;a.zb=0;a.w=0;a.Ba=0;a.yb=0;a.Ga=0;a.Fa=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Sb(a)}function Sb(a){a.Fa?(a.P=65536,a.J=a.hc,a.W=a.gd,a.mb=a.Zd,zb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.mb=a.$b,zb(a.h,16))}function xc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Kb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];pc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ac(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Bc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Cc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=qb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.yb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Tb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ec(a,a.Ia);Ec(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Fc(a){var b=Gc(a),c=Gc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Tb(a,c);a.u&=-17} -function Hb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Hc(a,b,c){var d,e,f,g=0;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> -f||4194239>>a.c].Db(b&a.j,c&255,b)}function Gc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ec(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(zc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(zc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.tb=function(a){if(!this.Fa)return this.h.tb(a);this.ra++;a=this.Tb(Hc(this,a,2));this.ra--;return a}; -h.Xa=function(a,b){this.Fa?(this.ra++,Ic(this,Hc(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.Ab=function(a,b){this.Fa?(this.ra++,this.$b(Hc(this,a,4),b),this.ra--):this.h.Ab(a,b)};h.gc=function(a,b,c){return Jc(this,a,b,c)};h.hc=function(a,b,c){return Hc(this,Jc(this,a,b,c),c)};h.Tb=function(a){return Ib(this.h,a)};h.gd=function(a){return Ib(this.h,Hc(this,a,2))};h.$b=function(a,b){Jb(this.h,a,b&65535)};h.Zd=function(a,b){Jb(this.h,Hc(this,a,4),b)}; -function Kc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Jc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Lc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Jc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Hc(a,e|c&65536,4),a.v=a.B>>14&3,Jb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Mc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Gb(a.h,c)):a=a.g[c]&255;return a}function Nc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Ib(a.h,a.J(b,c,2)):a.g[c]}function Oc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Jc(a,b,c,8)}function Pc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Gb(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Ib(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Ic(a,e,d.call(a,c,Gb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Jb(a.h,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Rc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Ic(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Sc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.kb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.zb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(zc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(yc(this))}while(0>1|b<<16;Cc(this,a);return a&65535}function Yc(a,b){a=b&2048|b>>1|b<<8;Cc(this,a<<8);return a&255}function Zc(a,b){a=b&~a;S(this,a);return a}function $c(a,b){a=b&~a;S(this,a<<8);return a}function ad(a,b){a|=b;S(this,a);return a}function bd(a,b){a|=b;S(this,a<<8);return a}function cd(a,b){a=~b|65536;Ac(this,a);return a&65535}function dd(a,b){a=~b|256;Ac(this,a<<8);return a&255} -function ed(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function fd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function gd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function hd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function id(a,b){a=-b;Ac(this,a,a&b&32768);return a&65535}function jd(a,b){a=-b;Ac(this,a<<8,(a&b&128)<<8);return a&255} -function kd(a,b){a=b<<1|this.m>>16&1;Cc(this,a);return a&65535}function ld(a,b){a=b<<1|this.m>>16&1;Cc(this,a<<8);return a&255}function md(a,b){a=(this.m&65536|b)>>1|b<<16;Cc(this,a);return a&65535}function nd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Cc(this,a<<8);return a&255}function od(a,b){var c=b-a;Dc(this,c,a,b);return c&65535}function pd(a,b){var c=b-a;Dc(this,c<<8,a<<8,b<<8);return c&255}function qd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function rd(a,b){a^=b;S(this,a);return a&65535}function sd(a){U(this,a,Nc(this,a),Tc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function td(a){var b=Qc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function ud(a){var b=Qc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function vd(a){V(this,a,!R(this))}function wd(a){V(this,a,R(this))} -function xd(a){U(this,a,Nc(this,a),Zc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function yd(a){T(this,a,Mc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){U(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Mc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Bd(a){S(this,Nc(this,a)&Qc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Cd(a){S(this,(Mc(this,a)&Pc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){V(this,a,this.i&65535?0:4)}function Ed(a){V(this,a,!this.ya()==!(this.f&32768))}function Fd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Gd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Hd(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Id(a){V(this,a,R(this)||(this.i&65535?0:4))}function Jd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Kd(a){V(this,a,this.ya())}function Ld(a){V(this,a,!!(this.i&65535))}function Md(a){V(this,a,!this.ya())}function Nd(){K(this,12,1);this.a-=5}function Od(a){V(this,a,!0)}function Pd(a){V(this,a,!(this.f&32768))}function Qd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Rd(a){var b=Nc(this,a);a=Qc(this,a);Dc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Sd(a){var b=Mc(this,a)<<8;a=Pc(this,a)<<8;Dc(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Td(a){var b=Qc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Ud(){K(this,24,2);this.a-=25} -function Vd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Wd(){K(this,16,4);this.a-=25}var Xd=[0,7,7,10,7,11,9,13];function Yd(a){this.G=this.a;P(this,Oc(this,a));this.a=this.G-Xd[this.c]}var Zd=[0,14,14,17,14,18,16,20];function $d(a){this.G=this.a;var b=Oc(this,a);a=a>>6&7;Ec(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-Zd[this.c]}var ae=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function be(a){var b=Nc(this,a);this.G=this.a;S(this,Sc(this,a,b));this.a=this.G-ae[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ce(a){var b=Mc(this,a);S(this,Rc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var de=[7,13,13,17,14,18,17,21]; -function ee(a){var b=Qc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ke(a){U(this,a,Nc(this,a),od);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function le(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)}function me(){K(this,28,5);this.a-=5}function ne(){this.u&4||this.j&&this.j.ka();this.u|=4;zc(this,-2);this.a-=3}function oe(a){U(this,a,Nc(this,a),rd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function uc(a){pe[a>>12].call(this,a)}function qe(a){re[a>>6&3].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a&15].call(this,a)} -function ye(a){ze[a&15].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)} -var pe=[function(a){Ge[a>>8&15].call(this,a)},be,Rd,Bd,xd,zd,sd,Y,function(a){He[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,ke,Y],Ge=[function(a){Ie[a>>4&15].call(this,a)},Od,Ld,Dd,Ed,Jd,Fd,Hd,$d,$d,qe,se,ue,Y,Y,Y],re=[function(a){Ac(this,Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,ed);this.a-=this.c?9:3+(7==this.b?2:0)}],te=[function(a){U(this,a,0, -id);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Tc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Ac(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Ie=[function(a){Je[a&15].call(this,a)},Y,Y,Y,Yd,Yd,Yd,Yd,ie,Y,we,ye,le,le,le,le],Je=[Vd,ne,he,Nd,Wd,ge,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],xe=[fe,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],ze=[fe,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],He=[Md,Kd,Gd,Id,Pd,Qd,vd,wd,Ud,me,Ae,Ce,Ee,Y,Y,Y],Be=[function(a){Ac(this, -Rc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,fd);this.a-=this.c?9:3+(7==this.b?2:0)}],De=[function(a){T(this,a,0,jd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Pc(this,a);Ac(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Fe=[function(a){T(this,a,0,nd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}];function vc(a){Ke[a>>12].call(this,a)} -var Ke=[function(a){Le[a>>8&15].call(this,a)},be,Rd,Bd,xd,zd,sd,function(a){Me[a>>8&15].call(this,a)},function(a){Ne[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,ke,Y],Le=[function(a){Oe[a>>4&15].call(this,a)},Od,Ld,Dd,Ed,Jd,Fd,Hd,$d,$d,qe,se,ue,function(a){Pe[a>>6&3].call(this,a)},Y,Y],Pe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Kc(this,a,0);Ec(this,a);S(this,a);this.a-=11},function(a){var b=Gc(this);this.G= -this.a;Lc(this,a,0,b);S(this,b);this.a=this.G-de[this.c]},function(a){S(this,Sc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Oe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,Yd,Yd,Yd,Yd,ie,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},we,ye,le,le,le,le],Qe=[Vd,ne,he,Nd,Wd,ge,function(){Fc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Me=[ee,ee,Td,Td,td,td,ud,ud,oe,oe,Y,Y,Y,Y,je,je],Ne=[Md,Kd,Gd,Id,Pd,Qd,vd,wd,Ud,me,Ae,Ce,Ee,function(a){Re[a>>6& -3].call(this,a)},Y,Y],Re=[Y,function(a){a=Kc(this,a,65536);Ec(this,a);S(this,a);this.a-=11},function(a){var b=Gc(this);this.G=this.a;Lc(this,a,65536,b);S(this,b);this.a=this.G-de[this.c]},Y]; -function Se(a){x.call(this,"ROM",a,Se);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Te(c)})}}z(Se);Se.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Te(this)}; -Se.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Se.prototype.ia=function(){return!0}; -function Te(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Cb(a.h,b,a.c,$b)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):xc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Ob(e.a,e.aa))});this.da=Qb(52,4);this.P=Nb(this.a,function(){e.c|=128;e.c&64&&Ob(e.a,e.da)});ab(b,this,Ze);F(this)}; -h.Kb=function(){if(!this.v){var a=lc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ia=function(a){return a?this.save():!0};h.reset=function(){$e(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return $e(this)};function $e(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.xb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1]=b;this.ta=!0}};function yb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&fc(a,hc,!1),(a.m=c.m)&&ic(a,hc,!1))}function ic(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function fc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function bc(a,b){b||(b=jc);fc(a,b,void 0);ic(a,b,void 0)} +var jc=[],ec=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.wa],hc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var dc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],cc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.va]; +function kc(a,b){x.call(this,"CPU",a,kc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.ub=Math.round(this.gb/1E4)/100;this.va=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.wa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(kc);var lc=["power","reset"];h=kc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.wa&&(a.wa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=pc(a)&&(a.Qa=a.Ra=-1,oc(a),G(a),c=!0);c&&a.T(pc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.va&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&sc(a.j)}lb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;rc(a)}function Ob(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+tc(a))} +function kb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function tc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} +h.kd=function(){if(this.l.U){this.vb>=this.gb&&rc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=tc(this,!0);this.Ta+=b;this.aa+=b;mb(this,b);kb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),pc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,qc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; +function jb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{qc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,pc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){tc(a);lb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),pc(a));b=!0}a.l.complete=void 0;return b} +function uc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;kc.call(this,a,6666667);this.decode=1120==this.Za?vc.bind(this):wc.bind(this);xc(this);this.ra=0;this.N=null;this.l.complete=!1}z(uc,kc);h=uc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);xc(this);nc(this);this.l.error=!1;this.parent.reset.call(this)}; +function xc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.tb=0;a.Ia=-1;ib(a)}function ib(a){a.Ca=255;a.M=0;a.Ab=0;a.w=0;a.Ba=0;a.zb=0;a.Ga=0;a.Fa=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Tb(a)}function Tb(a){a.Fa?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Ab(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Ab(a.h,16))}function yc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Lb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];qc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Bc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Cc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Dc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=rb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Ub(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Fc(a,a.Ia);Fc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Gc(a){var b=Hc(a),c=Hc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Ub(a,c);a.u&=-17} +function Ib(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Ic(a,b,c){var d,e,f,g=0;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> +f||4194239>>a.c].Db(b&a.j,c&255,b)}function Hc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Fc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Fa)return this.h.kb(a);this.ra++;a=this.Tb(Ic(this,a,2));this.ra--;return a}; +h.Xa=function(a,b){this.Fa?(this.ra++,Jc(this,Ic(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.lb=function(a,b){this.Fa?(this.ra++,this.$b(Ic(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Kc(this,a,b,c)};h.hc=function(a,b,c){return Ic(this,Kc(this,a,b,c),c)};h.Tb=function(a){return Jb(this.h,a)};h.gd=function(a){return Jb(this.h,Ic(this,a,2))};h.$b=function(a,b){Kb(this.h,a,b&65535)};h.Zd=function(a,b){Kb(this.h,Ic(this,a,4),b)}; +function Lc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Kc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Mc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Kc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Ic(a,e|c&65536,4),a.v=a.B>>14&3,Kb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Nc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Oc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]}function Pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Kc(a,b,c,8)}function Qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Jc(a,e,d.call(a,c,Hb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Kb(a.h,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Jc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Ac(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(zc(this))}while(0>1|b<<16;Dc(this,a);return a&65535}function Zc(a,b){a=b&2048|b>>1|b<<8;Dc(this,a<<8);return a&255}function $c(a,b){a=b&~a;S(this,a);return a}function ad(a,b){a=b&~a;S(this,a<<8);return a}function bd(a,b){a|=b;S(this,a);return a}function cd(a,b){a|=b;S(this,a<<8);return a}function dd(a,b){a=~b|65536;Bc(this,a);return a&65535}function ed(a,b){a=~b|256;Bc(this,a<<8);return a&255} +function fd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function gd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function hd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function id(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function jd(a,b){a=-b;Bc(this,a,a&b&32768);return a&65535}function kd(a,b){a=-b;Bc(this,a<<8,(a&b&128)<<8);return a&255} +function ld(a,b){a=b<<1|this.m>>16&1;Dc(this,a);return a&65535}function md(a,b){a=b<<1|this.m>>16&1;Dc(this,a<<8);return a&255}function nd(a,b){a=(this.m&65536|b)>>1|b<<16;Dc(this,a);return a&65535}function od(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Dc(this,a<<8);return a&255}function pd(a,b){var c=b-a;Ec(this,c,a,b);return c&65535}function qd(a,b){var c=b-a;Ec(this,c<<8,a<<8,b<<8);return c&255}function rd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function sd(a,b){a^=b;S(this,a);return a&65535}function td(a){U(this,a,Oc(this,a),Uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function vd(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function wd(a){V(this,a,!R(this))}function xd(a){V(this,a,R(this))} +function yd(a){U(this,a,Oc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){T(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){U(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Nc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Cd(a){S(this,Oc(this,a)&Rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){S(this,(Nc(this,a)&Qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){V(this,a,this.i&65535?0:4)}function Fd(a){V(this,a,!this.ya()==!(this.f&32768))}function Gd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Hd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Id(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Jd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Kd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Ld(a){V(this,a,this.ya())}function Md(a){V(this,a,!!(this.i&65535))}function Nd(a){V(this,a,!this.ya())}function Od(){K(this,12,1);this.a-=5}function Pd(a){V(this,a,!0)}function Qd(a){V(this,a,!(this.f&32768))}function Rd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Sd(a){var b=Oc(this,a);a=Rc(this,a);Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Td(a){var b=Nc(this,a)<<8;a=Qc(this,a)<<8;Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Ud(a){var b=Rc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Vd(){K(this,24,2);this.a-=25} +function Wd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Xd(){K(this,16,4);this.a-=25}var Yd=[0,7,7,10,7,11,9,13];function Zd(a){this.G=this.a;P(this,Pc(this,a));this.a=this.G-Yd[this.c]}var $d=[0,14,14,17,14,18,16,20];function ae(a){this.G=this.a;var b=Pc(this,a);a=a>>6&7;Fc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-$d[this.c]}var be=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function ce(a){var b=Oc(this,a);this.G=this.a;S(this,Tc(this,a,b));this.a=this.G-be[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function de(a){var b=Nc(this,a);S(this,Sc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ee=[7,13,13,17,14,18,17,21]; +function fe(a){var b=Rc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function le(a){U(this,a,Oc(this,a),pd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function me(a){U(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)}function ne(){K(this,28,5);this.a-=5}function oe(){this.u&4||this.j&&this.j.ka();this.u|=4;Ac(this,-2);this.a-=3}function pe(a){U(this,a,Oc(this,a),sd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function vc(a){qe[a>>12].call(this,a)}function re(a){se[a>>6&3].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a&15].call(this,a)} +function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)} +var qe=[function(a){He[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,Y,function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],He=[function(a){Je[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,Y,Y,Y],se=[function(a){Bc(this,Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,fd);this.a-=this.c?9:3+(7==this.b?2:0)}],ue=[function(a){U(this,a,0, +jd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Bc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Je=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,Y,xe,ze,me,me,me,me],Ke=[Wd,oe,ie,Od,Xd,he,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ye=[ge,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ae=[ge,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ie=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,Y,Y,Y],Ce=[function(a){Bc(this, +Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ee=[function(a){T(this,a,0,kd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Bc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Ge=[function(a){T(this,a,0,od);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function wc(a){Le[a>>12].call(this,a)} +var Le=[function(a){Me[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,function(a){Ne[a>>8&15].call(this,a)},function(a){Oe[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,function(a){Qe[a>>6&3].call(this,a)},Y,Y],Qe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Lc(this,a,0);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G= +this.a;Mc(this,a,0,b);S(this,b);this.a=this.G-ee[this.c]},function(a){S(this,Tc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){Re[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},xe,ze,me,me,me,me],Re=[Wd,oe,ie,Od,Xd,he,function(){Gc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ne=[fe,fe,Ud,Ud,ud,ud,vd,vd,pe,pe,Y,Y,Y,Y,ke,ke],Oe=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,function(a){Se[a>>6& +3].call(this,a)},Y,Y],Se=[Y,function(a){a=Lc(this,a,65536);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G=this.a;Mc(this,a,65536,b);S(this,b);this.a=this.G-ee[this.c]},Y]; +function Te(a){x.call(this,"ROM",a,Te);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Ue(c)})}}z(Te);Te.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ue(this)}; +Te.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Te.prototype.ia=function(){return!0}; +function Ue(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Db(a.h,b,a.c,ac)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):yc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Pb(e.a,e.aa))});this.da=Rb(52,4);this.P=Ob(this.a,function(){e.c|=128;e.c&64&&Pb(e.a,e.da)});bb(b,this,$e);F(this)}; +h.Kb=function(){if(!this.v){var a=mc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ia=function(a){return a?this.save():!0};h.reset=function(){af(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return af(this)};function af(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Pb(this.a,this.P,1E3/Math.round(this.I/10))}};var af={},Ze=(af[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],af[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],af[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],af[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],af);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&df(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;df(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ef(a);var e=this;if((this.c=lc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Qb(56,4);this.R=Nb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&of(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Ea=!1;a.m&&(a.m--,a.m||F(a));lf(a)})}function hf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.qb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){vf(a,b,c,d)})} -function vf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&ef(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ef(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ff(a);var e=this;if((this.c=mc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Rb(56,4);this.R=Ob(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&pf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Ea=!1;a.m&&(a.m--,a.m||F(a));mf(a)})}function jf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){wf(a,b,c,d)})} +function wf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function yf(a,b){var c=a.Z*a.S,d=b/c|0;return dg)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=xf(this,a++);)zf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function zf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Af(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Bf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=xf(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Bf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Cf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=yf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Af(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Cf(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Cf(this,a[0])};function Ff(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Hf(a,e,b,c,!1,d)}else Gf(a,e)} -function Hf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Gf(a,b,!0),k.pb?a.F("RL11 busy"):(k.pb=!0,e&&(k.ob=!0,a.s++),k.ib=!!f,uf(new qf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.pb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.vb)),b=null);b?(a.ca=b,a.ua=c,a.Da=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.vb),a.ob||e),this.j&&rc(this.j)):a.ib=!1;a.ob&&(a.ob=!1,--this.s||F(this));Af(this,a.vb)}; -function Ef(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Bf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Df(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Df(this,a[0])};function Gf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}If(a,e,b,c,!1,d)}else Hf(a,e)} +function If(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Hf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,vf(new rf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.ua=c,a.Da=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.j&&sc(this.j)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Bf(this,a.wb)}; +function Ff(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Jb(this.h,f,t|w<<8);if(Mb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Ib(this.h,f);if(Mb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Kb(this.h,f,t|w<<8);if(Nb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Jb(this.h,f);if(Nb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; h.Ld=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Ob(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var If={},Df=(If[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],If[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],If[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],If[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],If[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],If); -function Jf(a,b,c){x.call(this,"Computer",a,Jf);this.l.O=!1;Kf(this,b);this.A=lc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Lf;this.v=null;this.m=this.I=!1;this.P=lc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Mf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new sb({id:this.na+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bLf){if(Nf(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Nf(this.i)&&(Sf(this,d),a=2,Tf(this.i));this.i.set("timestamp",sa());Uf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Rf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Nf(d,g):("error"== -f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Tf(d),Nf(d)?(c=Rf(d),e=!0):c=!1))}e&&Qf(this,c?d:null)}else 2==a&&d.clear()}else Qf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Vf(this,this.a,b,c,a),this.a.Ua());this.G&&(Sf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Sf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Yf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bMf){if(Of(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Of(this.i)&&(Tf(this,d),a=2,Uf(this.i));this.i.set("timestamp",sa());Vf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Sf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Of(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Uf(d),Of(d)?(c=Sf(d),e=!0):c=!1))}e&&Rf(this,c?d:null)}else 2==a&&d.clear()}else Rf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Wf(this,this.a,b,c,a),this.a.Ua());this.G&&(Tf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Tf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function Zf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);eg(a,b,c)}})}else c(a,null)} -function fg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--bg||Ja(!0));l=!1}var g,k,l=!0;bg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?cg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--bg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--bg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?cg(b,a,d,!0,e,n):dg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return fg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +h.$=function(a,b,c){var d=this;switch(b){case "power":return this.o[b]=c,c.onclick=function(){d.j||(d.l.O?Zf(d,!1,!0):Qf(d,d.Wa))},!0;case "reset":return this.o[b]=c,c.onclick=function(){if(d.l.O&&!d.j)if(d.b&&!d.s){var a=ua("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Zf(d,a,!0);!a&&d.D?window&&window.location.reload():(a||(d.Hb=!0),d.Wa(Mf),d.Hb=!1)}else d.reset(),d.a&&d.a.Ua()},!0;case "save":if(ma(v(),"pcjs.org"))c.parentNode.removeChild(c); +else return this.o[b]=c,c.onclick=function(){var a=Nf(d,!0);if(a){var b=!!(d.b&&!d.s||d.D),c=Zf(d,b);b?$f(d,a,c):d.F("Resume disabled, machine state not saved")}},!0}return!1}; +function Nf(a,b){var c=a.c;c||((c=za("user"),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=ag(a,c))||a.F("The user ID is invalid.")):b&&a.F("Browser local storage is not available"));return c} +function ag(a,b){a.c=null;b=r(v()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Aa("user",b.data),a.c=b.data)}catch(d){u(d.message+" ("+c+")")}return a.c}function Pf(a){var b=null;a.c&&(b=v()+"/api/v1/user?req=load&user="+a.c+"&state="+bg(a,"1.30.2"));return b} +function $f(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=bg(a,"1.30.2");d.data=c;b=r(v()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);fg(a,b,c)}})}else c(a,null)} +function gg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--cg||Ja(!0));l=!1}var g,k,l=!0;cg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?dg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--cg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--cg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?dg(b,a,d,!0,e,n):eg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return gg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From 0afab359ad432045e79aa93519d8d064af158f08 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Nov 2016 21:20:04 -0700 Subject: [PATCH 13/30] The memory management toggle-in passes (see /devices/pdp11/machine/1170/panel/debugger) --- .../machine/1170/panel/debugger/README.md | 95 +++++++++++++ devices/pdp11/panel/test/README.md | 55 -------- modules/pdp11/lib/bus.js | 8 +- modules/pdp11/lib/cpustate.js | 14 +- modules/pdp11/lib/defines.js | 2 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 132 +++++++++--------- versions/pdpjs/1.30.2/pdp11.js | 94 ++++++------- 7 files changed, 222 insertions(+), 178 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 3c0448f6a..4ea73b516 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -9,3 +9,98 @@ machines: --- {% include machine.html id="test1170" %} + +Toggle-Ins +---------- + +From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: + + There are several useful toggle-ins that are probably not very well known. They are as follows: + + Memory Management + + Use the following toggle-in to verify the correct operation of Memory Management Relocation. + + 200/012737 MOV #400,@#177572 (load maint. bit in MMRO) + 202/000400 + 204/177572 + 206/012737 MOV #070707,@#200 (move 070707 to virtual 200) + 210/070707 + 212/000200 + 214/000000 HLT + + 300/000300 Preset loc 300 to 300 + + 17772300/077406 Set Kernel I PDR 0 to R/W 4K page + 17772340/000001 Set Kernel I PAR 0 to (Base address 100) + + Load Address 200 + Start Display = 000216 (Halt@214) + Load Address 300 + Exam Display = 070707 ... Relocation works + +With the PDPjs Debugger, the above "toggle-in" is more easily entered like so: + + e 200 012737 000400 177572 012737 070707 000200 000000 + e 300 000300 + e 17772300 077406 + e 17772340 000001 + r pc 200 + +The "g" command should produce these results: + + >> e 200 012737 000400 177572 012737 070707 000200 000000 + changing 000200 from 00000 to 12737 + changing 000202 from 00000 to 00400 + changing 000204 from 00000 to 77572 + changing 000206 from 00000 to 12737 + changing 000210 from 00000 to 70707 + changing 000212 from 00000 to 00200 + changing 000214 from 00000 to 00000 + >> e 300 000300 + changing 000300 from 00000 to 00300 + >> e 17772300 077406 + changing 00017772300 from 00000 to 77406 + >> e 17772340 000001 + changing 00017772340 from 00000 to 00001 + >> r pc 200 + updated registers: + R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 + SP=000000 PC=000200 PS=000013 SW=00000000 T0 N1 Z0 V1 C1 + 000200: 012737 000400 177572 MOV #400,@#177572 + >> g + running + stopped (3 instructions, 32 cycles, 9 ms, 3556 hz) + R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 + SP=000000 PC=000214 PS=000001 SW=00000000 T0 N0 Z0 V0 C1 + 000214: 000000 HALT + >> dw 300 l1 + 000300 70707 + +--- + + Unibus Map Checkout + + Use the following console operating procedure to verify the correct operation of the Unibus Map. + + Load Address 500 + Deposit 125252 Known Data + + Load Address 17000500 + Deposit 125252 Data Path Ok + + Load Address 17000700 + Deposit 070707 Known Data + + Load Address 17770202 Map register 0 Hi + Deposit 000000 Relocation constant + + Load Address 17770200 Map register 0 Lo + Deposit 000200 Relocation constant + + Load Address 17772516 MMR3 + Deposit 000040 Enable map + + Load address 17000500 Relocates to 700 + Examine 070707 ... Relocated ok diff --git a/devices/pdp11/panel/test/README.md b/devices/pdp11/panel/test/README.md index b3620c2d2..92b955810 100644 --- a/devices/pdp11/panel/test/README.md +++ b/devices/pdp11/panel/test/README.md @@ -8,58 +8,3 @@ PDP-11 Test Panels ------------------ * [Terminal Test Panel](terminal.xml) (with [Debugger](debugger/terminal.xml)) - -Toggle-Ins ----------- - -From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: - - There are several useful toggle-ins that are probably not very well known. They are as follows: - - Memory Management - - Use the following toggle-in to verify the correct operation of Memory Management Relocation. - - 200/012737 MOV #400,@#177572 (load maint. bit in MMRO) - 202/000400 - 204/177572 - 206/012737 MOV #070707,@#200 (move 070707 to virtual 200) - 210/070707 - 212/000200 - 214/000000 HLT - - 300/000300 Preset loc 300 to 300 - - 17772300/077406 Set Kernal I PDR 0 to R/W 4K page - 17772340/000001 Set Kernal I PAR 0 to (Base address 100) - - Load Address 200 - Start Display = 000216 (Halt@214) - Load Address 300 - Exam Display = 070707 ... Relocation works - - Unibus Map Checkout - - Use the following console operating procedure to verify the correct operation of the Unibus Map. - - Load Address 500 - Deposit 125252 Known Data - - Load Address 17000500 - Deposit 125252 Data Path Ok - - Load Address 17000700 - Deposit 070707 Known Data - - Load Address 17770202 Map register 0 Hi - Deposit 000000 Relocation constant - - Load Address 17770200 Map register 0 Lo - Deposit 000200 Relocation constant - - Load Address 17772516 MMR3 - Deposit 000040 Enable map - - Load address 17000500 Relocates to 700 - Examine 070707 ... Relocated ok diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index db6e78d7f..fec488364 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -93,8 +93,8 @@ function BusPDP11(parmsBus, cpu, dbg) * For PDPjs machines, the ideal block size is 8Kb (IOPAGE_LENGTH), the size of the IOPAGE on all PDP-11 machines; * as a result, our IOController functions assume that all incoming offsets are within a single 8Kb block. */ - this.addrTotal = Math.pow(2, this.nBusWidth); - this.nBusLimit = this.nBusMask = (this.addrTotal - 1) | 0; + this.addrTotal = 1 << this.nBusWidth; + this.nBusLimit = this.nBusMask = (this.addrTotal - 1); this.nBlockSize = BusPDP11.IOPAGE_LENGTH; this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2) this.nBlockLen = this.nBlockSize >> 2; @@ -457,7 +457,9 @@ BusPDP11.prototype.setIOPageRange = function(nRange) } if (nRange) { this.nIOPageRange = nRange; - addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH; + addr = (1 << nRange); + this.nBusLimit = this.nBusMask = (addr - 1); + addr -= BusPDP11.IOPAGE_LENGTH; this.prevIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); if (this.realIOPageBlocks) { this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.realIOPageBlocks); diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 1cc7ca70d..c735f81ef 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -1312,15 +1312,16 @@ CPUStatePDP11.prototype.mapUnibus = function(addr) */ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFlags) { - var page, pdr, physicalAddress, errorMask = 0; + var page, pdr, physicalAddress; + + this.assert(!(virtualAddress & ~0x1ffff) && accessFlags); /* - * Verify that 1) the incoming virtual address is within the 17-bit I/D range, 2) that - * accessFlags is properly set, and 3) that the MMU is enabled (because non-MMU code paths - * should no longer be going through this function; the Bus component is responsible for - * mapping physical addresses appropriately). + * This can happen when the DSTMODE (MAINT) bit of MMR0 is set but *not* the ENABLED bit. */ - this.assert(!(virtualAddress & ~0x1ffff) && accessFlags && (accessFlags & this.mmuEnable)); + if (!(accessFlags & this.mmuEnable)) { + return virtualAddress; + } this.mmuLastVirtual = virtualAddress; @@ -1329,6 +1330,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl pdr = this.mmuPDR[this.mmuMode][page]; physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask; + var errorMask = 0; switch (pdr & 0x7) { case 1: // read-only with trap errorMask = 0x1000; // MMU trap diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 8a3dafbb3..66d74768b 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -316,7 +316,7 @@ var PDP11 = { PAGE_D: 0x0010, // last fault occurred in D space PAGE_MODE: 0x0060, // processor mode as of last fault COMPLETED: 0x0080, // last instruction completed - DSTMODE: 0x0100, // only destination mode references will be relocated (for diagnostic use) + DSTMODE: 0x0100, // only destination mode references will be relocated (aka MAINT bit) MMU_TRAPS: 0x0200, // enable MMU traps UNUSED: 0x0C00, TRAP_MMU: 0x1000, // trap: MMU diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index ca8bf80f5..5820907bc 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -46,46 +46,46 @@ function Ga(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Qa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.kb=this.id:(this.Oa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Ya:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.pc=b.comment;this.Rc=b;b=this.id.indexOf(".");0>b?this.kb=this.id:(this.Pa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Za:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;k=yb.prototype;k.reset=function(){}; +function yb(a){u.call(this,"Panel",a,yb);this.g=this.v=this.Ua=this.D=0;this.H=this.J=!1;this.K=zb;this.C={};this.f={START:[1,!0,!1,this.ad],STEP:[1,!1,!1,this.bd],ENABLE:[1,!1,!1,this.Xc],CONT:[1,!0,!1,this.Vc],DEP:[0,!0,!1,this.Wc],EXAM:[1,!0,!1,this.Yc],LOAD:[1,!0,!1,this.$c],TEST:[0,!0,!1,this.Zc]};for(a=0;22>a;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;k=yb.prototype;k.reset=function(){}; k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= a.f[b];Ab(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.H="DEP"==b;a.J="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(Ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Bb(b,this,Cb);Db(b,this.reset.bind(this));Eb(this);Fb(this)};k.Fa=function(a,b){b||(Gb(),this.stop());return!0};k.Ea=function(){return!0}; function Ub(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Eb(a,b){for(var c in a.C)Ub(a,c,null!=b?b:a.C[c])}function Ab(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Fb(a){for(var b in a.f)Ab(a,b,a.f[b][0])}function Vb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Wb(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Xa=[];this.f=0;this.g=!1;this.v=[];this.Hc=[ic,jc,kc,lc];a=new I(this);mc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function jc(a,b,c){var d=!1,e=this.controller,f=e.Xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function kc(a,b){var c=-1,d=this.controller;(a=d.Xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function lc(a,b,c){var d=!1,e=this.controller;if(a=e.Xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function oc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[ic,jc,kc,lc];a=new I(this);mc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function jc(a,b,c){var d=!1,e=this.controller,f=e.Ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function kc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function lc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function oc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return tc(1,f,g)}f=new I(a,f,n,a.xa,d,e);mc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Sa)>>>this.la].fc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=vc(this.b,a));return this.W[(a&this.Sa)>>>this.la].ra(a&this.w,a)};k.Za=function(a){var b=a&this.w,c=(a&this.Sa)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Sa)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Sa)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; -k.gb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Sa)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Sa)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function wc(a){for(var b=0,c=[],d=0;d>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Oa)>>>this.la].fc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=vc(this.b,a));return this.W[(a&this.Oa)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Oa)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Oa)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; +k.gb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Oa)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function wc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.La=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.ab!=c&&(b.ab=c,Mc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Mc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; +k.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;var e=this;this.f.jc=zc(c,function(){e.f.ab|=128;e.f.ab&64&&(Jc(e.b,e.f.Wd),Kc(e.b,e.f.jc,1E3/60))});this.f.Wd=Lc(64,6);Bb(b,this,L);Db(b,this.reset.bind(this));H(this)};k.reset=function(){this.f.ab=0};k.md=function(){var a=this.f.ab;this.f.ab&=-129;return a};k.fe=function(a){this.f.ab=a;a&64&&Kc(this.b,this.f.jc,1E3/60);this.f.ab=a&-129};k.od=function(){var a=this.b;return a.C&62337|a.Ha<<5|a.La<<1}; +k.he=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ha=a>>5&3;b.La=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Mc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Mc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; -k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Ua[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Ua[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Ua[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Ua[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; +k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Va[a]:this.b.u[a]}; +k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return ec(this.b)};k.me=function(a){Nc(this.b,a&-1809|ec(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, @@ -95,39 +95,39 @@ K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Vc(this,Rc?Wc:Xc);else{a=this.b=Array(this.size>> +function I(a,b,c,d,e,f){this.w=a;this.id=Sc+=2;this.b=null;this.F=b;this.Lb=c;this.size=d||0;this.type=e||Tc;this.f=e==Uc;this.controller=null;mc(this);this.Ra=this.Nc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],Vc(this,f.Hc);else if(wb)this.C=new ArrayBuffer(this.size),this.D=new DataView(this.C,0,this.size),this.G=new Uint8Array(this.C,0,this.size),this.J=new Uint16Array(this.C,0,this.size>>1),this.b=new Int32Array(this.C,0,this.size>>2),Vc(this,Rc?Wc:Xc);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Qa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Oa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Ca(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Qa=!0},ta:function(a,b,c){this.G[a]=b;this.Qa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Qa=!0},Ha:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Qa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Ca(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ha:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, b)+")",!0)}};function mc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&ad(a,$c,!1),(a.A=c.A)&&Zc(a,$c,!1))}function cd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function Zc(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function ad(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Vc(a,b){b||(b=dd);ad(a,b,void 0);Zc(a,b,void 0)} -var dd=[],Yc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.La],$c=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Xc=[I.prototype.N,I.prototype.ka,I.prototype.Oa,I.prototype.kb],Wc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.Ha]; +var dd=[],Yc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.La],$c=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Xc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Wc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.Ha]; function ed(a,b){u.call(this,"CPU",a,ed,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(ed);var fd=["power","reset"];k=ed.prototype; k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=kd(a)&&(a.xb=a.yb=-1,id(a),a.ha(),c=!0);c&&a.j(kd(a)+" cycles: checksum="+p(a.Gb))}} k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Yb(a,a.S);a.S=0;a.R=Ba();a.$=0;md(a);return d}function zc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+nd(a))} function od(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Xb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function nd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&md(this,!0);this.za=0;this.Wa=Ba();if(this.$){var a=this.Wa-this.$;a>this.Sb&&(this.R+=a,this.R>this.Wa&&(this.R=this.Wa))}try{do{var b=od(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.za+=b;this.S+=b;Zb(this,b);Xb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.ca(),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),kd(this));vb(this,e.stack|| -e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.$-this.Wa),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,ld(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.$+=c;a(b,c)}}}; +k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&md(this,!0);this.za=0;this.Xa=Ba();if(this.$){var a=this.Xa-this.$;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=od(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.za+=b;this.S+=b;Zb(this,b);Xb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.ca(),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),kd(this));vb(this,e.stack|| +e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.$-this.Xa),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,ld(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.$+=c;a(b,c)}}}; k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;ld(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,kd(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){nd(this);Yb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),kd(this));b=!0}this.B.complete=a;return b}; function pd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;ed.call(this,a,6666667);this.decode=1120==this.wb?qd.bind(this):rd.bind(this);sd(this);this.L=0;this.N=null;this.B.complete=!1}z(pd,ed);k=pd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();sd(this);hd(this);this.B.error=!1;this.parent.reset.call(this)}; -function sd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Ua=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.La=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Wb(a)}function Wb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.ab=0;a.Ha=0;a.Qb=262143;a.N=null;a.w&&Mc(a)}function Mc(a){a.ab?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,oc(a.w,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,oc(a.w,16))}function td(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.rc=function(){return 0}; +function sd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.La=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Wb(a)}function Wb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ha=0;a.Qb=262143;a.N=null;a.w&&Mc(a)}function Mc(a){a.Ta?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,oc(a.w,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,oc(a.w,16))}function td(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.rc=function(){return 0}; k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,wc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];ld(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function zd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ad(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function vd(a){return a.U&32768?2:0}function wd(a){return a.aa&65535?0:4}k.Sa=function(){return this.X&32768?8:0};function xd(a){var b=a.u[7];a.C&57344||(a.cb=0,a.Jb=b);a.u[7]=b+2&65535;return a.ra(b)}function yd(a,b){var c=a.u[7];a.u[7]=c+b&65535;return c}function O(a,b){a.u[7]=b&65535}function Lc(a,b){return{Xd:a,zb:b,next:null}}function Jc(a,b){if(b!=a.N){var c=a.N;if(!c||c.zb<=b.zb)b.next=c,a.N=b;else{do{var d=c.next;if(!d||d.zb<=b.zb){b.next=d;c.next=b;break}c=d}while(c)}}a.I|=2} +function ec(a){return a.M=a.M&63728|a.Sa()|wd(a)|vd(a)|ud(a)}function Nc(a,b){a.X=b<<12;a.aa=~b&4;a.U=b<<14;a.T=b<<16;if((b^a.M)&2048)for(var c=a.Va.length;0<=--c;){var d=a.u[c];a.u[c]=a.Va[c];a.Va[c]=d}a.v=b>>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function zd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ad(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} function Bd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Cd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=ec(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Nc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Dd(this,this.va);Dd(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; function Vd(a){var b=Wd(a),c=Wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Nc(a,c);a.I&=-17}function vc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Xd(a,b,c){var d,e,f,g=0;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ha=a.v,a.La=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ha<<5|a.La<<1),b=!0),a.C&61440||!(4191360> -f||4194239>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ha=a.v,a.La=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ha<<5|a.La<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.ab)return this.w.Tb(a);this.L++;a=Yd(this,Xd(this,a,3));this.L--;return a}; -k.Za=function(a){if(!this.ab)return this.w.Za(a);this.L++;a=this.yc(Xd(this,a,2));this.L--;return a};k.pb=function(a,b){this.ab?(this.L++,Zd(this,Xd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.ab?(this.L++,this.Fc(Xd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return $d(this,a,b,c)};k.Pc=function(a,b,c){return Xd(this,$d(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Xd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; +g;a.b-=8;break;case 6:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Yd(this,Xd(this,a,3));this.L--;return a}; +k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Xd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,Zd(this,Xd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Xd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return $d(this,a,b,c)};k.Pc=function(a,b,c){return Xd(this,$d(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Xd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; k.Je=function(a,b){this.w.gb(Xd(this,a,4),b)};function ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=$d(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function be(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=$d(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Xd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} function ce(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return $d(a,b,c,8)}function fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Zd(a,e,d.call(a,c,Yd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function he(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Zd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} @@ -141,8 +141,8 @@ function Ie(a,b){var c=b-a;Cd(this,c<<8,a<<8,b<<8);return c&255}function Je(a,b) function Me(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} function Ne(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Oe(a){U(this,a,!ud(this))}function Pe(a){U(this,a,ud(this))} function Qe(a){T(this,a,de(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Re(a){S(this,a,ce(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){T(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ce(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ue(a){R(this,de(this,a)&ge(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ve(a){R(this,(ce(this,a)&fe(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){U(this,a,wd(this))}function Xe(a){U(this,a,!this.Ra()==!vd(this))}function Ye(a){U(this,a,!wd(this)&&!this.Ra()==!vd(this))}function Ze(a){U(this,a,!ud(this)&&!wd(this))}function $e(a){U(this,a,wd(this)||!this.Ra()!=!vd(this))} -function af(a){U(this,a,ud(this)||wd(this))}function bf(a){U(this,a,!this.Ra()!=!vd(this))}function cf(a){U(this,a,this.Ra())}function df(a){U(this,a,!wd(this))}function ef(a){U(this,a,!this.Ra())}function ff(){this.pa(12,1);this.b-=5}function gf(a){U(this,a,!0)}function hf(a){U(this,a,!vd(this))}function jf(a){U(this,a,vd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function Ue(a){R(this,de(this,a)&ge(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ve(a){R(this,(ce(this,a)&fe(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){U(this,a,wd(this))}function Xe(a){U(this,a,!this.Sa()==!vd(this))}function Ye(a){U(this,a,!wd(this)&&!this.Sa()==!vd(this))}function Ze(a){U(this,a,!ud(this)&&!wd(this))}function $e(a){U(this,a,wd(this)||!this.Sa()!=!vd(this))} +function af(a){U(this,a,ud(this)||wd(this))}function bf(a){U(this,a,!this.Sa()!=!vd(this))}function cf(a){U(this,a,this.Sa())}function df(a){U(this,a,!wd(this))}function ef(a){U(this,a,!this.Sa())}function ff(){this.pa(12,1);this.b-=5}function gf(a){U(this,a,!0)}function hf(a){U(this,a,!vd(this))}function jf(a){U(this,a,vd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} function kf(a){var b=de(this,a);a=ge(this,a);Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function lf(a){var b=ce(this,a)<<8;a=fe(this,a)<<8;Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} function mf(a){var b=ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function nf(){this.pa(24,2);this.b-=25} function of(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?pf(this.i):this.ha();this.b-=7}function qf(){this.pa(16,4);this.b-=25}var rf=[0,7,7,10,7,11,9,13];function sf(a){this.J=this.b;O(this,ee(this,a));this.b=this.J-rf[this.g]}var tf=[0,14,14,17,14,18,16,20];function uf(a){this.J=this.b;var b=ee(this,a);a=a>>6&7;Dd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-tf[this.g]}var vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; @@ -157,13 +157,13 @@ cg=[function(a){dg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,W,Rf,Tf,Gf,Gf,Gf,Gf] he(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Yf=[function(a){S(this,a,0,Ce);this.b-=this.g?11:6},function(a){S(this,a,ud(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ud(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=fe(this,a);zd(this,a<<8);this.b-=this.g?4:3+(7== this.f?2:0)}],$f=[function(a){S(this,a,0,Ge);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}];function rd(a){eg[a>>12].call(this,a)} var eg=[function(a){fg[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,function(a){gg[a>>8&15].call(this,a)},function(a){hg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],fg=[function(a){ig[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,function(a){jg[a>>6&3].call(this,a)},W,W],jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ae(this,a,0);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J= -this.b;be(this,a,0,b);R(this,b);this.b=this.J-yf[this.g]},function(a){R(this,ie(this,a,this.Ra?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ig=[function(a){kg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Rf,Tf,Gf,Gf,Gf,Gf],kg=[of,If,Cf,ff,qf,Bf,function(){Vd(this);this.b-=13},W,W,W,W,W,W,W,W,W],gg=[zf,zf,mf,mf,Me,Me,Ne,Ne,Jf,Jf,W,W,W,W,Ef,Ef],hg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,function(a){lg[a>> +this.b;be(this,a,0,b);R(this,b);this.b=this.J-yf[this.g]},function(a){R(this,ie(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ig=[function(a){kg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Rf,Tf,Gf,Gf,Gf,Gf],kg=[of,If,Cf,ff,qf,Bf,function(){Vd(this);this.b-=13},W,W,W,W,W,W,W,W,W],gg=[zf,zf,mf,mf,Me,Me,Ne,Ne,Jf,Jf,W,W,W,W,Ef,Ef],hg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,function(a){lg[a>> 6&3].call(this,a)},W,W],lg=[W,function(a){a=ae(this,a,65536);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J=this.b;be(this,a,65536,b);R(this,b);this.b=this.J-yf[this.g]},W]; -function mg(a){u.call(this,"ROM",a,mg);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Oa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);ng(c)})}}z(mg);mg.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;ng(this)}; +function mg(a){u.call(this,"ROM",a,mg);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);ng(c)})}}z(mg);mg.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;ng(this)}; mg.prototype.Fa=function(){this.ia&&(this.i&&og(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};mg.prototype.Ea=function(){return!0}; function ng(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(rc(a.w,b,a.g,Uc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():td(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.ka))});this.ma=Lc(52,4);this.$=zc(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.ma)});Bb(b,this,Ng);H(this)}; -k.vc=function(){if(!this.J){var a=gd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.vc=function(){if(!this.J){var a=gd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ea=function(a){return a?this.save():!0};k.reset=function(){Og(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Og(this)};function Og(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), @@ -182,26 +182,26 @@ function(){var a=d.G.listTapes;a&&Sg(d,a.options[a.selectedIndex].text,a.value,e k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Tg(a);var e=this;if((this.g=gd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Lc(56,4);this.da=zc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Oa,e,f),(e=Fa(e,f))&&bh(a,b,c,d,e.ea,e.Ja, -e.Ia));a.B.Ya=!1;a.D&&(a.D--,a.D||H(a));Zg(a)})}function Wg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&bh(a,b,c,d,e.ea,e.Ja, +e.Ia));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));Zg(a)})}function Wg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, +function hh(a,b,c,d,e){var f=c;if(a.w)return!0;a.Wa=b;a.fb=c;a.Cc=sa(c);a.w=e;a.C=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=la[d];if(e){a.ua=e[0];a.ya=e[1];a.qa=e[2];a.Ka=e[3]||512;c=a.Ka>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){ih(a,b,c,d)})} -function ih(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Va+'" (error '+d+": "+b+")",f);else{nb(a.controller.Oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function ih(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Na+a.Aa&&(a.Aa+=f-(a.Na+a.Aa)+1):(a.Na=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Va+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=kh(this,a++);)mh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function mh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&nh(d,a)},!0;case "loadDrive":return this.G[b]= @@ -213,9 +213,9 @@ k.Fa=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.qc){for(a k.restore=function(a){return ph(this,a[0])};function sh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}uh(a,e,b,c,!1,d)}else th(a,e)} function uh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,th(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,hh(new dh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Va=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));nh(this,a.ec)}; +k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));nh(this,a.ec)}; function rh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(yc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; @@ -232,7 +232,7 @@ d))}return d}function Bh(a,b){for(var c,d=a.Ha?"(":"{",e=a.Ha?")":"}",f=new RegE function Ch(a,b,c,d){var e;null!=b?(e=a.sc(b),0<=e?e=a.tc(e):(e=a.Y[b],null==e&&(e=qa(b,a.da))),null!=e||d||a.j("invalid "+(c?c:"value")+": "+b)):d||a.j("missing "+(c||"value"));return e} function Dh(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Eh(a,b){if(b)return Dh(a,b,a.Y[b]);var c=0;for(b in a.Y)Dh(a,b,a.Y[b]),c++;return 0d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Ua[a-8]:20>a?b=this.b.Ga[a-16]:20==a?b=ec(this.b):21==a&&this.f&&dc(this.f)&&(b=this.f.Ta));return b}; +k.sc=function(a){var b=-1;a=a.toUpperCase();switch(a){case "SP":b=6;break;case "PC":b=7;break;case "SW":b=21;break;default:"R"==a.charAt(0)&&(b=+a.charAt(1),0>b||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ga[a-16]:20==a?b=ec(this.b):21==a&&this.f&&dc(this.f)&&(b=this.f.Ua));return b}; k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,nd(a),a.ta=0,a.A&&a.A.ca()))};function Hh(a){var b;if(!je(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Wh(this):Xh(this)}};function Vh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Hh(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Yh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Rh(this.L));a.set(1,Rh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Sh(a[b++]),this.P=Sh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.Za(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Ma=!1,++a.$==a.H.length&&(a.$=0)));return!1}function pf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} +function ke(a,b,c){var d=-1;c||(d=a.b.$a(b),0==d&&(b=yd(a.b,2)));if(0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Ma=!1,++a.$==a.H.length&&(a.$=0)));return!1}function pf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} function Gh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||Zh(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Ma=!0:($h(this,a,a.length-1,"set"),Hh(this)));return d}; function Zh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.D));h.Ma||Hh(a);break}}return f}function ai(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), y&63)switch(y=A&7,A&56){case 0:x=Uh(y);break;case 8:x="@"+Uh(y);break;case 16:7>y?x="("+Uh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Uh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Uh(y)+")";break;case 40:x="@-("+Uh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Uh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Uh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Uh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Ua[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b?c="PS="+J(a,ec(d)):21==b&&a.f&&dc(a.f)&&(c="SW="+J(a,a.f.Ta,3));c&&(c+=" ");return c}function fi(a){var b,c="";for(b=0;6>b;b++)c+=ei(a,b);c=c+"\n"+(ei(a,6)+ei(a,7));c+=ei(a,20)+ei(a,21);return c+=di(a,"T")+di(a,"N")+di(a,"Z")+di(a,"V")+di(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]b?(c=Uh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b?c="PS="+J(a,ec(d)):21==b&&a.f&&dc(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function fi(a){var b,c="";for(b=0;6>b;b++)c+=ei(a,b);c=c+"\n"+(ei(a,6)+ei(a,7));c+=ei(a,20)+ei(a,21);return c+=di(a,"T")+di(a,"N")+di(a,"Z")+di(a,"V")+di(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function gi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.f["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.ca();a.j("updated registers:")}a.j(fi(a));c&&(a.L=Z(d.u[7]),Xh(a,J(a,a.L.F)))}}function ki(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b;b++)e.f["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.ca();a.j("updated registers:")}a.j(fi(a));c&&(a.L=Z(d.u[7]),Xh(a,J(a,a.L.F)))}}function ki(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ci(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} function bi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Gd=[];"call"==wg&&(Hb=1E5,Gd=["CALL"]);for(void 0!==vg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;yg++;Hb--}}yg||(a.j("no "+xg+"history available"),a.tb=void 0)}else{var Jb=Ph(a,ma);if(Jb){var Ac=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Ei),Ac=Ch(a,Ka)>>>0,65536>4||1;Gi--&&0Ec?String.fromCharCode(Ec):".";Bc-=Dc}Kb&&(Kb+="\n");Kb+=ma+" "+Hd+(0==Mb?" "+Bg:"")}Kb&&a.j(Kb);a.lb=Jb}}}}break;case "e":if("else"==g[0])break;var ib,Id,Jd,Kd,Ld=g[0],Md=g[1];"eb"==Ld?(ib=1,Id=255,Jd=a.Fb,Kd=a.Wb):"e"==Ld||"ew"==Ld?(ib=2,Id=65535,Jd=a.oa,Kd=a.gb):Md=null;if(null==Md)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Ph(a,Md);if(Fc)for(var Gc= @@ -285,8 +285,8 @@ G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=nul "Mhz")+" ("+a.b.bb+"x)");break;default:if(g[1]){a.j("unknown option: "+g[1]);break}case "?":a.j("debugger options:"),a.j("\tbase #\t\tset default base to #"),a.j("\tcs int #\tset checksum cycle interval to #"),a.j("\tcs start #\tset checksum cycle start count to #"),a.j("\tcs stop #\tset checksum cycle stop count to #"),a.j("\tsp #\t\tset speed multiplier to #")}break;case "t":li(a,g[0],g[1]);break;case "u":Xh(a,g[1],g[2],8);break;case "v":if("var"==g[0]){ii(a,b.substr(3))||(d=!1);break}if("ver"== g[0]){a.j("PDPjs version 1.30.2 ("+a.b.wb+",RELEASE"+(wb?",TYPEDARRAYS":",LONGARRAYS")+")");a.j(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){ki(a,b.substr(1));break}var Td="commands:",Ud;for(Ud in Jh)Td+="\n"+xa(Ud,9)+Jh[Ud];je(a)||(Td+="\nnote: history disabled if no exec breakpoints");a.j(Td);break;default:f=!0}f&&(a.j("unknown command: "+b),d=!1)}}catch(Jg){a.j("debugger error: "+(Jg.stack||Jg.message)),d=!1}return d} function jd(a,b,c){b=yh(a,b,c);for(var d in b)if(!bi(a,b[+d]))return!1;return!0}Xa(function(){for(var a=D(document,"pdp11","debugger"),b=0;b\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function u(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var xa=null;function ya(){if(null==xa){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}xa=a}return xa} function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ca={init:[],show:[],exit:[]},Da=!1,Ea=!1,Fa=!0; function Ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ha(a){Ca.init.push(a)}function Ia(a){if(Fa)try{for(var b=0;bb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Ea:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;h=Za.prototype;h.reset=function(){}; h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];ab(a, b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;bb(b,this,cb);db(b,this.reset.bind(this));eb(this);for(var e in this.b)ab(this,e,this.b[e][0])};h.ja=function(a,b){b||(fb(),this.stop());return!0};h.ia=function(){return!0}; function gb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function eb(a,b){for(var c in a.m)gb(a,c,null!=b?b:a.m[c])}function ab(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),ib(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&jb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])jb(this.a);else{a=this.C;var b;if(b=a)a.l.Ea&&(a.l.pb=!0),b=!a.l.Ea;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.xa=[];this.f=0;this.i=!1;this.s=[];this.ac=[ub,vb,wb,xb];a=new I(this);yb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.xa[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function vb(a,b,c){var d=!1,e=this.controller,f=e.xa[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.xa[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function wb(a,b){var c=-1,d=this.controller;(a=d.xa[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function xb(a,b,c){var d=!1,e=this.controller;if(a=e.xa[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Ab(a,b){if(b!=a.m){var c;a.m&&(c=(1<>2;this.j=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[ub,vb,wb,xb];a=new I(this);yb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function vb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function wb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function xb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Ab(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Fb(1,f,g)}f=new I(a,f,p,a.b,d,e);yb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Jb(a,b){3932160<=b&&(b=Ib(a.a,b));return a.h[(b&a.Aa)>>>a.c].W(b&a.j,b)} -h.kb=function(a){var b=a&this.j,c=(a&this.Aa)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.Aa)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Kb(a,b,c){3932160<=b&&(b=Ib(a.a,b));a.h[(b&a.Aa)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){var c=a&this.j,d=(a&this.Aa)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Lb(a){for(var b=0,c=[],d=0;d>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Jb(a,b){3932160<=b&&(b=Ib(a.a,b));return a.h[(b&a.ua)>>>a.c].W(b&a.j,b)} +h.kb=function(a){var b=a&this.j,c=(a&this.ua)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ua)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Kb(a,b,c){3932160<=b&&(b=Ib(a.a,b));a.h[(b&a.ua)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){var c=a&this.j,d=(a&this.ua)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Lb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Fa!=c&&(b.Fa=c,Tb(b))}};h.Ec=function(){var a=this.a.Ba;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +function J(a,b,c){a.i=!0;a.f||(c&&(a.a.M|=c),K(a.a,4,b))}function Nb(a){var b=a.i;a.i=!1;return b}function Fb(a,b,c){u("Memory block error ("+a+": "+m(b)+","+m(c)+")");return!1}function L(a){x.call(this,"Device",a,L);this.b={L:0,Cb:-1}}z(L);h=L.prototype;h.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;var e=this;this.b.Cb=Ob(c,function(){e.b.Aa|=128;e.b.Aa&64&&(Pb(e.a,e.b.ld),Qb(e.a,e.b.Cb,1E3/60))});this.b.ld=Rb(64,6);bb(b,this,M);db(b,this.reset.bind(this));F(this)}; +h.reset=function(){this.b.Aa=0};h.Bc=function(){var a=this.b.Aa;this.b.Aa&=-129;return a};h.vd=function(a){this.b.Aa=a;a&64&&Qb(this.a,this.b.Cb,1E3/60);this.b.Aa=a&-129};h.Dc=function(){var a=this.a;return a.w&62337|a.$a<<5|a.ab<<1};h.xd=function(a){var b=this.a;a&=62337;if(b.w!=a){b.w=a;b.$a=a>>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Tb(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Tb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; -h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Ca&65280:0};h.Sd=function(a){this.a.Ca=a|255}; +h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; h.Kc=function(){return rb(this.a)};h.Cd=function(a){Ub(this.a,a&-1809|rb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, @@ -91,34 +91,34 @@ Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),bc(this,Yb?cc:dc);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},va:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function yb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&fc(a,hc,!1),(a.m=c.m)&&ic(a,hc,!1))}function ic(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function fc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function bc(a,b){b||(b=jc);fc(a,b,void 0);ic(a,b,void 0)} -var jc=[],ec=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.wa],hc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var dc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],cc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.va]; -function kc(a,b){x.call(this,"CPU",a,kc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.ub=Math.round(this.gb/1E4)/100;this.va=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.wa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(kc);var lc=["power","reset"];h=kc.prototype; +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function yb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&fc(a,hc,!1),(a.m=c.m)&&ic(a,hc,!1))}function ic(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function fc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function bc(a,b){b||(b=jc);fc(a,b,void 0);ic(a,b,void 0)} +var jc=[],ec=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],hc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var dc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],cc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; +function kc(a,b){x.call(this,"CPU",a,kc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(kc);var lc=["power","reset"];h=kc.prototype; h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.wa&&(a.wa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=pc(a)&&(a.Qa=a.Ra=-1,oc(a),G(a),c=!0);c&&a.T(pc(a)+" cycles: checksum="+m(a.cb))}} +h.Ua=function(){return this.l.Ua||void 0===this.o.run?(jb(this),!0):!1};h.Ib=function(){return 0};function oc(a){void 0===a.eb&&(a.eb=0);void 0===a.Qa&&(a.Qa=-1);void 0===a.Ra&&(a.Ra=-1);a.l.fb=0<=a.eb&&0=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=pc(a)&&(a.Qa=a.Ra=-1,oc(a),G(a),c=!0);c&&a.T(pc(a)+" cycles: checksum="+m(a.cb))}} h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.va&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.va!=b){a.va=b;b=a.va.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&sc(a.j)}lb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;rc(a)}function Ob(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+tc(a))} +c,!0;case "setSpeed":return this.o[b]=c,c.onclick=function(){qc(d,d.qa<<1,!0)},c.textContent=this.wa.toFixed(2)+"Mhz",!0}return!1};h.ka=function(){var a=this.o.speed;a&&(a.textContent=this.l.U&&this.da?this.da.toFixed(2)+"Mhz":"Stopped")};function lb(a,b,c){a.sa+=b;c&&(a.pa=a.a=a.G=0)}function rc(a,b){var c=1;b&&1a.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&sc(a.j)}lb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;rc(a)}function Ob(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+tc(a))} function kb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function tc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} h.kd=function(){if(this.l.U){this.vb>=this.gb&&rc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=tc(this,!0);this.Ta+=b;this.aa+=b;mb(this,b);kb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),pc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,qc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; +this.j&&this.j.stop(ra(),pc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,qc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; function jb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{qc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,pc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){tc(a);lb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),pc(a));b=!0}a.l.complete=void 0;return b} function uc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;kc.call(this,a,6666667);this.decode=1120==this.Za?vc.bind(this):wc.bind(this);xc(this);this.ra=0;this.N=null;this.l.complete=!1}z(uc,kc);h=uc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);xc(this);nc(this);this.l.error=!1;this.parent.reset.call(this)}; function xc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.tb=0;a.Ia=-1;ib(a)}function ib(a){a.Ca=255;a.M=0;a.Ab=0;a.w=0;a.Ba=0;a.zb=0;a.Ga=0;a.Fa=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Tb(a)}function Tb(a){a.Fa?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Ab(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Ab(a.h,16))}function yc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.tb=0;a.Ia=-1;ib(a)}function ib(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Tb(a)}function Tb(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Ab(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Ab(a.h,16))}function yc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Lb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];qc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Bc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Cc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Dc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=rb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ba=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Ub(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Fc(a,a.Ia);Fc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Gc(a){var b=Hc(a),c=Hc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Ub(a,c);a.u&=-17} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=rb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Ub(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Fc(a,a.Ia);Fc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Gc(a){var b=Hc(a),c=Hc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Ub(a,c);a.u&=-17} function Ib(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Ic(a,b,c){var d,e,f,g=0;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1),b=!0),a.w&61440||!(4191360> -f||4194239>>a.c].Db(b&a.j,c&255,b)}function Hc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Fc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ba=a.Ba<<8|246);!a.v&&c<=a.Ca&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ba=a.Ba<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Ca||65534<=a.g[6])&&(a.g[6]<=a.Ca-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Fa)return this.h.kb(a);this.ra++;a=this.Tb(Ic(this,a,2));this.ra--;return a}; -h.Xa=function(a,b){this.Fa?(this.ra++,Jc(this,Ic(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.lb=function(a,b){this.Fa?(this.ra++,this.$b(Ic(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Kc(this,a,b,c)};h.hc=function(a,b,c){return Ic(this,Kc(this,a,b,c),c)};h.Tb=function(a){return Jb(this.h,a)};h.gd=function(a){return Jb(this.h,Ic(this,a,2))};h.$b=function(a,b){Kb(this.h,a,b&65535)};h.Zd=function(a,b){Kb(this.h,Ic(this,a,4),b)}; -function Lc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Kc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Mc(a,b,c,d){a.w&57344||(a.Ba=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Kc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Ic(a,e|c&65536,4),a.v=a.B>>14&3,Kb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Ic(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Hc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Fc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Ic(this,a,2));this.ra--;return a}; +h.Xa=function(a,b){this.Ba?(this.ra++,Jc(this,Ic(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Ic(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Kc(this,a,b,c)};h.hc=function(a,b,c){return Ic(this,Kc(this,a,b,c),c)};h.Tb=function(a){return Jb(this.h,a)};h.gd=function(a){return Jb(this.h,Ic(this,a,2))};h.$b=function(a,b){Kb(this.h,a,b&65535)};h.Zd=function(a,b){Kb(this.h,Ic(this,a,4),b)}; +function Lc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Kc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Mc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Kc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Ic(a,e|c&65536,4),a.v=a.B>>14&3,Kb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} function Nc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Oc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]}function Pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Kc(a,b,c,8)}function Qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]} function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Jc(a,e,d.call(a,c,Hb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Kb(a.h,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Jc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} @@ -130,8 +130,8 @@ function ld(a,b){a=b<<1|this.m>>16&1;Dc(this,a);return a&65535}function md(a,b){ function sd(a,b){a^=b;S(this,a);return a&65535}function td(a){U(this,a,Oc(this,a),Uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} function vd(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function wd(a){V(this,a,!R(this))}function xd(a){V(this,a,R(this))} function yd(a){U(this,a,Oc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){T(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){U(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Nc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Cd(a){S(this,Oc(this,a)&Rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){S(this,(Nc(this,a)&Qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){V(this,a,this.i&65535?0:4)}function Fd(a){V(this,a,!this.ya()==!(this.f&32768))}function Gd(a){V(this,a,!!(this.i&65535)&&!this.ya()==!(this.f&32768))}function Hd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Id(a){V(this,a,(this.i&65535?0:4)||!this.ya()!=!(this.f&32768))}function Jd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Kd(a){V(this,a,!this.ya()!=!(this.f&32768))}function Ld(a){V(this,a,this.ya())}function Md(a){V(this,a,!!(this.i&65535))}function Nd(a){V(this,a,!this.ya())}function Od(){K(this,12,1);this.a-=5}function Pd(a){V(this,a,!0)}function Qd(a){V(this,a,!(this.f&32768))}function Rd(a){V(this,a,this.f&32768?2:0)} +function Cd(a){S(this,Oc(this,a)&Rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){S(this,(Nc(this,a)&Qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){V(this,a,this.i&65535?0:4)}function Fd(a){V(this,a,!this.za()==!(this.f&32768))}function Gd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Id(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Jd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Kd(a){V(this,a,!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,this.za())}function Md(a){V(this,a,!!(this.i&65535))}function Nd(a){V(this,a,!this.za())}function Od(){K(this,12,1);this.a-=5}function Pd(a){V(this,a,!0)}function Qd(a){V(this,a,!(this.f&32768))}function Rd(a){V(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Sd(a){var b=Oc(this,a);a=Rc(this,a);Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Td(a){var b=Nc(this,a)<<8;a=Qc(this,a)<<8;Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} function Ud(a){var b=Rc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Vd(){K(this,24,2);this.a-=25} function Wd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Xd(){K(this,16,4);this.a-=25}var Yd=[0,7,7,10,7,11,9,13];function Zd(a){this.G=this.a;P(this,Pc(this,a));this.a=this.G-Yd[this.c]}var $d=[0,14,14,17,14,18,16,20];function ae(a){this.G=this.a;var b=Pc(this,a);a=a>>6&7;Fc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-$d[this.c]}var be=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; @@ -146,7 +146,7 @@ Je=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,Y,xe,ze,me,me,me,me] Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ee=[function(a){T(this,a,0,kd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Bc(this,a<<8);this.a-=this.c?4:3+(7==this.b? 2:0)}],Ge=[function(a){T(this,a,0,od);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function wc(a){Le[a>>12].call(this,a)} var Le=[function(a){Me[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,function(a){Ne[a>>8&15].call(this,a)},function(a){Oe[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,function(a){Qe[a>>6&3].call(this,a)},Y,Y],Qe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Lc(this,a,0);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G= -this.a;Mc(this,a,0,b);S(this,b);this.a=this.G-ee[this.c]},function(a){S(this,Tc(this,a,this.ya?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){Re[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},xe,ze,me,me,me,me],Re=[Wd,oe,ie,Od,Xd,he,function(){Gc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ne=[fe,fe,Ud,Ud,ud,ud,vd,vd,pe,pe,Y,Y,Y,Y,ke,ke],Oe=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,function(a){Se[a>>6& +this.a;Mc(this,a,0,b);S(this,b);this.a=this.G-ee[this.c]},function(a){S(this,Tc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){Re[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},xe,ze,me,me,me,me],Re=[Wd,oe,ie,Od,Xd,he,function(){Gc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ne=[fe,fe,Ud,Ud,ud,ud,vd,vd,pe,pe,Y,Y,Y,Y,ke,ke],Oe=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,function(a){Se[a>>6& 3].call(this,a)},Y,Y],Se=[Y,function(a){a=Lc(this,a,65536);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G=this.a;Mc(this,a,65536,b);S(this,b);this.a=this.G-ee[this.c]},Y]; function Te(a){x.call(this,"ROM",a,Te);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Ue(c)})}}z(Te);Te.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ue(this)}; Te.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Te.prototype.ia=function(){return!0}; @@ -170,24 +170,24 @@ h.$=function(a,b,c){var d=this,e=df;switch(b){case "listTapes":return this.o[b]= d.o.listTapes;a&&ef(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ef(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ff(a);var e=this;if((this.c=mc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Rb(56,4);this.R=Ob(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&pf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Ea=!1;a.m&&(a.m--,a.m||F(a));mf(a)})}function jf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +function vf(a,b,c,d,e){var f=c;if(a.h)return!0;a.va=b;a.Ea=c;a.Wb=q(c);a.h=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.V=e[0];a.Z=e[1];a.S=e[2];a.ga=e[3]||512;c=a.ga>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){wf(a,b,c,d)})} -function wf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function wf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.ua+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=yf(this,a++);)Af(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function Af(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Bf(d,a)},!0;case "loadDrive":return this.o[b]= @@ -198,11 +198,11 @@ h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;if((this.f=mc(this.j, h.ja=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.j.Hb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Bf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Df(this)};h.save=function(){return(new Q(this)).data()}; h.restore=function(a){return Df(this,a[0])};function Gf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}If(a,e,b,c,!1,d)}else Hf(a,e)} -function If(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Hf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,vf(new rf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.ua=c,a.Da=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.j&&sc(this.j)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Bf(this,a.wb)}; +function If(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Hf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,vf(new rf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.j&&sc(this.j)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Bf(this,a.wb)}; function Ff(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Kb(this.h,f,t|w<<8);if(Nb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Jb(this.h,f);if(Nb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; From afdefb9c4f014736c5be6292f27935201939a208 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 2 Nov 2016 21:26:04 -0700 Subject: [PATCH 14/30] Updated toggle-in README --- devices/pdp11/machine/1170/panel/debugger/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 4ea73b516..db3a3696d 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -40,15 +40,16 @@ Chapter 4: Load Address 300 Exam Display = 070707 ... Relocation works -With the PDPjs Debugger, the above "toggle-in" is more easily entered like so: +With the PDPjs Debugger, the above "toggle-in" is easily entered with these commands: e 200 012737 000400 177572 012737 070707 000200 000000 e 300 000300 e 17772300 077406 e 17772340 000001 r pc 200 + g -The "g" command should produce these results: +which should produce these results: >> e 200 012737 000400 177572 012737 070707 000200 000000 changing 000200 from 00000 to 12737 From 57bceb4da9cb7666809c14e6d53198eb5cf2be3b Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Nov 2016 10:28:54 -0700 Subject: [PATCH 15/30] Fixed the LED (lamp) test, fixed Front Panel update on a machine RESET, and cleaned up the status update code a bit --- .../machine/1170/panel/debugger/README.md | 14 +- modules/pdp11/lib/computer.js | 89 ++-- modules/pdp11/lib/cpu.js | 19 +- modules/pdp11/lib/cpuops.js | 3 +- modules/pdp11/lib/panel.js | 101 ++-- versions/pdpjs/1.30.2/pdp11-dbg.js | 484 +++++++++--------- versions/pdpjs/1.30.2/pdp11.js | 356 ++++++------- 7 files changed, 554 insertions(+), 512 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index db3a3696d..31e2adb6d 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -13,13 +13,11 @@ machines: Toggle-Ins ---------- -From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: +As DEC explains in its [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are listed below. + +### Memory Management - There are several useful toggle-ins that are probably not very well known. They are as follows: - - Memory Management - Use the following toggle-in to verify the correct operation of Memory Management Relocation. 200/012737 MOV #400,@#177572 (load maint. bit in MMRO) @@ -79,10 +77,8 @@ which should produce these results: >> dw 300 l1 000300 70707 ---- +### Unibus Map Checkout - Unibus Map Checkout - Use the following console operating procedure to verify the correct operation of the Unibus Map. Load Address 500 diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 15a6b9c10..4fe1afd01 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -744,6 +744,7 @@ ComputerPDP11.prototype.donePowerOn = function(aParms) * TODO: Do we not care about the return value here? (ie, is checking fRestoreError sufficient)? */ this.powerRestore(this.cpu, stateComputer, fRepower, fRestore); + this.updateStatus(); this.cpu.autoStart(); } @@ -955,26 +956,31 @@ ComputerPDP11.prototype.powerOff = function(fSave, fShutdown) * allocated the Bus object ourselves, after all the other components were allocated, it ends * up near the end of Component's list of components. Hence the special case for this.bus below. * + * Ditto for the CPU, in part because if the Front Panel resets before the CPU, it will end up + * snapping/displaying the PC as of the last instruction executed, before the CPU resets the PC, + * causing the Front Panel to display a stale address when we call updateStatus() at the end. + * * @this {ComputerPDP11} */ ComputerPDP11.prototype.reset = function() { if (this.bus && this.bus.reset) { - /* - * TODO: Why does WebStorm think that this.bus.type is undefined? The base class (Component) - * constructor defines it. - */ this.printMessage("Resetting " + this.bus.type); this.bus.reset(); } + if (this.cpu && this.cpu.reset) { + this.printMessage("Resetting " + this.cpu.type); + this.cpu.reset(); + } var aComponents = Component.getComponents(this.id); for (var iComponent = 0; iComponent < aComponents.length; iComponent++) { var component = aComponents[iComponent]; - if (component !== this && component !== this.bus && component.reset) { + if (component !== this && component !== this.bus && component !== this.cpu && component.reset) { this.printMessage("Resetting " + component.type); component.reset(); } } + this.updateStatus(true); }; /** @@ -1027,6 +1033,44 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) this.updateStatus(true); }; +/** + * updateStatus(fForce) + * + * TODO: Notify all (other) components with an updateStatus() method that the computer's state has changed. + * + * If any DOM controls were bound to the CPU, then we need to call its updateStatus() handler; if there are no + * such bindings, then cpu.updateStatus() does nothing. + * + * Similarly, if there's a Panel, then we need to call its updateStatus() handler, in case it created its own canvas + * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateStatus() also does nothing. + * + * In practice, there will *either* be a Panel with a custom canvas *or* a set of DOM controls bound to the CPU *or* + * neither. In theory, there could be BOTH, but that would be unusual. + * + * TODO: Consider alternate approaches to these largely register-oriented display updates. Ordinarily, we like to + * separate logic from presentation, and currently the CPUState contains both, since it's the component that intimately + * knows the names, number, sizes, etc, of all the active registers. The Panel component is the logical candidate, + * but Panel is an optional component; it's often the case that only machines that include the Debugger also include + * Panel. + * + * @this {ComputerPDP11} + * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) + */ +ComputerPDP11.prototype.updateStatus = function(fForce) +{ + /* + * fForce is generally set to true whenever the CPU is transitioning to/from a running state, in which case + * cpu.updateStatus() will definitely want to hide/show register contents; however, at other times, when the + * CPU is running, constantly updating the DOM controls too frequently can adversely impact overall performance. + * + * So fForce serves as a hint to help cpu.updateStatus() make a more informed decision. panel.updateStatus() + * currently doesn't care, on the theory that canvas updates should be significantly faster than DOM updates, + * but we still pass fForce on. + */ + if (this.cpu) this.cpu.updateStatus(fForce); + if (this.panel) this.panel.updateStatus(fForce); +}; + /** * setBinding(sType, sBinding, control, sValue) * @@ -1429,41 +1473,6 @@ ComputerPDP11.prototype.setFocus = function(fScroll) } }; -/** - * updateStatus(fForce) - * - * If any DOM controls were bound to the CPU, then we need to call its updateStatus() handler; if there are no - * such bindings, then cpu.updateStatus() does nothing. - * - * Similarly, if there's a Panel, then we need to call its updateStatus() handler, in case it created its own canvas - * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateStatus() also does nothing. - * - * In practice, there will *either* be a Panel with a custom canvas *or* a set of DOM controls bound to the CPU *or* - * neither. In theory, there could be BOTH, but that would be unusual. - * - * TODO: Consider alternate approaches to these largely register-oriented display updates. Ordinarily, we like to - * separate logic from presentation, and currently the CPUState contains both, since it's the component that intimately - * knows the names, number, sizes, etc, of all the active registers. The Panel component is the logical candidate, - * but Panel is an optional component; generally, only machines that include Debugger also include Panel. - * - * @this {ComputerPDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) - */ -ComputerPDP11.prototype.updateStatus = function(fForce) -{ - /* - * fForce is generally set to true whenever the CPU is transitioning to/from a running state, in which case - * cpu.updateStatus() will definitely want to hide/show register contents; however, at other times, when the - * CPU is running, constantly updating the DOM controls too frequently can adversely impact overall performance. - * - * So fForce serves as a hint to help cpu.updateStatus() make a more informed decision. panel.updateStatus() - * currently doesn't care, on the theory that canvas updates should be significantly faster than DOM updates, - * but we still pass fForce on. - */ - if (this.cpu) this.cpu.updateStatus(fForce); - if (this.panel) this.panel.updateStatus(fForce); -}; - /** * ComputerPDP11.init() * diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index c94e8886c..e5e1dffc8 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -282,11 +282,7 @@ CPUPDP11.prototype.powerUp = function(data, fRepower) * is now responsible for managing a component's fPowered flag, not us. * * this.flags.powered = true; - * - * And we don't have to worry whether this.cmp is set, because powerUp() handlers are never called - * before initBus() handlers. */ - this.cmp.updateStatus(); return true; }; @@ -508,6 +504,17 @@ CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) return false; }; +/** + * updateComputer(fForce) + * + * @this {CPUPDP11} + * @param {boolean} [fForce] + */ +CPUPDP11.prototype.updateComputer = function(fForce) +{ + if (this.cmp) this.cmp.updateStatus(fForce); +}; + /** * updateStatus(fForce) * @@ -1094,7 +1101,7 @@ CPUPDP11.prototype.runCPU = function() if (this.nCyclesNextYield <= 0) { this.nCyclesNextYield += this.nCyclesPerYield; if (++this.nYieldsSinceStatusUpdate >= CPUPDP11.YIELDS_PER_STATUS) { - if (this.cmp) this.cmp.updateStatus(); + this.updateComputer(); this.nYieldsSinceStatusUpdate = 0; } break; @@ -1209,7 +1216,7 @@ CPUPDP11.prototype.yieldCPU = function() * odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not, * so I've added this call to try to keep things looking synchronized. */ - if (this.cmp) this.cmp.updateStatus(); + this.updateComputer(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index c5b2a0a1e..960be5b01 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1413,9 +1413,8 @@ PDP11.opRESET = function(opCode) if (!(this.regPSW & PDP11.PSW.CMODE)) { this.bus.reset(); this.resetRegs(); - // display.data = this.regsGen[0]; // TODO: Review } - this.nStepCycles -= 667; // TODO: Review (but it's definitely a big number) + this.nStepCycles -= 667; // TODO: Review (but it's definitely a big number) }; /** diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index fdcc817b1..0723ec4f0 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -63,12 +63,16 @@ function PanelPDP11(parmsPanel) this.fDisplayLiveRegs = true; /* - * regSwitches contains the Console (Front Panel) Switch Register, which is also available as a - * read-only register at 177570 (but only the low 16 bits). + * regSwitches contains the Front Panel (aka Console) 'SWITCH' register, which is also available + * as a read-only register at 177570 (but only the low 16 bits). * - * regAddr is an internal register containing the contents of the Front Panel's ADDRESS display, - * and regData corresponds to the DATA display. They are updated by setAddr() and setData(), + * regAddr is an internal register containing the contents of the Front Panel's 'ADDRESS' display, + * and regData corresponds to the 'DATA' display. They are updated by setAddr() and setData(), * which in turn take care of calling setLEDArray(). + * + * The state of ALL switches is maintained in this.switches, and likewise all LED states are + * maintained in this.leds, but for convenience, we also mirror some of those states in dedicated + * variables (eg, regSwitches for the 'SWITCH' register, fLEDTest for the 'TEST' switch, etc). */ this.regSwitches = 0; this.regAddr = this.regData = 0; @@ -82,7 +86,7 @@ function PanelPDP11(parmsPanel) * register (regData) [the equivalent of selecting 'DISPLAY REGISTER'] except when data is being * examined or deposited [the equivalent of selecting 'DATA PATHS']. */ - this.fLampTest = false; // lamp (LED) test in progress + this.fLEDTest = false; // LED (lamp) test in progress this.fExamine = false; // true if the previously pressed switch was the 'EXAM' switch this.fDeposit = false; // true if the previously pressed switch was the 'DEP' switch this.nAddrSel = PanelPDP11.ADDRSEL.CONS_PHY; @@ -107,11 +111,11 @@ function PanelPDP11(parmsPanel) * * initBus() will call displaySwitches() to ensure that every switch is the position represented below. * - * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a lamp test - * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the ADDRESS register from the SWITCH - * register when it is momentarily pressed "down". + * NOTE: Not all switches have the same "process" criteria. For example, 'TEST' will perform a LED test + * when it is momentarily pressed "up", whereas 'LOAD [ADRS]' will load the 'ADDRESS' register from the + * 'SWITCH' register when it is momentarily pressed "down". * - * This means that processLampTest(value) must act when value == 1 ("up"), whereas processLoadAddr(value) + * This means that processLEDTest(value) must act when value == 1 ("up"), whereas processLoadAddr(value) * must act when value == 0 ("down"). You can infer all this from the table below, because the initial value * of any momentary switch is its "inactive" value, so the opposite is its "active" value. */ @@ -123,7 +127,7 @@ function PanelPDP11(parmsPanel) 'DEP': [0, true, false, this.processDeposit], 'EXAM': [1, true, false, this.processExamine], 'LOAD': [1, true, false, this.processLoadAddr], - 'TEST': [0, true, false, this.processLampTest] + 'TEST': [0, true, false, this.processLEDTest] }; for (var i = 0; i < 22; i++) { this.switches['S'+i] = [0, false, false, this.processSwitchReg, i]; @@ -203,10 +207,18 @@ PanelPDP11.prototype.getSwitch = function(name) /** * reset() * + * NOTE: Since we've registered our handler with the Bus component, we will be called twice whenever + * the entire machine is reset: once when the Computer's reset() handler calls the Bus's reset() handler, + * and again when the Computer's reset() handler calls us directly. Multiple resets should be harmless. + * * @this {PanelPDP11} */ PanelPDP11.prototype.reset = function() { + /* + * Simulate a call to our stop() handler, to update the panel's 'ADDRESS' register with the current PC. + */ + this.stop(); }; /** @@ -346,15 +358,9 @@ PanelPDP11.prototype.powerUp = function(data, fRepower) */ PanelPDP11.init(); /* - * TODO: Until we implement a restore() function, all we can do is reset(); however, that's - * currently unnecessary, since we've added reset() to the addResetHandler() list. - * - * this.reset(); - * - * In the meantime, simulate a call to our stop() handler, to update the panel's ADDRESS register - * with the new PC. + * TODO: Until we implement a restore() function, all we can do is reset() */ - this.stop(); + this.reset(); } return true; }; @@ -491,8 +497,14 @@ PanelPDP11.prototype.pressSwitch = function(sBinding) */ if (sw[3]) sw[3].call(this, sw[0], sw[4]); - this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); - this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); + /* + * This helps the next 'DEP' or 'EXAM' press determine if the previous press was the same, + * while also ignoring any intervening 'STEP' presses (see processStep() for why we do that). + */ + if (sBinding != PanelPDP11.SWITCH.STEP) { + this.fDeposit = (sBinding == PanelPDP11.SWITCH.DEP); + this.fExamine = (sBinding == PanelPDP11.SWITCH.EXAM); + } }; /** @@ -562,8 +574,11 @@ PanelPDP11.prototype.processStart = function(value, index) * processStep(value, index) * * If value == 1 (our initial value), then the 'STEP' switch is set to "S INST" (step one instruction); - * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). Note that we don't actually support the - * latter. + * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). + * + * However, since we can't currently support cycle-stepping, I've decided to change the meaning of this + * switch: the normal ("up") position means that successive 'EXAM' and 'DEP' operations will first add 2 + * to the 'ADDRESS' register, while the opposite ("down") position means they will first subtract 2. * * @this {PanelPDP11} * @param {number} value @@ -649,7 +664,7 @@ PanelPDP11.prototype.processContinue = function(value, index) } /* - * Simulate a call to our stop() handler, to update the panel's ADDRESS register with the new PC. + * Simulate a call to our stop() handler, to update the panel's 'ADDRESS' register with the new PC. */ this.stop(); @@ -658,8 +673,8 @@ PanelPDP11.prototype.processContinue = function(value, index) * updateStatus() handlers will be called, including ours. * * NOTE: If we used the Debugger's stepCPU() function, then that includes a call to updateStatus(); - * unfortunately, it will have happened BEFORE we called stop() to update the ADDRESS register, so we - * still need to call it again. + * unfortunately, it will have happened BEFORE we called stop() to update the 'ADDRESS' register, so + * we still need to call it again. */ if (this.cmp) this.cmp.updateStatus(); } @@ -679,9 +694,7 @@ PanelPDP11.prototype.processContinue = function(value, index) PanelPDP11.prototype.processDeposit = function(value, index) { if (value && !this.cpu.isRunning()) { - if (this.fDeposit) { - this.setAddr(this.regAddr + 2); - } + if (this.fDeposit) this.advanceAddr(); var w = this.setData(this.regSwitches); if (this.nAddrSel == PanelPDP11.ADDRSEL.CONS_PHY) { this.bus.setWordDirect(this.regAddr, w); @@ -704,10 +717,8 @@ PanelPDP11.prototype.processDeposit = function(value, index) PanelPDP11.prototype.processExamine = function(value, index) { if (!value && !this.cpu.isRunning()) { - if (this.fExamine) { - this.setAddr(this.regAddr + 2); - } var w; + if (this.fExamine) this.advanceAddr(); if (this.nAddrSel == PanelPDP11.ADDRSEL.CONS_PHY) { w = this.bus.getWordDirect(this.regAddr); } else { @@ -735,15 +746,21 @@ PanelPDP11.prototype.processLoadAddr = function(value, index) }; /** - * processLampTest(value, index) + * processLEDTest(value, index) * * @this {PanelPDP11} * @param {number} value * @param {number} [index] */ -PanelPDP11.prototype.processLampTest = function(value, index) +PanelPDP11.prototype.processLEDTest = function(value, index) { - this.displayLEDs(value || null); + if (value) { + this.fLEDTest = true; + this.displayLEDs(true); + } else { + this.fLEDTest = false; + this.displayLEDs(); + } }; /** @@ -776,6 +793,20 @@ PanelPDP11.prototype.setAddr = function(value) return this.regAddr; }; +/** + * advanceAddr() + * + * @this {PanelPDP11} + * @return {number} + */ +PanelPDP11.prototype.advanceAddr = function() +{ + var inc = this.getSwitch(PanelPDP11.SWITCH.STEP)? 2 : -2; + this.regAddr = (this.regAddr + inc) & this.bus.nBusMask; + this.setLEDArray("A", this.regAddr, 22); + return this.regAddr; +}; + /** * setData(value) * @@ -801,7 +832,7 @@ PanelPDP11.prototype.setData = function(value) PanelPDP11.prototype.setLED = function(sBinding, value) { this.leds[sBinding] = value; - if (!this.fLampTest) this.displayLED(sBinding, value); + if (!this.fLEDTest) this.displayLED(sBinding, value); return value; }; diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index 5820907bc..4826a09fe 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -40,279 +40,279 @@ function xa(a,b){return(a+" ").slice(0,b) function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ia:null,Ja:null,Ia:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ja=g.load;d.Ia=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ka=g.load;d.Ja=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.kb=this.id:(this.Pa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Za:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,jb=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(jb," "))]=decodeURIComponent(cb[2].replace(jb," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;k=yb.prototype;k.reset=function(){}; -k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.f[b];Ab(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.H="DEP"==b;a.J="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.f[b];c[1]&&c[2]&&(Ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Bb(b,this,Cb);Db(b,this.reset.bind(this));Eb(this);Fb(this)};k.Fa=function(a,b){b||(Gb(),this.stop());return!0};k.Ea=function(){return!0}; -function Ub(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Eb(a,b){for(var c in a.C)Ub(a,c,null!=b?b:a.C[c])}function Ab(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Fb(a){for(var b in a.f)Ab(a,b,a.f[b][0])}function Vb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Wb(this.b),this.f.ENABLE&&this.f.ENABLE[0]&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(this.f.ENABLE&&this.f.ENABLE[0])this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[ic,jc,kc,lc];a=new I(this);mc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function jc(a,b,c){var d=!1,e=this.controller,f=e.Ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function kc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function lc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function oc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return tc(1,f,g)}f=new I(a,f,n,a.xa,d,e);mc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Oa)>>>this.la].fc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=vc(this.b,a));return this.W[(a&this.Oa)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Oa)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Oa)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; -k.gb=function(a,b){3932160<=a&&(a=vc(this.b,a));this.W[(a&this.Oa)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Oa)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function wc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.La=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Mc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Mc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; +function yb(a){u.call(this,"Panel",a,yb);this.f=this.v=this.Ua=this.D=0;this.J=this.K=this.H=!1;this.L=zb;this.C={};this.g={START:[1,!0,!1,this.ad],STEP:[1,!1,!1,this.bd],ENABLE:[1,!1,!1,this.Xc],CONT:[1,!0,!1,this.Vc],DEP:[0,!0,!1,this.Wc],EXAM:[1,!0,!1,this.Yc],LOAD:[1,!0,!1,this.$c],TEST:[0,!0,!1,this.Zc]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; +function Vb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Vb(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Wb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Xb(this.b),Ab(this,"ENABLE")&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[jc,kc,lc,mc];a=new I(this);nc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function kc(a,b,c){var d=!1,e=this.controller,f=e.Ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function lc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} +function mc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} +function pc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return uc(1,f,g)}f=new I(a,f,n,a.xa,d,e);nc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Ea)>>>this.la].fc(a&this.w,a);this.f--;return a}; +k.oa=function(a){3932160<=a&&(a=wc(this.b,a));return this.W[(a&this.Ea)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Ea)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Ea)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; +k.gb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Ea)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function xc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Nc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Nc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Va[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ga[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ga[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[1]}; -k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ga[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ga[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; -k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return ec(this.b)};k.me=function(a){Nc(this.b,a&-1809|ec(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[1]}; +k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; +k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return fc(this.b)};k.me=function(a){Oc(this.b,a&-1809|fc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],M[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],M[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],M[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],M[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],M[65477]=[null,null,K.prototype.Ab,K.prototype.Db, "R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Bb, K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Vc(this,Rc?Wc:Xc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;bd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;bd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Ca(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ha:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function mc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&ad(a,$c,!1),(a.A=c.A)&&Zc(a,$c,!1))}function cd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function Zc(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function ad(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Vc(a,b){b||(b=dd);ad(a,b,void 0);Zc(a,b,void 0)} -var dd=[],Yc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.La],$c=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Xc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Wc=[I.prototype.R,I.prototype.ta,I.prototype.$,I.prototype.Ha]; -function ed(a,b){u.call(this,"CPU",a,ed,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(ed);var fd=["power","reset"];k=ed.prototype; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=kd(a)&&(a.xb=a.yb=-1,id(a),a.ha(),c=!0);c&&a.j(kd(a)+" cycles: checksum="+p(a.Gb))}} +1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Ca(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ia:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function nc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function $c(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +var ed=[],Zc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ma],ad=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Xc=[I.prototype.R,I.prototype.ta,I.prototype.aa,I.prototype.Ia]; +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=ld(a)&&(a.xb=a.yb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Gb))}} k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Yb(a,a.S);a.S=0;a.R=Ba();a.$=0;md(a);return d}function zc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Kc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+nd(a))} -function od(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Xb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function nd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&md(this,!0);this.za=0;this.Xa=Ba();if(this.$){var a=this.Xa-this.$;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=od(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=nd(this,!0);this.za+=b;this.S+=b;Zb(this,b);Xb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.ca(),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),kd(this));vb(this,e.stack|| -e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.$=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.$-this.Xa),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,ld(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.$+=c;a(b,c)}}}; -k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;ld(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,kd(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){nd(this);Yb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),kd(this));b=!0}this.B.complete=a;return b}; -function pd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;ed.call(this,a,6666667);this.decode=1120==this.wb?qd.bind(this):rd.bind(this);sd(this);this.L=0;this.N=null;this.B.complete=!1}z(pd,ed);k=pd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();sd(this);hd(this);this.B.error=!1;this.parent.reset.call(this)}; -function sd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ga=[0,0,0,0];a.v=0;a.La=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Wb(a)}function Wb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ha=0;a.Qb=262143;a.N=null;a.w&&Mc(a)}function Mc(a){a.Ta?(a.P=65536,a.ba=a.Pc,a.ra=a.Sd,a.Mb=a.Je,oc(a.w,a.ob&16?22:18)):(a.P=0,a.ba=a.Oc,a.ra=a.yc,a.Mb=a.Fc,oc(a.w,16))}function td(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.ca())}k.rc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,wc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];ld(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ga[c]=a.u[6],a.u[6]=a.Ga[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function zd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ad(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Bd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Cd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=ec(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Nc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Dd(this,this.va);Dd(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; -function Vd(a){var b=Wd(a),c=Wd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Nc(a,c);a.I&=-17}function vc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Xd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ha=a.v,a.La=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ha<<5|a.La<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(yd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Yd(this,Xd(this,a,3));this.L--;return a}; -k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Xd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,Zd(this,Xd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Xd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return $d(this,a,b,c)};k.Pc=function(a,b,c){return Xd(this,$d(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Xd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; -k.Je=function(a,b){this.w.gb(Xd(this,a,4),b)};function ae(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=$d(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ga[a.M>>12&3];return c}function be(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=$d(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Xd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ga[a.M>>12&3]=d} -function ce(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ee(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return $d(a,b,c,8)}function fe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Yd(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ba(b,e,7),Zd(a,e,d.call(a,c,Yd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function he(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?Zd(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function ie(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.ib=function(a){this.B.complete=!0;var b=this.i&&je(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&ke(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(yd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(xd(this))}while(0>1|b<<16;Bd(this,a);return a&65535}function qe(a,b){a=b&2048|b>>1|b<<8;Bd(this,a<<8);return a&255}function re(a,b){a=b&~a;R(this,a);return a}function se(a,b){a=b&~a;R(this,a<<8);return a}function te(a,b){a|=b;R(this,a);return a}function ue(a,b){a|=b;R(this,a<<8);return a} -function ve(a,b){a=~b|65536;zd(this,a);return a&65535}function we(a,b){a=~b|256;zd(this,a<<8);return a&255}function xe(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function ye(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function ze(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ae(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Be(a,b){a=-b;zd(this,a,a&b&32768);return a&65535}function Ce(a,b){a=-b;zd(this,a<<8,(a&b&128)<<8);return a&255}function De(a,b){a=b<<1|this.T>>16&1;Bd(this,a);return a&65535}function Ee(a,b){a=b<<1|this.T>>16&1;Bd(this,a<<8);return a&255}function Fe(a,b){a=(this.T&65536|b)>>1|b<<16;Bd(this,a);return a&65535}function Ge(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Bd(this,a<<8);return a&255}function He(a,b){var c=b-a;Cd(this,c,a,b);return c&65535} -function Ie(a,b){var c=b-a;Cd(this,c<<8,a<<8,b<<8);return c&255}function Je(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ke(a,b){a^=b;R(this,a);return a&65535}function Le(a){T(this,a,de(this,a),le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Me(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Ne(a){var b=ge(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Oe(a){U(this,a,!ud(this))}function Pe(a){U(this,a,ud(this))} -function Qe(a){T(this,a,de(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Re(a){S(this,a,ce(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){T(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ce(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ue(a){R(this,de(this,a)&ge(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ve(a){R(this,(ce(this,a)&fe(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){U(this,a,wd(this))}function Xe(a){U(this,a,!this.Sa()==!vd(this))}function Ye(a){U(this,a,!wd(this)&&!this.Sa()==!vd(this))}function Ze(a){U(this,a,!ud(this)&&!wd(this))}function $e(a){U(this,a,wd(this)||!this.Sa()!=!vd(this))} -function af(a){U(this,a,ud(this)||wd(this))}function bf(a){U(this,a,!this.Sa()!=!vd(this))}function cf(a){U(this,a,this.Sa())}function df(a){U(this,a,!wd(this))}function ef(a){U(this,a,!this.Sa())}function ff(){this.pa(12,1);this.b-=5}function gf(a){U(this,a,!0)}function hf(a){U(this,a,!vd(this))}function jf(a){U(this,a,vd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function kf(a){var b=de(this,a);a=ge(this,a);Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function lf(a){var b=ce(this,a)<<8;a=fe(this,a)<<8;Cd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function mf(a){var b=ge(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function nf(){this.pa(24,2);this.b-=25} -function of(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?pf(this.i):this.ha();this.b-=7}function qf(){this.pa(16,4);this.b-=25}var rf=[0,7,7,10,7,11,9,13];function sf(a){this.J=this.b;O(this,ee(this,a));this.b=this.J-rf[this.g]}var tf=[0,14,14,17,14,18,16,20];function uf(a){this.J=this.b;var b=ee(this,a);a=a>>6&7;Dd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-tf[this.g]}var vf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function wf(a){var b=de(this,a);this.J=this.b;R(this,ie(this,a,b));this.b=this.J-vf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function xf(a){var b=ce(this,a);R(this,he(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var yf=[7,13,13,17,14,18,17,21]; -function zf(a){var b=ge(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Ff(a){T(this,a,de(this,a),He);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Gf(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)}function Hf(){this.pa(28,5);this.b-=5}function If(){this.I&4||this.A&&this.A.ca();this.I|=4;yd(this,-2);this.b-=3}function Jf(a){T(this,a,de(this,a),Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=pf(b);b||this.pa(8,6)}function qd(a){Kf[a>>12].call(this,a)}function Lf(a){Mf[a>>6&3].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)} -function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a&15].call(this,a)}function Tf(a){Uf[a&15].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)} -var Kf=[function(a){ag[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,W,function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],ag=[function(a){cg[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,W,W,W],Mf=[function(a){zd(this,ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,xe);this.b-=this.g?9:3+(7==this.f?2:0)}],Of=[function(a){T(this,a,0, -Be);this.b-=this.g?11:6},function(a){T(this,a,ud(this)?1:0,le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,ud(this)?1:0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);zd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Qf=[function(a){T(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ne);this.b-=this.g?9:3+(7==this.f?2:0)}], -cg=[function(a){dg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,W,Rf,Tf,Gf,Gf,Gf,Gf],dg=[of,If,Cf,ff,qf,Bf,W,W,W,W,W,W,W,W,W,W],Sf=[Af,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Uf=[Af,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],bg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,W,W,W],Wf=[function(a){zd(this, -he(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Yf=[function(a){S(this,a,0,Ce);this.b-=this.g?11:6},function(a){S(this,a,ud(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,ud(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=fe(this,a);zd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],$f=[function(a){S(this,a,0,Ge);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}];function rd(a){eg[a>>12].call(this,a)} -var eg=[function(a){fg[a>>8&15].call(this,a)},wf,kf,Ue,Qe,Se,Le,function(a){gg[a>>8&15].call(this,a)},function(a){hg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Ff,W],fg=[function(a){ig[a>>4&15].call(this,a)},gf,df,We,Xe,bf,Ye,$e,uf,uf,Lf,Nf,Pf,function(a){jg[a>>6&3].call(this,a)},W,W],jg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ae(this,a,0);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J= -this.b;be(this,a,0,b);R(this,b);this.b=this.J-yf[this.g]},function(a){R(this,ie(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],ig=[function(a){kg[a&15].call(this,a)},W,W,W,sf,sf,sf,sf,Df,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Rf,Tf,Gf,Gf,Gf,Gf],kg=[of,If,Cf,ff,qf,Bf,function(){Vd(this);this.b-=13},W,W,W,W,W,W,W,W,W],gg=[zf,zf,mf,mf,Me,Me,Ne,Ne,Jf,Jf,W,W,W,W,Ef,Ef],hg=[ef,cf,Ze,af,hf,jf,Oe,Pe,nf,Hf,Vf,Xf,Zf,function(a){lg[a>> -6&3].call(this,a)},W,W],lg=[W,function(a){a=ae(this,a,65536);Dd(this,a);R(this,a);this.b-=11},function(a){var b=Wd(this);this.J=this.b;be(this,a,65536,b);R(this,b);this.b=this.J-yf[this.g]},W]; -function mg(a){u.call(this,"ROM",a,mg);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);ng(c)})}}z(mg);mg.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;ng(this)}; -mg.prototype.Fa=function(){this.ia&&(this.i&&og(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};mg.prototype.Ea=function(){return!0}; -function ng(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(rc(a.w,b,a.g,Uc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():td(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Jc(e.b,e.ka))});this.ma=Lc(52,4);this.$=zc(this.b,function(){e.g|=128;e.g&64&&Jc(e.b,e.ma)});Bb(b,this,Ng);H(this)}; -k.vc=function(){if(!this.J){var a=gd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Fa=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ea=function(a){return a?this.save():!0};k.reset=function(){Og(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Og(this)};function Og(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;ba.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Zb(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+od(a))} +function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Yb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&nd(this,!0);this.za=0;this.Xa=Ba();if(this.aa){var a=this.Xa-this.aa;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=pd(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.za+=b;this.S+=b;$b(this,b);Yb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.$(void 0),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.aa=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.aa-this.Xa),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.aa+=c;a(b,c)}}}; +k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,ld(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);Zb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; +function qd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.wb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; +function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Ma=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Xb(a)}function Xb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ia=0;a.Qb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ta?(a.P=65536,a.ca=a.Pc,a.ra=a.Sd,a.Mb=a.Je,pc(a.w,a.ob&16?22:18)):(a.P=0,a.ca=a.Oc,a.ra=a.yc,a.Mb=a.Fc,pc(a.w,16))}function ud(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.rc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,xc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=fc(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Oc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.va);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; +function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function wc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Yd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Ma<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| +g;a.b-=8;break;case 6:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; +k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Yd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Yd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return ae(this,a,b,c)};k.Pc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Yd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; +k.Je=function(a,b){this.w.gb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ha[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ha[a.M>>12&3]=d} +function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.ib=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} +function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} +function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} +function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Le(a,b){a^=b;R(this,a);return a&65535}function Me(a){T(this,a,ee(this,a),me);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} +function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} +function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Sa()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Sa()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Sa()!=!wd(this))} +function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Sa()!=!wd(this))}function df(a){U(this,a,this.Sa())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Sa())}function gf(){this.pa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.pa(24,2);this.b-=25} +function pf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.pa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; +function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.pa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.pa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} +var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, +Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], +dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, +ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} +var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= +this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> +6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; +function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; +ng.prototype.Ga=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Fa=function(){return!0}; +function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(sc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.ma=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Og);H(this)}; +k.vc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Fa=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Kc(this.b,this.$,1E3/Math.round(this.R/10))}};var Pg={},Ng=(Pg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Pg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Pg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Pg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Pg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Sg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Sg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Tg(a);var e=this;if((this.g=gd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Lc(56,4);this.da=zc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&bh(a,b,c,d,e.ea,e.Ja, -e.Ia));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));Zg(a)})}function Wg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;d'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.Ka, +e.Ja));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){ih(a,b,c,d)})} -function ih(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.Ka=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Na+a.Aa&&(a.Aa+=f-(a.Na+a.Aa)+1):(a.Na=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=kh(this,a++);)mh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function mh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&nh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&oh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=kh(a,c++);)for(var l=0,m=h.length;ld&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.La=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Oa+a.Aa&&(a.Aa+=f-(a.Oa+a.Aa)+1):(a.Oa=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";nh(this,0)}}return!0};k.Ea=function(a){return a?this.save():!0};k.reset=function(){ph(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return ph(this,a[0])};function sh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}uh(a,e,b,c,!1,d)}else th(a,e)} -function uh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,th(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,hh(new dh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));nh(this,a.ec)}; -function rh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} +function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} +k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));oh(this,a.ec)}; +function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(yc(this.w)){h=8192;break}f+=2;if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(yc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ka&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; +k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Jc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; -var vh={},qh=(vh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],vh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],vh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],vh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],vh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],vh);function wh(a){u.call(this,"Debugger",a,wh);this.da=a.base||16;this.Ha=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(wh); -var xh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};wh.prototype.sc=function(){return-1};wh.prototype.tc=function(){}; -function yh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function zh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; +var wh={},rh=(wh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],wh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],wh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],wh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],wh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ia=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); +var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.sc=function(){return-1};xh.prototype.tc=function(){}; +function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Ah(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Ah(a,b,c){var d;if(b){b=Bh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Eh(a,b){if(b)return Dh(a,b,a.Y[b]);var c=0;for(b in a.Y)Dh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0this.b.wb?Nh:[];Oh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Ph(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=uc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ga[a-16]:20==a?b=ec(this.b):21==a&&this.f&&dc(this.f)&&(b=this.f.Ua));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,nd(a),a.ta=0,a.A&&a.A.ca()))};function Hh(a){var b;if(!je(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Wh(this):Xh(this)}};function Vh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Fa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ea=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Hh(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Yh(this);a||this.ca()};k.save=function(){var a=new P(this);a.set(0,Rh(this.L));a.set(1,Rh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Sh(a[b++]),this.P=Sh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Ma=!1,++a.$==a.H.length&&(a.$=0)));return!1}function pf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} -function Gh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||Zh(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Ma=!0:($h(this,a,a.length-1,"set"),Hh(this)));return d}; -function Zh(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.la],b==a.D));h.Ma||Hh(a);break}}return f}function ai(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Uh(y);break;case 8:x="@"+Uh(y);break;case 16:7>y?x="("+Uh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Uh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Uh(y)+")";break;case 40:x="@-("+Uh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Uh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Uh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Uh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ga[b-16]):20==b?c="PS="+J(a,ec(d)):21==b&&a.f&&dc(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function fi(a){var b,c="";for(b=0;6>b;b++)c+=ei(a,b);c=c+"\n"+(ei(a,6)+ei(a,7));c+=ei(a,20)+ei(a,21);return c+=di(a,"T")+di(a,"N")+di(a,"Z")+di(a,"V")+di(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function gi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.f["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.ca();a.j("updated registers:")}a.j(fi(a));c&&(a.L=Z(d.u[7]),Xh(a,J(a,a.L.F)))}}function ki(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ci(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function bi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Gd=[];"call"==wg&&(Hb=1E5,Gd=["CALL"]);for(void 0!==vg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;yg++;Hb--}}yg||(a.j("no "+xg+"history available"),a.tb=void 0)}else{var Jb=Ph(a,ma);if(Jb){var Ac=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Ei),Ac=Ch(a,Ka)>>>0,65536>4||1;Gi--&&0Ec?String.fromCharCode(Ec):".";Bc-=Dc}Kb&&(Kb+="\n");Kb+=ma+" "+Hd+(0==Mb?" "+Bg:"")}Kb&&a.j(Kb);a.lb=Jb}}}}break;case "e":if("else"==g[0])break;var ib,Id,Jd,Kd,Ld=g[0],Md=g[1];"eb"==Ld?(ib=1,Id=255,Jd=a.Fb,Kd=a.Wb):"e"==Ld||"ew"==Ld?(ib=2,Id=65535,Jd=a.oa,Kd=a.gb):Md=null;if(null==Md)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Ph(a,Md);if(Fc)for(var Gc= -2;GcPd;){for(var La=null,Ki=256;65536>Pb.F>>>0;){Qd.F=a.oa(Pb,2);if(null==Pb.F||!Ki--)break;if(!(Qd.F&1)){for(var Li=a,Hc=Qd,Dg=null,Qb=Hc.F,Eg=Qb,Rd=1;6>=Rd&&Qb;Rd++){if(2< -Rd){Hc.F=Qb;var Ic=ci(Li,Hc);if(0<=Ic.indexOf("JSR")){var Fg=Ic.indexOf(" ");if(Qb+(Ic.indexOf(" ",Fg+1)-Fg-1)/2==Eg){Dg=Ic;break}}}Qb-=2}Hc.F=Eg;if(La=Dg)break}}if(!La||null==La)break;var Gg=null;if("ks"==Ji){var Hg=La.match(/[0-9A-F]+$/);Hg&&(Gg=ji(a,Hg[0]))}La=xa(La,50)+" ;"+(Gg||"stack="+J(a,Pb.F));a.j(La);Pd++}Pd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ji(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== -G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Sd=0;Sd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bpi){if(ri(d,this.J)){this.C=new P(this,"1.30.2","failsafe");ri(this.C)&&(wi(this,d),a=2,xi(this.C));this.C.set("timestamp",Da());yi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=vi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ri(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),xi(d),ri(d)?(c=vi(d),e=!0):c=!1))}e&&ui(this,c?d:null)}else 2==a&&d.clear()}else ui(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(zi(this,this.b,b,c,a),this.b.sb());this.P&&(wi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function wi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function mi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ea&&(c&&a.b.ha(),d=a.b.Ea(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ri(a,b,c)}})}else c(a,null)} -function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Di||Za(!0));l=!1}var g,h,l=!0;Di++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Di||Za(!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),--Di||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Nh=[0],Oh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Gh.prototype; +k.Da=function(a,b,c,d){this.w=b;this.b=c;this.A=a;this.f=a.f;(a=hd(a,"messages"))&&Jh(this,a);this.ub=Mh;this.Nb=1145>this.b.wb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=vc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=fc(this.b):21==a&&this.f&&ec(this.f)&&(b=this.f.Ua));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ta=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Na=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} +function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Na=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; +function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Na||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,fc(d)):21==b&&a.f&&ec(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Ib=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;zg++;Ib--}}zg||(a.j("no "+yg+"history available"),a.tb=void 0)}else{var Kb=Qh(a,ma);if(Kb){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Fi),zc=Dh(a,Ka)>>>0,65536>4||1;Hi--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Lb&&(Lb+="\n");Lb+=ma+" "+Id+(0==Nb?" "+Cg:"")}Lb&&a.j(Lb);a.lb=Kb}}}}break;case "e":if("else"==g[0])break;var jb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(jb=1,Jd=255,Kd=a.Fb,Ld=a.Wb):"e"==Md||"ew"==Md?(jb=2,Jd=65535,Kd=a.oa,Ld=a.gb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var La=null,Li=256;65536>Qb.F>>>0;){Rd.F=a.oa(Qb,2);if(null==Qb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Eg=null,Rb=Gc.F,Fg=Rb,Sd=1;6>=Sd&&Rb;Sd++){if(2< +Sd){Gc.F=Rb;var Hc=di(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Rb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Rb-=2}Gc.F=Fg;if(La=Eg)break}}if(!La||null==La)break;var Hg=null;if("ks"==Ki){var Ig=La.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}La=xa(La,50)+" ;"+(Hg||"stack="+J(a,Qb.F));a.j(La);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== +G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Da());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.sb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Si(a,b,c)}})}else c(a,null)} +function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!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),--Ei||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 5c18f4908..4e17efc5a 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -40,203 +40,203 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={K:null,X:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.C=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;h=Za.prototype;h.reset=function(){}; -h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.b[b];ab(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);a.v="DEP"==b;a.w="EXAM"==b}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.b[b];c[1]&&c[2]&&(ab(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;bb(b,this,cb);db(b,this.reset.bind(this));eb(this);for(var e in this.b)ab(this,e,this.b[e][0])};h.ja=function(a,b){b||(fb(),this.stop());return!0};h.ia=function(){return!0}; -function gb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function eb(a,b){for(var c in a.m)gb(a,c,null!=b?b:a.m[c])}function ab(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.C&&a.C.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),ib(this.a),this.b.ENABLE&&this.b.ENABLE[0]&&jb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(this.b.ENABLE&&this.b.ENABLE[0])jb(this.a);else{a=this.C;var b;if(b=a)a.l.Fa&&(a.l.pb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.j=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[ub,vb,wb,xb];a=new I(this);yb(a,this.C);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function vb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function wb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function xb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Ab(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Fb(1,f,g)}f=new I(a,f,p,a.b,d,e);yb(f,a.C,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Jb(a,b){3932160<=b&&(b=Ib(a.a,b));return a.h[(b&a.ua)>>>a.c].W(b&a.j,b)} -h.kb=function(a){var b=a&this.j,c=(a&this.ua)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ua)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Kb(a,b,c){3932160<=b&&(b=Ib(a.a,b));a.h[(b&a.ua)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){var c=a&this.j,d=(a&this.ua)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Lb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Tb(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Tb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.f=this.i=this.s=0;this.w=this.A=this.v=!1;this.C=$a;this.m={};this.c={START:[1,!0,!1,this.qc],STEP:[1,!1,!1,this.rc],ENABLE:[1,!1,!1,this.mc],CONT:[1,!0,!1,this.kc],DEP:[0,!0,!1,this.lc],EXAM:[1,!0,!1,this.nc],LOAD:[1,!0,!1,this.pc],TEST:[0,!0,!1,this.oc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);for(var e in this.c)bb(this,e,this.c[e][0])};h.la=function(a,b){b||(gb(),this.reset());return!0}; +h.ka=function(){return!0};function hb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)hb(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.j.U||(this.h.reset(),jb(this.a),ab(this,"ENABLE")&&kb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))kb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.l=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} +h.kb=function(a){var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; +h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return rb(this.a)};h.Cd=function(a){Ub(this.a,a&-1809|rb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +h.Kc=function(){return sb(this.a)};h.Cd=function(a){Vb(this.a,a&-1809|sb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, "R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= [null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),bc(this,Yb?cc:dc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},D:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function yb(a,b,c){a.C=b;a.i=a.m=0;c&&((a.i=c.i)&&fc(a,hc,!1),(a.m=c.m)&&ic(a,hc,!1))}function ic(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function fc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function bc(a,b){b||(b=jc);fc(a,b,void 0);ic(a,b,void 0)} -var jc=[],ec=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],hc=[I.prototype.G,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var dc=[I.prototype.D,I.prototype.da,I.prototype.P,I.prototype.ra],cc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function kc(a,b){x.call(this,"CPU",a,kc);var c=a.multiplier||1;this.gb=a.cycles||b;this.qa=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(kc);var lc=["power","reset"];h=kc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.C=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=pc(a)&&(a.Qa=a.Ra=-1,oc(a),G(a),c=!0);c&&a.T(pc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&sc(a.j)}lb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;rc(a)}function Ob(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Qb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.qa/1E3*c|0,a.I[b][0]=c+tc(a))} -function kb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function tc(a,b){var c=a.pa-=a.a;a.a=a.G=0;b&&(a.pa=0);return c} -h.kd=function(){if(this.l.U){this.vb>=this.gb&&rc(this,!0);this.Ta=0;this.bb=ra();if(this.oa){var a=this.bb-this.oa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.l.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=tc(this,!0);this.Ta+=b;this.aa+=b;mb(this,b);kb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.j&&this.j.ka(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),pc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.bb;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,qc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; -function jb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{qc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,pc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){tc(a);lb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),pc(a));b=!0}a.l.complete=void 0;return b} -function uc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;kc.call(this,a,6666667);this.decode=1120==this.Za?vc.bind(this):wc.bind(this);xc(this);this.ra=0;this.N=null;this.l.complete=!1}z(uc,kc);h=uc.prototype;h.reset=function(){this.status("model "+this.Za);this.l.U&&G(this);xc(this);nc(this);this.l.error=!1;this.parent.reset.call(this)}; -function xc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.D=0;a.c=a.b=a.tb=0;a.Ia=-1;ib(a)}function ib(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Tb(a)}function Tb(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Ab(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Ab(a.h,16))}function yc(a,b,c){a.Jb=b;P(a,b);!c&&a.C&&(G(a)||a.C.ka())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Lb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];qc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Bc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Cc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Dc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=rb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Ub(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Fc(a,a.Ia);Fc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Gc(a){var b=Hc(a),c=Hc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Ub(a,c);a.u&=-17} -function Ib(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Ic(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Hc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Fc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ac(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Ic(this,a,2));this.ra--;return a}; -h.Xa=function(a,b){this.Ba?(this.ra++,Jc(this,Ic(this,a,5),b),this.ra--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Ic(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Kc(this,a,b,c)};h.hc=function(a,b,c){return Ic(this,Kc(this,a,b,c),c)};h.Tb=function(a){return Jb(this.h,a)};h.gd=function(a){return Jb(this.h,Ic(this,a,2))};h.$b=function(a,b){Kb(this.h,a,b&65535)};h.Zd=function(a,b){Kb(this.h,Ic(this,a,4),b)}; -function Lc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Kc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Mc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Kc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Ic(a,e|c&65536,4),a.v=a.B>>14&3,Kb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Nc(a,b){b>>=6;var c=a.D=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Oc(a,b){b>>=6;var c=a.D=b&7;return(b=a.A=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]}function Pc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Kc(a,b,c,8)}function Qc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Hb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Jb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Jc(a,e,d.call(a,c,Hb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Kb(a.h,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Sc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Jc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Tc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Ac(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(zc(this))}while(0>1|b<<16;Dc(this,a);return a&65535}function Zc(a,b){a=b&2048|b>>1|b<<8;Dc(this,a<<8);return a&255}function $c(a,b){a=b&~a;S(this,a);return a}function ad(a,b){a=b&~a;S(this,a<<8);return a}function bd(a,b){a|=b;S(this,a);return a}function cd(a,b){a|=b;S(this,a<<8);return a}function dd(a,b){a=~b|65536;Bc(this,a);return a&65535}function ed(a,b){a=~b|256;Bc(this,a<<8);return a&255} -function fd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function gd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function hd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function id(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function jd(a,b){a=-b;Bc(this,a,a&b&32768);return a&65535}function kd(a,b){a=-b;Bc(this,a<<8,(a&b&128)<<8);return a&255} -function ld(a,b){a=b<<1|this.m>>16&1;Dc(this,a);return a&65535}function md(a,b){a=b<<1|this.m>>16&1;Dc(this,a<<8);return a&255}function nd(a,b){a=(this.m&65536|b)>>1|b<<16;Dc(this,a);return a&65535}function od(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Dc(this,a<<8);return a&255}function pd(a,b){var c=b-a;Ec(this,c,a,b);return c&65535}function qd(a,b){var c=b-a;Ec(this,c<<8,a<<8,b<<8);return c&255}function rd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function sd(a,b){a^=b;S(this,a);return a&65535}function td(a){U(this,a,Oc(this,a),Uc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function ud(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function vd(a){var b=Rc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function wd(a){V(this,a,!R(this))}function xd(a){V(this,a,R(this))} -function yd(a){U(this,a,Oc(this,a),$c);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){T(this,a,Nc(this,a),ad);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){U(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Nc(this,a),cd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Cd(a){S(this,Oc(this,a)&Rc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Dd(a){S(this,(Nc(this,a)&Qc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){V(this,a,this.i&65535?0:4)}function Fd(a){V(this,a,!this.za()==!(this.f&32768))}function Gd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Id(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Jd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Kd(a){V(this,a,!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,this.za())}function Md(a){V(this,a,!!(this.i&65535))}function Nd(a){V(this,a,!this.za())}function Od(){K(this,12,1);this.a-=5}function Pd(a){V(this,a,!0)}function Qd(a){V(this,a,!(this.f&32768))}function Rd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Sd(a){var b=Oc(this,a);a=Rc(this,a);Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Td(a){var b=Nc(this,a)<<8;a=Qc(this,a)<<8;Ec(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Ud(a){var b=Rc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Vd(){K(this,24,2);this.a-=25} -function Wd(){this.B&49152?(this.M|=128,K(this,4,3)):this.C?this.C.b():G(this);this.a-=7}function Xd(){K(this,16,4);this.a-=25}var Yd=[0,7,7,10,7,11,9,13];function Zd(a){this.G=this.a;P(this,Pc(this,a));this.a=this.G-Yd[this.c]}var $d=[0,14,14,17,14,18,16,20];function ae(a){this.G=this.a;var b=Pc(this,a);a=a>>6&7;Fc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-$d[this.c]}var be=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ce(a){var b=Oc(this,a);this.G=this.a;S(this,Tc(this,a,b));this.a=this.G-be[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function de(a){var b=Nc(this,a);S(this,Sc(this,a,b,1)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ee=[7,13,13,17,14,18,17,21]; -function fe(a){var b=Rc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function le(a){U(this,a,Oc(this,a),pd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function me(a){U(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)}function ne(){K(this,28,5);this.a-=5}function oe(){this.u&4||this.j&&this.j.ka();this.u|=4;Ac(this,-2);this.a-=3}function pe(a){U(this,a,Oc(this,a),sd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function vc(a){qe[a>>12].call(this,a)}function re(a){se[a>>6&3].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a&15].call(this,a)} -function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a>>6&3].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)} -var qe=[function(a){He[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,Y,function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],He=[function(a){Je[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,Y,Y,Y],se=[function(a){Bc(this,Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,dd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,fd);this.a-=this.c?9:3+(7==this.b?2:0)}],ue=[function(a){U(this,a,0, -jd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Uc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Bc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Je=[function(a){Ke[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,Y,xe,ze,me,me,me,me],Ke=[Wd,oe,ie,Od,Xd,he,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ye=[ge,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ae=[ge,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ie=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,Y,Y,Y],Ce=[function(a){Bc(this, -Sc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ee=[function(a){T(this,a,0,kd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Qc(this,a);Bc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Ge=[function(a){T(this,a,0,od);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}];function wc(a){Le[a>>12].call(this,a)} -var Le=[function(a){Me[a>>8&15].call(this,a)},ce,Sd,Cd,yd,Ad,td,function(a){Ne[a>>8&15].call(this,a)},function(a){Oe[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,le,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Pd,Md,Ed,Fd,Kd,Gd,Id,ae,ae,re,te,ve,function(a){Qe[a>>6&3].call(this,a)},Y,Y],Qe=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Lc(this,a,0);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G= -this.a;Mc(this,a,0,b);S(this,b);this.a=this.G-ee[this.c]},function(a){S(this,Tc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Pe=[function(a){Re[a&15].call(this,a)},Y,Y,Y,Zd,Zd,Zd,Zd,je,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},xe,ze,me,me,me,me],Re=[Wd,oe,ie,Od,Xd,he,function(){Gc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Ne=[fe,fe,Ud,Ud,ud,ud,vd,vd,pe,pe,Y,Y,Y,Y,ke,ke],Oe=[Nd,Ld,Hd,Jd,Qd,Rd,wd,xd,Vd,ne,Be,De,Fe,function(a){Se[a>>6& -3].call(this,a)},Y,Y],Se=[Y,function(a){a=Lc(this,a,65536);Fc(this,a);S(this,a);this.a-=11},function(a){var b=Hc(this);this.G=this.a;Mc(this,a,65536,b);S(this,b);this.a=this.G-ee[this.c]},Y]; -function Te(a){x.call(this,"ROM",a,Te);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Ue(c)})}}z(Te);Te.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.C=d;Ue(this)}; -Te.prototype.ja=function(){this.X&&(this.C&&this.C.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Te.prototype.ia=function(){return!0}; -function Ue(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Db(a.h,b,a.c,ac)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):yc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Pb(e.a,e.aa))});this.da=Rb(52,4);this.P=Ob(this.a,function(){e.c|=128;e.c&64&&Pb(e.a,e.da)});bb(b,this,$e);F(this)}; -h.Kb=function(){if(!this.v){var a=mc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ja=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ia=function(a){return a?this.save():!0};h.reset=function(){af(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return af(this)};function af(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),cc(this,Zb?dc:ec);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},oa:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ea:function(a,b){this.o[a]=b;this.ua=!0},qa:function(a,b){this.o[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ua=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&gc(a,ic,!1),(a.m=c.m)&&jc(a,ic,!1))}function jc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function gc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function cc(a,b){b||(b=kc);gc(a,b,void 0);jc(a,b,void 0)} +var kc=[],fc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],ic=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var ec=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],dc=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; +function lc(a,b){x.call(this,"CPU",a,lc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(lc);var mc=["power","reset"];h=lc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=qc(a)&&(a.Qa=a.Ra=-1,pc(a),G(a),c=!0);c&&a.T(qc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&tc(a.l)}mb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;sc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+uc(a))} +function lb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function uc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.kd=function(){if(this.j.U){this.vb>=this.gb&&sc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=uc(this,!0);this.Ta+=b;this.aa+=b;nb(this,b);lb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); +this.l&&this.l.stop(ra(),qc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,rc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; +function kb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{rc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,qc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){uc(a);mb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),qc(a));b=!0}a.j.complete=void 0;return b} +function vc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;lc.call(this,a,6666667);this.decode=1120==this.Za?wc.bind(this):xc.bind(this);yc(this);this.sa=0;this.N=null;this.j.complete=!1}z(vc,lc);h=vc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);yc(this);oc(this);this.j.error=!1;this.parent.reset.call(this)}; +function yc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;jb(a)}function jb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function zc(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];rc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Cc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ec(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=sb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Vb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Gc(a,a.Ia);Gc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Hc(a){var b=Ic(a),c=Ic(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Vb(a,c);a.u&=-17} +function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Jc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Ic(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Gc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Jc(this,a,2));this.sa--;return a}; +h.Xa=function(a,b){this.Ba?(this.sa++,Kc(this,Jc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Jc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Lc(this,a,b,c)};h.hc=function(a,b,c){return Jc(this,Lc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Jc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Jc(this,a,4),b)}; +function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Lc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Nc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Lc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Jc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} +function Oc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Pc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Lc(a,b,c,8)}function Rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Kc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Kc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Bc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ac(this))}while(0>1|b<<16;Ec(this,a);return a&65535}function $c(a,b){a=b&2048|b>>1|b<<8;Ec(this,a<<8);return a&255}function ad(a,b){a=b&~a;S(this,a);return a}function bd(a,b){a=b&~a;S(this,a<<8);return a}function cd(a,b){a|=b;S(this,a);return a}function dd(a,b){a|=b;S(this,a<<8);return a}function ed(a,b){a=~b|65536;Cc(this,a);return a&65535}function fd(a,b){a=~b|256;Cc(this,a<<8);return a&255} +function gd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function hd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function id(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function jd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function kd(a,b){a=-b;Cc(this,a,a&b&32768);return a&65535}function ld(a,b){a=-b;Cc(this,a<<8,(a&b&128)<<8);return a&255} +function md(a,b){a=b<<1|this.m>>16&1;Ec(this,a);return a&65535}function nd(a,b){a=b<<1|this.m>>16&1;Ec(this,a<<8);return a&255}function od(a,b){a=(this.m&65536|b)>>1|b<<16;Ec(this,a);return a&65535}function pd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ec(this,a<<8);return a&255}function qd(a,b){var c=b-a;Fc(this,c,a,b);return c&65535}function rd(a,b){var c=b-a;Fc(this,c<<8,a<<8,b<<8);return c&255}function sd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function td(a,b){a^=b;S(this,a);return a&65535}function ud(a){U(this,a,Pc(this,a),Vc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function vd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function wd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function xd(a){V(this,a,!R(this))}function yd(a){V(this,a,R(this))} +function zd(a){U(this,a,Pc(this,a),ad);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){U(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Oc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Dd(a){S(this,Pc(this,a)&Sc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){S(this,(Oc(this,a)&Rc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){V(this,a,this.i&65535?0:4)}function Gd(a){V(this,a,!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Id(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Jd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Kd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Ld(a){V(this,a,!this.za()!=!(this.f&32768))}function Md(a){V(this,a,this.za())}function Nd(a){V(this,a,!!(this.i&65535))}function Od(a){V(this,a,!this.za())}function Pd(){K(this,12,1);this.a-=5}function Qd(a){V(this,a,!0)}function Rd(a){V(this,a,!(this.f&32768))}function Sd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Td(a){var b=Pc(this,a);a=Sc(this,a);Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ud(a){var b=Oc(this,a)<<8;a=Rc(this,a)<<8;Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Vd(a){var b=Sc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Wd(){K(this,24,2);this.a-=25} +function Xd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Yd(){K(this,16,4);this.a-=25}var Zd=[0,7,7,10,7,11,9,13];function $d(a){this.G=this.a;P(this,Qc(this,a));this.a=this.G-Zd[this.c]}var ae=[0,14,14,17,14,18,16,20];function be(a){this.G=this.a;var b=Qc(this,a);a=a>>6&7;Gc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-ae[this.c]}var ce=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function de(a){var b=Pc(this,a);this.G=this.a;S(this,Uc(this,a,b));this.a=this.G-ce[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ee(a){var b=Oc(this,a);S(this,Tc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var fe=[7,13,13,17,14,18,17,21]; +function ge(a){var b=Sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function me(a){U(this,a,Pc(this,a),qd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function ne(a){U(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)}function oe(){K(this,28,5);this.a-=5}function pe(){this.u&4||this.l&&this.l.da();this.u|=4;Bc(this,-2);this.a-=3}function qe(a){U(this,a,Pc(this,a),td);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function wc(a){re[a>>12].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a&15].call(this,a)} +function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)} +var re=[function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,Y,function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ie=[function(a){Ke[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,Y,Y,Y],te=[function(a){Cc(this,Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0, +kd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Cc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Ke=[function(a){Le[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,Y,ye,Ae,ne,ne,ne,ne],Le=[Xd,pe,je,Pd,Yd,ie,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[he,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Be=[he,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Je=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Cc(this, +Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,ld);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Cc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],He=[function(a){T(this,a,0,pd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function xc(a){Me[a>>12].call(this,a)} +var Me=[function(a){Ne[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,function(a){Oe[a>>8&15].call(this,a)},function(a){Pe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ne=[function(a){Qe[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,function(a){Re[a>>6&3].call(this,a)},Y,Y],Re=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Mc(this,a,0);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G= +this.a;Nc(this,a,0,b);S(this,b);this.a=this.G-fe[this.c]},function(a){S(this,Uc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Qe=[function(a){Se[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ye,Ae,ne,ne,ne,ne],Se=[Xd,pe,je,Pd,Yd,ie,function(){Hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Oe=[ge,ge,Vd,Vd,vd,vd,wd,wd,qe,qe,Y,Y,Y,Y,le,le],Pe=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,function(a){Te[a>>6& +3].call(this,a)},Y,Y],Te=[Y,function(a){a=Mc(this,a,65536);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G=this.a;Nc(this,a,65536,b);S(this,b);this.a=this.G-fe[this.c]},Y]; +function Ue(a){x.call(this,"ROM",a,Ue);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ve(c)})}}z(Ue);Ue.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Ve(this)}; +Ue.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ue.prototype.ka=function(){return!0}; +function Ve(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,bc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.ea=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.ea)});cb(b,this,af);F(this)}; +h.Kb=function(){if(!this.v){var a=nc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ka=function(a){return a?this.save():!0};h.reset=function(){bf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return bf(this)};function bf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Qb(this.a,this.P,1E3/Math.round(this.I/10))}};var bf={},$e=(bf[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],bf[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],bf[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],bf[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],bf);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&ef(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ef(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.C=d;this.J=ff(a);var e=this;if((this.c=mc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Rb(56,4);this.R=Ob(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&pf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));mf(a)})}function jf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){wf(a,b,c,d)})} -function wf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,va=w.length;va>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=yf(this,a++);)Af(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Af(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Bf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Cf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=yf(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&ff(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ff(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=gf(a);var e=this;if((this.c=nc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&qf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));nf(a)})}function kf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){xf(a,b,c,d)})} +function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,wa=w.length;wa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=zf(this,a++);)Bf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function Bf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; +h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Cf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Df(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=zf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Bf(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){Df(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Df(this,a[0])};function Gf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}If(a,e,b,c,!1,d)}else Hf(a,e)} -function If(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Hf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,vf(new rf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.j&&sc(this.j)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Bf(this,a.wb)}; -function Ff(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Cf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ef(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Ef(this,a[0])};function Hf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Jf(a,e,b,c,!1,d)}else If(a,e)} +function Jf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,If(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,wf(new sf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&tc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Cf(this,a.wb)}; +function Gf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Kb(this.h,f,t|w<<8);if(Nb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Jb(this.h,f);if(Nb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; -h.Ld=function(a){this.L=this.L&-1023|a&1022;this.D=this.D&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Pb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var Jf={},Ef=(Jf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Jf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Jf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Jf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Jf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Jf); -function Kf(a,b,c){x.call(this,"Computer",a,Kf);this.l.O=!1;Lf(this,b);this.A=mc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Mf;this.v=null;this.m=this.I=!1;this.P=mc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Nf(this);if(this.a=Ua("CPU",this.id)){this.C=Ua("Debugger",this.id);this.h=new tb({id:this.na+".bus",busWidth:this.N},this.a,this.C);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bMf){if(Of(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Of(this.i)&&(Tf(this,d),a=2,Uf(this.i));this.i.set("timestamp",sa());Vf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Sf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Of(d,g):("error"== -f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Uf(d),Of(d)?(c=Sf(d),e=!0):c=!1))}e&&Rf(this,c?d:null)}else 2==a&&d.clear()}else Rf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Wf(this,this.a,b,c,a),this.a.Ua());this.G&&(Tf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Tf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function Zf(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&G(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);fg(a,b,c)}})}else c(a,null)} -function gg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--cg||Ja(!0));l=!1}var g,k,l=!0;cg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?dg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--cg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--cg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?dg(b,a,d,!0,e,n):eg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return gg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; +var Kf={},Ff=(Kf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Kf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Kf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Kf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Kf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Kf); +function Lf(a,b,c){x.call(this,"Computer",a,Lf);this.j.O=!1;Mf(this,b);this.A=nc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Nf;this.v=null;this.m=this.I=!1;this.P=nc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Of(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bNf){if(Pf(d,this.v)){this.i=new Q(this,"1.30.2","failsafe");Pf(this.i)&&(Uf(this,d),a=2,Vf(this.i));this.i.set("timestamp",sa());Wf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Tf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Vf(d),Pf(d)?(c=Tf(d),e=!0):c=!1))}e&&Sf(this,c?d:null)}else 2==a&&d.clear()}else Sf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Xf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Uf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +function Uf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function $f(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.2"),g=new Q(a,"1.30.2","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);gg(a,b,c)}})}else c(a,null)} +function hg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--dg||Ja(!0));l=!1}var g,k,l=!0;dg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");n=function(d,k){k?eg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--dg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--dg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?eg(b,a,d,!0,e,n):fg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return hg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11.map From d67e8489738a8b7ef156c6d47fda90ad3c2a60a3 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Nov 2016 14:42:35 -0700 Subject: [PATCH 16/30] Changed 11/70 machines to allocate RAM as a single chunk, and updated the 11/70 page on toggle-ins (/devices/pdp11/machine/1170/panel/debugger/README.md) --- .../machine/1170/monitor/debugger/machine.xml | 3 +- .../pdp11/machine/1170/monitor/machine.xml | 3 +- .../machine/1170/panel/debugger/README.md | 234 +++++++++- .../machine/1170/panel/debugger/machine.xml | 3 +- devices/pdp11/machine/1170/panel/machine.xml | 3 +- .../machine/1170/vt100/debugger/machine.xml | 3 +- devices/pdp11/machine/1170/vt100/machine.xml | 3 +- devices/pdp11/rl11/default.xml | 4 +- docs/pcx86/examples/pcx86-dbg.js | 3 +- modules/pdp11/lib/bus.js | 48 +- modules/pdp11/lib/debugger.js | 27 +- modules/shared/lib/debugger.js | 2 +- modules/shared/lib/weblib.js | 4 +- versions/pc8080/1.30.2/pc8080-dbg.js | 2 +- versions/pcx86/1.30.2/pcx86-dbg.js | 3 +- versions/pdpjs/1.30.2/pdp11-dbg.js | 430 +++++++++--------- versions/pdpjs/1.30.2/pdp11.js | 14 +- 17 files changed, 504 insertions(+), 285 deletions(-) diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index e7f6b20ec..d6b10230a 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 Boot Monitor with Debugger - - + diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index db64c1f0a..b8773cd16 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 Boot Monitor - - + diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 31e2adb6d..10083ceb1 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -13,8 +13,8 @@ machines: Toggle-Ins ---------- -As DEC explains in its [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are listed below. +As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. ### Memory Management @@ -38,31 +38,32 @@ Chapter 4: "There are several useful toggle-ins that are probably not very well Load Address 300 Exam Display = 070707 ... Relocation works -With the PDPjs Debugger, the above "toggle-in" is easily entered with these commands: +With the PDPjs Debugger, the above "toggle-in" is easily entered with the following commands (the semicolons are optional; +they just make it easier to paste an entire set of commands into the Debugger at once): - e 200 012737 000400 177572 012737 070707 000200 000000 - e 300 000300 - e 17772300 077406 - e 17772340 000001 - r pc 200 + e 200 012737 000400 177572 012737 070707 000200 000000; + e 300 000300; + e 17772300 077406; + e 17772340 000001; + r pc 200; g which should produce these results: >> e 200 012737 000400 177572 012737 070707 000200 000000 - changing 000200 from 00000 to 12737 - changing 000202 from 00000 to 00400 - changing 000204 from 00000 to 77572 - changing 000206 from 00000 to 12737 - changing 000210 from 00000 to 70707 - changing 000212 from 00000 to 00200 - changing 000214 from 00000 to 00000 + changing 000200 from 000000 to 012737 + changing 000202 from 000000 to 000400 + changing 000204 from 000000 to 177572 + changing 000206 from 000000 to 012737 + changing 000210 from 000000 to 070707 + changing 000212 from 000000 to 000200 + changing 000214 from 000000 to 000000 >> e 300 000300 - changing 000300 from 00000 to 00300 + changing 000300 from 000000 to 000300 >> e 17772300 077406 - changing 00017772300 from 00000 to 77406 + changing 00017772300 from 000000 to 077406 >> e 17772340 000001 - changing 00017772340 from 00000 to 00001 + changing 00017772340 from 000000 to 000001 >> r pc 200 updated registers: R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 @@ -74,8 +75,12 @@ which should produce these results: R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 SP=000000 PC=000214 PS=000001 SW=00000000 T0 N0 Z0 V0 C1 000214: 000000 HALT - >> dw 300 l1 - 000300 70707 + >> d 300 l1 + 000300 070707 + +NOTE: By long-standing convention, all PCjs Debuggers use the "e" command to edit memory and the "d" command to dump +memory. Don't confuse those letters with the "EXAM" and "DEP" switches on the PDP-11 Front Panel, because they perform +*opposite* operations. ### Unibus Map Checkout @@ -85,7 +90,7 @@ which should produce these results: Deposit 125252 Known Data Load Address 17000500 - Deposit 125252 Data Path Ok + Examine 125252 Data Path Ok Load Address 17000700 Deposit 070707 Known Data @@ -101,3 +106,190 @@ which should produce these results: Load address 17000500 Relocates to 700 Examine 070707 ... Relocated ok + +The above "toggle-in" can be performed with the PDPjs Debugger as follows: + + e 500 125252; + d 17000500 l1; + e 17000700 070707; + e 17770202 000000; + e 17770200 000200; + e 17772516 40; + d 17000500 l1 + +which should produce these results: + + >> e 500 125252 + changing 000500 from 000000 to 125252 + >> d 17000500 l1 + 00017000500 125252 + >> e 17000700 070707 + changing 00017000700 from 000000 to 070707 + >> e 17770202 000000 + changing 00017770202 from 000000 to 000000 + >> e 17770200 000200 + changing 00017770200 from 000000 to 000200 + >> e 17772516 40 + changing 00017772516 from 000000 to 000040 + >> d 17000500 l1 + 00017000500 070707 + +If you also want to see all the hardware register activity, use the Debugger's "m bus on" command to turn bus messages on: + + >> m bus on + messages on: bus + >> e 500 125252 + changing 000500 to 125252 + >> d 17000500 l1 + 00017000500 125252 + >> e 17000700 070707 + changing 00017000700 to 070707 + >> e 17770202 000000 + changing 00017770202 to 000000 + UNIMAP1.writeWord(00017770202,000000) + >> e 17770200 000200 + changing 00017770200 to 000200 + UNIMAP0.writeWord(00017770200,000200) + >> e 17772516 40 + changing 00017772516 to 000040 + MMR3.writeWord(00017772516,000040) + >> d 17000500 l1 + 00017000500 070707 + +### Memory Clear Program + + Use this toggle-in to clear all of memory from location 0 to system size. + + LOCATION CONTENTS INSTRUCTIONS & NOTES + + 17772300 077406 KIPDR 0 + 17772316 077406 KIPDR 7 = I/O page for program + 17772340 000000 KIPAR 0 ; Load 200 if using trap catchers + 17772356 177600 KIPAR 7 = I/O page for program + 17777700 000000 R0 = Start Virtual Address + 17777701 172340 R1 = KIPAR 0 Address + 17777702 177572 R2 = MMR0 Address + 17777703 177760 R3 = System size register Address + 17777704 172516 R4 = MMR3 Address + 17777705 Pattern R5 = Desired pattern or "0" + 17777706 177676 R6 = Stack pointer + 17777776 000000 PSW = 0 + 17772240 012714 MOV #20,(R4) ; Enable 22-bit Mapping + 17772242 000020 + 17772244 005212 INC (R2) ; Enable Memory Management + 17772246 010520 1$: MOV R5,(R0)+ ; Data to memory + 17772250 020027 CMP R0,#17776 ; Top of Page 0? + 17772252 017776 + 17772254 003774 BLE 1$ + 17772256 062711 ADD #200,(R1) ; Step Page + 17772260 000200 + 17772262 021311 CMP (R3),(R1) ; Top of Memory? + 17772264 003402 BLE 2$ + 17772266 005000 CLR R0 ; Start at Virtual Address 0 + 17772270 000776 BR 1$ + 17772272 005312 2$: DEC (R2) ; Disable Relocation + 17772274 000000 HLT + + Load address 172240 + Start + +The above "toggle-in" can be entered with the PDPjs Debugger as follows: + + e 17772300 077406; + e 17772316 077406; + e 17772340 000000; + e 17772356 177600; + e 17777700 000000; + e 17777701 172340; + e 17777702 177572; + e 17777703 177760; + e 17777704 172516; + e 17777705 123123; + e 17777706 177676; + e 17777776 000000; + e 17772240 012714 000020 005212 010520 020027 017776 003774 062711; + e 17772260 000200 021311 003402 005000 000776 005312 000000; + r pc 172240 + +which should produce the following results when bus messages are turned on ("m bus on"): + + >> m bus on + messages on: bus + >> e 17772300 077406 + changing 00017772300 to 077406 + KISDR0.writeWord(00017772300,077406) + >> e 17772316 077406 + changing 00017772316 to 077406 + KISDR7.writeWord(00017772316,077406) + >> e 17772340 000000 + changing 00017772340 to 000000 + KISAR0.writeWord(00017772340,000000) + >> e 17772356 177600 + changing 00017772356 to 177600 + KISAR7.writeWord(00017772356,177600) + >> e 17777700 000000 + changing 00017777700 to 000000 + R0SET0.writeWord(00017777700,000000) + >> e 17777701 172340 + changing 00017777701 to 172340 + R1SET0.writeWord(00017777701,172340) + >> e 17777702 177572 + changing 00017777702 to 177572 + R2SET0.writeWord(00017777702,177572) + >> e 17777703 177760 + changing 00017777703 to 177760 + R3SET0.writeWord(00017777703,177760) + >> e 17777704 172516 + changing 00017777704 to 172516 + R4SET0.writeWord(00017777704,172516) + >> e 17777705 123123 + changing 00017777705 to 123123 + R5SET0.writeWord(00017777705,123123) + >> e 17777706 177676 + changing 00017777706 to 177676 + R6KERNEL.writeWord(00017777706,177676) + >> e 17777776 000000 + changing 00017777776 to 000000 + PSW.writeWord(00017777776,000000) + >> e 17772240 012714 000020 005212 010520 020027 017776 003774 062711 + changing 00017772240 to 012714 + SISAR0.writeWord(00017772240,012714) + changing 00017772242 to 000020 + SISAR1.writeWord(00017772242,000020) + changing 00017772244 to 005212 + SISAR2.writeWord(00017772244,005212) + changing 00017772246 to 010520 + SISAR3.writeWord(00017772246,010520) + changing 00017772250 to 020027 + SISAR4.writeWord(00017772250,020027) + changing 00017772252 to 017776 + SISAR5.writeWord(00017772252,017776) + changing 00017772254 to 003774 + SISAR6.writeWord(00017772254,003774) + changing 00017772256 to 062711 + SISAR7.writeWord(00017772256,062711) + >> e 17772260 000200 021311 003402 005000 000776 005312 000000 + changing 00017772260 to 000200 + SDSAR0.writeWord(00017772260,000200) + changing 00017772262 to 021311 + SDSAR1.writeWord(00017772262,021311) + changing 00017772264 to 003402 + SDSAR2.writeWord(00017772264,003402) + changing 00017772266 to 005000 + SDSAR3.writeWord(00017772266,005000) + changing 00017772270 to 000776 + SDSAR4.writeWord(00017772270,000776) + changing 00017772272 to 005312 + SDSAR5.writeWord(00017772272,005312) + changing 00017772274 to 000000 + SDSAR6.writeWord(00017772274,000000) + >> r pc 172240 + updated registers: + R0=000000 R1=172340 R2=177572 R3=177760 R4=172516 R5=123123 + SP=177676 PC=172240 PS=000000 SW=00000000 T0 N0 Z0 V0 C0 + SISAR0.readWord(172240): 012714 + SISAR1.readWord(172242): 000020 + SISAR0.readWord(172240): 012714 + SISAR1.readWord(172242): 000020 + 172240: 012714 000020 MOV #20,@R4 + diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 846aab7b4..674d438c7 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel and Debugger - - + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 4d1466a77..e770a5112 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index a2a5b2d5c..fef987ce4 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index af6436216..6283cd2e5 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml index b70668bc1..6d8b4ddf8 100644 --- a/devices/pdp11/rl11/default.xml +++ b/devices/pdp11/rl11/default.xml @@ -1,10 +1,10 @@ - + Disk Drive Controls - + Load diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index f0585cb0c..5a7c9859f 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -709,8 +709,7 @@ case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d function pq(a,b,c){var d;if(b){b=qq(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } return b; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_BYTE); b = 0xff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } return b; }, @@ -336,13 +336,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, !bus.nDisableFaults); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_BYTE); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } }, @@ -368,14 +368,14 @@ BusPDP11.IOController = { } if (w >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } return w; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_WORD); w = 0xffff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } return w; }, @@ -405,13 +405,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, !bus.nDisableFaults); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_WORD); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } } }; @@ -896,6 +896,14 @@ BusPDP11.prototype.getByte = function(addr) */ BusPDP11.prototype.getByteDirect = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } this.fFault = false; this.nDisableFaults++; var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); @@ -939,6 +947,14 @@ BusPDP11.prototype.getWord = function(addr) */ BusPDP11.prototype.getWordDirect = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var w; var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; @@ -985,6 +1001,14 @@ BusPDP11.prototype.setByte = function(addr, b) */ BusPDP11.prototype.setByteDirect = function(addr, b) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } this.fFault = false; this.nDisableFaults++; this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr); @@ -1030,6 +1054,14 @@ BusPDP11.prototype.setWord = function(addr, w) */ BusPDP11.prototype.setWordDirect = function(addr, w) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; this.fFault = false; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 74659313a..0def5db5c 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -2867,8 +2867,8 @@ if (DEBUGGER) { /** * doDump(asArgs) * - * The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, and it is - * interpreted using the current base. + * The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, + * and it is interpreted using the current base. * * @this {DebuggerPDP11} * @param {Array.} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes]) @@ -2941,7 +2941,7 @@ if (DEBUGGER) { return; } } - if (!sAddr) sCmd = this.sCmdDumpPrev || "db"; + if (!sAddr) sCmd = this.sCmdDumpPrev || "dw"; } else { this.sCmdDumpPrev = sCmd; } @@ -2963,17 +2963,20 @@ if (DEBUGGER) { if (len > 0x10000) len = 0x10000; // prevent bad user (or variable) input from producing excessive output } - var sDump = ""; - var size = (sCmd == "dd"? 4 : (sCmd == "dw"? 2 : 1)); + /* + * I've changed the code below to effectively make "dw" the default if only "d" is specified, + * since this is primarily a word-oriented machine. + */ + var size = (sCmd == "dd"? 4 : (sCmd == "db"? 1 : 2)); var nBytes = (size * len) || 128; var nLines = ((nBytes + 15) >> 4) || 1; + var sDump = ""; while (nLines-- && nBytes > 0) { - var data = 0, shift = 0, i; var sData = "", sChars = ""; sAddr = this.toStrAddr(dbgAddr); /* - * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords). + * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16. * * And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've * changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated @@ -2981,8 +2984,10 @@ if (DEBUGGER) { * * Besides, it's nice for "db" and "dw" to generate the same Bus activity that typical byte and word reads do. */ - for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) { - var n = 1; + var i, n; + var data = 0, shift = 0; + for (i = this.nBase; i > 0 && nBytes > 0; i -= n, nBytes -= n) { + n = 1; var v = size == 1? this.getByte(dbgAddr, n) : this.getWord(dbgAddr, (n = 2)); data |= (v << (shift << 3)); shift += n; @@ -2992,7 +2997,6 @@ if (DEBUGGER) { data = shift = 0; } sChars += (v >= 32 && v < 128? String.fromCharCode(v) : '.'); - nBytes -= n; } if (sDump) sDump += '\n'; sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : ""); @@ -3045,8 +3049,7 @@ if (DEBUGGER) { if (vNew & ~mask) { this.println("warning: " + str.toHex(vNew) + " exceeds " + size + "-byte value"); } - var vOld = fnGet.call(this, dbgAddr); - this.println("changing " + this.toStrAddr(dbgAddr) + " from " + this.toStrBase(vOld, size) + " to " + this.toStrBase(vNew, size)); + this.println("changing " + this.toStrAddr(dbgAddr) + (this.messageEnabled(MessagesPDP11.BUS)? "" : (" from " + this.toStrBase(fnGet.call(this, dbgAddr), size))) + " to " + this.toStrBase(vNew, size)); fnSet.call(this, dbgAddr, vNew, size); } }; diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index cf599d213..42af047e3 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -681,7 +681,7 @@ if (DEBUGGER) { var s; switch(this.nBase) { case 8: - s = str.toOct(n, Math.round((8/3) * nBytes)); + s = str.toOct(n, nBytes * 3 - (nBytes > 2? 1 : 0)); break; case 10: s = n.toString(); diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index 0c683b730..ad0a42561 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -202,9 +202,9 @@ web.getResource = function(sURL, dataPost, fAsync, done) if (DEBUG) { /* - * The larger resources that we put on archive.pcjs.org should also be available locally... + * The larger resources we put on archive.pcjs.org should also be available locally... */ - sURL = sURL.replace("http://archive.pcjs.org", ""); + sURL = sURL.replace(/^http:\/\/archive.pcjs.org(\/.*)\/([^\/]*)$/, "$1/archive/$2"); } if (NODE) { diff --git a/versions/pc8080/1.30.2/pc8080-dbg.js b/versions/pc8080/1.30.2/pc8080-dbg.js index 1fe231f13..65dde8297 100644 --- a/versions/pc8080/1.30.2/pc8080-dbg.js +++ b/versions/pc8080/1.30.2/pc8080-dbg.js @@ -191,7 +191,7 @@ function Ce(a,b,c){var d;if(b){b=De(a,b);for(var e=0,f=!1,g=b,h=[],k=[],n=b.spli d))}return d}function De(a,b){for(var c,d=/\{(.*?)\}/;(c=b.match(d))&&!(0<=c[1].indexOf("{"));){var e=Ce(a,c[1]);b=b.replace("{"+c[1]+"}",null!=e?Ge(a,e):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.ba-a.na}if(null==d)break;b=b.replace(c[0],d.toString())}return b} function Ee(a,b,c,d){var e;null!=b?(e=a.Pb(b),0<=e?e=a.Qb(e):(e=a.ea[b],null==e&&(e=aa(b,a.Xa))),null!=e||d||a.g("invalid "+(c?c:"value")+": "+b)):d||a.g("missing "+(c||"value"));return e} function Fe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4>=1;g=p+g;d>>=8}d=t(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function He(a,b){if(b)return Fe(a,b,a.ea[b]);var c=0;for(b in a.ea)Fe(a,b,a.ea[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ia:null,Ka:null,Ja:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ka=g.load;d.Ja=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.kb=this.id:(this.Pa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Za:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.qc=b.comment;this.Sc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; -k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; -function Vb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Vb(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Wb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Xb(this.b),Ab(this,"ENABLE")&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0a;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[jc,kc,lc,mc];a=new I(this);nc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function kc(a,b,c){var d=!1,e=this.controller,f=e.Ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function lc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function mc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function pc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return uc(1,f,g)}f=new I(a,f,n,a.xa,d,e);nc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Ea)>>>this.la].fc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=wc(this.b,a));return this.W[(a&this.Ea)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Ea)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Ea)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; -k.gb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Ea)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function xc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Nc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Nc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; -k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; -k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; -k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Va[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[1]}; -k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; -k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return fc(this.b)};k.me=function(a){Oc(this.b,a&-1809|fc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, -K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, -K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],M[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],M[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],M[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],M[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],M[65477]=[null,null,K.prototype.Ab,K.prototype.Db, -"R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Bb, -K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +function ic(a,b,c){u.call(this,"Bus",a,ic,64);this.b=b;this.i=c;this.K=a.busWidth||16;this.g=0;this.J=[];this.C=null;this.D=1<>2;this.w=this.ya-1;this.v=this.D/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.B=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function qc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; +k.pa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; +k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; +function yc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.pe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.ga};k.$d=function(){this.b.ga=0};k.od=function(){return this.b.Ac}; +k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return gc(this.b)};k.ne=function(a){Oc(this.b,a&-1809|gc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KISDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.ld, +K.prototype.ee,"KISAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Pd, +K.prototype.Ge,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},va:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Ca(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ia:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function nc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function $c(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} -var ed=[],Zc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ma],ad=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Xc=[I.prototype.R,I.prototype.ta,I.prototype.aa,I.prototype.Ia]; -function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=ld(a)&&(a.xb=a.yb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Gb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Zb(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+od(a))} -function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Yb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&nd(this,!0);this.za=0;this.Xa=Ba();if(this.aa){var a=this.Xa-this.aa;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=pd(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.za+=b;this.S+=b;$b(this,b);Yb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.$(void 0),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, -e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.aa=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.aa-this.Xa),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.aa+=c;a(b,c)}}}; -k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,ld(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);Zb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; -function qd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.wb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; -function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Ma=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Xb(a)}function Xb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ia=0;a.Qb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ta?(a.P=65536,a.ca=a.Pc,a.ra=a.Sd,a.Mb=a.Je,pc(a.w,a.ob&16?22:18)):(a.P=0,a.ca=a.Oc,a.ra=a.yc,a.Mb=a.Fc,pc(a.w,16))}function ud(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.rc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,xc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} -function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=fc(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Oc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.va);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; -function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function wc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Yd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Ma<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; -k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Yd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Yd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return ae(this,a,b,c)};k.Pc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Yd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; -k.Je=function(a,b){this.w.gb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ha[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ha[a.M>>12&3]=d} -function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.ib=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.B=c.B)&&$c(a,ad,!1))}function dd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +var ed=[],Zc=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],ad=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Xc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} +function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Wd=function(){if(this.A.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.A.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.B&&this.B.$(void 0),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ha();this.B&&this.B.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.A.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;md(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.A.Z){od(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),ld(this));b=!0}this.A.complete=a;return b}; +function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.A.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.A.Z&&this.ha();td(this);id(this);this.A.error=!1;this.parent.reset.call(this)}; +function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function ud(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=gc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Oc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.wa);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; +function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Yd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Yd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Yd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ae(this,a,b,c)};k.Qc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Yd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; +k.Ke=function(a,b){this.w.hb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} +function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.A.complete=!0;var b=this.i&&ke(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} @@ -141,178 +141,178 @@ function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b) function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Sa()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Sa()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Sa()!=!wd(this))} -function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Sa()!=!wd(this))}function df(a){U(this,a,this.Sa())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Sa())}function gf(){this.pa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Ta()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Ta()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Ta()!=!wd(this))} +function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Ta()!=!wd(this))}function df(a){U(this,a,this.Ta())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Ta())}function gf(){this.qa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.pa(24,2);this.b-=25} -function pf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.pa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.qa(24,2);this.b-=25} +function pf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.qa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; -function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.pa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.pa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.B&&this.B.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} -var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= -this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> +this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} +var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= +this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> 6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; -function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; -ng.prototype.Ga=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Fa=function(){return!0}; -function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(sc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.ma=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Og);H(this)}; -k.vc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Fa=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Qg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Qg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Qg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function qg(a){u.call(this,"RAM",a,qg);this.ia=this.g=null;this.B=a.addr;this.C=a.size;this.La=a.load;this.Ka=a.exec;this.v=!1;this.f=a.file;this.D=sa(this.f);if(this.f){a=this.f;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.g=a.ea,c.ia=a.ia,null==c.La&&(c.La=a.La),null==c.Ka&&(c.Ka=a.Ka)):c.f=null);rg(c)})}} +z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)};qg.prototype.Ha=function(){this.ia&&(this.i&&pg(this.i,this.id,this.B,this.C,this.ia),delete this.ia);return!0};qg.prototype.Ga=function(){return!0};function rg(a){if(a.w&&(!a.v&&a.C&&tc(a.w,a.B,a.C,1)&&(a.v=!0),!tb(a))){if(!a.v)q("No RAM allocated");else if(a.f){if(!a.g||!a.w)return;Lg(a,a.g,a.La,a.Ka,a.B)}H(a)}} +qg.prototype.reset=function(){if(this.v){for(var a=this.w,b=this.B,c=this.C,d=b&a.w,b=b>>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; +k.wc=function(){if(!this.J){var a=hd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Qg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Qg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Qg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.Ka, -e.Ja));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, +e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, +function ch(a,b,c,d,e,f,g){a.N=b;a.C=c;a.v=d;a.ea=e;a.La=f;a.Ka=g;2==d?a.S&&Lg(a.S,e,f,g)?a.status("tape loaded: "+b):(a.N="",a.C="",a.H=Rg,a.v=Sg,a.O("No load address available for tape: "+b)):(a.K=0,a.J=e,a.status("tape attached: "+b),Vg(a,0))}function ah(a,b){if(a.C||!1===b)a.N="",a.C="",b||(a.v&&a.status(1==a.v?"tape detached":"tape unloaded"),a.H=Rg,a.v=Sg,$g(a))}k.save=function(){return(new P(this)).data()};k.restore=function(){return!0};k.vd=function(){return this.f&65534}; +k.me=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Kc(this.b,this.Y)):(this.f&=-129,this.f|=2048,this.L=0,Lc(this.b,this.da,1E3/Math.round(this.aa/10))));this.f=this.f&-66|a&65};k.ud=function(){this.f&=-129;this.f|=2048;return this.L};k.le=function(){};var dh={},Wg=(dh[65384]=[null,null,Pc.prototype.vd,Pc.prototype.me,"PRS"],dh[65386]=[null,null,Pc.prototype.ud,Pc.prototype.le,"PRB"],dh); +function eh(a,b,c){u.call(this,"Disk",{id:a.Qa+".disk"+p(++fh,4)},eh,2097152);this.controller=a;this.B=a.B;this.i=a.i;this.v=b;this.Xa=b.name;this.ec=b.ec;gh(this,c,b.va,b.za,b.ra,b.Ma);H(this)}var fh=0;z(eh);k=eh.prototype;k.Ea=function(a,b,c,d){this.i=d}; +function gh(a,b,c,d,e,f){a.mode=b;a.va=c;a.za=d;a.ra=e;a.Ma=f;a.b=[];if("preload"!=a.mode){b=Array(a.va);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){jh(a,b,c,d)})} -function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.La=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Oa+a.Aa&&(a.Aa+=f-(a.Oa+a.Aa)+1):(a.Oa=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.B&&!a.B.A.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=hd(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}qh(this);this.P=Mc(112,5);Cb(b,this,rh,2097152);sh(this,"None","",!0);this.L&&sh(this,"Local Disk","?");sh(this,"Remote Disk","??");th(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.rc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} -function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));oh(this,a.ec)}; +function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; -k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; -var wh={},rh=(wh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],wh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],wh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],wh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],wh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ia=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); -var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.sc=function(){return-1};xh.prototype.tc=function(){}; +function oh(a,b){if(0<=b&&b>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; +k.we=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; +var wh={},rh=(wh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],wh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],wh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],wh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],wh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); +var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.tc=function(){return-1};xh.prototype.uc=function(){}; function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function Ah(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} function Bh(a,b,c){var d;if(b){b=Ch(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0this.b.wb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=vc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=fc(this.b):21==a&&this.f&&ec(this.f)&&(b=this.f.Ua));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ta=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Na=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} -function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Na=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; -function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Na||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,fc(d)):21==b&&a.f&&ec(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&ethis.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=gc(this.b):21==a&&this.f&&fc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.A.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.B&&a.B.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} +function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; +function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,gc(d)):21==b&&a.f&&fc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Ib=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;zg++;Ib--}}zg||(a.j("no "+yg+"history available"),a.tb=void 0)}else{var Kb=Qh(a,ma);if(Kb){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Fi),zc=Dh(a,Ka)>>>0,65536>4||1;Hi--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Lb&&(Lb+="\n");Lb+=ma+" "+Id+(0==Nb?" "+Cg:"")}Lb&&a.j(Lb);a.lb=Kb}}}}break;case "e":if("else"==g[0])break;var jb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(jb=1,Jd=255,Kd=a.Fb,Ld=a.Wb):"e"==Md||"ew"==Md?(jb=2,Jd=65535,Kd=a.oa,Ld=a.gb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= -2;FcQd;){for(var La=null,Li=256;65536>Qb.F>>>0;){Rd.F=a.oa(Qb,2);if(null==Qb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Eg=null,Rb=Gc.F,Fg=Rb,Sd=1;6>=Sd&&Rb;Sd++){if(2< -Sd){Gc.F=Rb;var Hc=di(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Rb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Rb-=2}Gc.F=Fg;if(La=Eg)break}}if(!La||null==La)break;var Hg=null;if("ks"==Ki){var Ig=La.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}La=xa(La,50)+" ;"+(Hg||"stack="+J(a,Qb.F));a.j(La);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== -G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Td=0;Tdna.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;zg++;Jb--}}zg||(a.j("no "+yg+"history available"),a.ub=void 0)}else{var Lb=Qh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Fi),Ac=Dh(a,La)>>>0,65536>4||1,Nb="";Hi--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Cg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var Ma=null,Ki=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Ki--)break;if(!(Rd.F&1)){for(var Li=a,Gc=Rd,Eg=null,Tb=Gc.F,Fg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< +Sd){Gc.F=Tb;var Hc=di(Li,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Tb-=2}Gc.F=Fg;if(Ma=Eg)break}}if(!Ma||null==Ma)break;var Hg=null;if("ks"==Ji){var Ig=Ma.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}Ma=xa(Ma,50)+" ;"+(Hg||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Da());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.sb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Ca());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.A.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Si(a,b,c)}})}else c(a,null)} -function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!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),--Ei||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +1);c=0}}};function yi(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function zi(a){var b=!0;if(Ka()){var c=JSON.stringify(a[a.id]);Oa(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function wi(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){q(c.message||c),b=!1}return b}function si(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ka()&&(b=Na(a.key))?(a[a.id]=b,a.b=!0):!1}var Ei=0; +function Pi(a,b,c,d,e,f){e("Loading "+a+"...");Ea(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Qi(h,a,b,c,d,e,f)})} +function Qi(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(nb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ri(a,b,c)}})}else c(a,null)} +function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!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),--Ei||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 4e17efc5a..9d7f5bc21 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -42,7 +42,7 @@ function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=reso typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={K:null,X:null,ga:null,fa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; @@ -70,7 +70,7 @@ function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&( h.reset=function(){for(var a=0;a>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} -h.kb=function(a){var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +function wf(a,b,c,d,e){var f=c;if(a.h)return!0;a.va=b;a.Ea=c;a.Wb=q(c);a.h=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.V=e[0];a.Z=e[1];a.S=e[2];a.ha=e[3]||512;c=a.ha>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){xf(a,b,c,d)})} function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,wa=w.length;wa>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255 Date: Thu, 3 Nov 2016 15:36:37 -0700 Subject: [PATCH 17/30] Fixed zeroMemory() to properly zero any block(s) that originally underlaid the IOPAGE block(s), rather than trying to zero the IOPAGE block itself (which would be a bad idea) --- modules/pdp11/lib/bus.js | 23 +++-- modules/pdp11/lib/memory.js | 13 ++- versions/pdpjs/1.30.2/pdp11-dbg.js | 150 ++++++++++++++--------------- versions/pdpjs/1.30.2/pdp11.js | 18 ++-- 4 files changed, 105 insertions(+), 99 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 851895c81..a39b61a1b 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -80,8 +80,8 @@ function BusPDP11(parmsBus, cpu, dbg) * It is managed by setIOPageRange(). reset() establishes the default (16). */ this.nIOPageRange = 0; // zero means no IOPAGE access (yet) - this.prevIOPageBlocks = []; // this saves any memory blocks we had to replace with IOPAGE blocks - this.realIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them + this.aIOPrevBlocks = []; // this saves any previous blocks we had to replace with IOPAGE blocks + this.aIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them /* * Compute all BusPDP11 memory block parameters now, based on the width of the bus. @@ -452,7 +452,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) var addr; if (this.nIOPageRange) { addr = (1 << this.nIOPageRange) - BusPDP11.IOPAGE_LENGTH; - this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.prevIOPageBlocks); + this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPrevBlocks); this.nIOPageRange = 0; } if (nRange) { @@ -460,12 +460,12 @@ BusPDP11.prototype.setIOPageRange = function(nRange) addr = (1 << nRange); this.nBusLimit = this.nBusMask = (addr - 1); addr -= BusPDP11.IOPAGE_LENGTH; - this.prevIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); - if (this.realIOPageBlocks) { - this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.realIOPageBlocks); + this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); + if (this.aIOPageBlocks) { + this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.aIOPageBlocks); } else { this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this); - this.realIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); + this.aIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); } } } @@ -675,7 +675,14 @@ BusPDP11.prototype.zeroMemory = function(addr, size) var off = addr & this.nBlockLimit; var iBlock = addr >>> this.nBlockShift; while (size > 0 && iBlock < this.aMemBlocks.length) { - this.aMemBlocks[iBlock].zero(off, size); + var block = this.aMemBlocks[iBlock]; + if (block.controller) { + if (this.aIOPageBlocks && this.aIOPageBlocks.length == this.aIOPrevBlocks.length) { + var i = this.aIOPageBlocks.indexOf(block); + if (i >= 0) block = this.aIOPrevBlocks[i]; + } + } + if (block) block.zero(off, size); size -= this.nBlockSize; iBlock++; off = 0; diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 550782b80..96b047c3d 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -174,10 +174,9 @@ function MemoryPDP11(bus, addr, used, size, type, controller) a = this.ab = new Array(this.size); } else { /* - * NOTE: This is the default mode of operation (!TYPEDARRAYS && !BYTEARRAYS), because it - * seems to provide the best performance; and although in theory, that performance might - * come at twice the overhead of TYPEDARRAYS, it's increasingly likely that the JavaScript - * runtime will notice that all we ever store are 32-bit values, and optimize accordingly. + * NOTE: This used to be the default mode of operation (!TYPEDARRAYS && !BYTEARRAYS), because + * it seemed to provide the best performance; however, that was then, and this is now. TYPEDARRAYS + * is more efficient. */ a = this.adw = new Array(this.size >> 2); } @@ -389,8 +388,8 @@ MemoryPDP11.prototype = { * zero(off, len) * * Zeros the block. Supporting off and len parameters is probably overkill, and makes more - * work in the non-TYPEDARRAY, non-BYTEARRAY case, because there all we have is an array of DWORDs, - * but that's not the typical case. + * work in the non-TYPEDARRAY, non-BYTEARRAY case, but that's not the typical case. The other + * exception is controller-based blocks, which may not have any array backing at all. * * @this {MemoryPDP11} * @param {number} [off] (optional starting byte offset within block) @@ -404,7 +403,7 @@ MemoryPDP11.prototype = { */ if (len === undefined) len = this.size; Component.assert(off >= 0 && off < this.size); - if (TYPEDARRAYS || BYTEARRAYS) { + if ((TYPEDARRAYS || BYTEARRAYS) && this.ab) { for (i = off; len-- && i < this.ab.length; i++) this.ab[i] = 0; } else { for (i = off; len-- && i < this.size; i++) this.writeByteDirect(off, 0, this.addr + off); diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index d240a84e3..37e99b13e 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -46,39 +46,39 @@ function Ga(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Qa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.qc=b.comment;this.Sc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.B.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; -k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +k.ta=function(a,b,c,d){if(this.A&&this.A.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0>2;this.w=this.ya-1;this.v=this.D/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.B=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.v);for(b=0;b>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} -function qc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; k.pa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; -function yc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;wa.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; @@ -97,28 +97,28 @@ K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.p Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ 1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.B=c.B)&&$c(a,ad,!1))}function dd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.A||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} var ed=[],Zc=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],ad=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Xc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; -function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.B.Z=!1;this.B.Yb=!1;this.B.tb=a.autoStart;this.B.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Wd=function(){if(this.A.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.A.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.B&&this.B.$(void 0),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ha();this.B&&this.B.stop(Ba(),ld(this));vb(this, -e.stack||e.message);return}if(this.A.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;md(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.A.Z){od(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),ld(this));b=!0}this.A.complete=a;return b}; -function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.A.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.A.Z&&this.ha();td(this);id(this);this.A.error=!1;this.parent.reset.call(this)}; +k.Wd=function(){if(this.B.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.B.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.A&&this.A.$(void 0),this.Vb=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.rb(!0),this.A.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);$b(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; +function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function ud(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=gc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Oc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.wa);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; @@ -132,8 +132,8 @@ k.Ke=function(a,b){this.w.hb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;( function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&ke(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} @@ -149,7 +149,7 @@ function pf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?qf(this.i):this.ha function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.B&&this.B.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], @@ -159,19 +159,19 @@ this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.sb&1):3+(7== var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> 6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; -function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.B=null);og(c)})}}z(ng);ng.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; +function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; ng.prototype.Ha=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Ga=function(){return!0}; -function og(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; -k.wc=function(){if(!this.J){var a=hd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;var e=this;this.ka=Mc(48,4);this.Y=Jc(this.b,function(){e.f&128||!e.C.length||(e.K=e.C.shift()&255,e.da&&97<=e.K&&122>e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; +k.wc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ga=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), @@ -179,21 +179,21 @@ this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa function Pc(a){u.call(this,"PC11",a,Pc);this.g=a.autoMount||null;this.D=0;this.aa=a.baudReceive||3600;this.K=this.L=this.f=0;this.J=[];this.H=Rg;this.v=Sg;this.N=this.C="";this.ea=this.La=this.Ka=null;this.R=-1;this.P=!Pa("Mobi")&&window&&"FileReader"in window}z(Pc);var Rg="",Sg=0;k=Pc.prototype; k.ta=function(a,b,c){var d=this,e=Sg;switch(b){case "listTapes":return this.G[b]=c,c.onchange=function(){var a=d.G.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){q("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b=''+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, -e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, +e.Ka));a.B.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){jh(a,b,c,d)})} -function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;fb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;if((this.v=hd(this.A,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}qh(this);this.P=Mc(112,5);Cb(b,this,rh,2097152);sh(this,"None","",!0);this.L&&sh(this,"Local Disk","?");sh(this,"Remote Disk","??");th(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.rc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} -k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.A&&this.A.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;ethis.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ +k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.A=a;this.f=a.f;(a=hd(a,"messages"))&&Jh(this,a);this.vb=Mh;this.Ob=1145>this.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=gc(this.b):21==a&&this.f&&fc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.A.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.B&&a.B.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,gc(d)):21==b&&a.f&&fc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;zg++;Jb--}}zg||(a.j("no "+yg+"history available"),a.ub=void 0)}else{var Lb=Qh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Fi),Ac=Dh(a,La)>>>0,65536>4||1,Nb="";Hi--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Cg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= -2;FcQd;){for(var Ma=null,Ki=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Ki--)break;if(!(Rd.F&1)){for(var Li=a,Gc=Rd,Eg=null,Tb=Gc.F,Fg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< Sd){Gc.F=Tb;var Hc=di(Li,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Tb-=2}Gc.F=Fg;if(Ma=Eg)break}}if(!Ma||null==Ma)break;var Hg=null;if("ks"==Ji){var Ig=Ma.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}Ma=xa(Ma,50)+" ;"+(Hg||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Ca());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.A.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;la[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;l>2;this.l=this.b-1;this.v=this.A/this.b|0;this.ya=[];this.f=0;this.i=!1;this.s=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.v);for(b=0;b>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.m){var c;a.m&&(c=(1<>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} -h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; @@ -109,7 +109,7 @@ function kb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a function vc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;lc.call(this,a,6666667);this.decode=1120==this.Za?wc.bind(this):xc.bind(this);yc(this);this.sa=0;this.N=null;this.j.complete=!1}z(vc,lc);h=vc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);yc(this);oc(this);this.j.error=!1;this.parent.reset.call(this)}; function yc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;jb(a)}function jb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function zc(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];rc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Cc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ec(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=sb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Vb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Gc(a,a.Ia);Gc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Hc(a){var b=Ic(a),c=Ic(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Vb(a,c);a.u&=-17} @@ -155,7 +155,7 @@ function Ve(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if( Ha(function(){for(var a=D(document,"pdp11","rom"),b=0;b>>a.c;0>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e Date: Thu, 3 Nov 2016 15:50:19 -0700 Subject: [PATCH 18/30] Memory can now be explicitly "zeroed" with any byte pattern (but the default is still zero); note that memory blocks are still always zero-initialized when first created --- modules/pdp11/lib/bus.js | 7 ++++--- modules/pdp11/lib/memory.js | 10 ++++++---- modules/pdp11/lib/ram.js | 7 ++++++- versions/pdpjs/1.30.2/pdp11-dbg.js | 2 +- versions/pdpjs/1.30.2/pdp11.js | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index a39b61a1b..a69972c09 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -664,13 +664,14 @@ BusPDP11.prototype.cleanMemory = function(addr, size) }; /** - * zeroMemory(addr, size) + * zeroMemory(addr, size, pattern) * * @this {BusPDP11} * @param {number} addr * @param {number} size + * @param {number} [pattern] */ -BusPDP11.prototype.zeroMemory = function(addr, size) +BusPDP11.prototype.zeroMemory = function(addr, size, pattern) { var off = addr & this.nBlockLimit; var iBlock = addr >>> this.nBlockShift; @@ -682,7 +683,7 @@ BusPDP11.prototype.zeroMemory = function(addr, size) if (i >= 0) block = this.aIOPrevBlocks[i]; } } - if (block) block.zero(off, size); + if (block) block.zero(off, size, pattern); size -= this.nBlockSize; iBlock++; off = 0; diff --git a/modules/pdp11/lib/memory.js b/modules/pdp11/lib/memory.js index 96b047c3d..44d689153 100644 --- a/modules/pdp11/lib/memory.js +++ b/modules/pdp11/lib/memory.js @@ -385,7 +385,7 @@ MemoryPDP11.prototype = { return false; }, /** - * zero(off, len) + * zero(off, len, pattern) * * Zeros the block. Supporting off and len parameters is probably overkill, and makes more * work in the non-TYPEDARRAY, non-BYTEARRAY case, but that's not the typical case. The other @@ -394,19 +394,21 @@ MemoryPDP11.prototype = { * @this {MemoryPDP11} * @param {number} [off] (optional starting byte offset within block) * @param {number} [len] (optional maximum number of bytes; default is the entire block) + * @param {number} [pattern] */ - zero: function(off, len) { + zero: function(off, len, pattern) { var i; off = off || 0; + pattern &= 0xff; /* * NOTE: If len happens to be larger than the block, that's OK, because we also bounds-check the index. */ if (len === undefined) len = this.size; Component.assert(off >= 0 && off < this.size); if ((TYPEDARRAYS || BYTEARRAYS) && this.ab) { - for (i = off; len-- && i < this.ab.length; i++) this.ab[i] = 0; + for (i = off; len-- && i < this.ab.length; i++) this.ab[i] = pattern; } else { - for (i = off; len-- && i < this.size; i++) this.writeByteDirect(off, 0, this.addr + off); + for (i = off; len-- && i < this.size; i++) this.writeByteDirect(off, pattern, this.addr + off); } }, /** diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 1f07716ca..1a52af5a9 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -239,7 +239,12 @@ RAMPDP11.prototype.initRAM = function() RAMPDP11.prototype.reset = function() { if (this.fAllocated) { - this.bus.zeroMemory(this.addrRAM, this.sizeRAM); + /* + * TODO: Add a configuration parameter for selecting the byte pattern on reset? + * Note that when memory blocks are originally created, they are currently always + * zero-initialized, so this would only affect resets. + */ + this.bus.zeroMemory(this.addrRAM, this.sizeRAM, 0); if (this.abInit) { this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM, true); } diff --git a/versions/pdpjs/1.30.2/pdp11-dbg.js b/versions/pdpjs/1.30.2/pdp11-dbg.js index 37e99b13e..9698c72ed 100644 --- a/versions/pdpjs/1.30.2/pdp11-dbg.js +++ b/versions/pdpjs/1.30.2/pdp11-dbg.js @@ -165,7 +165,7 @@ function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if( Xa(function(){for(var a=D(document,"pdp11","rom"),b=0;b>>a.la;0>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e>>a.c;0>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e Date: Thu, 3 Nov 2016 16:24:56 -0700 Subject: [PATCH 19/30] Promoted the working version to 1.30.3 --- apps/pcx86/1981/visicalc/manifest.xml | 2 +- apps/pcx86/1982/esuite/manifest.xml | 2 +- apps/pcx86/1985/rogue/manifest.xml | 2 +- apps/pcx86/1987/thinktank/manifest.xml | 2 +- apps/pcx86/1988/moria/manifest.xml | 2 +- apps/pcx86/1992/moria/manifest.xml | 2 +- devices/c1p/machine/32kb/machine.xml | 2 +- .../c1p/machine/8kb/all/debugger/machine.xml | 2 +- devices/c1p/machine/8kb/all/machine.xml | 2 +- devices/c1p/machine/8kb/array/machine.xml | 2 +- .../machine/8kb/large/debugger/machine.xml | 2 +- devices/c1p/machine/8kb/large/machine.xml | 2 +- devices/c1p/machine/8kb/small/machine.xml | 2 +- .../machine/exerciser/machine-8080ex1.xml | 2 +- .../machine/exerciser/machine-8080pre.xml | 2 +- .../machine/exerciser/machine-cputest.xml | 2 +- .../pc8080/machine/exerciser/machine-test.xml | 2 +- devices/pc8080/machine/exerciser/machine.xml | 2 +- .../machine/invaders/debugger/machine.xml | 2 +- devices/pc8080/machine/invaders/machine.xml | 2 +- .../pc8080/machine/vt100/debugger/machine.xml | 2 +- devices/pc8080/machine/vt100/machine.xml | 2 +- .../5150/cga/384kb/softkbd/machine.xml | 2 +- .../5150/cga/64kb/donkey/debugger/machine.xml | 2 +- .../machine/5150/cga/64kb/donkey/machine.xml | 2 +- .../machine/5150/cga/64kb/softkbd/machine.xml | 2 +- .../pcx86/machine/5150/dual/64kb/machine.xml | 2 +- .../5150/mda/64kb/debugger/machine.xml | 2 +- .../pcx86/machine/5150/mda/64kb/machine.xml | 2 +- .../machine/5150/mda/64kb/softkbd/machine.xml | 2 +- .../machine/5160/cga/256kb/array/machine.xml | 2 +- .../5160/cga/256kb/demo/debugger/machine.xml | 2 +- .../machine/5160/cga/256kb/demo/machine.xml | 2 +- .../5160/cga/256kb/softkbd/machine.xml | 2 +- .../cga/256kb/win101/debugger/machine.xml | 2 +- .../machine/5160/cga/256kb/win101/machine.xml | 2 +- .../5160/cga/256kb/win101/softkbd/machine.xml | 2 +- .../5160/cga/512kb/win101/softkbd/machine.xml | 2 +- .../5160/cga/640kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/cga/640kb/machine.xml | 2 +- .../5160/cga/640kb/softkbd/machine.xml | 2 +- .../5160/ega/256kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/ega/256kb/machine.xml | 2 +- .../machine/5160/ega/640kb/array/machine.xml | 2 +- .../5160/ega/640kb/debugger/machine.xml | 2 +- .../pcx86/machine/5160/ega/640kb/machine.xml | 2 +- .../5160/mda/256kb/debugger/machine.xml | 2 +- .../mda/256kb/fake188/debugger/machine.xml | 2 +- .../5160/mda/256kb/fake188/machine.xml | 2 +- .../pcx86/machine/5160/mda/256kb/machine.xml | 2 +- .../machine/5160/mda/64kb/softkbd/machine.xml | 2 +- .../5170/cga/640kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/cga/640kb/rev3/machine.xml | 2 +- .../5170/ega/1152kb/rev1/debugger/machine.xml | 2 +- .../machine/5170/ega/1152kb/rev1/machine.xml | 2 +- .../rev3/debugger/backtrack/machine.xml | 2 +- .../5170/ega/1152kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/ega/1152kb/rev3/machine.xml | 2 +- .../rev3/debugger/backtrack/machine.xml | 2 +- .../5170/ega/2048kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/ega/2048kb/rev3/machine.xml | 2 +- .../5170/ega/640kb/rev1/debugger/machine.xml | 2 +- .../machine/5170/ega/640kb/rev1/machine.xml | 2 +- .../5170/mda/640kb/rev3/debugger/machine.xml | 2 +- .../machine/5170/mda/640kb/rev3/machine.xml | 2 +- .../5170/vga/2048kb/debugger/machine.xml | 2 +- .../pcx86/machine/5170/vga/2048kb/machine.xml | 2 +- .../5170/vga/4096kb/debugger/machine.xml | 2 +- .../pcx86/machine/5170/vga/4096kb/machine.xml | 2 +- .../att/6300/cga/640kb/debugger/machine.xml | 2 +- .../machine/att/6300/cga/640kb/machine.xml | 2 +- .../mpc1600/cga/640kb/debugger/machine.xml | 2 +- .../machine/cdp/mpc1600/cga/640kb/machine.xml | 2 +- .../ega/2048kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/ega/2048kb/machine.xml | 2 +- .../ega/4096kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/ega/4096kb/machine.xml | 2 +- .../2048kb/debugger/backtrack/machine.xml | 2 +- .../other/2048kb/debugger/machine.xml | 2 +- .../vga/2048kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/vga/2048kb/machine.xml | 2 +- .../vga/4096kb/debugger/machine.xml | 2 +- .../compaq/deskpro386/vga/4096kb/machine.xml | 2 +- devices/pcx86/machine/custom/machine.xml | 2 +- .../z150/cga/640kb/debugger/machine.xml | 2 +- .../machine/zenith/z150/cga/640kb/machine.xml | 2 +- .../machine/1120/basic/debugger/machine.xml | 2 +- devices/pdp11/machine/1120/basic/machine.xml | 2 +- .../1120/bootstrap/debugger/machine.xml | 2 +- .../pdp11/machine/1120/bootstrap/machine.xml | 2 +- .../machine/1120/monitor/debugger/machine.xml | 2 +- .../pdp11/machine/1120/monitor/machine.xml | 2 +- .../machine/1170/monitor/debugger/machine.xml | 2 +- .../pdp11/machine/1170/monitor/machine.xml | 2 +- .../machine/1170/panel/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/panel/machine.xml | 2 +- .../machine/1170/vt100/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/vt100/machine.xml | 2 +- .../pcx86/apps/ibm/topview/1.01/manifest.xml | 2 +- disks/pcx86/apps/lotus/123/1.0a/manifest.xml | 2 +- .../apps/micropro/wordstar/3.30/manifest.xml | 2 +- .../apps/micropro/wordstar/4.00/manifest.xml | 2 +- .../apps/microsoft/chart/2.02/manifest.xml | 2 +- .../apps/microsoft/winword/2.0c/manifest.xml | 2 +- .../apps/microsoft/word/3.0/manifest.xml | 2 +- .../apps/microsoft/word/3.1/manifest.xml | 2 +- .../apps/microsoft/word/5.0/manifest.xml | 2 +- .../apps/sunnyhill/omniview/4.30/manifest.xml | 2 +- disks/pcx86/cpm/1.1b/machine.xml | 2 +- disks/pcx86/cpm/1.1b/manifest.xml | 2 +- disks/pcx86/diags/ibm/manifest.xml | 2 +- disks/pcx86/dos/compaq/1.11/manifest.xml | 2 +- disks/pcx86/dos/compaq/1.12/manifest.xml | 2 +- disks/pcx86/dos/compaq/2.12/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.00/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.10/manifest.xml | 2 +- disks/pcx86/dos/compaq/3.31/manifest.xml | 2 +- disks/pcx86/dos/ibm/1.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/1.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/2.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/2.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.20/manifest.xml | 2 +- disks/pcx86/dos/ibm/3.30/manifest.xml | 2 +- disks/pcx86/dos/ibm/4.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/5.00/manifest.xml | 2 +- disks/pcx86/dos/ibm/6.10/manifest.xml | 2 +- disks/pcx86/dos/ibm/6.30/manifest.xml | 2 +- disks/pcx86/dos/ibm/7.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.20/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.21/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.30/manifest.xml | 2 +- disks/pcx86/dos/microsoft/3.31/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.00/manifest.xml | 2 +- .../dos/microsoft/4.01/720K/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.01/manifest.xml | 2 +- disks/pcx86/dos/microsoft/4.0M/manifest.xml | 2 +- disks/pcx86/dos/microsoft/5.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.00/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.20/manifest.xml | 2 +- disks/pcx86/dos/microsoft/6.22/manifest.xml | 2 +- disks/pcx86/empty/manifest.xml | 2 +- disks/pcx86/games/id/wolf3d/manifest.xml | 2 +- disks/pcx86/games/infocom/hhiker/manifest.xml | 2 +- disks/pcx86/games/infocom/machine.xml | 2 +- disks/pcx86/games/infocom/planet/manifest.xml | 2 +- .../games/infocom/zork1/debugger/machine.xml | 2 +- disks/pcx86/games/infocom/zork1/manifest.xml | 2 +- disks/pcx86/games/infocom/zork2/manifest.xml | 2 +- disks/pcx86/games/infocom/zork3/manifest.xml | 2 +- .../games/microsoft/adventure/machine.xml | 2 +- .../games/microsoft/adventure/manifest.xml | 2 +- .../microsoft/flightsim/1982/manifest.xml | 2 +- .../microsoft/flightsim/1984/manifest.xml | 2 +- disks/pcx86/minix/1.1/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.0/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.1/manifest.xml | 2 +- disks/pcx86/os2/ibm/1.3/manifest.xml | 2 +- disks/pcx86/os2/microsoft/1.0/manifest.xml | 2 +- disks/pcx86/os2/misc/manifest.xml | 2 +- .../tools/borland/pascal/3.00b/manifest.xml | 2 +- .../tools/borland/pascal/3.01a/manifest.xml | 2 +- .../pcx86/tools/ibm/bascom/1.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/basic/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/2.03/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/3.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/4.00/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/5.00/manifest.xml | 2 +- .../tools/microsoft/c/5.10-os2/manifest.xml | 2 +- .../pcx86/tools/microsoft/c/5.10/manifest.xml | 2 +- .../tools/microsoft/masm/1.00/manifest.xml | 2 +- .../tools/microsoft/masm/3.00/manifest.xml | 2 +- .../tools/microsoft/masm/3.01/manifest.xml | 2 +- .../tools/microsoft/masm/4.00/manifest.xml | 2 +- .../tools/microsoft/masm/5.00/manifest.xml | 2 +- .../tools/microsoft/masm/5.10/manifest.xml | 2 +- .../tools/microsoft/masm/6.00/manifest.xml | 2 +- .../tools/microsoft/masm/6.11/manifest.xml | 2 +- .../tools/microsoft/mouse/5.00/manifest.xml | 2 +- .../tools/microsoft/os2/sdk/1.02/manifest.xml | 2 +- .../microsoft/windows/sdk/1.01/manifest.xml | 2 +- .../microsoft/windows/sdk/1.03/manifest.xml | 2 +- .../microsoft/windows/sdk/1.04/manifest.xml | 2 +- .../microsoft/windows/sdk/2.03/manifest.xml | 2 +- .../microsoft/windows/sdk/3.00/manifest.xml | 2 +- disks/pcx86/tools/misc/manifest.xml | 2 +- disks/pcx86/unix/ibm/pcix/1.0/manifest.xml | 2 +- .../unix/microport/system-v/2.3/manifest.xml | 2 +- .../unix/sco/xenix/8086/2.1.3/manifest.xml | 2 +- disks/pcx86/windows/1.00/manifest.xml | 2 +- disks/pcx86/windows/1.01/manifest.xml | 2 +- disks/pcx86/windows/1.02/manifest.xml | 2 +- disks/pcx86/windows/1.03/manifest.xml | 2 +- disks/pcx86/windows/1.03a/manifest.xml | 2 +- disks/pcx86/windows/1.03b/manifest.xml | 2 +- disks/pcx86/windows/1.04/manifest.xml | 2 +- disks/pcx86/windows/2.03/manifest.xml | 2 +- disks/pcx86/windows/2.0x/manifest.xml | 2 +- disks/pcx86/windows/2.10/manifest.xml | 2 +- disks/pcx86/windows/2.11/manifest.xml | 2 +- disks/pcx86/windows/3.00/720K/manifest.xml | 2 +- disks/pcx86/windows/3.00/manifest.xml | 2 +- disks/pcx86/windows/3.10/manifest.xml | 2 +- disks/pcx86/windows/3.11/manifest.xml | 2 +- .../pcx86/windows/win95/4.00.499/manifest.xml | 2 +- .../pcx86/windows/win95/4.00.950/manifest.xml | 2 +- disks/pcx86/windows/wincomm/manifest.xml | 2 +- docs/pcx86/examples/components.xsl | 4 +- docs/pcx86/examples/pcx86-dbg.js | 22 +- docs/pcx86/examples/pcx86.js | 18 +- package.json | 2 +- .../demos/machine-debugger.xml | 2 +- .../Graphics_for_the_IBM_PC/demos/machine.xml | 2 +- pubs/pc/programming/manifest.xml | 2 +- .../reference/ibm/5150/techref/manifest.xml | 2 +- .../reference/ibm/5160/techref/manifest.xml | 2 +- pubs/pc/reference/ibm/5170/setup/manifest.xml | 2 +- .../reference/ibm/5170/techref/manifest.xml | 2 +- pubs/pc/reference/ibm/ps2/manifest.xml | 2 +- pubs/pc/reference/ibm/video/ega/manifest.xml | 2 +- pubs/pc/reference/intel/80286/manifest.xml | 2 +- .../software/os2/microsoft/sdk10/manifest.xml | 2 +- pubs/pc/software/windows/sdk200/manifest.xml | 2 +- versions/c1pjs/1.30.3/c1p-dbg.js | 190 +++ versions/c1pjs/1.30.3/c1p.js | 150 ++ versions/c1pjs/1.30.3/common.css | 265 ++++ versions/c1pjs/1.30.3/common.xsl | 56 + versions/c1pjs/1.30.3/components.css | 108 ++ versions/c1pjs/1.30.3/components.xsl | 588 +++++++ versions/c1pjs/1.30.3/document.css | 162 ++ versions/c1pjs/1.30.3/document.xsl | 452 ++++++ versions/c1pjs/1.30.3/machine.xsl | 49 + versions/c1pjs/1.30.3/manifest.xsl | 247 +++ versions/c1pjs/1.30.3/outline.xsl | 47 + versions/pc8080/1.30.3/common.css | 265 ++++ versions/pc8080/1.30.3/common.xsl | 56 + versions/pc8080/1.30.3/components.css | 237 +++ versions/pc8080/1.30.3/components.xsl | 1380 +++++++++++++++++ versions/pc8080/1.30.3/document.css | 162 ++ versions/pc8080/1.30.3/document.xsl | 452 ++++++ versions/pc8080/1.30.3/machine.xsl | 49 + versions/pc8080/1.30.3/manifest.xsl | 247 +++ versions/pc8080/1.30.3/outline.xsl | 47 + versions/pc8080/1.30.3/pc8080-dbg.js | 288 ++++ versions/pc8080/1.30.3/pc8080.js | 202 +++ versions/pcx86/1.30.3/common.css | 265 ++++ versions/pcx86/1.30.3/common.xsl | 56 + versions/pcx86/1.30.3/components.css | 237 +++ versions/pcx86/1.30.3/components.xsl | 1380 +++++++++++++++++ versions/pcx86/1.30.3/document.css | 162 ++ versions/pcx86/1.30.3/document.xsl | 452 ++++++ versions/pcx86/1.30.3/machine.xsl | 49 + versions/pcx86/1.30.3/manifest.xsl | 247 +++ versions/pcx86/1.30.3/outline.xsl | 47 + versions/pcx86/1.30.3/pcx86-dbg.js | 868 +++++++++++ versions/pcx86/1.30.3/pcx86.js | 686 ++++++++ versions/pdpjs/1.30.3/common.css | 265 ++++ versions/pdpjs/1.30.3/common.xsl | 56 + versions/pdpjs/1.30.3/components.css | 237 +++ versions/pdpjs/1.30.3/components.xsl | 1380 +++++++++++++++++ versions/pdpjs/1.30.3/document.css | 162 ++ versions/pdpjs/1.30.3/document.xsl | 452 ++++++ versions/pdpjs/1.30.3/machine.xsl | 49 + versions/pdpjs/1.30.3/manifest.xsl | 247 +++ versions/pdpjs/1.30.3/outline.xsl | 47 + versions/pdpjs/1.30.3/pdp11-dbg.js | 318 ++++ versions/pdpjs/1.30.3/pdp11.js | 242 +++ 268 files changed, 13846 insertions(+), 243 deletions(-) create mode 100644 versions/c1pjs/1.30.3/c1p-dbg.js create mode 100644 versions/c1pjs/1.30.3/c1p.js create mode 100644 versions/c1pjs/1.30.3/common.css create mode 100644 versions/c1pjs/1.30.3/common.xsl create mode 100644 versions/c1pjs/1.30.3/components.css create mode 100644 versions/c1pjs/1.30.3/components.xsl create mode 100644 versions/c1pjs/1.30.3/document.css create mode 100644 versions/c1pjs/1.30.3/document.xsl create mode 100644 versions/c1pjs/1.30.3/machine.xsl create mode 100644 versions/c1pjs/1.30.3/manifest.xsl create mode 100644 versions/c1pjs/1.30.3/outline.xsl create mode 100644 versions/pc8080/1.30.3/common.css create mode 100644 versions/pc8080/1.30.3/common.xsl create mode 100644 versions/pc8080/1.30.3/components.css create mode 100644 versions/pc8080/1.30.3/components.xsl create mode 100644 versions/pc8080/1.30.3/document.css create mode 100644 versions/pc8080/1.30.3/document.xsl create mode 100644 versions/pc8080/1.30.3/machine.xsl create mode 100644 versions/pc8080/1.30.3/manifest.xsl create mode 100644 versions/pc8080/1.30.3/outline.xsl create mode 100644 versions/pc8080/1.30.3/pc8080-dbg.js create mode 100644 versions/pc8080/1.30.3/pc8080.js create mode 100644 versions/pcx86/1.30.3/common.css create mode 100644 versions/pcx86/1.30.3/common.xsl create mode 100644 versions/pcx86/1.30.3/components.css create mode 100644 versions/pcx86/1.30.3/components.xsl create mode 100644 versions/pcx86/1.30.3/document.css create mode 100644 versions/pcx86/1.30.3/document.xsl create mode 100644 versions/pcx86/1.30.3/machine.xsl create mode 100644 versions/pcx86/1.30.3/manifest.xsl create mode 100644 versions/pcx86/1.30.3/outline.xsl create mode 100644 versions/pcx86/1.30.3/pcx86-dbg.js create mode 100644 versions/pcx86/1.30.3/pcx86.js create mode 100644 versions/pdpjs/1.30.3/common.css create mode 100644 versions/pdpjs/1.30.3/common.xsl create mode 100644 versions/pdpjs/1.30.3/components.css create mode 100644 versions/pdpjs/1.30.3/components.xsl create mode 100644 versions/pdpjs/1.30.3/document.css create mode 100644 versions/pdpjs/1.30.3/document.xsl create mode 100644 versions/pdpjs/1.30.3/machine.xsl create mode 100644 versions/pdpjs/1.30.3/manifest.xsl create mode 100644 versions/pdpjs/1.30.3/outline.xsl create mode 100644 versions/pdpjs/1.30.3/pdp11-dbg.js create mode 100644 versions/pdpjs/1.30.3/pdp11.js diff --git a/apps/pcx86/1981/visicalc/manifest.xml b/apps/pcx86/1981/visicalc/manifest.xml index 86e6ac5a7..7bd6cdafa 100644 --- a/apps/pcx86/1981/visicalc/manifest.xml +++ b/apps/pcx86/1981/visicalc/manifest.xml @@ -1,5 +1,5 @@ - + VisiCalc diff --git a/apps/pcx86/1982/esuite/manifest.xml b/apps/pcx86/1982/esuite/manifest.xml index af34df5eb..28a9821c7 100644 --- a/apps/pcx86/1982/esuite/manifest.xml +++ b/apps/pcx86/1982/esuite/manifest.xml @@ -1,5 +1,5 @@ - + Executive Suite diff --git a/apps/pcx86/1985/rogue/manifest.xml b/apps/pcx86/1985/rogue/manifest.xml index 76f2f0c67..8b10feb46 100644 --- a/apps/pcx86/1985/rogue/manifest.xml +++ b/apps/pcx86/1985/rogue/manifest.xml @@ -1,5 +1,5 @@ - + Rogue diff --git a/apps/pcx86/1987/thinktank/manifest.xml b/apps/pcx86/1987/thinktank/manifest.xml index d8a6cc128..7cdea2e1b 100644 --- a/apps/pcx86/1987/thinktank/manifest.xml +++ b/apps/pcx86/1987/thinktank/manifest.xml @@ -1,5 +1,5 @@ - + ThinkTank 2.41NP diff --git a/apps/pcx86/1988/moria/manifest.xml b/apps/pcx86/1988/moria/manifest.xml index 1778de5a9..c5ff8ab81 100644 --- a/apps/pcx86/1988/moria/manifest.xml +++ b/apps/pcx86/1988/moria/manifest.xml @@ -1,5 +1,5 @@ - + The Dungeons of Moria 4.872 diff --git a/apps/pcx86/1992/moria/manifest.xml b/apps/pcx86/1992/moria/manifest.xml index efb049fbd..114df8280 100644 --- a/apps/pcx86/1992/moria/manifest.xml +++ b/apps/pcx86/1992/moria/manifest.xml @@ -1,5 +1,5 @@ - + The Dungeons of Moria 5.5 diff --git a/devices/c1p/machine/32kb/machine.xml b/devices/c1p/machine/32kb/machine.xml index a61c40244..91505914c 100644 --- a/devices/c1p/machine/32kb/machine.xml +++ b/devices/c1p/machine/32kb/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (32Kb) with Disk Support diff --git a/devices/c1p/machine/8kb/all/debugger/machine.xml b/devices/c1p/machine/8kb/all/debugger/machine.xml index 9414da362..d7ccf2474 100644 --- a/devices/c1p/machine/8kb/all/debugger/machine.xml +++ b/devices/c1p/machine/8kb/all/debugger/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb, Additional Software) diff --git a/devices/c1p/machine/8kb/all/machine.xml b/devices/c1p/machine/8kb/all/machine.xml index a020b1f50..1febcf6e9 100644 --- a/devices/c1p/machine/8kb/all/machine.xml +++ b/devices/c1p/machine/8kb/all/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb, Additional Software) diff --git a/devices/c1p/machine/8kb/array/machine.xml b/devices/c1p/machine/8kb/array/machine.xml index 87486b45c..6951643f4 100644 --- a/devices/c1p/machine/8kb/array/machine.xml +++ b/devices/c1p/machine/8kb/array/machine.xml @@ -1,5 +1,5 @@ - + Challenger 1P (8Kb) "Server Array" diff --git a/devices/c1p/machine/8kb/large/debugger/machine.xml b/devices/c1p/machine/8kb/large/debugger/machine.xml index 1addf0c3c..6a18698c3 100644 --- a/devices/c1p/machine/8kb/large/debugger/machine.xml +++ b/devices/c1p/machine/8kb/large/debugger/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (8Kb) with Debugger diff --git a/devices/c1p/machine/8kb/large/machine.xml b/devices/c1p/machine/8kb/large/machine.xml index df05f7099..4951bc378 100644 --- a/devices/c1p/machine/8kb/large/machine.xml +++ b/devices/c1p/machine/8kb/large/machine.xml @@ -1,5 +1,5 @@ - + OSI Challenger 1P (circa 1978) diff --git a/devices/c1p/machine/8kb/small/machine.xml b/devices/c1p/machine/8kb/small/machine.xml index e5780f069..9ac1073cf 100644 --- a/devices/c1p/machine/8kb/small/machine.xml +++ b/devices/c1p/machine/8kb/small/machine.xml @@ -1,5 +1,5 @@ - + diff --git a/devices/pc8080/machine/exerciser/machine-8080ex1.xml b/devices/pc8080/machine/exerciser/machine-8080ex1.xml index 0cf4449b0..ec5d981d0 100644 --- a/devices/pc8080/machine/exerciser/machine-8080ex1.xml +++ b/devices/pc8080/machine/exerciser/machine-8080ex1.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Test Machine diff --git a/devices/pc8080/machine/exerciser/machine-8080pre.xml b/devices/pc8080/machine/exerciser/machine-8080pre.xml index d83aa3c41..b5a8b8827 100644 --- a/devices/pc8080/machine/exerciser/machine-8080pre.xml +++ b/devices/pc8080/machine/exerciser/machine-8080pre.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Preliminary Test Machine diff --git a/devices/pc8080/machine/exerciser/machine-cputest.xml b/devices/pc8080/machine/exerciser/machine-cputest.xml index aeeb0ed20..c42032ad3 100644 --- a/devices/pc8080/machine/exerciser/machine-cputest.xml +++ b/devices/pc8080/machine/exerciser/machine-cputest.xml @@ -1,5 +1,5 @@ - + 8080 CPUTEST Machine diff --git a/devices/pc8080/machine/exerciser/machine-test.xml b/devices/pc8080/machine/exerciser/machine-test.xml index 8233bc1ba..6cc506a30 100644 --- a/devices/pc8080/machine/exerciser/machine-test.xml +++ b/devices/pc8080/machine/exerciser/machine-test.xml @@ -1,5 +1,5 @@ - + 8080 "Kelly Smith" Test Machine diff --git a/devices/pc8080/machine/exerciser/machine.xml b/devices/pc8080/machine/exerciser/machine.xml index 0cf4449b0..ec5d981d0 100644 --- a/devices/pc8080/machine/exerciser/machine.xml +++ b/devices/pc8080/machine/exerciser/machine.xml @@ -1,5 +1,5 @@ - + 8080 Exerciser Test Machine diff --git a/devices/pc8080/machine/invaders/debugger/machine.xml b/devices/pc8080/machine/invaders/debugger/machine.xml index 0af0d2943..22a5b486b 100644 --- a/devices/pc8080/machine/invaders/debugger/machine.xml +++ b/devices/pc8080/machine/invaders/debugger/machine.xml @@ -1,5 +1,5 @@ - + Space Invaders diff --git a/devices/pc8080/machine/invaders/machine.xml b/devices/pc8080/machine/invaders/machine.xml index cf6bc99ad..d41b11347 100644 --- a/devices/pc8080/machine/invaders/machine.xml +++ b/devices/pc8080/machine/invaders/machine.xml @@ -1,5 +1,5 @@ - + Space Invaders diff --git a/devices/pc8080/machine/vt100/debugger/machine.xml b/devices/pc8080/machine/vt100/debugger/machine.xml index e4eced698..7b9d4b7a9 100644 --- a/devices/pc8080/machine/vt100/debugger/machine.xml +++ b/devices/pc8080/machine/vt100/debugger/machine.xml @@ -1,5 +1,5 @@ - + VT100 Terminal diff --git a/devices/pc8080/machine/vt100/machine.xml b/devices/pc8080/machine/vt100/machine.xml index ef193a82f..20dd86b89 100644 --- a/devices/pc8080/machine/vt100/machine.xml +++ b/devices/pc8080/machine/vt100/machine.xml @@ -1,5 +1,5 @@ - + VT100 Terminal diff --git a/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml b/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml index a513d8dd8..76d8c2bb8 100644 --- a/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/cga/384kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 384K diff --git a/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml b/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml index 271e84b81..971fa8684 100644 --- a/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/donkey/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml b/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml index 11d9bf26f..e61d767ee 100644 --- a/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/donkey/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml b/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml index 7d72fca2f..93ccdafe5 100644 --- a/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/cga/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), CGA, 64K diff --git a/devices/pcx86/machine/5150/dual/64kb/machine.xml b/devices/pcx86/machine/5150/dual/64kb/machine.xml index a9dde4aa1..7893765db 100644 --- a/devices/pcx86/machine/5150/dual/64kb/machine.xml +++ b/devices/pcx86/machine/5150/dual/64kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Dual Displays diff --git a/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml b/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml index bb4b398c2..2cd9b5642 100644 --- a/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/5150/mda/64kb/machine.xml b/devices/pcx86/machine/5150/mda/64kb/machine.xml index de1c5d0f4..26a22bc65 100644 --- a/devices/pcx86/machine/5150/mda/64kb/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml b/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml index 7861f83a3..23d4d6221 100644 --- a/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5150/mda/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150), MDA, 64K diff --git a/devices/pcx86/machine/5160/cga/256kb/array/machine.xml b/devices/pcx86/machine/5160/cga/256kb/array/machine.xml index f2195e9b9..1d6561e36 100644 --- a/devices/pcx86/machine/5160/cga/256kb/array/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/array/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml b/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml index 32ccfaa6d..0bbc76eb6 100644 --- a/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/demo/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml b/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml index 8e10bb0c4..335542f62 100644 --- a/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/demo/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml index c166ffa29..d8144ec44 100644 --- a/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml index 5d602080e..50192c27b 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160) running Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml index bb8b53b58..0db7d1331 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160) running Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml index f114b10de..00d1795ff 100644 --- a/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/256kb/win101/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 256K, Windows 1.01 diff --git a/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml index d3d500053..9633e17b6 100644 --- a/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/512kb/win101/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 512K, WIN101 diff --git a/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml index 36cf7613e..e33a091fa 100644 --- a/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/640kb/machine.xml b/devices/pcx86/machine/5160/cga/640kb/machine.xml index fe743769b..766644c91 100644 --- a/devices/pcx86/machine/5160/cga/640kb/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml b/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml index 8f5c9fc6f..10592c6f9 100644 --- a/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/cga/640kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), CGA, 640K, 10Mb Drive diff --git a/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml b/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml index 0187cb1c0..ac2fea212 100644 --- a/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/ega/256kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), 64K EGA, 256K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/256kb/machine.xml b/devices/pcx86/machine/5160/ega/256kb/machine.xml index bd67eb3b1..98fb24626 100644 --- a/devices/pcx86/machine/5160/ega/256kb/machine.xml +++ b/devices/pcx86/machine/5160/ega/256kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), 64K EGA, 256K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/array/machine.xml b/devices/pcx86/machine/5160/ega/640kb/array/machine.xml index d5cf38f2b..11d07e795 100644 --- a/devices/pcx86/machine/5160/ega/640kb/array/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/array/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml b/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml index 86a3c1234..c46df9e56 100644 --- a/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/ega/640kb/machine.xml b/devices/pcx86/machine/5160/ega/640kb/machine.xml index 091001e23..6f1b0c0f0 100644 --- a/devices/pcx86/machine/5160/ega/640kb/machine.xml +++ b/devices/pcx86/machine/5160/ega/640kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT, 128K EGA, 640K RAM, 10Mb Hard Disk diff --git a/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml b/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml index 9b09d6251..baa27635f 100644 --- a/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml b/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml index cb23a391e..0e7178681 100644 --- a/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/fake188/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml b/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml index 623d362a3..43371abd4 100644 --- a/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/fake188/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/256kb/machine.xml b/devices/pcx86/machine/5160/mda/256kb/machine.xml index 21a3a9b52..6220ea281 100644 --- a/devices/pcx86/machine/5160/mda/256kb/machine.xml +++ b/devices/pcx86/machine/5160/mda/256kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 256Kb, 10Mb Drive diff --git a/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml b/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml index 92d843d0b..cdf795a34 100644 --- a/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml +++ b/devices/pcx86/machine/5160/mda/64kb/softkbd/machine.xml @@ -1,5 +1,5 @@ - + IBM PC XT (Model 5160), MDA, 64K, 10Mb Drive diff --git a/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml index b1729bf5d..c4cb41612 100644 --- a/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/cga/640kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Color Display diff --git a/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml b/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml index 4ae41cfc6..fe9b6ce11 100644 --- a/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/cga/640kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Color Display diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml index b9bf5c524..2deebc6c6 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev1/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (6Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml index ffc6b7230..5309fb8ec 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev1/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (6Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml index 574d3f918..722fa9397 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml index 988358982..3afc0081c 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml b/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml index b33c9718c..b185f7204 100644 --- a/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/ega/1152kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 1152Kb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml index 551513fd8..91139689a 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml index 0a5ece4f7..0db6fa8b6 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml b/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml index e2b39d0f6..c31c82863 100644 --- a/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/ega/2048kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), 128Kb EGA, 2Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml b/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml index b5b160a44..04b00ae68 100644 --- a/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml +++ b/devices/pcx86/machine/5170/ega/640kb/rev1/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT, 128K EGA, 640Kb RAM diff --git a/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml b/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml index 3c2d1d5bc..d882b05d5 100644 --- a/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml +++ b/devices/pcx86/machine/5170/ega/640kb/rev1/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT, 128K EGA, 640Kb RAM diff --git a/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml b/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml index a4aabd216..142793f7f 100644 --- a/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml +++ b/devices/pcx86/machine/5170/mda/640kb/rev3/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Monochrome Display diff --git a/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml b/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml index dbe2abc90..170301aca 100644 --- a/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml +++ b/devices/pcx86/machine/5170/mda/640kb/rev3/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 640Kb, Dual Floppy) with Monochrome Display diff --git a/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml b/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml index ef9fecd3d..68eeb506a 100644 --- a/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/5170/vga/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 2Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/2048kb/machine.xml b/devices/pcx86/machine/5170/vga/2048kb/machine.xml index fd64baa58..272b6fbc0 100644 --- a/devices/pcx86/machine/5170/vga/2048kb/machine.xml +++ b/devices/pcx86/machine/5170/vga/2048kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 2Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml b/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml index 25ec36c34..2c5ed000f 100644 --- a/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/5170/vga/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz, 4Mb, 20Mb Hard Disk) with VGA Display diff --git a/devices/pcx86/machine/5170/vga/4096kb/machine.xml b/devices/pcx86/machine/5170/vga/4096kb/machine.xml index 1b4a36d23..ab30b1277 100644 --- a/devices/pcx86/machine/5170/vga/4096kb/machine.xml +++ b/devices/pcx86/machine/5170/vga/4096kb/machine.xml @@ -1,5 +1,5 @@ - + IBM PC AT (8Mhz), VGA, 4Mb RAM, 20Mb Hard Disk diff --git a/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml index a6f096093..e12cd02b6 100644 --- a/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/att/6300/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + AT&T Personal Computer 6300 with Color Display diff --git a/devices/pcx86/machine/att/6300/cga/640kb/machine.xml b/devices/pcx86/machine/att/6300/cga/640kb/machine.xml index 8a2f8648a..e596202a8 100644 --- a/devices/pcx86/machine/att/6300/cga/640kb/machine.xml +++ b/devices/pcx86/machine/att/6300/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + AT&T Personal Computer 6300 with Color Display diff --git a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml index 3467ae53b..f744be8dd 100644 --- a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + Columbia Data Products MPC 1600 with Color Display diff --git a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml index 8387891fd..94ef148ab 100644 --- a/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml +++ b/devices/pcx86/machine/cdp/mpc1600/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + Columbia Data Products MPC 1600 with Color Display diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml index d82a2792a..0ee1f29b4 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml index 5fb503da5..4ab5cfde0 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/2048kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml index 28293dd53..4d0962aaf 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml index 41e0fb336..57e8aa0b1 100644 --- a/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/ega/4096kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, 128Kb EGA diff --git a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml index 7be0007a7..7946d9543 100644 --- a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/backtrack/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, COMPAQ VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml index 2951ed5ec..ddab336de 100644 --- a/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/other/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, COMPAQ VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml index 9c4b42c4b..b597ffee5 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml index a3468791d..340246e06 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 2Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml index 44dd9e16d..7a57cbab3 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml index c4670fe2b..739de29be 100644 --- a/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml +++ b/devices/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml @@ -1,5 +1,5 @@ - + COMPAQ DeskPro 386, 4Mb RAM, IBM VGA, 20Mb Hard Disk diff --git a/devices/pcx86/machine/custom/machine.xml b/devices/pcx86/machine/custom/machine.xml index 672b6c54d..0fc9f1de8 100644 --- a/devices/pcx86/machine/custom/machine.xml +++ b/devices/pcx86/machine/custom/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) with Monochrome Display diff --git a/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml b/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml index 353eeaf6d..2760aa68b 100644 --- a/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml +++ b/devices/pcx86/machine/zenith/z150/cga/640kb/debugger/machine.xml @@ -1,5 +1,5 @@ - + Zenith Z-150 with Color Display diff --git a/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml b/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml index 4f8afd74d..4ba9623ef 100644 --- a/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml +++ b/devices/pcx86/machine/zenith/z150/cga/640kb/machine.xml @@ -1,5 +1,5 @@ - + Zenith Z-150 with Color Display diff --git a/devices/pdp11/machine/1120/basic/debugger/machine.xml b/devices/pdp11/machine/1120/basic/debugger/machine.xml index 0a7675b87..2c2d29d53 100644 --- a/devices/pdp11/machine/1120/basic/debugger/machine.xml +++ b/devices/pdp11/machine/1120/basic/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20: 16Kb, PDP-11 BASIC, Debugger diff --git a/devices/pdp11/machine/1120/basic/machine.xml b/devices/pdp11/machine/1120/basic/machine.xml index e6b3af6f8..2d989db83 100644 --- a/devices/pdp11/machine/1120/basic/machine.xml +++ b/devices/pdp11/machine/1120/basic/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20: 16Kb, PDP-11 BASIC diff --git a/devices/pdp11/machine/1120/bootstrap/debugger/machine.xml b/devices/pdp11/machine/1120/bootstrap/debugger/machine.xml index 1b21e929a..af1748920 100644 --- a/devices/pdp11/machine/1120/bootstrap/debugger/machine.xml +++ b/devices/pdp11/machine/1120/bootstrap/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20: 16Kb, Bootstrap Loader, Debugger diff --git a/devices/pdp11/machine/1120/bootstrap/machine.xml b/devices/pdp11/machine/1120/bootstrap/machine.xml index 42191ab95..4b0dea0ba 100644 --- a/devices/pdp11/machine/1120/bootstrap/machine.xml +++ b/devices/pdp11/machine/1120/bootstrap/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20: 16Kb, Bootstrap Loader diff --git a/devices/pdp11/machine/1120/monitor/debugger/machine.xml b/devices/pdp11/machine/1120/monitor/debugger/machine.xml index 57fb4c4c5..1e46df5a9 100644 --- a/devices/pdp11/machine/1120/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1120/monitor/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20 Boot Monitor with 56Kb and Debugger diff --git a/devices/pdp11/machine/1120/monitor/machine.xml b/devices/pdp11/machine/1120/monitor/machine.xml index 3d9507d3e..878ba43ba 100644 --- a/devices/pdp11/machine/1120/monitor/machine.xml +++ b/devices/pdp11/machine/1120/monitor/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/20 Boot Monitor with 56Kb diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index d6b10230a..b76e6522a 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Boot Monitor with Debugger diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index b8773cd16..899d360cc 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 Boot Monitor diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 674d438c7..52716d8e7 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 with Front Panel and Debugger diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index e770a5112..778713152 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 with Front Panel diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index fef987ce4..7ae1f88e8 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 with Front Panel diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 6283cd2e5..2ac6456a4 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -1,5 +1,5 @@ - + PDP-11/70 with Front Panel diff --git a/disks/pcx86/apps/ibm/topview/1.01/manifest.xml b/disks/pcx86/apps/ibm/topview/1.01/manifest.xml index eac745c0a..bfff8f75a 100644 --- a/disks/pcx86/apps/ibm/topview/1.01/manifest.xml +++ b/disks/pcx86/apps/ibm/topview/1.01/manifest.xml @@ -1,5 +1,5 @@ - + TopView 1.01 diff --git a/disks/pcx86/apps/lotus/123/1.0a/manifest.xml b/disks/pcx86/apps/lotus/123/1.0a/manifest.xml index d6b0e8836..e0700daca 100644 --- a/disks/pcx86/apps/lotus/123/1.0a/manifest.xml +++ b/disks/pcx86/apps/lotus/123/1.0a/manifest.xml @@ -1,5 +1,5 @@ - + 1-2-3 1.0a diff --git a/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml b/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml index a1fa985ac..7cd09421d 100644 --- a/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml +++ b/disks/pcx86/apps/micropro/wordstar/3.30/manifest.xml @@ -1,5 +1,5 @@ - + WordStar 3.30 diff --git a/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml b/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml index 08ea0dd68..0b0d17eff 100644 --- a/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml +++ b/disks/pcx86/apps/micropro/wordstar/4.00/manifest.xml @@ -1,5 +1,5 @@ - + WordStar 4.00 diff --git a/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml b/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml index e7de90493..78ef1ab63 100644 --- a/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml +++ b/disks/pcx86/apps/microsoft/chart/2.02/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Chart 2.02 diff --git a/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml b/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml index 9ebcccec8..3097e50cc 100644 --- a/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml +++ b/disks/pcx86/apps/microsoft/winword/2.0c/manifest.xml @@ -1,5 +1,5 @@ - + Word for Windows 2.0c diff --git a/disks/pcx86/apps/microsoft/word/3.0/manifest.xml b/disks/pcx86/apps/microsoft/word/3.0/manifest.xml index e6df79909..f1e3428cb 100644 --- a/disks/pcx86/apps/microsoft/word/3.0/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/3.0/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 3.0 diff --git a/disks/pcx86/apps/microsoft/word/3.1/manifest.xml b/disks/pcx86/apps/microsoft/word/3.1/manifest.xml index 7e4681732..362c62623 100644 --- a/disks/pcx86/apps/microsoft/word/3.1/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/3.1/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 3.1 diff --git a/disks/pcx86/apps/microsoft/word/5.0/manifest.xml b/disks/pcx86/apps/microsoft/word/5.0/manifest.xml index 2d0e3396b..fceee04f6 100644 --- a/disks/pcx86/apps/microsoft/word/5.0/manifest.xml +++ b/disks/pcx86/apps/microsoft/word/5.0/manifest.xml @@ -1,5 +1,5 @@ - + MS Word 5.0 diff --git a/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml b/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml index 3cc119d79..286cd193c 100644 --- a/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml +++ b/disks/pcx86/apps/sunnyhill/omniview/4.30/manifest.xml @@ -1,5 +1,5 @@ - + Omniview 386 4.30 diff --git a/disks/pcx86/cpm/1.1b/machine.xml b/disks/pcx86/cpm/1.1b/machine.xml index febc5d338..c1068d4cf 100644 --- a/disks/pcx86/cpm/1.1b/machine.xml +++ b/disks/pcx86/cpm/1.1b/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) running CP/M-86 diff --git a/disks/pcx86/cpm/1.1b/manifest.xml b/disks/pcx86/cpm/1.1b/manifest.xml index b5f75f019..fcbfb501a 100644 --- a/disks/pcx86/cpm/1.1b/manifest.xml +++ b/disks/pcx86/cpm/1.1b/manifest.xml @@ -1,5 +1,5 @@ - + CP/M-86 1.1B diff --git a/disks/pcx86/diags/ibm/manifest.xml b/disks/pcx86/diags/ibm/manifest.xml index 623fd1f1f..13bc72822 100644 --- a/disks/pcx86/diags/ibm/manifest.xml +++ b/disks/pcx86/diags/ibm/manifest.xml @@ -1,5 +1,5 @@ - + IBM PC Diagnostics Diagnostics diff --git a/disks/pcx86/dos/compaq/1.11/manifest.xml b/disks/pcx86/dos/compaq/1.11/manifest.xml index 427b31760..e706efe74 100644 --- a/disks/pcx86/dos/compaq/1.11/manifest.xml +++ b/disks/pcx86/dos/compaq/1.11/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 1.11 diff --git a/disks/pcx86/dos/compaq/1.12/manifest.xml b/disks/pcx86/dos/compaq/1.12/manifest.xml index 696cf9b55..c6a147b17 100644 --- a/disks/pcx86/dos/compaq/1.12/manifest.xml +++ b/disks/pcx86/dos/compaq/1.12/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 1.12 diff --git a/disks/pcx86/dos/compaq/2.12/manifest.xml b/disks/pcx86/dos/compaq/2.12/manifest.xml index cbf986607..8494ea5c4 100644 --- a/disks/pcx86/dos/compaq/2.12/manifest.xml +++ b/disks/pcx86/dos/compaq/2.12/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 2.12 diff --git a/disks/pcx86/dos/compaq/3.00/manifest.xml b/disks/pcx86/dos/compaq/3.00/manifest.xml index 87eb5014f..3c8001f4a 100644 --- a/disks/pcx86/dos/compaq/3.00/manifest.xml +++ b/disks/pcx86/dos/compaq/3.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.00 diff --git a/disks/pcx86/dos/compaq/3.10/manifest.xml b/disks/pcx86/dos/compaq/3.10/manifest.xml index 30da8d891..972b46feb 100644 --- a/disks/pcx86/dos/compaq/3.10/manifest.xml +++ b/disks/pcx86/dos/compaq/3.10/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.10 diff --git a/disks/pcx86/dos/compaq/3.31/manifest.xml b/disks/pcx86/dos/compaq/3.31/manifest.xml index d1b655b54..78e159921 100644 --- a/disks/pcx86/dos/compaq/3.31/manifest.xml +++ b/disks/pcx86/dos/compaq/3.31/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.31 diff --git a/disks/pcx86/dos/ibm/1.00/manifest.xml b/disks/pcx86/dos/ibm/1.00/manifest.xml index 811ae8867..91b6d647b 100644 --- a/disks/pcx86/dos/ibm/1.00/manifest.xml +++ b/disks/pcx86/dos/ibm/1.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 1.00 diff --git a/disks/pcx86/dos/ibm/1.10/manifest.xml b/disks/pcx86/dos/ibm/1.10/manifest.xml index 2363193e8..3e11ea692 100644 --- a/disks/pcx86/dos/ibm/1.10/manifest.xml +++ b/disks/pcx86/dos/ibm/1.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 1.10 diff --git a/disks/pcx86/dos/ibm/2.00/manifest.xml b/disks/pcx86/dos/ibm/2.00/manifest.xml index 1717e6370..c895a001e 100644 --- a/disks/pcx86/dos/ibm/2.00/manifest.xml +++ b/disks/pcx86/dos/ibm/2.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 2.00 diff --git a/disks/pcx86/dos/ibm/2.10/manifest.xml b/disks/pcx86/dos/ibm/2.10/manifest.xml index 521cf1dc6..ede6e0563 100644 --- a/disks/pcx86/dos/ibm/2.10/manifest.xml +++ b/disks/pcx86/dos/ibm/2.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 2.10 diff --git a/disks/pcx86/dos/ibm/3.00/manifest.xml b/disks/pcx86/dos/ibm/3.00/manifest.xml index 6c8b58aaf..ebc37e797 100644 --- a/disks/pcx86/dos/ibm/3.00/manifest.xml +++ b/disks/pcx86/dos/ibm/3.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.00 diff --git a/disks/pcx86/dos/ibm/3.10/manifest.xml b/disks/pcx86/dos/ibm/3.10/manifest.xml index b6bd3d3fc..32e918448 100644 --- a/disks/pcx86/dos/ibm/3.10/manifest.xml +++ b/disks/pcx86/dos/ibm/3.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.10 diff --git a/disks/pcx86/dos/ibm/3.20/manifest.xml b/disks/pcx86/dos/ibm/3.20/manifest.xml index dda75df9d..fa0132efe 100644 --- a/disks/pcx86/dos/ibm/3.20/manifest.xml +++ b/disks/pcx86/dos/ibm/3.20/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.20 diff --git a/disks/pcx86/dos/ibm/3.30/manifest.xml b/disks/pcx86/dos/ibm/3.30/manifest.xml index cbdea0759..fb83f9ed0 100644 --- a/disks/pcx86/dos/ibm/3.30/manifest.xml +++ b/disks/pcx86/dos/ibm/3.30/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 3.30 diff --git a/disks/pcx86/dos/ibm/4.00/manifest.xml b/disks/pcx86/dos/ibm/4.00/manifest.xml index 87d6dd96c..7a6550ecf 100644 --- a/disks/pcx86/dos/ibm/4.00/manifest.xml +++ b/disks/pcx86/dos/ibm/4.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 4.00 diff --git a/disks/pcx86/dos/ibm/5.00/manifest.xml b/disks/pcx86/dos/ibm/5.00/manifest.xml index e189a2cdb..b43584abd 100644 --- a/disks/pcx86/dos/ibm/5.00/manifest.xml +++ b/disks/pcx86/dos/ibm/5.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 5.00 diff --git a/disks/pcx86/dos/ibm/6.10/manifest.xml b/disks/pcx86/dos/ibm/6.10/manifest.xml index 5f0580449..2c610e591 100644 --- a/disks/pcx86/dos/ibm/6.10/manifest.xml +++ b/disks/pcx86/dos/ibm/6.10/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 6.10 diff --git a/disks/pcx86/dos/ibm/6.30/manifest.xml b/disks/pcx86/dos/ibm/6.30/manifest.xml index a0e0f169f..495f80f5b 100644 --- a/disks/pcx86/dos/ibm/6.30/manifest.xml +++ b/disks/pcx86/dos/ibm/6.30/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 6.30 diff --git a/disks/pcx86/dos/ibm/7.00/manifest.xml b/disks/pcx86/dos/ibm/7.00/manifest.xml index ab7ef851e..7de8fb099 100644 --- a/disks/pcx86/dos/ibm/7.00/manifest.xml +++ b/disks/pcx86/dos/ibm/7.00/manifest.xml @@ -1,5 +1,5 @@ - + PC-DOS 7.00 diff --git a/disks/pcx86/dos/microsoft/3.20/manifest.xml b/disks/pcx86/dos/microsoft/3.20/manifest.xml index 681c7fc76..69e9c9532 100644 --- a/disks/pcx86/dos/microsoft/3.20/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.20/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.20 diff --git a/disks/pcx86/dos/microsoft/3.21/manifest.xml b/disks/pcx86/dos/microsoft/3.21/manifest.xml index 9597a9f15..60bcff5e4 100644 --- a/disks/pcx86/dos/microsoft/3.21/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.21/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.21 diff --git a/disks/pcx86/dos/microsoft/3.30/manifest.xml b/disks/pcx86/dos/microsoft/3.30/manifest.xml index 9a81740e1..441fd7530 100644 --- a/disks/pcx86/dos/microsoft/3.30/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.30/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.30 diff --git a/disks/pcx86/dos/microsoft/3.31/manifest.xml b/disks/pcx86/dos/microsoft/3.31/manifest.xml index e8c5ba911..348b77e71 100644 --- a/disks/pcx86/dos/microsoft/3.31/manifest.xml +++ b/disks/pcx86/dos/microsoft/3.31/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 3.31 diff --git a/disks/pcx86/dos/microsoft/4.00/manifest.xml b/disks/pcx86/dos/microsoft/4.00/manifest.xml index 1b8d76d34..cf0e1a5f6 100644 --- a/disks/pcx86/dos/microsoft/4.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.00 diff --git a/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml b/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml index f120fcba0..a319d7f4e 100644 --- a/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.01/720K/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.01 diff --git a/disks/pcx86/dos/microsoft/4.01/manifest.xml b/disks/pcx86/dos/microsoft/4.01/manifest.xml index 627e26e32..49c0e6f95 100644 --- a/disks/pcx86/dos/microsoft/4.01/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.01/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.01 diff --git a/disks/pcx86/dos/microsoft/4.0M/manifest.xml b/disks/pcx86/dos/microsoft/4.0M/manifest.xml index 5f927e13f..7b9c485c2 100644 --- a/disks/pcx86/dos/microsoft/4.0M/manifest.xml +++ b/disks/pcx86/dos/microsoft/4.0M/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 4.0M diff --git a/disks/pcx86/dos/microsoft/5.00/manifest.xml b/disks/pcx86/dos/microsoft/5.00/manifest.xml index 76c909b09..35fdc8839 100644 --- a/disks/pcx86/dos/microsoft/5.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/5.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 5.00 diff --git a/disks/pcx86/dos/microsoft/6.00/manifest.xml b/disks/pcx86/dos/microsoft/6.00/manifest.xml index c10fd4db0..6f275159b 100644 --- a/disks/pcx86/dos/microsoft/6.00/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.00/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.00 diff --git a/disks/pcx86/dos/microsoft/6.20/manifest.xml b/disks/pcx86/dos/microsoft/6.20/manifest.xml index b3643de07..08ede4624 100644 --- a/disks/pcx86/dos/microsoft/6.20/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.20/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.20 diff --git a/disks/pcx86/dos/microsoft/6.22/manifest.xml b/disks/pcx86/dos/microsoft/6.22/manifest.xml index 1e4da86a8..d87c24c7f 100644 --- a/disks/pcx86/dos/microsoft/6.22/manifest.xml +++ b/disks/pcx86/dos/microsoft/6.22/manifest.xml @@ -1,5 +1,5 @@ - + MS-DOS 6.22 diff --git a/disks/pcx86/empty/manifest.xml b/disks/pcx86/empty/manifest.xml index 4ff3ed528..1d2ffd687 100644 --- a/disks/pcx86/empty/manifest.xml +++ b/disks/pcx86/empty/manifest.xml @@ -1,5 +1,5 @@ - + Empty Diskettes diff --git a/disks/pcx86/games/id/wolf3d/manifest.xml b/disks/pcx86/games/id/wolf3d/manifest.xml index 24b1d71ee..e1cb36639 100644 --- a/disks/pcx86/games/id/wolf3d/manifest.xml +++ b/disks/pcx86/games/id/wolf3d/manifest.xml @@ -1,5 +1,5 @@ - + Wolfenstein 3D diff --git a/disks/pcx86/games/infocom/hhiker/manifest.xml b/disks/pcx86/games/infocom/hhiker/manifest.xml index 8e60d1bb0..2da6d9a3f 100644 --- a/disks/pcx86/games/infocom/hhiker/manifest.xml +++ b/disks/pcx86/games/infocom/hhiker/manifest.xml @@ -1,5 +1,5 @@ - + The Hitchhiker's Guide to the Galaxy diff --git a/disks/pcx86/games/infocom/machine.xml b/disks/pcx86/games/infocom/machine.xml index f74b38ab8..66073202b 100644 --- a/disks/pcx86/games/infocom/machine.xml +++ b/disks/pcx86/games/infocom/machine.xml @@ -1,5 +1,5 @@ - + IBM PC Model 5150 (CGA, 64K) diff --git a/disks/pcx86/games/infocom/planet/manifest.xml b/disks/pcx86/games/infocom/planet/manifest.xml index cd849dc1a..3ad400b62 100644 --- a/disks/pcx86/games/infocom/planet/manifest.xml +++ b/disks/pcx86/games/infocom/planet/manifest.xml @@ -1,5 +1,5 @@ - + Planetfall diff --git a/disks/pcx86/games/infocom/zork1/debugger/machine.xml b/disks/pcx86/games/infocom/zork1/debugger/machine.xml index 61b846d92..80a4c019d 100644 --- a/disks/pcx86/games/infocom/zork1/debugger/machine.xml +++ b/disks/pcx86/games/infocom/zork1/debugger/machine.xml @@ -1,5 +1,5 @@ - + Zork I (IBM PC Model 5150) diff --git a/disks/pcx86/games/infocom/zork1/manifest.xml b/disks/pcx86/games/infocom/zork1/manifest.xml index 4ac88510c..80629fe3a 100644 --- a/disks/pcx86/games/infocom/zork1/manifest.xml +++ b/disks/pcx86/games/infocom/zork1/manifest.xml @@ -1,5 +1,5 @@ - + Zork I diff --git a/disks/pcx86/games/infocom/zork2/manifest.xml b/disks/pcx86/games/infocom/zork2/manifest.xml index fbb0f186b..9bc12ee58 100644 --- a/disks/pcx86/games/infocom/zork2/manifest.xml +++ b/disks/pcx86/games/infocom/zork2/manifest.xml @@ -1,5 +1,5 @@ - + Zork II diff --git a/disks/pcx86/games/infocom/zork3/manifest.xml b/disks/pcx86/games/infocom/zork3/manifest.xml index 4a3f27343..29098bcf9 100644 --- a/disks/pcx86/games/infocom/zork3/manifest.xml +++ b/disks/pcx86/games/infocom/zork3/manifest.xml @@ -1,5 +1,5 @@ - + Zork III diff --git a/disks/pcx86/games/microsoft/adventure/machine.xml b/disks/pcx86/games/microsoft/adventure/machine.xml index 9cd1ea972..f347c45be 100644 --- a/disks/pcx86/games/microsoft/adventure/machine.xml +++ b/disks/pcx86/games/microsoft/adventure/machine.xml @@ -1,5 +1,5 @@ - + IBM PC (Model 5150) running Microsoft Adventure diff --git a/disks/pcx86/games/microsoft/adventure/manifest.xml b/disks/pcx86/games/microsoft/adventure/manifest.xml index c26f1e6c1..1003a9eff 100644 --- a/disks/pcx86/games/microsoft/adventure/manifest.xml +++ b/disks/pcx86/games/microsoft/adventure/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Adventure 1.00 diff --git a/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml b/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml index 13f36d2da..83c1fb12b 100644 --- a/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml +++ b/disks/pcx86/games/microsoft/flightsim/1982/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Flight Simulator diff --git a/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml b/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml index 205c3169d..a5c887daf 100644 --- a/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml +++ b/disks/pcx86/games/microsoft/flightsim/1984/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Flight Simulator diff --git a/disks/pcx86/minix/1.1/manifest.xml b/disks/pcx86/minix/1.1/manifest.xml index 07eae014f..f4cc3cd13 100644 --- a/disks/pcx86/minix/1.1/manifest.xml +++ b/disks/pcx86/minix/1.1/manifest.xml @@ -1,5 +1,5 @@ - + MINIX 1.1 diff --git a/disks/pcx86/os2/ibm/1.0/manifest.xml b/disks/pcx86/os2/ibm/1.0/manifest.xml index 434f33d86..263f58a18 100644 --- a/disks/pcx86/os2/ibm/1.0/manifest.xml +++ b/disks/pcx86/os2/ibm/1.0/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.0 diff --git a/disks/pcx86/os2/ibm/1.1/manifest.xml b/disks/pcx86/os2/ibm/1.1/manifest.xml index d4f6c2ae1..4443e353b 100644 --- a/disks/pcx86/os2/ibm/1.1/manifest.xml +++ b/disks/pcx86/os2/ibm/1.1/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.1 diff --git a/disks/pcx86/os2/ibm/1.3/manifest.xml b/disks/pcx86/os2/ibm/1.3/manifest.xml index d83fb96a5..5ff32e53c 100644 --- a/disks/pcx86/os2/ibm/1.3/manifest.xml +++ b/disks/pcx86/os2/ibm/1.3/manifest.xml @@ -1,5 +1,5 @@ - + IBM OS/2 1.3 diff --git a/disks/pcx86/os2/microsoft/1.0/manifest.xml b/disks/pcx86/os2/microsoft/1.0/manifest.xml index bd8fe7b13..50cf581c8 100644 --- a/disks/pcx86/os2/microsoft/1.0/manifest.xml +++ b/disks/pcx86/os2/microsoft/1.0/manifest.xml @@ -1,5 +1,5 @@ - + MS OS/2 1.0 diff --git a/disks/pcx86/os2/misc/manifest.xml b/disks/pcx86/os2/misc/manifest.xml index 7caa23f22..fc94196a9 100644 --- a/disks/pcx86/os2/misc/manifest.xml +++ b/disks/pcx86/os2/misc/manifest.xml @@ -1,5 +1,5 @@ - + OS/2 Prototype Disks diff --git a/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml b/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml index eb8a036b1..860f547bf 100644 --- a/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml +++ b/disks/pcx86/tools/borland/pascal/3.00b/manifest.xml @@ -1,5 +1,5 @@ - + Borland Turbo Pascal diff --git a/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml b/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml index 2c40a76fd..2aa272c6a 100644 --- a/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml +++ b/disks/pcx86/tools/borland/pascal/3.01a/manifest.xml @@ -1,5 +1,5 @@ - + Borland Turbo Pascal diff --git a/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml b/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml index 99b468c08..3db99829f 100644 --- a/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml +++ b/disks/pcx86/tools/ibm/bascom/1.00/manifest.xml @@ -1,5 +1,5 @@ - + IBM BASIC Compiler 1.00 diff --git a/disks/pcx86/tools/microsoft/basic/manifest.xml b/disks/pcx86/tools/microsoft/basic/manifest.xml index 75767fab2..e1402aa32 100644 --- a/disks/pcx86/tools/microsoft/basic/manifest.xml +++ b/disks/pcx86/tools/microsoft/basic/manifest.xml @@ -1,5 +1,5 @@ - + MS BASIC diff --git a/disks/pcx86/tools/microsoft/c/2.03/manifest.xml b/disks/pcx86/tools/microsoft/c/2.03/manifest.xml index 1a2c3dabc..c20ec52df 100644 --- a/disks/pcx86/tools/microsoft/c/2.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 2.03 diff --git a/disks/pcx86/tools/microsoft/c/3.00/manifest.xml b/disks/pcx86/tools/microsoft/c/3.00/manifest.xml index e742258fa..da0a2c8f1 100644 --- a/disks/pcx86/tools/microsoft/c/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 3.00 diff --git a/disks/pcx86/tools/microsoft/c/4.00/manifest.xml b/disks/pcx86/tools/microsoft/c/4.00/manifest.xml index e7d1d6baa..69e5e95ff 100644 --- a/disks/pcx86/tools/microsoft/c/4.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/4.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 4.00 diff --git a/disks/pcx86/tools/microsoft/c/5.00/manifest.xml b/disks/pcx86/tools/microsoft/c/5.00/manifest.xml index 322dc4ebb..0b2b85a2a 100644 --- a/disks/pcx86/tools/microsoft/c/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.00 diff --git a/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml b/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml index 1fb361bdf..d66191e7b 100644 --- a/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.10-os2/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.10-OS2 diff --git a/disks/pcx86/tools/microsoft/c/5.10/manifest.xml b/disks/pcx86/tools/microsoft/c/5.10/manifest.xml index 235cbd18e..452b8b07f 100644 --- a/disks/pcx86/tools/microsoft/c/5.10/manifest.xml +++ b/disks/pcx86/tools/microsoft/c/5.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft C Compiler 5.10 diff --git a/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml index 69c9fa5f8..8d7beabfe 100644 --- a/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/1.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 1.00 diff --git a/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml index 6b9cd622f..e08d9c169 100644 --- a/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 3.00 diff --git a/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml b/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml index dddca8973..3b533a14a 100644 --- a/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/3.01/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 3.01 diff --git a/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml index f443afa6d..e0dd2859f 100644 --- a/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/4.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 4.00 diff --git a/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml index ed6c8da64..7009047ec 100644 --- a/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/5.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 5.00 diff --git a/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml b/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml index 5cecdf83b..9d7078900 100644 --- a/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/5.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 5.10 diff --git a/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml b/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml index a5197b13d..83fe267e1 100644 --- a/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/6.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 6.00 diff --git a/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml b/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml index 119311895..9debcd9cc 100644 --- a/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml +++ b/disks/pcx86/tools/microsoft/masm/6.11/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Macro Assembler 6.11 diff --git a/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml b/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml index 97125c917..7597635a6 100644 --- a/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/mouse/5.00/manifest.xml @@ -1,5 +1,5 @@ - + MS Mouse 5.00 diff --git a/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml b/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml index 56a3824c2..3465cb82a 100644 --- a/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml +++ b/disks/pcx86/tools/microsoft/os2/sdk/1.02/manifest.xml @@ -1,5 +1,5 @@ - + MS OS/2 SDK 1.02 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml index 3212bf900..5118b3b25 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.01/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.01 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml index 282d11757..a4ec53df4 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.03/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.03 diff --git a/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml index a1f4effbb..f1330803b 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/1.04/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 1.04 os2museum.com diff --git a/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml index 50fb61ba0..c69b8e979 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 2.03 os2museum.com diff --git a/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml b/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml index e51fd7966..ec720e515 100644 --- a/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml +++ b/disks/pcx86/tools/microsoft/windows/sdk/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Windows SDK 3.00 diff --git a/disks/pcx86/tools/misc/manifest.xml b/disks/pcx86/tools/misc/manifest.xml index b8ea74941..1a2f50153 100644 --- a/disks/pcx86/tools/misc/manifest.xml +++ b/disks/pcx86/tools/misc/manifest.xml @@ -1,5 +1,5 @@ - + Enhanced DEBUG PC DOS Retro: Enhanced DEBUG for PC DOS and MS-DOS diff --git a/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml b/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml index 402e213d7..5d68820e5 100644 --- a/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml +++ b/disks/pcx86/unix/ibm/pcix/1.0/manifest.xml @@ -1,5 +1,5 @@ - + PC/IX 1.0 diff --git a/disks/pcx86/unix/microport/system-v/2.3/manifest.xml b/disks/pcx86/unix/microport/system-v/2.3/manifest.xml index 313d232d5..dcf7cb6cb 100644 --- a/disks/pcx86/unix/microport/system-v/2.3/manifest.xml +++ b/disks/pcx86/unix/microport/system-v/2.3/manifest.xml @@ -1,5 +1,5 @@ - + Microport's AT&T UNIX System V-AT 2.3 (5¨) diff --git a/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml b/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml index 2e40f2628..e6050e1c2 100644 --- a/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml +++ b/disks/pcx86/unix/sco/xenix/8086/2.1.3/manifest.xml @@ -1,5 +1,5 @@ - + SCO Xenix 8086 Operating System v2.1.3 diff --git a/disks/pcx86/windows/1.00/manifest.xml b/disks/pcx86/windows/1.00/manifest.xml index 9945c5072..a25232f0f 100644 --- a/disks/pcx86/windows/1.00/manifest.xml +++ b/disks/pcx86/windows/1.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.00 diff --git a/disks/pcx86/windows/1.01/manifest.xml b/disks/pcx86/windows/1.01/manifest.xml index 214990cfb..7f4d3b7ff 100644 --- a/disks/pcx86/windows/1.01/manifest.xml +++ b/disks/pcx86/windows/1.01/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.01 diff --git a/disks/pcx86/windows/1.02/manifest.xml b/disks/pcx86/windows/1.02/manifest.xml index 08cd067b8..f2860b7ac 100644 --- a/disks/pcx86/windows/1.02/manifest.xml +++ b/disks/pcx86/windows/1.02/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.02 diff --git a/disks/pcx86/windows/1.03/manifest.xml b/disks/pcx86/windows/1.03/manifest.xml index 957bc44d5..9bc80761f 100644 --- a/disks/pcx86/windows/1.03/manifest.xml +++ b/disks/pcx86/windows/1.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03 diff --git a/disks/pcx86/windows/1.03a/manifest.xml b/disks/pcx86/windows/1.03a/manifest.xml index 081b07f88..ea1916504 100644 --- a/disks/pcx86/windows/1.03a/manifest.xml +++ b/disks/pcx86/windows/1.03a/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03a diff --git a/disks/pcx86/windows/1.03b/manifest.xml b/disks/pcx86/windows/1.03b/manifest.xml index bc3ebc0f2..3f3a1b194 100644 --- a/disks/pcx86/windows/1.03b/manifest.xml +++ b/disks/pcx86/windows/1.03b/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.03b diff --git a/disks/pcx86/windows/1.04/manifest.xml b/disks/pcx86/windows/1.04/manifest.xml index bc40c177a..9ebab28ae 100644 --- a/disks/pcx86/windows/1.04/manifest.xml +++ b/disks/pcx86/windows/1.04/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 1.04 os2museum.com diff --git a/disks/pcx86/windows/2.03/manifest.xml b/disks/pcx86/windows/2.03/manifest.xml index 48974b088..1782073f5 100644 --- a/disks/pcx86/windows/2.03/manifest.xml +++ b/disks/pcx86/windows/2.03/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 2.03 diff --git a/disks/pcx86/windows/2.0x/manifest.xml b/disks/pcx86/windows/2.0x/manifest.xml index ab185bec1..5dffe0515 100644 --- a/disks/pcx86/windows/2.0x/manifest.xml +++ b/disks/pcx86/windows/2.0x/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows/386 2.0x diff --git a/disks/pcx86/windows/2.10/manifest.xml b/disks/pcx86/windows/2.10/manifest.xml index 2069494da..7bb0a9029 100644 --- a/disks/pcx86/windows/2.10/manifest.xml +++ b/disks/pcx86/windows/2.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows/386 2.10 diff --git a/disks/pcx86/windows/2.11/manifest.xml b/disks/pcx86/windows/2.11/manifest.xml index 313a755fc..6443f8322 100644 --- a/disks/pcx86/windows/2.11/manifest.xml +++ b/disks/pcx86/windows/2.11/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 2.11 diff --git a/disks/pcx86/windows/3.00/720K/manifest.xml b/disks/pcx86/windows/3.00/720K/manifest.xml index 471ab5623..ae9a446e4 100644 --- a/disks/pcx86/windows/3.00/720K/manifest.xml +++ b/disks/pcx86/windows/3.00/720K/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.00 diff --git a/disks/pcx86/windows/3.00/manifest.xml b/disks/pcx86/windows/3.00/manifest.xml index e16f11880..9e46144f2 100644 --- a/disks/pcx86/windows/3.00/manifest.xml +++ b/disks/pcx86/windows/3.00/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.00 diff --git a/disks/pcx86/windows/3.10/manifest.xml b/disks/pcx86/windows/3.10/manifest.xml index d3398cccc..8c63f8326 100644 --- a/disks/pcx86/windows/3.10/manifest.xml +++ b/disks/pcx86/windows/3.10/manifest.xml @@ -1,5 +1,5 @@ - + Microsoft Windows 3.10 diff --git a/disks/pcx86/windows/3.11/manifest.xml b/disks/pcx86/windows/3.11/manifest.xml index 3bfafad48..1e02aacd9 100644 --- a/disks/pcx86/windows/3.11/manifest.xml +++ b/disks/pcx86/windows/3.11/manifest.xml @@ -1,5 +1,5 @@ - + Windows for Workgroups 3.11 diff --git a/disks/pcx86/windows/win95/4.00.499/manifest.xml b/disks/pcx86/windows/win95/4.00.499/manifest.xml index 645eaf18b..bdb561c76 100644 --- a/disks/pcx86/windows/win95/4.00.499/manifest.xml +++ b/disks/pcx86/windows/win95/4.00.499/manifest.xml @@ -1,5 +1,5 @@ - + Windows 95 (Build 499) diff --git a/disks/pcx86/windows/win95/4.00.950/manifest.xml b/disks/pcx86/windows/win95/4.00.950/manifest.xml index 8739cc6d9..b1c6c8cc7 100644 --- a/disks/pcx86/windows/win95/4.00.950/manifest.xml +++ b/disks/pcx86/windows/win95/4.00.950/manifest.xml @@ -1,5 +1,5 @@ - + Windows 95 (RTM) 4.00.950 diff --git a/disks/pcx86/windows/wincomm/manifest.xml b/disks/pcx86/windows/wincomm/manifest.xml index 51acdc422..368bf37ff 100644 --- a/disks/pcx86/windows/wincomm/manifest.xml +++ b/disks/pcx86/windows/wincomm/manifest.xml @@ -1,5 +1,5 @@ - + Windows COMM Driver (Source) diff --git a/docs/pcx86/examples/components.xsl b/docs/pcx86/examples/components.xsl index 4946e4a80..4224a3315 100644 --- a/docs/pcx86/examples/components.xsl +++ b/docs/pcx86/examples/components.xsl @@ -14,11 +14,11 @@ pcjs pcx86 PCx86 - 1.30.2 + 1.30.3 www.pcjs.org - + diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 5a7c9859f..cc58c917a 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -824,28 +824,28 @@ g[0]){Lr(a,g[1],!0);break}Mr(a,g);break;case "m":if("mouse"==g[0]){var si=g[1],v null;else if("off"==Ma)vc=!1,Ma=null;else{"keys"==Ma&&(Ma="key");"kbd"==Ma&&(Ma="keyboard");for(uc in Eb)if(Ma==uc){rd=Eb[uc];vc=!!(a.wc&rd);break}if(!rd){a.O("unknown message category: "+Ma);break a}}rd&&("on"==g[2]?(a.wc|=rd,vc=!0):"off"==g[2]&&(a.wc&=~rd,vc=!1))}var qs=0,af="";for(uc in Eb)if(!Ma||Ma==uc){var rs=!!(a.wc&Eb[uc]);if(null===vc||vc==rs)af&&(af+=","),++qs%10||(af+="\n\t"),"key"==uc&&(uc="keys"),af+=uc}void 0===Ma&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off"); a.O((null!==vc?vc?"messages on: ":"messages off: ":"message categories:\n\t")+(af||"none"));yq(a)}break;case "o":var ti=g[1],ss=g[2];if(ti&&"?"!=ti){var ui=rq(a,ti,"port #"),vi=rq(a,ss);void 0!==ui&&void 0!==vi&&(zc(a.ga,ui,1,vi),a.O(v(ui)+": "+u(vi)))}else a.O("output commands:"),a.O("\to [p] [b]\twrite byte [b] to port [p]"),a.O("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){Nr(a,b.substr(5));break}var Tn="pr"==g[0]?1:0,de=1+Tn;if(a.U)a.O("step in progress"); else{var wg,Un=!1,kb=wq(a,M(a.F),a.F.wa.Z);do switch(wg=!1,a.Qa(kb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:fr(a,kb,1);wg=!0;break;case 204:case 206:a.U=de;fr(a,kb,1);break;case 205:case 224:case 225:case 226:a.U=de;fr(a,kb,kb.Rb?4:2);break;case 232:a.U=de;fr(a,kb,kb.Rb?5:3);break;case 154:a.U=de;fr(a,kb,kb.Rb?7:5);break;case 255:var Vn=a.tb(kb)&14591;if(4351==Vn||6399==Vn)a.U=de,yr(a,kb);break;case 243:case 242:fr(a,kb,1);Un=wg=!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:Un&& -(a.U=de,fr(a,kb,1))}while(wg);a.U?(a.Rd(a.B,kb,!0),a.Ne()||(a.X&&a.X.wd(),a.U=0)):Pr(a,Tn?"tr":"t")}break;case "r":if("reset"==b){a.X&&a.X.reset();break}qr(a,g);break;case "t":Pr(a,g[0],g[1]);break;case "u":rr(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Kr(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.30.2 ("+a.F.ja+",RELEASE,NOPREFETCH"+(Ab?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ca());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var bf;void 0!==g[3]&&(bf=+g[3]);switch(g[2]){case "int":a.F.Y.jf= +(a.U=de,fr(a,kb,1))}while(wg);a.U?(a.Rd(a.B,kb,!0),a.Ne()||(a.X&&a.X.wd(),a.U=0)):Pr(a,Tn?"tr":"t")}break;case "r":if("reset"==b){a.X&&a.X.reset();break}qr(a,g);break;case "t":Pr(a,g[0],g[1]);break;case "u":rr(a,g[1],g[2],8);break;case "v":if("var"==g[0]){Kr(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.30.3 ("+a.F.ja+",RELEASE,NOPREFETCH"+(Ab?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ca());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var bf;void 0!==g[3]&&(bf=+g[3]);switch(g[2]){case "int":a.F.Y.jf= bf;break;case "start":a.F.Y.Nf=bf;break;case "stop":a.F.Y.lf=bf;break;default:a.O("unknown cs option");break a}void 0!==bf&&$c(a.F);a.O("checksums "+(a.F.la.Xe?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(dd(a.F,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.F.Y.He.toFixed(2)+"Mhz")+" ("+a.F.Y.Wd+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"), a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){Nr(a,b.substr(1));break}var wi="commands:",xi;for(xi in Dq)wi+="\n"+pa(xi,7)+Dq[xi];ag(a)||(wi+="\nnote: frequency/history disabled if no exec breakpoints");a.O(wi);break;default:a.O("unknown command: "+b),d=!1}}}catch(Wn){a.O("debugger error: "+(Wn.stack||Wn.message)),d=!1}return d}function Aq(a,b,c){b=a.Ng(b,c);for(var d in b)if(!xr(a,b[+d]))return!1;return!0} Xa(function(){for(var a=tb(document,"pcx86","debugger"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;b\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.2","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +function Xr(a,b){var c=new qf(a,"1.30.3","validate");if(c.load()&&Yr(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.Na("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}} +l.dg=function(a){void 0===a&&(a=this.A||(this.aa?1:Tr));if(!this.N){this.N++;var b=!1,c=!1;this.ka=!1;var d=this.ea||new qf(this,"1.30.3");if(-1==a)b=!0;else if(a>Tr){if(d.load(this.aa)){this.X=new qf(this,"1.30.3","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): ("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; -function Zr(a,b){if(Ea("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.ie();b=b.toString();var d={app:"PCx86",ver:"1.30.2"};d.url=a.ua;d.user=c;d.type="bug";d.data=b;Aa("http://www.pcjs.org/api/v1/report",d,!0)}} -function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.2"),g=new qf(a,"1.30.2","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad).*?(<\/xsl:variable>)/,"$1pcx86$2") function ts(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Aa(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);ts(a,b,c)}})}else c(a,null)} function us(a,b,c,d){function e(a){if(void 0===h){var b=g&&tb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);k&&(--fs||Za(!0));k=!1}var g,h,k=!0;fs++;lb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=m:t.appendChild(document.createTextNode(m));n.appendChild(t)}c|| -(c="/versions/pcx86/1.30.2/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!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),--fs||Za(!0)):f("invalid machine element: "+ +(c="/versions/pcx86/1.30.3/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!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),--fs||Za(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gs(b,a,d,!0,e,m):hs(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return k}function vs(a,b,c,d){Za(!1);return us(a,b,c,d)}window.embedPC=vs;window.embedPCx86=vs;window.enableEvents=Za;window.sendEvent=$a; function ws(a,b,c,d){if(!c&&b){d.push(b);a=lb[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Aa(b,null,!0,function(a,b){xs(b,d)}):xs(null,d)}else w("Error ("+c+") requesting "+a)} function xs(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=lb[f],k={},m;for(m in h){var n=h[m],t=ka(m);if("xml"==t){for(t=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=t.exec(h[m]);){var q=d[2];q&&(h[q]||(n=n.replace(d[0],"")))}d=m=ja(m)}else"xsl"==t&&(e=m=ja(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?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, "©"),a=Na(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')+('
\n')+"...\n",a=a+(' +
+ + + + + + + + + + + + + +
+ + + + js + , + + +
+
+ + + + + + + + + + + + + , + + + + + + + + + + + + .machine + . + + + + + + + + + + + + + + border:1px solid black;border-radius:10px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + position:; + position:absolute; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
+ + + + + + +
+ +
+
+ +
+ +
+
+ +
+ + +
[XML]
+ +
+ +
+
+
+
+ + + + + text-align:center; + + + +

+
+ + +
+
+ + + + type:'' + + + binding:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + position:absolute; + float:left; + float:right; + margin:0 auto; + ; + float:left; + + + + + + + + +
+ + + font-size:; + + + + + -label + + + width:; + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + +
+
+ +
+
+ + +
+
+
+ +
+
+ +

+
+ +
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + null + + + + + + ,autoStart: + + + + + + + + + + + + + + + 600 + + + + + keyboard + ,model: + + + + + + + + + + + + + + + false + + + + + serial + ,demo: + + + + + + + + + + + + + + disk + + + + + + + + + + + + + + + 0 + + + + + + + + + + + rom + ,size:,image:'' + + + + + + + + + + + + + + + 0 + + + + + ram + ,size: + + + + + + + + + + + + + + + 600 + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 32 + + + + + + 32 + + + + + + + 0 + + + + + + + 0 + + + + + + + + + + + + + + null + + + + + video + ,model:,screenWidth:,screenHeight:,charCols:,charRows:,charWidth:,charHeight:,charSet:'',screenColor:'',smoothing: + + + + + + + + + + + + + + debugger + + + + + + + + + + + + + + panel + + + + + + + + + + + + + [ + {} + , + ] + + + + computer + ,modules: + + + + + type:'',refID:'',start:,end: + + + diff --git a/versions/c1pjs/1.30.3/document.css b/versions/c1pjs/1.30.3/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/c1pjs/1.30.3/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/c1pjs/1.30.3/document.xsl b/versions/c1pjs/1.30.3/document.xsl new file mode 100644 index 000000000..bd8720c9d --- /dev/null +++ b/versions/c1pjs/1.30.3/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

+
+ + + + + + + +

+
+ +

+
+
+
+ + + + + + +
+
+ + +
+ +   + + +
+
+ +
+
+ + + + + + + + + + + + + + + + +

+
+ + +

+
+ + +

+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + +
+
+ + +
+
+ + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/c1pjs/1.30.3/machine.xsl b/versions/c1pjs/1.30.3/machine.xsl new file mode 100644 index 000000000..93c7bd5a3 --- /dev/null +++ b/versions/c1pjs/1.30.3/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/c1pjs/1.30.3/manifest.xsl b/versions/c1pjs/1.30.3/manifest.xsl new file mode 100644 index 000000000..55c3519f8 --- /dev/null +++ b/versions/c1pjs/1.30.3/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/c1pjs/1.30.3/outline.xsl b/versions/c1pjs/1.30.3/outline.xsl new file mode 100644 index 000000000..4354999ea --- /dev/null +++ b/versions/c1pjs/1.30.3/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.3/common.css b/versions/pc8080/1.30.3/common.css new file mode 100644 index 000000000..6b1c0f887 --- /dev/null +++ b/versions/pc8080/1.30.3/common.css @@ -0,0 +1,265 @@ +@CHARSET "UTF-8"; +/** + @author Jeff Parsons (@jeffpar) + @website http://www.pcjs.org/ + @created 2013-05-05 + @modified 2014-02-23 + @license http://www.gnu.org/licenses/gpl.html + */ +body { + margin: 0; + background: #202020; +} +h1, h2 { + margin-top: 0; + color: #cccccc; +} +h1, h2, h3, h4 { + word-wrap: break-word; +} + +h4 a { + color: #cccccc !important; +} +p { + line-height: 1.5em; +} +img { + max-width: 100%; +} +a img { + vertical-align: bottom; +} +pre, code { + color: #000000; + background-color: #cccccc; + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; +} +pre { + margin: 1em 2em; + padding: 1em; + border-radius: 5px; + overflow: auto; +} +code { + padding: 1px; +} +pre a, code a { + color: #006400 !important; +} +.common { + width: 100%; + margin: 0 auto; + color: #cccccc; +} +.common a { + + color: #7fc07f; + text-decoration: none; +} +.common hr { + border-color: #808080; +} +.common a:hover { + text-decoration: underline; +} +.common, .machine { + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; + font-size: 15px; +} +.machine { + margin: 15px; + overflow: hidden; +} +.c1pjs { + overflow: visible; +} +.machine-placeholder { + text-align: center; + font-weight: bold; +} +.common-top { + background: #202020; + font-size: small; +} +.common-top-left { + float: left; + width: 60%; +} +.common-top-left ul { + line-height: 1.5em; + list-style-type: none; + margin: 0; + padding: 1em 1em 1em 9px; + overflow: hidden; +} +.common-top-left ul li { + display: block; + float: left; +} +.common-top-left ul li a { + border-right: 1px solid #6f6f6f; + padding: 2px 6px 2px 6px; +} +.common-top-left ul li:last-child a { + border-right: none; +} +.common-top-right { + float: right; + width: 40%; +} +.common-top-right p { + float: right; + margin: 0; + padding: 1em; +} +.common-middle { + clear: both; + padding: 1px 1em 1px 1em; + background: #404040; +} +.common-sidebar { + float: left; + font-size: small; + width: 140px; + padding-bottom: 20px; + overflow: hidden; + white-space: nowrap; + word-wrap: break-word; +} +.common-list { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list li { + + padding-bottom: 7px; +} +.common-list-data { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list-data li { + line-height: 1.5em; +} +.common-list-data-items, .common-list-data-subitems { + font-size: x-small; + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} +.common-list-data-items li, .common-list-data-subitems li { + padding-bottom: 0; +} +.common-main { + margin-left: 150px; + +} +.common-main blockquote { + text-align: justify; +} +.common-image-gallery { + margin: 0 auto; + text-align: center; +} +.common-image-gallery:after { + content: ''; + display: block; +} +.common-image-frame { + display: inline-block; + margin: 8px; + text-align: center; +} +.common-image-link { + padding: 5px; + border: 1px solid black; + border-radius: 5px; + background-color: #FAEBD7; +} +.common-image-label { + font-size: x-small; +} +.common-bottom { + clear: both; + padding-top: 1em; +} +.common-bottom:after { + content: ''; + display: block; + clear: both; +} +.common-reference { + float: left; + font-size: x-small; +} +.common-reference a { + text-decoration: none; +} +.common-copyright { + float: right; + font-size: x-small; +} +.common-copyright a { + text-decoration: none; +} +.md-list { +} +.md-list li { + line-height: 1.5em; + margin-bottom: 1em; +} +.md-list li p { + padding-left: 2em; +} +.md-list-compact { +} +.md-list-compact li { + margin-bottom: 0; +} +.md-list-none { + list-style-type: none; + padding-left: 2em; +} +.md-list-none li { + margin-bottom: 0; +} +@media screen and (max-width: 900px) { + + .common-sidebar { + width: 100%; + white-space: normal; + } + .common-list { + padding-left: 0; + } + .common-list-data { + padding-left: 0; + } + .common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li { + width: 130px; + float: left; + overflow: hidden; + vertical-align: top; + padding-right: 1em; + margin-top: 0; + } + .common-list-data-subitems { + display: none; + } + .common-main { + clear: both; + margin-left: 0; + padding-left: 0; + padding-right: 0; + } + .md-list-none { + padding-left: 1em; + } +} diff --git a/versions/pc8080/1.30.3/common.xsl b/versions/pc8080/1.30.3/common.xsl new file mode 100644 index 000000000..166a642a1 --- /dev/null +++ b/versions/pc8080/1.30.3/common.xsl @@ -0,0 +1,56 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +

    Powered by JavaScript, Vanilla JS, and GitHub

    +
    +
    +
    + + +
    +

    + +
    +
    + +
    diff --git a/versions/pc8080/1.30.3/components.css b/versions/pc8080/1.30.3/components.css new file mode 100644 index 000000000..b40fd1375 --- /dev/null +++ b/versions/pc8080/1.30.3/components.css @@ -0,0 +1,237 @@ +@CHARSET "UTF-8"; + + +*:not(input,textarea) { + -webkit-user-select: none; +} +.pcjs-embed { +} +.pcjs-embed:after { + clear:both; +} +.pcjs-machine { +} +.pcjs-name, .pcjs-menu { + clear: both; + font-weight: bold; + padding-bottom: 4px; +} +.pcjs-menu { + float: left; +} +.pcjs-canvas { + width: 100%; + height: auto; +} +.pcjs-container { + color: #000000; + position: relative; +} +.pcjs-label { + font-size: small; + line-height: 20px; + vertical-align: middle; + float: left; + font-family: Monaco, "Lucida Console", monospace; +} +.pcjs-controls textarea { + font-family: Monaco, "Lucida Console", monospace; + font-size: x-small; +} +.pcjs-fieldset { + border: none; + margin: 0; + padding: 0; +} +.pcjs-flag { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 20px; + vertical-align: middle; +} +.pcjs-progress { + height: 20px; + width: 300px; + margin-top: 8px; + border: 1px solid black; + position: relative; +} +.pcjs-progress-bar { + height: 20px; + width: 0%; + background-color: gold; + position: absolute; + top: 0px; +} +.pcjs-progress-text { + height: 20px; + width: 300px; + font-size: small; + line-height: 20px; + text-align: center; + position: absolute; + top: 0px; + z-index: 1; +} +.pcjs-register { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 20px; + vertical-align: middle; + border: 1px solid black; +} +.pcjs-switches { + float: left; +} +.pcjs-bitBucket { + float: left; + width: 19px; + height: 38px; +} +.pcjs-bitCell { + float: left; + width: 19px; + height: 19px; + margin-right: -1px; + margin-bottom: -1px; + border: 1px solid black; + text-align: center; + line-height: 19px; +} +.pcjs-bitCellLeft { + border-left: 1px solid black; +} +.pcjs-bitLabel { + font-size: xx-small; + text-align: center; +} +.pcjs-description, .pcjs-status { + font-size: x-small; + line-height: 2.8em; +} +.pcjs-key { + border: 1px solid black; + font-size: x-small; + text-align: center; + position: absolute; + height: 34px; + line-height: 34px; + background-color: #ffffff; +} +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-triplet { + padding: 1px; +} +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} +.pcjs-ledlbl0 { + text-align: right; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; +} +.pcjs-ledpad { + text-align: center; + font-size: x-small; + line-height: 32px; + background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; +} +.pcjs-led { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + text-align: center; + vertical-align: middle; + background-color: #000000; +} +.pcjs-rled { + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + border-radius: 50%; + text-align: center; + vertical-align: middle; + background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 16px; + background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; +} +.pcjs-screen { + clear: both; + height: auto; + position: relative; + line-height: 0; +} +.pcjs-screen textarea { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + border: 0; + padding: 0; + line-height: 0; +} +.pcjs-reference { + float: left; + font-size: x-small; +} +.pcjs-reference a { + text-decoration: none; +} +.pcjs-copyright { + float: right; + font-size: x-small; +} +.pcjs-copyright a { + text-decoration: none; +} + +@media screen and (max-width: 900px) { + .pcjs-textarea { + width: 100% !important; + } + .pcjs-registers { + width: 100% !important; + } + .pdp11-device { + width: 100% !important; + max-width: none !important; + } +} diff --git a/versions/pc8080/1.30.3/components.xsl b/versions/pc8080/1.30.3/components.xsl new file mode 100644 index 000000000..354930955 --- /dev/null +++ b/versions/pc8080/1.30.3/components.xsl @@ -0,0 +1,1380 @@ + + + +]> + + + + + + + + pc + pcjs + pc8080 + PC8080 + 1.30.3 + www.pcjs.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + clear:both; + position:; + position:relative; + text-align:; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,addrReset:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + device + ,type:'',baudReceive:,baudTransmit:,autoMount:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + + + false + + + + + serial + ,adapter:,baudReceive:,baudTransmit:,binding:'',tabSize:,charBOL:,upperCase: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + rom + ,addr:,size:,alias:,file:'',notify:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + null + + + + + + null + + + + + + true + + + + + ram + ,addr:,size:,file:'',load:,exec:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + +
    diff --git a/versions/pc8080/1.30.3/document.css b/versions/pc8080/1.30.3/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pc8080/1.30.3/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pc8080/1.30.3/document.xsl b/versions/pc8080/1.30.3/document.xsl new file mode 100644 index 000000000..a47da61cb --- /dev/null +++ b/versions/pc8080/1.30.3/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pc8080/1.30.3/machine.xsl b/versions/pc8080/1.30.3/machine.xsl new file mode 100644 index 000000000..4c6e9f420 --- /dev/null +++ b/versions/pc8080/1.30.3/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.3/manifest.xsl b/versions/pc8080/1.30.3/manifest.xsl new file mode 100644 index 000000000..c026a65aa --- /dev/null +++ b/versions/pc8080/1.30.3/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pc8080/1.30.3/outline.xsl b/versions/pc8080/1.30.3/outline.xsl new file mode 100644 index 000000000..f66db7013 --- /dev/null +++ b/versions/pc8080/1.30.3/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pc8080/1.30.3/pc8080-dbg.js b/versions/pc8080/1.30.3/pc8080-dbg.js new file mode 100644 index 000000000..cd461958e --- /dev/null +++ b/versions/pc8080/1.30.3/pc8080-dbg.js @@ -0,0 +1,288 @@ +(function(){/* + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpudef.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 +*/ +var l,m={pe:1,qe:3,re:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Xb:65,Kc:66,Mc:67,$b:68,E:69,Pc:70,Qc:71,Rc:72,Sc:73,Zc:74,$c:75,bc:76,gd:77,hd:78,kd:79,ld:80,Q:81,rd:82,ud:83,Ad:84,Bd:85,Cd:86,Dd:87,Fd:88,Gd:89,Hd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Ye:97,Ze:98,$e:99,d:100,e:101,af:102,bf:103,cf:104,df:105,ef:106,k:107,ff:108, +gf:109,n:110,hf:111,p:112,q:113,r:114,jf:115,t:116,lf:117,mf:118,nf:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; +function aa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function t(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ca(a){return t(a,2,!0)} +function u(a){return t(a,4,!0)}function ea(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function la(a){return a.replace(/[&<>"']/g,function(a){return ka[a]})} +function ma(a,b){return(a+" ").slice(0,b)}function na(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var oa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function pa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function sa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.bb=g.load;d.Ta=g.exec;if(e=g.bytes)d.Aa=e;else if(e=g.words)for(d.Aa=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.Aa=Array(4*e.length),f=c=0;c>8&255,d.Aa[f++]=e[c]>>16&255,d.Aa[f++]=e[c]>>24&255;else d.Aa=g;d.Ea=g.symbols;d.Aa.length?1==d.Aa.length&&(w(d.Aa[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.gb=this.id:(this.hb=this.id.substr(0,b),this.gb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,wb:!1,Nb:!1,xa:!1,error:!1};this.Hb=null;this.C.error=!1;this.N={};this.I=null;this.ta=d||0;Ua.push(this)}var Va=void 0,Wa={}; +if(window){Va||(Va=window.location.search.substr(1));for(var Xa,Ya=/\+/g,$a=/([^&=]+)=?([^&]*)/g;Xa=$a.exec(Va);)Wa[decodeURIComponent(Xa[1].replace(Ya," "))]=decodeURIComponent(Xa[2].replace(Ya," "))}function ab(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function A(a,b){b||(b=z);a.prototype=ab(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var bb=window.PCjs.Machines||(window.PCjs.Machines={}),Ua=window.PCjs.Components||(window.PCjs.Components=[])}else bb={},Ua=[];function cb(a,b,c){bb[a]&&b&&(bb[a][b]=c)}function Qa(a,b,c){b||w((c?c+": ":"")+a)} +function db(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.ia&&(this.ia=10);15>2;this.u=this.Ja-1;this.K=this.L/this.Ja|0;this.H=this.K-1;this.A=[];this.j=[];this.F=this.D=!1;this.O=[];this.P=[];a=new G;xb(a,this.I);this.X=Array(this.K);for(b=0;b>>a.ia;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.G)return h.Cb+=h.G-e,h.G=e,!0;if(e>=h.G+h.Cb){n=h.size-(e-k);n>f&&(n=f);h.Cb=e-h.G+n;e=k+a.Ja;f-=n;g++;continue}}return zb(1,e,f)}e=new G(e,n,a.Ja,d);xb(e,a.I,h);a.X[g++]=e;e=k+a.Ja;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+Ab[d]+" at "+u(b)),!0):zb(2,b,c)} +l.aa=function(a){return this.X[(a&this.w)>>>this.ia].nb(a&this.u,a)};function Bb(a,b){return a.X[(b&a.w)>>>a.ia].Ab(b&a.u,b)}l.cb=function(a){var b=a&this.u,c=(a&this.w)>>>this.ia;return b!=this.u?this.X[c].Dc(b,a):this.X[c++].nb(b,a)|this.X[c&this.H].nb(0,a+1)<<8};function Cb(a,b){var c=b&a.u,d=(b&a.w)>>>a.ia;return c!=a.u?a.X[d].Sb(c,b):a.X[d++].Ab(c,b)|a.X[d&a.H].Ab(0,b+1)<<8}l.va=function(a,b){this.X[(a&this.w)>>>this.ia].pb(a&this.u,b&255,a)}; +function Db(a,b,c){a.X[(b&a.w)>>>a.ia].Db(b&a.u,c&255,b)}l.Lb=function(a,b){var c=a&this.u,d=(a&this.w)>>>this.ia;c!=this.u?this.X[d].Fc(c,b&65535,a):(this.X[d++].pb(c,b&255,a),this.X[d&this.H].pb(0,b>>8&255,a+1))};function Fb(a){for(var b=0,c=[],d=0;d>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,d);a.I&&a.D!=g[1]&&Wb(a.I,b,k)}else a.I&&(hb(a.I,a,b,k,d),a.D&&Wb(a.I,b,k));f+=h<<3;b+=h;e-=h}} +function zb(a,b,c){w("Memory block error ("+a+": "+t(b)+","+t(c)+")");return!1}var Xb;if(qb){var Yb=new ArrayBuffer(2);(new DataView(Yb)).setUint16(0,256,!0);Xb=256===(new Uint16Array(Yb))[0]}else Xb=!1;var Zb=Xb; +function G(a,b,c,d){this.id=$b+=2;this.b=null;this.G=a;this.Cb=b;this.size=c||0;this.type=d||ac;this.N=d==bc;xb(this);this.Pa=this.Ac=!1;if(c)if(qb)this.F=new ArrayBuffer(c),this.D=new DataView(this.F,0,c),this.u=new Uint8Array(this.F,0,c),this.K=new Uint16Array(this.F,0,c>>1),this.b=new Int32Array(this.F,0,c>>2),cc(this,Zb?dc:ec);else{this.b=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},Y:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},fa:function(a){var b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+1]&255)<<8},hb:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<> +2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Pa=!0},O:function(a,b){if(this.I&&null!=this.G){var c=this.I;jc(c,this.G+a,1,c.O)&&c.ra(!0)}return this.Ab(a,b)},ca:function(a,b){if(this.I&&null!=this.G){var c=this.I;jc(c,this.G+a,2,c.O)&&c.ra(!0)}return this.Sb(a,b)},ja:function(a,b,c){if(this.I&&null!=this.G){var d=this.I;jc(d,this.G+a,1,d.D)&&d.ra(!0)}this.N?this.w(a,b,c):this.Db(a,b,c)},ma:function(a,b,c){if(this.I&& +null!=this.G){var d=this.I;jc(d,this.G+a,2,d.D)&&d.ra(!0)}this.N?this.w(a,b,c):this.Wb(a,b,c)},M:function(a){return this.u[a]},P:function(a){return this.u[a]},ba:function(a){return this.D.getUint16(a,!0)},ea:function(a){return a&1?this.u[a]|this.u[a+1]<<8:this.K[a>>1]},ha:function(a,b){this.u[a]=b;this.Pa=!0},gb:function(a,b){this.u[a]=b;this.Pa=!0},la:function(a,b){this.D.setUint16(a,b,!0);this.Pa=!0},na:function(a,b){a&1?(this.u[a]=b,this.u[a+1]=b>>8):this.K[a>>1]=b;this.Pa=!0}}; +function xb(a,b,c){a.I=b;a.A=a.j=0;c&&((a.A=c.A)&&ic(a,hc,!1),(a.j=c.j)&&gc(a,hc,!1))}function kc(a,b){b?--a.j||(a.pb=a.N?a.w:a.Db,a.Fc=a.N?a.H:a.Wb):--a.A||(a.nb=a.Ab,a.Dc=a.Sb)}function gc(a,b,c){c&&a.j||(a.pb=!a.N&&b[1]||a.w,a.Fc=!a.N&&b[3]||a.H);if(c||void 0===c)a.Db=b[1]||a.w,a.Wb=b[3]||a.H}function ic(a,b,c){c&&a.A||(a.nb=b[0]||a.J,a.Dc=b[2]||a.L);if(c||void 0===c)a.Ab=b[0]||a.J,a.Sb=b[2]||a.L}function cc(a,b){b||(b=lc);ic(a,b,void 0);gc(a,b,void 0)} +var lc=[],fc=[G.prototype.Y,G.prototype.hb,G.prototype.fa,G.prototype.wa],hc=[G.prototype.O,G.prototype.ja,G.prototype.ca,G.prototype.ma];if(qb)var ec=[G.prototype.M,G.prototype.ha,G.prototype.ba,G.prototype.la],dc=[G.prototype.P,G.prototype.gb,G.prototype.ea,G.prototype.na]; +function mc(a,b){z.call(this,"CPU",a,mc,1);var c=a.multiplier||1;this.Y=a.cycles||b;this.Sa=c;this.ha=Math.round(this.Y/1E4)/100;this.eb=this.ha*this.Sa;this.C.za=!1;this.C.Vb=!1;this.C.vb=a.autoStart;this.C.yc=!1;this.C.jb=!1;this.xb=this.O=0;this.yb=a.csStart;this.lb=a.csInterval;this.mb=a.csStop;this.w=[];this.Ha=this.fb.bind(this);F(this)}A(mc);var nc=["power","reset"];l=mc.prototype; +l.Ra=function(a,b,c,d){this.A=a;this.u=b;this.I=d;for(b=0;b=a.O&&(a.O+=a.lb,c=!0);0<=a.mb&&a.mb<=Gc(a)&&(a.lb=a.mb=-1,Cc(a),a.ra(),c=!0);c&&a.g(Gc(a)+" cycles: checksum="+t(a.xb))}} +l.qa=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.N[b]=c;a=!0;break;case "run":this.N[b]=c;c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.C.xa)a=!0;else{var b=null,c,h=db(a.id);for(c=0;ca.K/a.eb?b=1:d=!0;a.Sa=b;b=a.ha*a.Sa;if(a.eb!=b){a.eb=b;b=a.eb.toFixed(2)+"Mhz";var e=a.N.setSpeed;e&&(e.textContent=b);a.g("target speed: "+b)}c&&a.A&&a.A.Bb()}Ic(a,a.H);a.H=0;a.D=qa();a.J=0;Jc(a);return d}function Kc(a,b){var c=a.w.length;a.w.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.w[b][0]&&(c*=a.Y*a.Sa/1E3,a.w[b][0]=c+Mc(a))}function Mc(a,b){var c=a.L-=a.b;a.b=0;b&&(a.L=0);return c} +l.fb=function(a){if(kb(this,!0)){if(!this.C.za){Hc(this);this.A&&this.A.start(this.D,Gc(this));this.C.za=!0;this.C.Vb=!0;this.F&&this.F.start();var b=this.N.run;b&&(b.textContent="Halt");this.A&&(this.A.La(!0),a&&this.A.Bb(!0))}this.ja>=this.Y&&Jc(this,!0);this.ba=0;this.ea=qa();this.J&&(a=this.ea-this.J,a>this.wa&&(this.D+=a,this.D>this.ea&&(this.D=this.ea)));try{do{for(var c,d=this.C.jb?1:this.fa,e=this.w.length-1;0<=e;e--){var f=this.w[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.ob(c);c=Mc(this,!0);this.ba+= +c;this.H+=c;Fc(this,c);a=c;for(var g=this.w.length-1;0<=g;g--){var h=this.w[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.P-=c;if(0>=this.P){this.P+=this.fa;15<=++this.Ba&&(this.A&&this.A.La(),this.Ba=0);break}}while(this.C.za)}catch(k){this.ra();Ec(this);this.A&&this.A.stop(qa(),Gc(this));kb(this,!1);nb(this,k.stack||k.message);return}c=setTimeout;d=this.Ha;this.J=qa();e=this.wa;this.ba&&(e=Math.round(e*this.ba/this.fa));e-=this.J-this.ea;if(f=this.J-this.D)this.K=Math.round(this.H/(10*f))/ +100,864E5<=f&&(this.M=0,Hc(this));if(0>e||this.Ke&&(this.D-=e),e=0;this.ja+=this.ba;this.J+=e;c(d,e)}else Ec(this),this.A&&this.A.stop(qa(),Gc(this))};l.ob=function(){return 0};l.ra=function(a){lb(this,!0);Mc(this);Ic(this,this.H);this.H=0;if(this.C.za){this.C.za=!1;this.F&&this.F.stop();var b=this.N.run;b&&(b.textContent="Run")}this.C.complete=a};function Ec(a,b){if(a.A){for(var c=a.A,d=0;d>8&255;a.T=b&255}function Xc(a){return a.U<<8|a.V}function Yc(a,b){a.U=b>>8&255;a.V=b&255}function K(a){return a.W<<8|a.Z} +function Zc(a,b){a.W=b>>8&255;a.Z=b&255}function I(a,b){a.R=b&65535}function $c(a){return a.da&256?1:0}function ad(a,b){a.da=a.da&255|b}function bd(a){return rb[a.ga&255]?4:0}function cd(a){return(a.ga^a.ya)&16?16:0}function dd(a){return a.da&255?0:64}function ed(a){return a.ga&128?128:0}function Uc(a){return a.ua&-214|ed(a)|dd(a)|cd(a)|bd(a)|$c(a)}function Sc(a,b){a.da=a.ga=a.ya=0;b&1&&(a.da|=256);b&4||(a.ga|=1);b&16&&(a.ya|=16);b&64||(a.da|=255);b&128&&(a.ga^=192);a.ua=a.ua&-726|b&512|2} +function fd(a,b){a.ya=a.i^b;return a.ga=(a.da=a.i+b)&255}function gd(a,b){a.ya=a.i^b;return a.ga=(a.da=a.i+b+(a.da&256?1:0))&255}function hd(a,b){a.da=a.ga=a.ya=a.i&b;(a.i|b)&8&&(a.ya^=16);return a.da}function id(a,b){a.ya=b^255;b=a.ga=b+255&255;a.da=a.da&-256|b;return b}function jd(a,b){a.ya=b;b=a.ga=b+1&255;a.da=a.da&-256|b;return b}function Ed(a,b){return a.ga=a.da=a.ya=a.i|b}function L(a,b){b^=255;a.ya=a.i^b;return a.ga=(a.da=a.i+b+1^256)&255} +function Fd(a,b){b^=255;a.ya=a.i^b;return a.ga=(a.da=a.i+b+(a.da&256?0:1)^256)&255}function Gd(a,b){return a.ga=a.da=a.ya=a.i^b}l.aa=function(a){return this.u.aa(a)};l.va=function(a,b){this.u.va(a,b)};function M(a){var b=a.aa(a.R);I(a,a.R+1);return b}function O(a){var b=a.u.cb(a.R);I(a,a.R+2);return b}function P(a){var b=a.u.cb(a.pa);a.pa=a.pa+2&65535;return b}function Q(a,b){a.pa=a.pa-2&65535;a.u.Lb(a.pa,b)} +function Hd(a){if(a.b&&a.j&255&&a.ua&512){for(var b=0;8>b&&!(a.j&1<b?255:1<>8;ad(this,a&256);this.b-=4},Ld,function(){var a;Zc(this,a=K(this)+Vc(this));ad(this,a>>8&256);this.b-=10},function(){this.i=this.aa(Vc(this));this.b-=7},function(){Wc(this,Vc(this)-1);this.b-= +5},function(){this.T=jd(this,this.T);this.b-=5},function(){this.T=id(this,this.T);this.b-=5},function(){this.T=M(this);this.b-=7},function(){var a=this.i<<8&256;this.i=(a|this.i)>>1;ad(this,a);this.b-=4},Ld,function(){Yc(this,O(this));this.b-=10},function(){this.va(Xc(this),this.i);this.b-=7},function(){Yc(this,Xc(this)+1);this.b-=5},function(){this.U=jd(this,this.U);this.b-=5},function(){this.U=id(this,this.U);this.b-=5},function(){this.U=M(this);this.b-=7},function(){var a=this.i<<1;this.i=a&255| +$c(this);ad(this,a&256);this.b-=4},Ld,function(){var a;Zc(this,a=K(this)+Xc(this));ad(this,a>>8&256);this.b-=10},function(){this.i=this.aa(Xc(this));this.b-=7},function(){Yc(this,Xc(this)-1);this.b-=5},function(){this.V=jd(this,this.V);this.b-=5},function(){this.V=id(this,this.V);this.b-=5},function(){this.V=M(this);this.b-=7},function(){var a=this.i<<8;this.i=($c(this)<<8|this.i)>>1;ad(this,a&256);this.b-=4},Ld,function(){Zc(this,O(this));this.b-=10},function(){var a=O(this);this.u.Lb(a,K(this)); +this.b-=16},function(){Zc(this,K(this)+1);this.b-=5},function(){this.W=jd(this,this.W);this.b-=5},function(){this.W=id(this,this.W);this.b-=5},function(){this.W=M(this);this.b-=7},function(){var a=0,b=$c(this);if(cd(this)||9<(this.i&15))a|=6;if(b||154<=this.i)a|=96,b=1;this.i=fd(this,a);ad(this,b?256:0);this.b-=4},Ld,function(){var a;Zc(this,a=K(this)+K(this));ad(this,a>>8&256);this.b-=10},function(){var a;a=O(this);a=this.u.cb(a);Zc(this,a);this.b-=16},function(){Zc(this,K(this)-1);this.b-=5},function(){this.Z= +jd(this,this.Z);this.b-=5},function(){this.Z=id(this,this.Z);this.b-=5},function(){this.Z=M(this);this.b-=7},function(){this.i=~this.i&255;this.b-=4},Ld,function(){this.pa=O(this)&65535;this.b-=10},function(){this.va(O(this),this.i);this.b-=13},function(){this.pa=this.pa+1&65535;this.b-=5},function(){var a=K(this);this.va(a,jd(this,this.aa(a)));this.b-=10},function(){var a=K(this);this.va(a,id(this,this.aa(a)));this.b-=10},function(){this.va(K(this),M(this));this.b-=10},function(){this.da|=256;this.b-= +4},Ld,function(){var a;Zc(this,a=K(this)+this.pa);ad(this,a>>8&256);this.b-=10},function(){this.i=this.aa(O(this));this.b-=13},function(){this.pa=this.pa-1&65535;this.b-=5},function(){this.i=jd(this,this.i);this.b-=5},function(){this.i=id(this,this.i);this.b-=5},function(){this.i=M(this);this.b-=7},function(){ad(this,$c(this)?0:256);this.b-=4},function(){this.b-=5},function(){this.S=this.T;this.b-=5},function(){this.S=this.U;this.b-=5},function(){this.S=this.V;this.b-=5},function(){this.S=this.W; +this.b-=5},function(){this.S=this.Z;this.b-=5},function(){this.S=this.aa(K(this));this.b-=7},function(){this.S=this.i;this.b-=5},function(){this.T=this.S;this.b-=5},function(){this.b-=5},function(){this.T=this.U;this.b-=5},function(){this.T=this.V;this.b-=5},function(){this.T=this.W;this.b-=5},function(){this.T=this.Z;this.b-=5},function(){this.T=this.aa(K(this));this.b-=7},function(){this.T=this.i;this.b-=5},function(){this.U=this.S;this.b-=5},function(){this.U=this.T;this.b-=5},function(){this.b-= +5},function(){this.U=this.V;this.b-=5},function(){this.U=this.W;this.b-=5},function(){this.U=this.Z;this.b-=5},function(){this.U=this.aa(K(this));this.b-=7},function(){this.U=this.i;this.b-=5},function(){this.V=this.S;this.b-=5},function(){this.V=this.T;this.b-=5},function(){this.V=this.U;this.b-=5},function(){this.b-=5},function(){this.V=this.W;this.b-=5},function(){this.V=this.Z;this.b-=5},function(){this.V=this.aa(K(this));this.b-=7},function(){this.V=this.i;this.b-=5},function(){this.W=this.S; +this.b-=5},function(){this.W=this.T;this.b-=5},function(){this.W=this.U;this.b-=5},function(){this.W=this.V;this.b-=5},function(){this.b-=5},function(){this.W=this.Z;this.b-=5},function(){this.W=this.aa(K(this));this.b-=7},function(){this.W=this.i;this.b-=5},function(){this.Z=this.S;this.b-=5},function(){this.Z=this.T;this.b-=5},function(){this.Z=this.U;this.b-=5},function(){this.Z=this.V;this.b-=5},function(){this.Z=this.W;this.b-=5},function(){this.b-=5},function(){this.Z=this.aa(K(this));this.b-= +7},function(){this.Z=this.i;this.b-=5},function(){this.va(K(this),this.S);this.b-=7},function(){this.va(K(this),this.T);this.b-=7},function(){this.va(K(this),this.U);this.b-=7},function(){this.va(K(this),this.V);this.b-=7},function(){this.va(K(this),this.W);this.b-=7},function(){this.va(K(this),this.Z);this.b-=7},function(){var a=this.R-1;if(this.ca.length)for(var b=0;b>8;this.b-=10},function(){var a=O(this);ed(this)||I(this,a);this.b-=10},function(){this.ua&=-513;this.b-=4},function(){var a=O(this);ed(this)||(Q(this,this.R),I(this,a),this.b-=6);this.b-=11},function(){Q(this,Uc(this)&255|this.i<<8);this.b-=11},function(){this.i=Ed(this,M(this));this.b-=7},function(){Q(this,this.R);I(this,48);this.b-=11},function(){ed(this)&& +(I(this,P(this)),this.b-=6);this.b-=5},function(){this.pa=K(this)&65535;this.b-=5},function(){var a=O(this);ed(this)&&I(this,a);this.b-=10},function(){this.ua|=512;this.b-=4;Hd(this)},function(){var a=O(this);ed(this)&&(Q(this,this.R),I(this,a),this.b-=6);this.b-=11},Od,function(){L(this,M(this));this.b-=7},function(){Q(this,this.R);I(this,56);this.b-=11}]; +function S(a){z.call(this,"ChipSet",a,S,32768);var b=a.model;b&&!Pd[b]&&Qa("Unrecognized ChipSet model: "+b);this.w=Pd[b]||{};a.sound&&(this.fa=null,window&&(this.fa=window.AudioContext||window.webkitAudioContext),this.fa&&new this.fa);F(this)}A(S); +var U={Ca:1978.1,yd:{Da:0,te:1,xe:16,Ee:32,Ne:64,Me:128,qb:14},$a:{Da:1,Nc:1,qd:2,md:4,nd:16,od:32,pd:64,qb:8},zd:{Da:2,se:3,Ve:4,ue:8,Ie:16,Je:32,Ke:64,ve:128,qb:0},Re:{Da:3},Pe:{Da:2,Fe:7},Te:{Da:3,We:1,Se:2,Le:4,Ce:8,we:16,me:32},Qe:{Da:4},Ue:{Da:5,ye:1,ze:2,Ae:4,Be:8,Xe:16}},V={Ca:100,Ma:{Da:66,pc:1,ec:2,jd:4,He:8,Ge:16,gc:32,fc:64,ac:128},Lc:{Da:66,INIT:0},Va:{Da:194,oe:0,Zb:16,sd:32,lc:48,Vc:0,Wc:32},Eb:{Da:162,Oe:0,Yc:0,Uc:0,Xc:0,Tc:0},Na:{De:{Da:98},Ua:{Ic:0,Hc:1,vd:2,Ed:4,Oc:5,td:6,wd:7}, +Fb:16383}},Pd={SI1978:U,VT100:V};S.prototype.qa=function(){return!1};S.prototype.Ra=function(a,b,c,d){this.u=b;this.b=c;this.I=d;this.A=a;this.K=ub(a,"Keyboard");this.Ha=ub(a,"SerialPort");this.video=ub(a,"Video");Hb(b,this,this.w.Jb);Ub(b,this,this.w.Kb);if(d){var e=this;Qd(d,16384,function(){for(var a="",b=0;b>8-this.ea&255;E(this,a,null,b,"SHIFT.RESULT",c,!0);return c};l.ce=function(a,b,c){E(this,a,b,c,"SHIFT.COUNT",null,!0);this.ea=b};l.ee=function(a,b,c){E(this,a,b,c,"SOUND1",null,!0);this.ma=b};l.de=function(a,b,c){E(this,a,b,c,"SHIFT.DATA",null,!0);this.Y=b<<8|this.Y>>8}; +l.fe=function(a,b,c){E(this,a,b,c,"SOUND2",null,!0);this.na=b};l.ge=function(a,b,c){E(this,a,b,c,"WATCHDOG",null,!0)};function Rd(a){var b=0,c=0,d=~a.P;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +l.Wd=function(a,b){var c=this.J,c=c&~V.Ma.fc;if((Gc(this.b)&64)<<1&&(c|=V.Ma.fc,c!=this.J)){var d,e;d=this.O&1;e=this.O>>1&7;switch(e){case V.Na.Ua.wd:break;case V.Na.Ua.Hc:this.P=this.P<<1|d;break;case V.Na.Ua.Oc:d=Rd(this);this.F[d]=V.Na.Fb;ib(this,"doNVRCommand(): erase data at addr "+u(d));break;case V.Na.Ua.Ic:this.j=this.j<<1|d;break;case V.Na.Ua.Ed:d=Rd(this);e=this.j&V.Na.Fb;this.F[d]=e;ib(this,"doNVRCommand(): write data "+u(e)+" to addr "+u(d));break;case V.Na.Ua.td:d=Rd(this);e=this.F[d]; +null==e&&(e=V.Na.Fb);this.j=e;ib(this,"doNVRCommand(): read data "+u(e)+" from addr "+u(d));break;case V.Na.Ua.vd:this.j<<=1;this.ca=this.j&V.Na.Fb+1;break;default:ib(this,"doNVRCommand(): unrecognized command "+ca(e))}}c&=~V.Ma.gc;this.ca&&(c|=V.Ma.gc);c&=~V.Ma.ac;if(d=this.K){d=this.K;if(e=d.D)e=d.b,e=Gc(d.b)>=d.J+e.Y*e.Sa/1E3*1.2731488;e&&(d.D=!1);d=!d.D}d&&(c|=V.Ma.ac);c&=~V.Ma.pc;this.Ha&&this.Ha.Fa&1&&(c|=V.Ma.pc);this.J=c;E(this,a,null,b,"FLAGS",c);return c}; +l.he=function(a,b,c){E(this,a,b,c,"BRIGHTNESS");this.ha=b};l.ke=function(a,b,c){E(this,a,b,c,"NVR.LATCH");this.O=b};l.je=function(a,b,c){E(this,a,b,c,"DC012");a=b&3;switch(b>>2&3){case 0:this.D=this.D&-4|a;break;case 1:this.D=this.D&-13|a<<2;this.video&&(b=this.video,a=this.D,ib(b,"updateScrollOffset("+a+")"),b.ib!==a&&((b.ib=a)?Nc(b,!0):b.sb=!0));break;case 2:switch(a){case 0:this.ba=~this.ba;break;case 2:case 3:this.la=3-a}break;case 3:this.ja=a}}; +l.ie=function(a,b,c){E(this,a,b,c,"DC011");b&V.Va.sd?(b&=V.Va.lc,this.M!=b&&(this.M=b,this.video&&(a=this.video,b=this.M==V.Va.lc?50:60,ib(a,"updateRate("+b+")"),a.tc=b))):(b&=V.Va.Zb,this.L!=b&&(this.L=b,this.video&&(a=this.L==V.Va.Zb?132:80,b=this.video,ib(b,"updateDimensions("+a+","+(80>>0,g],q=pa(p,k,a.xc);0>q&&p.splice(-(q+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.H.push({kf:b,G:c,Yd:d,Ea:e,wc:f})}delete this.Ea}return!0};Ud.prototype.Ka=function(){return!0}; +function Vd(a,b,c,d){if(d)a.ka("Unable to load system ROM (error "+d+": "+b+")");else{cb(a.hb,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.Ea=e.symbols;if(!a.A.length){w("Empty ROM: "+b);return}if(1==a.A.length){w(a.A[0]);return}}catch(h){a.ka("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e>>f.ia;0>>= +f.ia;0d?a.j.push({Ub:b,Rb:Date.now(),Gb:!1}):(a.j[d].Rb=Date.now(),a.j[d].Gb=!1);else if(0<=d){if(!a.j[d].Gb){var e=a.j[d].Rb;if(e&&100>Date.now()-e)return a.j[d].Gb=!0,he(a),!0}a.j.splice(d,1)}if(a.F){d=0;switch(b){case "1p":d=U.$a.md;break;case "2p":d=U.$a.qd;break;case "coin":d=U.$a.Nc;break;case "left":d=U.$a.od;break;case "right":d=U.$a.pd;break;case "fire":d=U.$a.nd}d&&(a=a.F,b=d,a.H&=~b,c&&(a.H|=b))}return!0} +function he(a){for(var b=0,c=-1;bc||c>e)c=e}else{fe(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){he(a)},c)}l.Xd=function(a,b){var c=this.H;0<=this.w&&(this.w>3)*a.ba,!yb(a.u,a.Wa,a.P,3)))return!1;a.P?(a.oc=a.F.createImageData(b,c),a.rc=16/a.Xa|0,ne(a,a.P>>1)):ne(a,(a.ca+1)*a.wa);a.L=document.createElement("canvas");a.L.width=b;a.L.height=c;a.rb=a.L.getContext("2d");a.fa={};a.ma=1<=a.ic?8:16,f=8>(7>4)*c)}return k}ie.prototype.Ga=function(){return!0};ie.prototype.qa=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.Mb[b]=c,!0;switch(b){case "fullScreen":return this.N[b]=c,this.j&&this.j.kb?c.onclick=function(){d.kb()}:c.parentNode.removeChild(c),!0}return!1}; +ie.prototype.kb=function(){var a=!1;if(this.j){if(this.j.kb){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.Y/this.O;b>c&&(a=Math.round(c/b*100)+"%")}this.nc?(this.M.style.width=a,this.M.style.width=a,this.M.style.display="block",this.M.style.margin="auto"):(this.j.style.width=a,this.j.style.height="auto");this.j.style.backgroundColor="black";this.j.kb();a=!0}this.la&&this.la.focus()}return a}; +function le(a,b){!b&&a.j&&(a.nc?a.M.style.width=a.M.style.height="":a.j.style.width=a.j.style.height="");ib(a,"notifyFullScreen("+b+")")}function ne(a,b){a.qc=b;a.ja=!1;if(void 0===a.H||a.H.length!=a.qc)a.H=Array(a.qc)}function pe(a,b,c,d,e){d=a.w?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.na&&(208<=c&&236>c?e=a.ma+0:28<=c&&72>c&&(e=a.ma+1));a=a.ha[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function Nc(a,b){var c=!0;if(!b){a.Ya&&(120==a.Ya?a.sc&1?(Id(a.b,2),c=!1):Id(a.b,1):Id(a.b,4));if(c&&a.ja&&a.P){for(var d=a.u,e=a.P,f=!0,g=a.Wa>>>d.ia;0>=1);;){var v=Bb(a.u,p++);if(127==(v&127)){var r=Bb(a.u,p++),d=r&96,c=(r&15)<<8|Bb(a.u,p),c=c+ +(r&16?8192:16384);break}if(n>4)*v.oa,C,T,da,X,ta=v.sa,Eb=v.oa;y?(C=x*r.sa,T=e*r.oa,da=r.sa,X=r.oa):(C=x*r.jc,T=e*r.kc,da=r.jc,X=r.kc);v.sa>r.sa&&(C*=2,da*=2);v.oa>r.oa&&(q||(H+=r.oa),Eb=r.oa);y?y.drawImage(v.canvas,ga,H,ta,Eb,C,T,da,X):(C+=0,T+=0,r.F.drawImage(v.canvas, +ga,H,ta,Eb,C,T,da,X))}h++}g++}e++}}a.ja=!0;!b&&a.sb&&1==h&&(a.H[k]=-1,h=0);a.sb=!1;(h||b)&&a.rb&&a.F.drawImage(a.L,0,a.ib,a.J,a.ba-a.oa,0,0,a.Gc,a.Jd)}else{e=a.Wa;f=e+a.P;k=h=g=0;b=a.J;n=0;c=a.ba;q=d=0;p=a.Xa;x=(1<>8|(r&255)<<8);h>y&x,pe(a,a.oc,h++,k,ga),y+=p;h>n&&(n=h);k=d&&(d=k+1)}e+=2;g++;if(h>=a.J&&(h=0,k++,k>a.ba))break}a.ja=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=xa().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Wa.aspect);f&&.3<=f&&3.33>=f&&(Na("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Da("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new ie(d,e,g,f,c);gb(d,c)}}); +function qe(a){this.fa=+a.adapter;switch(this.fa){case 0:this.ha=0;this.la=2;break;default:w("Unrecognized serial adapter #"+this.fa);return}this.j=this.w=null;this.ja=a.tabSize;this.ea=a.charBOL;this.D=0;this.ba=!1;z.call(this,"SerialPort",a,qe,8388608);var b=a.binding;if("console"==b)this.w="";else{var c;a=re;b&&(void 0===c&&(c="Panel"),(c=fb(c,this.id))&&(b=c.N[b])&&this.qa(null,a,b))}this.H="";this.K=this.M=null;this.exports={connect:this.Cc,receiveData:this.Tb}}A(qe); +var se=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],te=[!1,0,0,133,142,39,238],re="buffer";l=qe.prototype; +l.qa=function(a,b,c,d){var e=this;switch(b){case re:return this.N[b]=this.j=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=na(b[0]);if(c!=this.gb)return;b=na(b[1]);if(this.K=eb(b)){var d=this.K.exports;if(d){var e=d.connect;e&&e.call(this.K);if(this.M=d.receiveData){this.status(this.hb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};l.Ga=function(a,b){if(!b)if(this.Cc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +l.Ka=function(a){return a?this.save():!0};l.reset=function(){xe(this)};l.save=function(){var a=new J(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Y;c[b++]=this.ca;c[b++]=this.Fa;c[b++]=this.J;c[b++]=this.P;c[b]=this.O;a.set(0,c);return a.data()};l.restore=function(a){return xe(this,a[0])};function xe(a,b){var c=0;b||(b=te);a.L=b[c++];a.Y=b[c++];a.ca=b[c++];a.Fa=b[c++];a.J=b[c++];a.P=b[c++];a.O=b[c];return!0} +function ye(a,b){var c=a.O&b;b&15||(c>>=4);b=se[c];c=((a.J&12)>>2)+6;a.J&16&&c++;c+=((a.J&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function ue(a,b){ib(a,"receiveByte("+ca(b)+"), status="+ca(a.Fa));return a.ba||a.Fa&2?!1:(a.Y=b,a.Fa|=2,Id(a.b,a.la),!0)}l.Tb=function(a){null!=a&&(this.H="number"!=typeof a?a:this.H+String.fromCharCode(a));this.H&&(ue(this,this.H.charCodeAt(0))&&(this.H=this.H.substr(1)),this.H&&this.b&&Lc(this.b,this.ma,ye(this,15)));return!0}; +l.Rd=function(a,b){var c=this.Y;E(this,a,null,b,"DATA",c);this.Fa&=-3;return c};l.Qd=function(a,b){var c=this.Fa;E(this,a,null,b,"STATUS",c);return c}; +l.be=function(a,b,c){E(this,a,b,c,"DATA");this.ca=b;this.Fa&=-6;ib(this,"transmitByte("+ca(b)+")");if(19==b)this.ba=!0;else if(17==b)this.ba=!1;else if(this.M&&this.M.call(this.K,b),this.j)8==b?(this.j.value=this.j.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,9==b?(b=this.ja||8,c=b-this.D%b,this.ja&&(a=ma("",c))):13==b&&(this.D=c=0,a="\n"),this.ea&&!this.D&&c&&(a=String.fromCharCode(this.ea)+a),this.j.value+=a,this.j.scrollTop=this.j.scrollHeight, +this.D+=c);else if(null!=this.w){if(10==b||1024<=this.w.length)this.g(this.w),this.w="";10!=b&&(this.w+=String.fromCharCode(b))}this.b&&Lc(this.b,this.na,ye(this,240))};l.ae=function(a,b,c){E(this,a,b,c,"CONTROL");this.L?(this.P=b,this.P&64&&(this.L=!1)):(this.J=b,this.L=!0)};l.$d=function(a,b,c){E(this,a,b,c,"BAUDRATES");this.O=b};var ve={0:qe.prototype.Rd,1:qe.prototype.Qd},we={0:qe.prototype.be,1:qe.prototype.ae,2:qe.prototype.$d}; +Oa(function(){for(var a=D(document,"pc8080","serial"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};ze.prototype.Pb=function(){return-1};ze.prototype.Qb=function(){}; +ze.prototype.Ib=function(a,b,c){if(b)if(a){0>this.j&&this.w.length&&(this.j=0);if(0>this.j||a!=this.w[this.j])this.w.splice(0,0,a),this.j=0;this.j--}else this.P?a="end":a=this.w[this.j+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(na(a.substring(d,f))),d=f+1}}return b}; +function Be(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} +function Ce(a,b,c){var d;if(b){b=De(a,b);for(var e=0,f=!1,g=b,h=[],k=[],n=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=p+g;d>>=8}d=t(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function He(a,b){if(b)return Fe(a,b,a.ea[b]);var c=0;for(b in a.ea)Fe(a,b,a.ea[b]),c++;return 0>>d.u.ia;k=1}d.g("blockid physical blockaddr used size type");d.g("-------- --------- ---------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.g("..."):(c=p.type,n=Ab[c],p&&d.g(t(p.id)+" %"+t(e<>>e.ia;f!=e.u?e.X[g].Wb(f,b&65535,d):(e.X[g++].Db(f,b&255,d),e.X[g&e.H].Db(0,b>>8&255,d+1));c&&Ue(a,c);Ec(this.b,!0)}};function Y(a){return{G:a,Qa:!1}}function uf(a){return[a.G,a.Qa]}function vf(a){return{G:a[0],Qa:a[1]}} +function Te(a,b,c){var d;c=(c?a.M:a.Wa).G;if(void 0!==b){d=b=De(a,b);var e;if(d.match(/^[a-z_][a-z0-9_]*$/i))for(d=d.toUpperCase(),c=0;cc&&(c=sa(Qe,a.substr(b,1))));return c};function yf(a,b){var c=0;a=a.Qb(b);if(void 0!==a)switch(b){case 7:case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:c=4}return c?t(a,c):"??"} +l.Qb=function(a){var b;if(0<=a){var c=this.b;switch(a){case 7:b=c.i;break;case 0:b=c.S;break;case 1:b=c.T;break;case 8:b=Vc(c);break;case 2:b=c.U;break;case 3:b=c.V;break;case 9:b=Xc(c);break;case 4:b=c.W;break;case 5:b=c.Z;break;case 10:b=K(c);break;case 6:b=c.aa(K(c));break;case 11:b=c.pa;break;case 12:b=c.R;break;case 13:b=Uc(c);break;case 14:b=Uc(c)&255|c.i<<8}}return b}; +function zf(a,b){b=De(a,b);for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.Pb(b,c+1),0<=e&&(b=b.substr(0,c)+yf(a,e)+b.substr(c+1+Qe[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=aa(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=Te(a,e))?(d=e+' "'+xf(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=Te(a,e))?(Ue(d),d=e+ +' "'+xf(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Z(Y(this.b.R).G));this.ta&1073741824?this.ma.push(a):this.la&&a==this.la||(this.la=a,this.ta&-2147483648&&(this.ra(),a+=" (cpu halted)"),this.g(a),this.b&&(a=this.b,Mc(a),a.P=0,Ec(a)))}; +function hb(a,b,c,d,e,f,g,h){h|=256;null!=f&&(a.ta&h)!=h||a.message(b.gb+"."+(null!=d?"outPort":"inPort")+"("+u(c)+","+(f?f:"unknown")+(null!=d?","+ca(d):"")+")"+(null!=g?": "+ca(g):"")+(null!=e?" at "+Z(e):""))} +function Le(a){var b;if(Jd(a)){if(!a.L||!a.L.length){a.L=Array(1E3);for(b=0;b>>d.ia],!1)}a.O=["br"];if(a.D)for(b=1;b>>d.ia],!0);a.D=["bw"];a.Ya=0}l.ab=function(a,b,c){var d=!0;c||Ef(this,a,b,!1,!0);if(a!=this.F){var e=Se(b);if(-1===e)this.g("invalid address: "+Z(b.G)),d=!1;else{var f=this.u;f.X[e>>>f.ia].ab(e&f.u,a==this.D)}}d&&(a.push(b),c?b.Qa=!0:(Ff(this,a,a.length-1,"set"),Le(this)));return d}; +function Ef(a,b,c,d,e){var f=!1;c=Se(c);for(var g=1;g>>d.ia],b==a.D));h.Qa||Le(a);break}}return f}function Gf(a,b){for(var c=1;c>24,4);break;case 3:y=t(v.cb(y,2),4);break;default:v="imm("+u(r)+")";break a}8086==v.style&&r&64?y="["+y+"]":r&16||(y=(v.style==Je?"$":"0x")+y);v=y}else r&16? +(v=(q&3840)>>8,r=Qe[v],8086==a.style&&q&64&&(6==v&&(r="HL"),r="["+r+"]"),v=r):r&128&&(v=(f>>3&7).toString());if(!v||!v.length){h="INVALID";break}0b[0]?1:a[0]>>0;for(b=0;b>>0,h=f.Yd;if(e>=g&&e>8&255;case "C":d.T=f&255;break;case "D":d.U=f&255;break; +case "DE":d.U=f>>8&255;case "E":d.V=f&255;break;case "H":d.W=f&255;break;case "HL":d.W=f>>8&255;case "L":d.Z=f&255;break;case "SP":d.pa=f&65535;break;case "PC":I(d,f);a.M=Y(d.R);break;case "PS":Sc(d,f);break;case "PSW":Sc(d,f&255|d.ua&-256);d.i=f>>8;break;case "CF":d.da=f?d.da|256:d.da&255;break;case "PF":f?bd(d)||(d.ga^=1):bd(d)&&(d.ga^=1);break;case "AF":d.ya=f?~d.ga&16|d.ya&-17:d.ga&16|d.ya&-17;break;case "ZF":d.da=f?d.da&-256:d.da|255;break;case "SF":f?ed(d)||(d.ga^=192):ed(d)&&(d.ga^=192);break; +case "IF":d.ua=f?d.ua|512:d.ua&-513;break;default:a.g("unknown register: "+e);return}Ec(d);a.g("updated registers:")}a.g(Lf(a));c&&(a.M=Y(d.R),Cf(a,Z(a.M.G)))}}function Sf(a,b){b=na(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.g(zf(a,c[2])):Ce(a,b,!0)}function Tf(a,b,c){var d="t"!=b;c=Ee(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);Ea(c,function(){return kb(a,!0)&&a.ob(e,d,!1)},function(){Ec(a.b);kb(a,!1)})} +function Cf(a,b,c,d){if(b=Te(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=Te(a,c,!0);if(!d||d.Gh[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.g(n)}h[3]&&(g=h[3],f=null);f=If(a,b,g,f);a.g(f);a.M=b;e-=b.G-k;c++}}} +l.Ib=function(a,b,c){if(b)if(a){0>this.j&&this.w.length&&(this.j=0);if(0>this.j||a!=this.w[this.j])this.w.splice(0,0,a),this.j=0;this.j--}else this.P?a="end":a=this.w[this.j+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(na(a.substring(d,f))),d=f+1}}return b}; +function Hf(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.g(">> "+b):(a.P&&(a.g("ended assemble at "+Z(a.ca.G)),a.M=a.ca,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.la=null;if(mb(a)&&0n||"z"Ga.length&&(a.g("note: only "+Ga.length+" available"),ia=Ga.length);ua-=ia;0>ua&&(null==Ga[Ga.length-1].G?(ia=ua+ia,ua=0):ua+=Ga.length);var md=[];"call"==$e&&(Ib=1E5,md=["CALL"]);for(void 0!==Ze&&a.g(ia+" instructions earlier:");0< +Ib&&ua!=a.fa;){var cf=Ga[ua++];if(null==cf.G)break;var Jb=Y(cf.G),lg=ia--,df=If(a,Jb,"history",lg);(!md.length||0<=df.indexOf(md[0]))&&a.g(df);Jb.Ob&&(ua+=Jb.Ob,Ib-=Jb.Ob,ia-=Jb.Ob);ua>=Ga.length&&(ua=0);a.ib=ia;bf++;Ib--}}bf||(a.g("no "+af+"history available"),a.ib=void 0)}else{var oc=Te(a,X);if(oc){var pc=0;ta&&("l"==ta.charAt(0)&&(ta=ta.substr(1)||Eb),pc=Ee(a,ta)>>>0,65536>4||1;mg--&&0tc?String.fromCharCode(tc):".";rc--}Kb&&(Kb+="\n");Kb+=X+" "+od+(Lb?"":" "+ef)}Kb&&a.g(Kb);a.Wa=oc}}}}break;case "e":if("else"==f[0])break;var uc=1,ff=255,gf=a.aa,hf=a.va;"ew"==f[0]&&(uc=2,ff=65535,gf=a.cb,hf=a.Lb);var jf=uc<<1,kf=f[1];if(null==kf)a.g("edit memory commands:"),a.g("\teb [a] [...] edit bytes at address a"),a.g("\tew [a] [...] edit words at address a"); +else{var vc=Te(a,kf);if(vc)for(var wc=2;wcvd;){for(var Za=null,sg=256;65536>Ob.G>>>0;){mf.G=a.cb(Ob,2);if(null==Ob.G||!sg--)break;for(var tg=a,yc=mf,nf= +null,Pb=yc.G,of=Pb,wd=1;6>=wd&&Pb;wd++){if(2\nLicense: GPL version 3 or later ");for(b=0;bXf){if(Zf(d,this.L)){this.D=new J(this,"1.30.3","failsafe");Zf(this.D)&&(dg(this,d),a=2,eg(this.D));this.D.set("timestamp",ra());fg(this.D);var e=this.A&&!this.K;if(1==a||ya("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=cg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Zf(d,g):("error"== +f&&"no machine state"!=g?(this.ka("Error: "+g),"unable to verify user"==g&&(Ca("user",""),this.j=null)):this.g(f+": "+g),eg(d),Zf(d)?(c=cg(d),e=!0):c=!1))}e&&bg(this,c?d:null)}else 2==a&&d.clear()}else bg(this);delete this.L;delete this.M}e=db(this.id);for(f=0;fa[1];a=a[2];this.ha=!0;this.C.xa=!0;var d=this.N.power;d&&(d.textContent="Shutdown");this.b&&(gg(this,this.b,b,c,a),this.b.vb());this.Y&&(dg(this,b),b.clear());!c&&this.D&&(this.D.clear(),delete this.D);this.w=0}; +function dg(a,b){if(ya("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.j||"";b=b.toString();var d={app:"PC8080",ver:"1.30.3"};d.url=a.fa;d.user=c;d.type="bug";d.data=b;va("http://www.pcjs.org/api/v1/report",d,!0)}} +function Uf(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new J(a,"1.30.3"),g=new J(a,"1.30.3","validate"),h=ra();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",xa());a.b&&a.b.Ka&&(c&&a.b.ra(),d=a.b.Ka(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.xa=!1,!1===d&&(e=null)));for(var h=db(a.id),k=0;kf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");va(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],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)k=0>k.indexOf(n[1])?k.replace(">",n[0]+">"):k.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);Ag(a,b,c)}})}else c(a,null)} +function Bg(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=la(a))}function f(a){e("Error: "+a);k&&(--kg||Sa(!0));k=!1}var g,h,k=!0;kg++;bb[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css";q.styleSheet?q.styleSheet.cssText=n:q.appendChild(document.createTextNode(n));p.appendChild(q)}c|| +(c="/versions/pc8080/1.30.3/components.xsl");n=function(d,h){h?yg(c,null,null,!1,e,function(d,k){k?(cb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--kg||Sa(!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),--kg||Sa(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?yg(b,a,d,!0,e,n):zg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(x){f(x.message)}return k}window.embedPC8080=function(a,b,c,d){Sa(!1);return Bg(a,b,c,d)};window.enableEvents=Sa;window.sendEvent=Ta;})(); diff --git a/versions/pc8080/1.30.3/pc8080.js b/versions/pc8080/1.30.3/pc8080.js new file mode 100644 index 000000000..04ffb7bfb --- /dev/null +++ b/versions/pc8080/1.30.3/pc8080.js @@ -0,0 +1,202 @@ +(function(){/* + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpudef.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pc8080/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 +*/ +var k,m={td:1,ud:3,vd:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,nb:65,Qb:66,Sb:67,qb:68,E:69,Vb:70,Wb:71,Xb:72,Yb:73,ec:74,fc:75,sb:76,mc:77,nc:78,qc:79,rc:80,Q:81,xc:82,Ac:83,Fc:84,Gc:85,Hc:86,Ic:87,Kc:88,Lc:89,Mc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ce:97,de:98,ee:99,d:100,e:101,fe:102,ge:103,he:104,ie:105,je:106,k:107,ke:108, +le:109,n:110,me:111,p:112,q:113,r:114,ne:115,t:116,oe:117,pe:118,qe:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126}; +function aa(a){var b=16,c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ba(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0":">",'"':""","'":"'"};function ga(a){return a.replace(/[&<>"']/g,function(a){return fa[a]})}function ha(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var ia={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ja=Date.now||function(){return+new Date}; +function ka(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function la(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function ma(a,b){var c,d={aa:null,wa:null,Ea:null,xa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ea=g.load;d.xa=g.exec;if(e=g.bytes)d.aa=e;else if(e=g.words)for(d.aa=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.aa=Array(4*e.length),f=c=0;c>8&255,d.aa[f++]=e[c]>>16&255,d.aa[f++]=e[c]>>24&255;else d.aa=g;d.wa=g.symbols;d.aa.length?1==d.aa.length&&(q(d.aa[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Xa=this.id:(this.za=this.id.substr(0,b),this.Xa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,$a:!1,ib:!1,Y:!1,error:!1};this.cb=null;this.l.error=!1;this.w={};this.O=null;v.push(this)}var Ea=void 0,Fa={}; +if(window){Ea||(Ea=window.location.search.substr(1));for(var Ga,Ha=/\+/g,Ia=/([^&=]+)=?([^&]*)/g;Ga=Ia.exec(Ea);)Fa[decodeURIComponent(Ga[1].replace(Ha," "))]=decodeURIComponent(Ga[2].replace(Ha," "))}function Ja(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function w(a,b){b||(b=r);a.prototype=Ja(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ka=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else Ka={},v=[];function La(a,b,c){Ka[a]&&b&&(Ka[a][b]=c)}function Ba(a,b,c){b||q((c?c+": ":"")+a)} +function Ma(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b>1)+2;10>this.j&&(this.j=10);15>2;this.f=this.c-1;this.i=this.u/this.c|0;this.o=this.i-1;this.m=[];this.A=[];this.B=[];this.C=[];a=new C;Za(a,this.O);this.b=Array(this.i);for(b=0;b>>a.j;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.Ra)return h.hb+=h.Ra-e,h.Ra=e,!0;if(e>=h.Ra+h.hb){n=h.size-(e-l);n>f&&(n=f);h.hb=e-h.Ra+n;e=l+a.c;f-=n;g++;continue}}return ab(1,e,f)}e=new C(e,n,a.c,d);Za(e,a.O,h);a.b[g++]=e;e=l+a.c;f-=n}return 0>=f?(a.status(Math.floor(c/1024)+"Kb "+bb[d]+" at "+p(b,4,!0)),!0):ab(2,b,c)}Ya.prototype.J=function(a){return this.b[(a&this.g)>>>this.j].Ua(a&this.f,a)}; +function cb(a,b){return a.b[(b&a.g)>>>a.j].gb(b&a.f,b)}function db(a,b){var c=b&a.f,d=(b&a.g)>>>a.j;return c!=a.f?a.b[d].od(c,b):a.b[d++].Ua(c,b)|a.b[d&a.o].Ua(0,b+1)<<8}Ya.prototype.ba=function(a,b){this.b[(a&this.g)>>>this.j].Va(a&this.f,b&255,a)};function eb(a,b,c){a.b[(b&a.g)>>>a.j].Lb(b&a.f,c&255,b)}function gb(a,b,c){var d=b&a.f,e=(b&a.g)>>>a.j;d!=a.f?a.b[e].pd(d,c&65535,b):(a.b[e++].Va(d,c&255,b),a.b[e&a.o].Va(0,c>>8&255,b+1))} +function hb(a){for(var b=0,c=[],d=0;d>1),this.a=new Int32Array(this.j,0,c>>2),qb(this,mb?rb:sb);else{this.a=Array(c>>2);for(a=0;a>2),b=0;b>8,c)},C:function(a){return this.a[a>> +2]>>>((a&3)<<3)&255},I:function(a){var b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},S:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.oa=!0},v:function(a,b){return this.gb(a,b)},H:function(a,b){return this.Ib(a,b)},N:function(a,b,c){this.c||this.Lb(a,b,c)},W:function(a, +b,c){this.c||this.X(a,b,c)},u:function(a){return this.b[a]},B:function(a){return this.b[a]},G:function(a){return this.w.getUint16(a,!0)},M:function(a){return a&1?this.b[a]|this.b[a+1]<<8:this.i[a>>1]},L:function(a,b){this.b[a]=b;this.oa=!0},R:function(a,b){this.b[a]=b;this.oa=!0},U:function(a,b){this.w.setUint16(a,b,!0);this.oa=!0},za:function(a,b){a&1?(this.b[a]=b,this.b[a+1]=b>>8):this.i[a>>1]=b;this.oa=!0}};function Za(a,b,c){a.O=b;a.f=a.g=0;c&&((a.f=c.f)&&ub(a,vb,!1),(a.g=c.g)&&wb(a,vb,!1))} +function wb(a,b,c){c&&a.g||(a.Va=!a.c&&b[1]||a.o,a.pd=!a.c&&b[3]||a.s);if(c||void 0===c)a.Lb=b[1]||a.o,a.X=b[3]||a.s}function ub(a,b,c){c&&a.f||(a.Ua=b[0]||a.m,a.od=b[2]||a.A);if(c||void 0===c)a.gb=b[0]||a.m,a.Ib=b[2]||a.A}function qb(a,b){b||(b=xb);ub(a,b,void 0);wb(a,b,void 0)}var xb=[],tb=[C.prototype.C,C.prototype.S,C.prototype.I,C.prototype.Z],vb=[C.prototype.v,C.prototype.N,C.prototype.H,C.prototype.W]; +if(Ta)var sb=[C.prototype.u,C.prototype.L,C.prototype.G,C.prototype.U],rb=[C.prototype.B,C.prototype.R,C.prototype.M,C.prototype.za];function yb(a,b){r.call(this,"CPU",a,yb);var c=a.multiplier||1;this.ma=a.cycles||b;this.L=c;this.Ha=Math.round(this.ma/1E4)/100;this.U=this.Ha*this.L;this.l.pa=!1;this.l.Jb=!1;this.l.Sa=a.autoStart;this.l.Cb=!1;this.l.ab=!1;this.ua=this.X=0;this.va=a.csStart;this.Z=a.csInterval;this.ja=a.csStop;this.G=[];this.Za=this.lb.bind(this);B(this)}w(yb);var zb=["power","reset"]; +k=yb.prototype;k.ra=function(a,b,c,d){this.A=a;this.j=b;this.O=d;for(b=0;ba.R/a.U&&(b=1);a.L=b;b=a.Ha*a.L;if(a.U!=b){a.U=b;b=a.U.toFixed(2)+"Mhz";var d=a.w.setSpeed;d&&(d.textContent=b);a.ea("target speed: "+b)}c&&a.A&&Ib(a.A)}a.H+=a.N;a.N=0;a.I=ja();a.S=0;Gb(a)}function Jb(a,b){var c=a.G.length;a.G.push([-1,b]);return c}function Kb(a,b,c){0<=b&&ba.G[b][0]&&(c*=a.ma*a.L/1E3,a.G[b][0]=c+Mb(a))}function Mb(a,b){var c=a.W-=a.a;a.a=0;b&&(a.W=0);return c} +k.lb=function(a){if(Ra(this,!0)){if(!this.l.pa){Fb(this);this.A&&this.A.start(this.I,Hb(this));this.l.pa=!0;this.l.Jb=!0;this.M&&this.M.start();var b=this.w.run;b&&(b.textContent="Halt");this.A&&(this.A.Fa(!0),a&&Ib(this.A,!0))}this.Ia>=this.ma&&Gb(this,!0);this.qa=0;this.ta=ja();this.S&&(a=this.ta-this.S,a>this.Pa&&(this.I+=a,this.I>this.ta&&(this.I=this.ta)));try{do{for(var c,d=this.l.ab?1:this.Ba,e=this.G.length-1;0<=e;e--){var f=this.G[e];0>f[0]||d>f[0]&&(d=f[0])}c=d;this.Kb(c);c=Mb(this,!0); +this.qa+=c;this.N+=c;a=c;this.l.ab&&(b=!1,this.ua=this.ua+this.Fb()|0,this.X-=a,0>=this.X&&(this.X+=this.Z,b=!0),0<=this.ja&&this.ja<=Hb(this)&&(this.Z=this.ja=-1,Cb(this),Eb(this),b=!0),b&&this.ea(Hb(this)+" cycles: checksum="+p(this.ua)));a=c;for(var g=this.G.length-1;0<=g;g--){var h=this.G[g];0>h[0]||(h[0]-=a,0>=h[0]&&(h[0]=-1,h[1]()))}this.la-=c;if(0>=this.la){this.la+=this.Ba;15<=++this.Qa&&(this.A&&this.A.Fa(),this.Qa=0);break}}while(this.l.pa)}catch(l){Eb(this);Db(this);this.A&&this.A.stop(ja(), +Hb(this));Ra(this,!1);c=l.stack||l.message;this.l.error=!0;this.K(c);return}c=setTimeout;d=this.Za;this.S=ja();e=this.Pa;this.qa&&(e=Math.round(e*this.qa/this.Ba));e-=this.S-this.ta;if(f=this.S-this.I)this.R=Math.round(this.N/(10*f))/100,864E5<=f&&(this.H=0,Fb(this));if(0>e||this.Re&&(this.I-=e),e=0;this.Ia+=this.qa;this.S+=e;c(d,e)}else Db(this),this.A&&this.A.stop(ja(),Hb(this))};k.Kb=function(){return 0}; +function Eb(a){a.l.$a&&(a.l.ib=!0);Mb(a);a.H+=a.N;a.N=0;if(a.l.pa){a.l.pa=!1;a.M&&a.M.stop();var b=a.w.run;b&&(b.textContent="Run")}a.l.complete=void 0}function Db(a){if(a.A){for(var b=a.A,c=0;c>8&255;a.D=b&255}function Xb(a){return a.f<<8|a.F}function Yb(a,b){a.f=b>>8&255;a.F=b&255}function G(a){return a.g<<8|a.i} +function I(a,b){a.g=b>>8&255;a.i=b&255}function E(a,b){a.o=b&65535}function J(a){return a.m&256?1:0}function K(a,b){a.m=a.m&255|b}function Zb(a){return Ua[a.s&255]?4:0}function Ub(a){return a.C&-214|(a.s&128?128:0)|(a.m&255?0:64)|((a.s^a.v)&16?16:0)|Zb(a)|J(a)}function Sb(a,b){a.m=a.s=a.v=0;b&1&&(a.m|=256);b&4||(a.s|=1);b&16&&(a.v|=16);b&64||(a.m|=255);b&128&&(a.s^=192);a.C=a.C&-726|b&512|2}function L(a,b){a.v=a.b^b;return a.s=(a.m=a.b+b)&255} +function $b(a,b){a.v=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?1:0))&255}function ac(a,b){a.m=a.s=a.v=a.b&b;(a.b|b)&8&&(a.v^=16);return a.m}function bc(a,b){a.v=b^255;b=a.s=b+255&255;a.m=a.m&-256|b;return b}function cc(a,b){a.v=b;b=a.s=b+1&255;a.m=a.m&-256|b;return b}function dc(a,b){return a.s=a.m=a.v=a.b|b}function M(a,b){b^=255;a.v=a.b^b;return a.s=(a.m=a.b+b+1^256)&255}function ec(a,b){b^=255;a.v=a.b^b;return a.s=(a.m=a.b+b+(a.m&256?0:1)^256)&255}function fc(a,b){return a.s=a.m=a.v=a.b^b}k.J=function(a){return this.j.J(a)}; +k.ba=function(a,b){this.j.ba(a,b)};function N(a){var b=a.J(a.o);E(a,a.o+1);return b}function O(a){var b=db(a.j,a.o);E(a,a.o+2);return b}function P(a){var b=db(a.j,a.u);a.u=a.u+2&65535;return b}function R(a,b){a.u=a.u-2&65535;gb(a.j,a.u,b)}function gc(a){if(a.a&&a.B&255&&a.C&512){for(var b=0;8>b&&!(a.B&1<b?255:1<>8;K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Vb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Vb(this));this.a-=7},function(){Wb(this,Vb(this)-1);this.a-=5}, +function(){this.D=cc(this,this.D);this.a-=5},function(){this.D=bc(this,this.D);this.a-=5},function(){this.D=N(this);this.a-=7},function(){var a=this.b<<8&256;this.b=(a|this.b)>>1;K(this,a);this.a-=4},ic,function(){Yb(this,O(this));this.a-=10},function(){this.ba(Xb(this),this.b);this.a-=7},function(){Yb(this,Xb(this)+1);this.a-=5},function(){this.f=cc(this,this.f);this.a-=5},function(){this.f=bc(this,this.f);this.a-=5},function(){this.f=N(this);this.a-=7},function(){var a=this.b<<1;this.b=a&255|J(this); +K(this,a&256);this.a-=4},ic,function(){var a;I(this,a=G(this)+Xb(this));K(this,a>>8&256);this.a-=10},function(){this.b=this.J(Xb(this));this.a-=7},function(){Yb(this,Xb(this)-1);this.a-=5},function(){this.F=cc(this,this.F);this.a-=5},function(){this.F=bc(this,this.F);this.a-=5},function(){this.F=N(this);this.a-=7},function(){var a=this.b<<8;this.b=(J(this)<<8|this.b)>>1;K(this,a&256);this.a-=4},ic,function(){I(this,O(this));this.a-=10},function(){var a=O(this);gb(this.j,a,G(this));this.a-=16},function(){I(this, +G(this)+1);this.a-=5},function(){this.g=cc(this,this.g);this.a-=5},function(){this.g=bc(this,this.g);this.a-=5},function(){this.g=N(this);this.a-=7},function(){var a=0,b=J(this);if((this.s^this.v)&16||9<(this.b&15))a|=6;if(b||154<=this.b)a|=96,b=1;this.b=L(this,a);K(this,b?256:0);this.a-=4},ic,function(){var a;I(this,a=G(this)+G(this));K(this,a>>8&256);this.a-=10},function(){var a;a=O(this);a=db(this.j,a);I(this,a);this.a-=16},function(){I(this,G(this)-1);this.a-=5},function(){this.i=cc(this,this.i); +this.a-=5},function(){this.i=bc(this,this.i);this.a-=5},function(){this.i=N(this);this.a-=7},function(){this.b=~this.b&255;this.a-=4},ic,function(){this.u=O(this)&65535;this.a-=10},function(){this.ba(O(this),this.b);this.a-=13},function(){this.u=this.u+1&65535;this.a-=5},function(){var a=G(this);this.ba(a,cc(this,this.J(a)));this.a-=10},function(){var a=G(this);this.ba(a,bc(this,this.J(a)));this.a-=10},function(){this.ba(G(this),N(this));this.a-=10},function(){this.m|=256;this.a-=4},ic,function(){var a; +I(this,a=G(this)+this.u);K(this,a>>8&256);this.a-=10},function(){this.b=this.J(O(this));this.a-=13},function(){this.u=this.u-1&65535;this.a-=5},function(){this.b=cc(this,this.b);this.a-=5},function(){this.b=bc(this,this.b);this.a-=5},function(){this.b=N(this);this.a-=7},function(){K(this,J(this)?0:256);this.a-=4},function(){this.a-=5},function(){this.c=this.D;this.a-=5},function(){this.c=this.f;this.a-=5},function(){this.c=this.F;this.a-=5},function(){this.c=this.g;this.a-=5},function(){this.c=this.i; +this.a-=5},function(){this.c=this.J(G(this));this.a-=7},function(){this.c=this.b;this.a-=5},function(){this.D=this.c;this.a-=5},function(){this.a-=5},function(){this.D=this.f;this.a-=5},function(){this.D=this.F;this.a-=5},function(){this.D=this.g;this.a-=5},function(){this.D=this.i;this.a-=5},function(){this.D=this.J(G(this));this.a-=7},function(){this.D=this.b;this.a-=5},function(){this.f=this.c;this.a-=5},function(){this.f=this.D;this.a-=5},function(){this.a-=5},function(){this.f=this.F;this.a-= +5},function(){this.f=this.g;this.a-=5},function(){this.f=this.i;this.a-=5},function(){this.f=this.J(G(this));this.a-=7},function(){this.f=this.b;this.a-=5},function(){this.F=this.c;this.a-=5},function(){this.F=this.D;this.a-=5},function(){this.F=this.f;this.a-=5},function(){this.a-=5},function(){this.F=this.g;this.a-=5},function(){this.F=this.i;this.a-=5},function(){this.F=this.J(G(this));this.a-=7},function(){this.F=this.b;this.a-=5},function(){this.g=this.c;this.a-=5},function(){this.g=this.D;this.a-= +5},function(){this.g=this.f;this.a-=5},function(){this.g=this.F;this.a-=5},function(){this.a-=5},function(){this.g=this.i;this.a-=5},function(){this.g=this.J(G(this));this.a-=7},function(){this.g=this.b;this.a-=5},function(){this.i=this.c;this.a-=5},function(){this.i=this.D;this.a-=5},function(){this.i=this.f;this.a-=5},function(){this.i=this.F;this.a-=5},function(){this.i=this.g;this.a-=5},function(){this.a-=5},function(){this.i=this.J(G(this));this.a-=7},function(){this.i=this.b;this.a-=5},function(){this.ba(G(this), +this.c);this.a-=7},function(){this.ba(G(this),this.D);this.a-=7},function(){this.ba(G(this),this.f);this.a-=7},function(){this.ba(G(this),this.F);this.a-=7},function(){this.ba(G(this),this.g);this.a-=7},function(){this.ba(G(this),this.i);this.a-=7},function(){var a=this.o-1;if(this.sa.length)for(var b=0;b>>=f)&l;if(void 0!==g&&g[0])g[0](a,l,d);f+=h<<3;a+=h;e-=h}this.a-=10},function(){var a=O(this);J(this)||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this,Xb(this));this.a-=11},function(){this.b=M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,16);this.a-=11},function(){J(this)&&(E(this,P(this)),this.a-=6);this.a-=5},kc,function(){var a=O(this);J(this)&&E(this,a);this.a-=10},function(){for(var a=N(this),b=this.j,c=this.o+-2&65535,d=1,e=0, +f=0;0>8;this.a-=10},function(){var a=O(this);this.s&128||E(this,a);this.a-=10},function(){this.C&=-513;this.a-=4},function(){var a=O(this);this.s&128||(R(this,this.o),E(this,a),this.a-=6);this.a-=11},function(){R(this, +Ub(this)&255|this.b<<8);this.a-=11},function(){this.b=dc(this,N(this));this.a-=7},function(){R(this,this.o);E(this,48);this.a-=11},function(){this.s&128&&(E(this,P(this)),this.a-=6);this.a-=5},function(){this.u=G(this)&65535;this.a-=5},function(){var a=O(this);this.s&128&&E(this,a);this.a-=10},function(){this.C|=512;this.a-=4;gc(this)},function(){var a=O(this);this.s&128&&(R(this,this.o),E(this,a),this.a-=6);this.a-=11},lc,function(){M(this,N(this));this.a-=7},function(){R(this,this.o);E(this,56); +this.a-=11}];function T(a){r.call(this,"ChipSet",a,T);var b=a.model;b&&!mc[b]&&Ba("Unrecognized ChipSet model: "+b);this.c=mc[b]||{};a.sound&&(this.I=null,window&&(this.I=window.AudioContext||window.webkitAudioContext),this.I&&new this.I);B(this)}w(T); +var V={ca:1978.1,Dc:{da:0,xd:1,Bd:16,Id:32,Rd:64,Qd:128,Ka:14},Da:{da:1,Tb:1,wc:2,sc:4,tc:16,uc:32,vc:64,Ka:8},Ec:{da:2,wd:3,$d:4,yd:8,Md:16,Nd:32,Od:64,zd:128,Ka:0},Vd:{da:3},Td:{da:2,Jd:7},Xd:{da:3,ae:1,Wd:2,Pd:4,Gd:8,Ad:16,qd:32},Ud:{da:4},Yd:{da:5,Cd:1,Dd:2,Ed:4,Fd:8,be:16}},W={ca:100,ka:{da:66,zb:1,oc:2,pc:4,Ld:8,Kd:16,wb:32,vb:64,rb:128},Rb:{da:66,INIT:0},Aa:{da:194,sd:0,pb:16,yc:32,xb:48,ac:0,bc:32},Wa:{da:162,Sd:0,dc:0,$b:0,cc:0,Zb:0},na:{Hd:{da:98},Ga:{Ob:0,Nb:1,Bc:2,Jc:4,Ub:5,zc:6,Zd:7}, +Ya:16383}},mc={SI1978:V,VT100:W};T.prototype.V=function(){return!1};T.prototype.ra=function(a,b,c,d){this.j=b;this.a=c;this.O=d;this.A=a;this.m=Wa(a,"Keyboard");this.Z=Wa(a,"SerialPort");this.video=Wa(a,"Video");ib(b,this,this.c.eb);jb(b,this,this.c.fb)};T.prototype.ga=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};T.prototype.ia=function(a){return a?this.save():!0};V.INIT=[[V.Dc.Ka,V.Da.Ka,V.Ec.Ka,0,0,0,0]]; +W.INIT=[[W.Rb.INIT,W.ka.oc|W.ka.pc],[W.Aa.ac,W.Aa.bc],[W.Wa.dc,W.Wa.$b,W.Wa.cc,W.Wa.Zb],[0,0,0,0,[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11776,11984,11888,11776,11808,11776,12E3,12E3,11901,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11904,11776,11784,11918,11808,11984,11856,11776,11808,11776,12E3,12E3,11881,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]];k=T.prototype;k.reset=function(){this.c.INIT&&!this.restore(this.c.INIT)&&this.K("reset error")}; +k.save=function(){var a=new F(this);switch(this.c.ca){case V.ca:a.set(0,[this.W,this.g,this.X,this.C,this.M,this.S,this.U]);break;case W.ca:a.set(0,[this.L,this.u]),a.set(1,[this.o,this.s]),a.set(2,[this.f,this.G,this.R,this.N]),a.set(3,[this.B,this.b,this.v,this.H,this.i])}return a.data()}; +k.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.c.ca){case V.ca:return this.W=b[0],this.g=b[1],this.X=b[2],this.C=b[3],this.M=b[4],this.S=b[5],this.U=b[6],!0;case W.ca:return this.L=b[0],this.u=b[1],b=a[1],this.o=b[0],this.s=b[1],b=a[2],this.f=b[0],this.G=b[1],this.R=b[2],this.N=b[3],b=a[3],this.B=b[0],this.b=b[1],this.v=b[2],this.H=b[3],this.i=b[4],!0}return!1};k.start=function(){};k.stop=function(){};k.Wc=function(){return this.W};k.Xc=function(){return this.g};k.Yc=function(){return this.X}; +k.Vc=function(){return this.C>>8-this.M&255};k.dd=function(a,b){this.M=b};k.fd=function(a,b){this.S=b};k.ed=function(a,b){this.C=b<<8|this.C>>8};k.gd=function(a,b){this.U=b};k.hd=function(){};function nc(a){var b=0,c=0,d=~a.B;for(a=0;10>a;a++)d&1&&(b=9-a),d>>=1;for(a=0;10>a;a++)d&1&&(c=9-a),d>>=1;return 10*b+c} +k.Zc=function(){var a=this.u,a=a&~W.ka.vb;if((Hb(this.a)&64)<<1&&(a|=W.ka.vb,a!=this.u)){var b,c;b=this.v&1;switch(this.v>>1&7){case W.na.Ga.Nb:this.B=this.B<<1|b;break;case W.na.Ga.Ub:b=nc(this);this.i[b]=W.na.Ya;break;case W.na.Ga.Ob:this.b=this.b<<1|b;break;case W.na.Ga.Jc:b=nc(this);c=this.b&W.na.Ya;this.i[b]=c;break;case W.na.Ga.zc:b=nc(this);c=this.i[b];null==c&&(c=W.na.Ya);this.b=c;break;case W.na.Ga.Bc:this.b<<=1,this.H=this.b&W.na.Ya+1}}a&=~W.ka.wb;this.H&&(a|=W.ka.wb);a&=~W.ka.rb;if(b=this.m){b= +this.m;if(c=b.f)c=b.a,c=Hb(b.a)>=b.m+c.ma*c.L/1E3*1.2731488;c&&(b.f=!1);b=!b.f}b&&(a|=W.ka.rb);a&=~W.ka.zb;this.Z&&this.Z.fa&1&&(a|=W.ka.zb);return this.u=a};k.jd=function(a,b){this.L=b};k.md=function(a,b){this.v=b};k.ld=function(a,b){a=b&3;switch(b>>2&3){case 0:this.f=this.f&-4|a;break;case 1:this.f=this.f&-13|a<<2;this.video&&(b=this.video,a=this.f,b.qa!==a&&((b.qa=a)?Nb(b,!0):b.ta=!0));break;case 2:switch(a){case 0:this.G=~this.G;break;case 2:case 3:this.R=3-a}break;case 3:this.N=a}}; +k.kd=function(a,b){b&W.Aa.yc?(b&=W.Aa.xb,this.s!=b&&(this.s=b,this.video&&(this.video.Hb=this.s==W.Aa.xb?50:60))):(b&=W.Aa.pb,this.o!=b&&(this.o=b,this.video&&(a=this.video,b=this.o==W.Aa.pb?132:80,a.H=b,a.T=a.Ba,80>8&255,a.b[d++]=g[c]>>16&255,a.b[d++]=g[c]>>24&255;else a.b=e;a.wa=e.symbols;if(!a.b.length){q("Empty ROM: "+b);return}if(1==a.b.length){q(a.b[0]);return}}catch(h){a.K("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.b=Array(b.length),e=0;e>>f.j;0>>=f.j;0d?a.j.push({mb:b,jb:Date.now(),bb:!1}):(a.j[d].jb=Date.now(),a.j[d].bb=!1);else if(0<=d){if(!a.j[d].bb){var e=a.j[d].jb;if(e&&100>Date.now()-e)return a.j[d].bb=!0,Ec(a),!0}a.j.splice(d,1)}if(a.M){d=0;switch(b){case "1p":d=V.Da.sc;break;case "2p":d=V.Da.wc;break;case "coin":d=V.Da.Tb;break;case "left":d=V.Da.uc;break;case "right":d=V.Da.vc;break;case "fire":d=V.Da.tc}d&&(a=a.M,b=d,a.g&=~b,c&&(a.g|=b))}return!0} +function Ec(a){for(var b=0,c=-1;bc||c>e)c=e}else{Cc(a,d,!1);b=0;continue}}b++}0<=c&&setTimeout(function(){Ec(a)},c)}k.$c=function(){var a=this.g;0<=this.c&&(this.c>3)*a.G,!$a(a.j,a.ja,a.B,3)))return!1;a.B?(a.Oa=a.f.createImageData(b,c),a.Qa=16/a.la|0,Kc(a,a.B>>1)):Kc(a,(a.H+1)*a.W);a.s=document.createElement("canvas");a.s.width=b;a.s.height=c;a.sa=a.s.getContext("2d");a.I={};a.S=1<=a.Ba?8:16,f=8>(7>4)*c)}return l}Fc.prototype.ga=function(){return!0};Fc.prototype.V=function(a,b,c){var d=this;if("led"==a||"rled"==a)return this.va[b]=c,!0;switch(b){case "fullScreen":return this.w[b]=c,this.b&&this.b.Ja?c.onclick=function(){d.Ja()}:c.parentNode.removeChild(c),!0}return!1}; +Fc.prototype.Ja=function(){var a=!1;if(this.b){if(this.b.Ja){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.C/this.v;b>c&&(a=Math.round(c/b*100)+"%")}this.Na?(this.u.style.width=a,this.u.style.width=a,this.u.style.display="block",this.u.style.margin="auto"):(this.b.style.width=a,this.b.style.height="auto");this.b.style.backgroundColor="black";this.b.Ja();a=!0}this.R&&this.R.focus()}return a}; +function Ic(a,b){!b&&a.b&&(a.Na?a.u.style.width=a.u.style.height="":a.b.style.width=a.b.style.height="")}function Kc(a,b){a.Pa=b;a.N=!1;if(void 0===a.i||a.i.length!=a.Pa)a.i=Array(a.Pa)}function Mc(a,b,c,d,e){d=a.c?(b.height-c-1)*b.width+d:c+d*b.width;e&&1==a.U&&(208<=c&&236>c?e=a.S+0:28<=c&&72>c&&(e=a.S+1));a=a.L[e];d*=a.length;b.data[d]=a[0];b.data[d+1]=a[1];b.data[d+2]=a[2];b.data[d+3]=a[3]} +function Nb(a,b){var c=!0;if(!b){a.ma&&(120==a.ma?a.Za&1?(hc(a.a,2),c=!1):hc(a.a,1):hc(a.a,4));if(c&&a.N&&a.B){for(var d=a.j,e=a.B,f=!0,g=a.ja>>>d.j;0>=1);;){var x=cb(a.j,u++);if(127==(x&127)){var t=cb(a.j,u++),d=t&96,c=(t&15)<<8|cb(a.j,u),c=c+(t&16? +8192:16384);break}if(n>4)*x.P,Z,sa,Pa,fb,zc=x.T,Lb=x.P;D?(Z=H*t.T,sa=e*t.P,Pa=t.T,fb=t.P):(Z=H*t.Ha,sa=e*t.Ia,Pa=t.Ha,fb=t.Ia);x.T>t.T&&(Z*=2,Pa*=2);x.P>t.P&&(z||(Q+=t.P),Lb=t.P);D?D.drawImage(x.canvas,U,Q,zc,Lb,Z,sa,Pa,fb):(Z+=0,sa+=0,t.f.drawImage(x.canvas,U,Q,zc,Lb,Z, +sa,Pa,fb))}h++}g++}e++}}a.N=!0;!b&&a.ta&&1==h&&(a.i[l]=-1,h=0);a.ta=!1;(h||b)&&a.sa&&a.f.drawImage(a.s,0,a.qa,a.o,a.G-a.P,0,0,a.Nc,a.Mb)}else{e=a.ja;f=e+a.B;l=h=g=0;b=a.o;n=0;c=a.G;z=d=0;u=a.la;H=(1<>>t.j;t=x!=t.f?t.b[U].Ib(x,D):t.b[U++].gb(x,D)|t.b[U&t.o].gb(0,D+1)<<8;if(a.N&&t===a.i[g])h+=a.Qa;else{a.i[g]=t;(D=z)&&(t=t>>8|(t&255)<<8);h>D&H,Mc(a,a.Oa,h++,l,U),D+=u;h>n&&(n=h);l=d&&(d=l+1)}e+= +2;g++;if(h>=a.o&&(h=0,l++,l>a.G))break}a.N=!0;bMissing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||Fa.aspect);f&&.3<=f&&3.33>=f&&(ya("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");ta("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Fc(d,e,g,f,c);Qa(d,c)}}); +function Nc(a){this.I=+a.adapter;switch(this.I){case 0:this.L=0;this.R=2;break;default:q("Unrecognized serial adapter #"+this.I);return}this.b=this.c=null;this.N=a.tabSize;this.H=a.charBOL;this.f=0;this.C=!1;r.call(this,"SerialPort",a,Nc);var b=a.binding;if("console"==b)this.c="";else{var c;a=Oc;b&&(void 0===c&&(c="Panel"),(c=Oa(c,this.id))&&(b=c.w[b])&&this.V(null,a,b))}this.g="";this.i=this.s=null;this.exports={connect:this.Gb,receiveData:this.kb}}w(Nc); +var Pc=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Qc=[!1,0,0,133,142,39,238],Oc="buffer";k=Nc.prototype; +k.V=function(a,b,c,d){var e=this;switch(b){case Oc:return this.w[b]=this.b=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=ha(b[0]);if(c!=this.Xa)return;b=ha(b[1]);if(this.i=Na(b)){var d=this.i.exports;if(d){var e=d.connect;e&&e.call(this.i);if(this.s=d.receiveData){this.status(this.za+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.ga=function(a,b){if(!b)if(this.Gb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.ia=function(a){return a?this.save():!0};k.reset=function(){Uc(this)};k.save=function(){var a=new F(this),b=0,c=[];c[b++]=this.o;c[b++]=this.B;c[b++]=this.G;c[b++]=this.fa;c[b++]=this.m;c[b++]=this.v;c[b]=this.u;a.set(0,c);return a.data()};k.restore=function(a){return Uc(this,a[0])};function Uc(a,b){var c=0;b||(b=Qc);a.o=b[c++];a.B=b[c++];a.G=b[c++];a.fa=b[c++];a.m=b[c++];a.v=b[c++];a.u=b[c];return!0} +function Vc(a,b){var c=a.u&b;b&15||(c>>=4);b=Pc[c];c=((a.m&12)>>2)+6;a.m&16&&c++;c+=((a.m&192)>>6)+1>>1;return 1E3/Math.round(b/c)}function Rc(a,b){return a.C||a.fa&2?!1:(a.B=b,a.fa|=2,hc(a.a,a.R),!0)}k.kb=function(a){null!=a&&(this.g="number"!=typeof a?a:this.g+String.fromCharCode(a));this.g&&(Rc(this,this.g.charCodeAt(0))&&(this.g=this.g.substr(1)),this.g&&this.a&&Kb(this.a,this.S,Vc(this,15)));return!0};k.Uc=function(){var a=this.B;this.fa&=-3;return a};k.Tc=function(){return this.fa}; +k.cd=function(a,b){this.G=b;this.fa&=-6;if(19==b)this.C=!0;else if(17==b)this.C=!1;else if(this.s&&this.s.call(this.i,b),this.b)if(8==b)this.b.value=this.b.value.slice(0,-1),0":String.fromCharCode(b);var c=a.length;9==b?(b=this.N||8,c=b-this.f%b,this.N&&(a=" ".slice(0,c))):13==b&&(this.f=c=0,a="\n");this.H&&!this.f&&c&&(a=String.fromCharCode(this.H)+a);this.b.value+=a;this.b.scrollTop=this.b.scrollHeight;this.f+=c}else if(null!= +this.c){if(10==b||1024<=this.c.length)this.ea(this.c),this.c="";10!=b&&(this.c+=String.fromCharCode(b))}this.a&&Kb(this.a,this.U,Vc(this,240))};k.bd=function(a,b){this.o?(this.v=b,this.v&64&&(this.o=!1)):(this.m=b,this.o=!0)};k.ad=function(a,b){this.u=b};var Sc={0:Nc.prototype.Uc,1:Nc.prototype.Tc},Tc={0:Nc.prototype.cd,1:Nc.prototype.bd,2:Nc.prototype.ad};za(function(){for(var a=A(document,"pc8080","serial"),b=0;b\nLicense: GPL version 3 or later ");for(b=0;bYc){if($c(d,this.s)){this.i=new F(this,"1.30.3","failsafe");$c(this.i)&&(ed(this,d),a=2,fd(this.i));this.i.set("timestamp",ka());gd(this.i);var e=this.b&&!this.A;if(1==a||na("Click OK to restore the previous PC8080 machine state, or CANCEL to reset the machine.")){if(c=dd(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?$c(d,g):("error"== +f&&"no machine state"!=g?(this.K("Error: "+g),"unable to verify user"==g&&(ra("user",""),this.c=null)):this.ea(f+": "+g),fd(d),$c(d)?(c=dd(d),e=!0):c=!1))}e&&cd(this,c?d:null)}else 2==a&&d.clear()}else cd(this);delete this.s;delete this.u}e=Ma(this.id);for(f=0;fa[1];a=a[2];this.L=!0;this.l.Y=!0;var d=this.w.power;d&&(d.textContent="Shutdown");this.a&&(hd(this,this.a,b,c,a),this.a.Sa());this.C&&(ed(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.f=0}; +function ed(a,b){if(na("There may be a problem with your PC8080 machine.\n\nTo help us diagnose it, click OK to send this PC8080 machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PC8080",ver:"1.30.3"};d.url=a.I;d.user=c;d.type="bug";d.data=b;la("http://www.pcjs.org/api/v1/report",d,!0)}} +function id(a,b,c){var d,e="none";if(a.f)return null;a.f--;var f=new F(a,"1.30.3"),g=new F(a,"1.30.3","validate"),h=ka();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ia&&(c&&Eb(a.a),d=a.a.ia(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.Y=!1,!1===d&&(e=null)));for(var h=Ma(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PC8080$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pc8080$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(u){f=null,a=u.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");la(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],n,u=/( [a-z]+=)(['"])(.*?)\2/g;n=u.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[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);pd(a,b,c)}})}else c(a,null)} +function qd(a,b,c,d){function e(a){if(void 0===h){var b=g&&A(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=ga(a))}function f(a){e("Error: "+a);l&&(--md||Ca(!0));l=!1}var g,h,l=!0;md++;Ka[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var u=document.head||document.getElementsByTagName("head")[0],z=document.createElement("style");z.type="text/css";z.styleSheet?z.styleSheet.cssText=n:z.appendChild(document.createTextNode(n));u.appendChild(z)}c|| +(c="/versions/pc8080/1.30.3/components.xsl");n=function(d,h){h?nd(c,null,null,!1,e,function(d,l){l?(La(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--md||Ca(!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),--md||Ca(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?nd(b,a,d,!0,e,n):od(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(H){f(H.message)}return l}window.embedPC8080=function(a,b,c,d){Ca(!1);return qd(a,b,c,d)};window.enableEvents=Ca;window.sendEvent=Da;})(); diff --git a/versions/pcx86/1.30.3/common.css b/versions/pcx86/1.30.3/common.css new file mode 100644 index 000000000..6b1c0f887 --- /dev/null +++ b/versions/pcx86/1.30.3/common.css @@ -0,0 +1,265 @@ +@CHARSET "UTF-8"; +/** + @author Jeff Parsons (@jeffpar) + @website http://www.pcjs.org/ + @created 2013-05-05 + @modified 2014-02-23 + @license http://www.gnu.org/licenses/gpl.html + */ +body { + margin: 0; + background: #202020; +} +h1, h2 { + margin-top: 0; + color: #cccccc; +} +h1, h2, h3, h4 { + word-wrap: break-word; +} + +h4 a { + color: #cccccc !important; +} +p { + line-height: 1.5em; +} +img { + max-width: 100%; +} +a img { + vertical-align: bottom; +} +pre, code { + color: #000000; + background-color: #cccccc; + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; +} +pre { + margin: 1em 2em; + padding: 1em; + border-radius: 5px; + overflow: auto; +} +code { + padding: 1px; +} +pre a, code a { + color: #006400 !important; +} +.common { + width: 100%; + margin: 0 auto; + color: #cccccc; +} +.common a { + + color: #7fc07f; + text-decoration: none; +} +.common hr { + border-color: #808080; +} +.common a:hover { + text-decoration: underline; +} +.common, .machine { + font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; + font-size: 15px; +} +.machine { + margin: 15px; + overflow: hidden; +} +.c1pjs { + overflow: visible; +} +.machine-placeholder { + text-align: center; + font-weight: bold; +} +.common-top { + background: #202020; + font-size: small; +} +.common-top-left { + float: left; + width: 60%; +} +.common-top-left ul { + line-height: 1.5em; + list-style-type: none; + margin: 0; + padding: 1em 1em 1em 9px; + overflow: hidden; +} +.common-top-left ul li { + display: block; + float: left; +} +.common-top-left ul li a { + border-right: 1px solid #6f6f6f; + padding: 2px 6px 2px 6px; +} +.common-top-left ul li:last-child a { + border-right: none; +} +.common-top-right { + float: right; + width: 40%; +} +.common-top-right p { + float: right; + margin: 0; + padding: 1em; +} +.common-middle { + clear: both; + padding: 1px 1em 1px 1em; + background: #404040; +} +.common-sidebar { + float: left; + font-size: small; + width: 140px; + padding-bottom: 20px; + overflow: hidden; + white-space: nowrap; + word-wrap: break-word; +} +.common-list { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list li { + + padding-bottom: 7px; +} +.common-list-data { + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; +} +.common-list-data li { + line-height: 1.5em; +} +.common-list-data-items, .common-list-data-subitems { + font-size: x-small; + list-style-type: none; + margin-top: 0; + margin-bottom: 0; + padding-left: 2em; +} +.common-list-data-items li, .common-list-data-subitems li { + padding-bottom: 0; +} +.common-main { + margin-left: 150px; + +} +.common-main blockquote { + text-align: justify; +} +.common-image-gallery { + margin: 0 auto; + text-align: center; +} +.common-image-gallery:after { + content: ''; + display: block; +} +.common-image-frame { + display: inline-block; + margin: 8px; + text-align: center; +} +.common-image-link { + padding: 5px; + border: 1px solid black; + border-radius: 5px; + background-color: #FAEBD7; +} +.common-image-label { + font-size: x-small; +} +.common-bottom { + clear: both; + padding-top: 1em; +} +.common-bottom:after { + content: ''; + display: block; + clear: both; +} +.common-reference { + float: left; + font-size: x-small; +} +.common-reference a { + text-decoration: none; +} +.common-copyright { + float: right; + font-size: x-small; +} +.common-copyright a { + text-decoration: none; +} +.md-list { +} +.md-list li { + line-height: 1.5em; + margin-bottom: 1em; +} +.md-list li p { + padding-left: 2em; +} +.md-list-compact { +} +.md-list-compact li { + margin-bottom: 0; +} +.md-list-none { + list-style-type: none; + padding-left: 2em; +} +.md-list-none li { + margin-bottom: 0; +} +@media screen and (max-width: 900px) { + + .common-sidebar { + width: 100%; + white-space: normal; + } + .common-list { + padding-left: 0; + } + .common-list-data { + padding-left: 0; + } + .common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li { + width: 130px; + float: left; + overflow: hidden; + vertical-align: top; + padding-right: 1em; + margin-top: 0; + } + .common-list-data-subitems { + display: none; + } + .common-main { + clear: both; + margin-left: 0; + padding-left: 0; + padding-right: 0; + } + .md-list-none { + padding-left: 1em; + } +} diff --git a/versions/pcx86/1.30.3/common.xsl b/versions/pcx86/1.30.3/common.xsl new file mode 100644 index 000000000..ec22c15d5 --- /dev/null +++ b/versions/pcx86/1.30.3/common.xsl @@ -0,0 +1,56 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +

    Powered by JavaScript, Vanilla JS, and GitHub

    +
    +
    +
    + + +
    +

    + +
    +
    + +
    diff --git a/versions/pcx86/1.30.3/components.css b/versions/pcx86/1.30.3/components.css new file mode 100644 index 000000000..b40fd1375 --- /dev/null +++ b/versions/pcx86/1.30.3/components.css @@ -0,0 +1,237 @@ +@CHARSET "UTF-8"; + + +*:not(input,textarea) { + -webkit-user-select: none; +} +.pcjs-embed { +} +.pcjs-embed:after { + clear:both; +} +.pcjs-machine { +} +.pcjs-name, .pcjs-menu { + clear: both; + font-weight: bold; + padding-bottom: 4px; +} +.pcjs-menu { + float: left; +} +.pcjs-canvas { + width: 100%; + height: auto; +} +.pcjs-container { + color: #000000; + position: relative; +} +.pcjs-label { + font-size: small; + line-height: 20px; + vertical-align: middle; + float: left; + font-family: Monaco, "Lucida Console", monospace; +} +.pcjs-controls textarea { + font-family: Monaco, "Lucida Console", monospace; + font-size: x-small; +} +.pcjs-fieldset { + border: none; + margin: 0; + padding: 0; +} +.pcjs-flag { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 20px; + vertical-align: middle; +} +.pcjs-progress { + height: 20px; + width: 300px; + margin-top: 8px; + border: 1px solid black; + position: relative; +} +.pcjs-progress-bar { + height: 20px; + width: 0%; + background-color: gold; + position: absolute; + top: 0px; +} +.pcjs-progress-text { + height: 20px; + width: 300px; + font-size: small; + line-height: 20px; + text-align: center; + position: absolute; + top: 0px; + z-index: 1; +} +.pcjs-register { + font-family: Monaco, "Lucida Console", monospace; + font-size: small; + text-align: center; + line-height: 20px; + vertical-align: middle; + border: 1px solid black; +} +.pcjs-switches { + float: left; +} +.pcjs-bitBucket { + float: left; + width: 19px; + height: 38px; +} +.pcjs-bitCell { + float: left; + width: 19px; + height: 19px; + margin-right: -1px; + margin-bottom: -1px; + border: 1px solid black; + text-align: center; + line-height: 19px; +} +.pcjs-bitCellLeft { + border-left: 1px solid black; +} +.pcjs-bitLabel { + font-size: xx-small; + text-align: center; +} +.pcjs-description, .pcjs-status { + font-size: x-small; + line-height: 2.8em; +} +.pcjs-key { + border: 1px solid black; + font-size: x-small; + text-align: center; + position: absolute; + height: 34px; + line-height: 34px; + background-color: #ffffff; +} +.pcjs-panel-group { + color: #ffffff; + background-color: #404040; +} +.pcjs-triplet { + padding: 1px; +} +.pcjs-ledlbl { + text-align: center; + font-size: 40%; + background-color: #000000; +} +.pcjs-ledlbl0 { + text-align: right; + font-size: 50%; + background-color: #8d4076; +} +.pcjs-ledlbl1 { + text-align: right; + font-size: 50%; + background-color: #d83662; +} +.pcjs-ledpad { + text-align: center; + font-size: x-small; + line-height: 32px; + background-color: #000000; + border-bottom-left-radius: 20%; + border-bottom-right-radius: 20%; +} +.pcjs-led { + float: left; + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + text-align: center; + vertical-align: middle; + background-color: #000000; +} +.pcjs-rled { + width: 8px; + height: 8px; + margin: 4px; + border: 1px solid black; + border-radius: 50%; + text-align: center; + vertical-align: middle; + background-color: #ff0000; + max-width: 50%; + max-height: 50%; +} +.pcjs-swlbl { + text-align: center; + font-size: 40%; + line-height: 16px; + background-color: #000000; + border-top-left-radius: 20%; + border-top-right-radius: 20%; +} +.pcjs-swpad { + height: 32px; + background-color: #000000; +} +.pcjs-switch { + height: 10px; + width: 28px; + margin-top: 0%; + max-width: 90%; + background-color: #00ff00; +} +.pcjs-screen { + clear: both; + height: auto; + position: relative; + line-height: 0; +} +.pcjs-screen textarea { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + border: 0; + padding: 0; + line-height: 0; +} +.pcjs-reference { + float: left; + font-size: x-small; +} +.pcjs-reference a { + text-decoration: none; +} +.pcjs-copyright { + float: right; + font-size: x-small; +} +.pcjs-copyright a { + text-decoration: none; +} + +@media screen and (max-width: 900px) { + .pcjs-textarea { + width: 100% !important; + } + .pcjs-registers { + width: 100% !important; + } + .pdp11-device { + width: 100% !important; + max-width: none !important; + } +} diff --git a/versions/pcx86/1.30.3/components.xsl b/versions/pcx86/1.30.3/components.xsl new file mode 100644 index 000000000..d08149b1b --- /dev/null +++ b/versions/pcx86/1.30.3/components.xsl @@ -0,0 +1,1380 @@ + + + +]> + + + + + + + + pc + pcjs + pcx86 + PCx86 + 1.30.3 + www.pcjs.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + clear:both; + position:; + position:relative; + text-align:; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,addrReset:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + device + ,type:'',baudReceive:,baudTransmit:,autoMount:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + + + false + + + + + serial + ,adapter:,baudReceive:,baudTransmit:,binding:'',tabSize:,charBOL:,upperCase: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + rom + ,addr:,size:,alias:,file:'',notify:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + null + + + + + + null + + + + + + true + + + + + ram + ,addr:,size:,file:'',load:,exec:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + +
    diff --git a/versions/pcx86/1.30.3/document.css b/versions/pcx86/1.30.3/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pcx86/1.30.3/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pcx86/1.30.3/document.xsl b/versions/pcx86/1.30.3/document.xsl new file mode 100644 index 000000000..dbb3ae30f --- /dev/null +++ b/versions/pcx86/1.30.3/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pcx86/1.30.3/machine.xsl b/versions/pcx86/1.30.3/machine.xsl new file mode 100644 index 000000000..e474cbd9b --- /dev/null +++ b/versions/pcx86/1.30.3/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pcx86/1.30.3/manifest.xsl b/versions/pcx86/1.30.3/manifest.xsl new file mode 100644 index 000000000..fab2465e3 --- /dev/null +++ b/versions/pcx86/1.30.3/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pcx86/1.30.3/outline.xsl b/versions/pcx86/1.30.3/outline.xsl new file mode 100644 index 000000000..702611d69 --- /dev/null +++ b/versions/pcx86/1.30.3/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pcx86/1.30.3/pcx86-dbg.js b/versions/pcx86/1.30.3/pcx86-dbg.js new file mode 100644 index 000000000..cc58c917a --- /dev/null +++ b/versions/pcx86/1.30.3/pcx86-dbg.js @@ -0,0 +1,868 @@ +(function(){/* + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/parallelport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2016 +*/ +var l,aa,ba={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],5242880:[256,2,40,256],10485760:[512,2,40,256]},p={uo:1,dl:3,vo:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ue:65,Bi:66,Ci:67, +Di:68,E:69,Ei:70,Fi:71,Gi:72,Hi:73,Ii:74,Ji:75,Ki:76,Li:77,Mi:78,Ni:79,Oi:80,Q:81,Pi:82,Qi:83,Ri:84,Si:85,Ti:86,Ui:87,Vi:88,Wi:89,og:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ve:97,ol:98,ql:99,d:100,e:101,Al:102,Bl:103,Cl:104,Dl:105,Tm:106,k:107,Um:108,Ym:109,n:110,en:111,p:112,q:113,r:114,lo:115,t:116,oo:117,po:118,qo:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},ca={};ca[186]=p[";"];ca[187]=p["="];ca[188]=p[","];ca[189]=p["-"];ca[190]=p["."];ca[191]=p["/"];ca[192]=p["`"];ca[219]=p["["]; +ca[220]=p["\\"];ca[221]=p["]"];ca[222]=p["'"];ca[173]=p["-"];var da={};da[p["1"]]=p["!"];da[p["2"]]=p["@"];da[p["3"]]=p["#"];da[p["4"]]=p.$;da[p["5"]]=p["%"];da[p["6"]]=p["^"];da[p["7"]]=p["&"];da[p["8"]]=p["*"];da[p["9"]]=p["("];da[p["0"]]=p[")"];da[186]=p[":"];da[187]=p["+"];da[188]=p["<"];da[189]=p._;da[190]=p[">"];da[191]=p["?"];da[192]=p["~"];da[219]=p["{"];da[220]=p["|"];da[221]=p["}"];da[222]=p['"'];da[173]=p._;da[61]=p["+"];da[59]=p[":"]; +function ea(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1;return c}function ha(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} +function ia(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function u(a){return r(a,2,!0)}function v(a){return r(a,4,!0)} +function ja(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} +function pa(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function qa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ra={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function sa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var va=[31,28,31,30,31,30,31,31,30,31,30,31]; +function wa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.vh|g<>a.shift}function ya(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb?this.xd=this.id:(this.ce=this.id.substr(0,b),this.xd=this.id.substr(b+1));this[a]=c;this.la={ready:!1,Ff:!1,hh:!1,ic:!1,error:!1};this.zg=null;this.la.error=!1;this.qa={};this.ha=null;this.wc=d||0;cb.push(this)}var db=void 0,eb={}; +if(window){db||(db=window.location.search.substr(1));for(var fb,gb=/\+/g,hb=/([^&=]+)=?([^&]*)/g;fb=hb.exec(db);)eb[decodeURIComponent(fb[1].replace(gb," "))]=decodeURIComponent(fb[2].replace(gb," "))}function ib(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function jb(a,b){b||(b=bb);a.prototype=ib(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),cb=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},cb=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b=this.x&&a=this.y&&b=c>>2);d?(b=new Hb(a.x,a.y,a.ad,a.A*b/c|0),a.y+=b.A,a.A-=b.A):(b=new Hb(a.x,a.y,a.ad*b/c|0,a.A),a.x+=b.ad,a.ad-=b.ad);return b}l=Fb.prototype;l.Pb=function(a,b,c,d){return this.X&&this.X.Pb(a,b,c,d)||this.F&&this.F.Pb(a,b,c,d)||this.B&&this.B.Pb(a,b,c,d)||this.ha&&this.ha.Pb(a,b,c,d)?!0:this.parent.Pb.call(this,a,b,c,d)}; +l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.F=c;this.ha=d;this.B=Jb(a,"Keyboard")};l.hc=function(a,b){b||Kb();return!0};l.gc=function(){return!0};l.he=function(a,b){a.button||(this.ea=b?0:-1,Mb(this,a,b))};l.Kf=function(a){Mb(this,a)}; +function Mb(a,b,c){var d=1280/null.offsetWidth,e=720/null.offsetHeight,f=null.getBoundingClientRect(),d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.ea||(a.ea=Math.abs(a.L-d)>Math.abs(a.V-b)?1:2),1==a.ea?b=a.V:2==a.ea&&(d=a.L));a.L=d;a.V=b;if(0<=d&&1280>d&&0<=b&&720>b){a:{c=d;if(960>c&&a.A&&a.A.Se)for(f=0;fd&&(f=d);c=f;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.Ca)){b=c;if(a.context&&a.ia&&a.ka){e=a.ia.width;a.ka.fillStyle="black";a.ka.fillRect(0,360,e,360);Ob(a,378,a.ia,a.ka);a.pa=a.Da.width/24|0;if(null==b)Pb(a,"Mouse over memory to dump");else for(Pb(a,r(b,8,!0),null,0,1),f=1;16>=f;f++){d="";for(g=1;8>=g;g++){var h;h=a.ga;var k=b++;h=h.sa[(k&h.Gb)>>>h.La].re(k&h.A,k);Pb(a,r(h,2),null,1);d+=32<=h&&128>h?String.fromCharCode(h):"."}Pb(a,d,null,0,1)}a.context.drawImage(a.ia,0,360,e,360,a.qb,a.Db,a.Pa,a.cb)}a.Ca= +c}}}l.pd=function(){};function Qb(a,b,c,d){a.A.Bf[a.A.fj++]={El:b,Td:c,type:d};return wa(Nb,b,c,0,d)}function Ob(a,b,c,d){var e,f=null.style.color,g=a.Oa=10;a.C=g;a.U=b;a.W=a.va=18;e||(e=a.ua||a.va+"px Monaco, Lucida Console, Courier New");a.fa=a.ua=e;c&&(a.Da=c);d&&(a.N=d,a.Ea=f||"white")} +function Pb(a,b,c,d,e){a.N.font=a.fa;a.N.fillStyle=a.Ea;a.N.fillText(b,a.C,a.U);a.C+=a.pa;null!=c&&(16!=a.Tb?b=c.toString():(b=8>a.Ka?"0x":"",b+=r(c,a.Ka)),a.N.fillText(b,a.C,a.U),a.C+=a.pa);d&&(a.C+=a.pa*d);e&&(a.C=a.Oa,a.U+=(a.W+2)*(e||1))}function Kb(){for(var a=!1,b=tb(document,"pcx86","panel"),c=0;c=this.N?12:24>=this.N?14:15;this.Sb=1<>2;this.A=this.Sb-1;this.U=this.W/this.Sb|0;this.ga=this.U-1;this.B=[];this.C=[];this.L=this.V=!1;this.aa=[];this.ea=[];a=new B;Sb(a,this.ha);this.sa=Array(this.U);for(b=0;b>>a.La;0g&&(n=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.Fa)return k.Qe+=k.Fa-f,k.Fa=f,!0;if(f>=k.Fa+k.Qe){n=k.size-(f-m);n>g&&(n=g);k.Qe=f-k.Fa+n;f=m+a.Sb;g-=n;h++;continue}}return Wb(a,1,f,g)}f=new B(f,n,a.Sb,d,e);Sb(f,a.ha,k);a.sa[h++]=f;f=m+a.Sb;g-=n}return 0>=g?(Xb(a.F),a.F.la.Ib||a.status(Math.floor(c/1024)+"Kb "+Yb[d]+" at "+r(b)),!0):Wb(a,2,b,c)} +var Nb,$b={Hk:20,count:8,Ko:1,type:3},ac=0,bc;for(bc in $b){var cc=$b[bc];$b[bc]={vh:(1<>>this.La;0>>a.La;0>>=a.La;0>>a.La;0>>this.La].pc(a&this.A,a)}; +l.na=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;return b!=this.A?this.sa[c].sf(b,a):this.sa[c++].pc(b,a)|this.sa[c&this.ga].pc(0,a+1)<<8};function mc(a,b){var c=b&a.A,d=(b&a.Gb)>>>a.La;return c!=a.A?a.sa[d].gg(c,b):a.sa[d++].re(c,b)|a.sa[d&a.ga].re(0,b+1)<<8}l.oa=function(a){var b=a&this.A,c=(a&this.Gb)>>>this.La;if(b>>this.La].sc(a&this.A,b&255,a)};l.jb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;c!=this.A?this.sa[d].zf(c,b&65535,a):(this.sa[d++].sc(c,b&255,a),this.sa[d&this.ga].sc(0,b>>8&255,a+1))};function nc(a,b,c){var d=b&a.A,e=(b&a.Gb)>>>a.La;d!=a.A?a.sa[e].zi(d,c&65535,b):(a.sa[e++].xf(d,c&255,b),a.sa[e&a.ga].xf(0,c>>8&255,b+1))} +l.nb=function(a,b){var c=a&this.A,d=(a&this.Gb)>>>this.La;if(c>>=8};l.xj=function(){return null}; +function oc(a,b){var c=0,d=[],e=!a.X&&a.Eg==a.Gb;e||Tb(a,!0);for(var f=0;f>>=f)&k;if(void 0!==g){if(g[0])g[0](b,k,e);a.ha&&a.V!=g[1]&&Ac(a.ha,b,k)}else a.ha&&(ub(a.ha,a,b,k,e),a.V&&Ac(a.ha,b,k));f+=h<<3;b+=h;c-=h}}function Wb(a,b,c,d,e){b="Memory block error ("+b+": "+r(c)+","+r(d)+")";e?a.ha?a.ha.message(b):a.log(b):w(b);return!1}var Bc;if(Ab){var Cc=new ArrayBuffer(2);(new DataView(Cc)).setUint16(0,256,!0);Bc=256===(new Uint16Array(Cc))[0]}else Bc=!1;var ic=Bc; +function B(a,b,c,d,e,f){this.id=Dc+=2;this.da=null;this.C=0;this.Fa=a;this.Qe=b;this.size=c||0;this.type=d||Ec;this.N=d==hc;this.controller=null;this.F=f;Sb(this);this.Wa=this.tj=!1;if(c)if(e)this.controller=e,a=e.wj(a),this.da=a[0],this.C=a[1],fc(this,e.nh());else if(Ab)this.X=new ArrayBuffer(c),this.qa=new DataView(this.X,0,c),this.Za=new Uint8Array(this.X,0,c),this.de=new Uint16Array(this.X,0,c>>1),this.da=new Int32Array(this.X,0,c>>2),fc(this,ic?jc:kc);else{this.da=Array(c>>2);for(e=0;e>8&65280|a>>>24);return a} +B.prototype={constructor:B,parent:null,qh:function(a){this.Fa=a},save:function(){var a,b;if(this.controller)a=null;else if(Ab)for(a=Array(this.size>>2),b=0;b>8,c)},U:function(a,b,c){this.sc(a++,b&255,c++); +this.sc(a++,b>>8&255,c++);this.sc(a++,b>>16&255,c++);this.sc(a,b>>>24,c)},Ea:function(a){return this.da[a>>2]>>>((a&3)<<3)&255},sb:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b]>>a;return 24>a?c&65535:c&255|(this.da[b+1]&255)<<8},Ya:function(a){var b=a>>2;a=(a&3)<<3;var c=this.da[b];a&&(c=c>>>a|this.da[b+1]<<32-a);return c},tc:function(a,b){var c=a>>2;a=(a&3)<<3;this.da[c]=this.da[c]&~(255<>2;a=(a&3)<<3;24>a?this.da[c]=this.da[c]&~(65535<>8);this.Wa=!0},Wc:function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<>>32-a}else this.da[c]=b;this.Wa=!0},Da:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a)||this.F&&Lc(this.F,b,1,!1);return this.re(a,b)},qb:function(a,b){this.ha&&null!=this.Fa&&Kc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,b,2,!1);return this.gg(a,b)},Pa:function(a,b){this.ha&&null!=this.Fa&& +Kc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,b,4,!1);return this.si(a,b)},bc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a)||this.F&&Lc(this.F,c,1,!0);this.N?this.L(a,b,c):this.xf(a,b,c)},sd:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,2)||this.F&&Lc(this.F,c,2,!0);this.N?this.L(a,b,c):this.zi(a,b,c)},Vc:function(a,b,c){this.ha&&null!=this.Fa&&Mc(this.ha,this.Fa+a,4)||this.F&&Lc(this.F,c,4,!0);this.N?this.L(a,b,c):this.ua(a,b,c)},Ja:function(a,b){this.yb.da[this.A]|=this.ga; +this.zb.da[this.B]|=this.ga;return this.Bd.pc(a,b)},Jb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.sf(a,b)},fb:function(a,b){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.ga;return this.Bd.Md(a,b)},Cc:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.sc(a,b,c)},Gd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V;this.Bd.zf(a,b,c)},hd:function(a,b,c){this.yb.da[this.A]|=this.ga;this.zb.da[this.B]|=this.V; +this.Bd.yf(a,b,c)},Ka:function(a,b){return Nc(this.F,b,!1).pc(a,b)},xd:function(a,b){return Nc(this.F,b,!1).sf(a,b)},gb:function(a,b){return Nc(this.F,b,!1).Md(a,b)},Uc:function(a,b,c){Nc(this.F,c,!0).sc(a,b,c)},Hd:function(a,b,c){Nc(this.F,c,!0).zf(a,b,c)},jd:function(a,b,c){Nc(this.F,c,!0).yf(a,b,c)},Ca:function(a){return this.Za[a]},aa:function(a){return this.Za[a]},Ga:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.pc=this.aa;return this.Za[a]},Tb:function(a){return this.qa.getUint16(a, +!0)},pa:function(a){return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Db:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.sf=this.pa;return a&1?this.Za[a]|this.Za[a+1]<<8:this.de[a>>1]},Oa:function(a){return this.qa.getInt32(a,!0)},fa:function(a){return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>>2]},cb:function(a){this.yb.da[this.A]|=32;this.zb.da[this.B]|=32;this.Md=this.fa;return a&3?this.Za[a]|this.Za[a+1]<<8|this.Za[a+2]<<16|this.Za[a+3]<<24:this.da[a>> +2]},Ub:function(a,b){this.Za[a]=b;this.Wa=!0},ra:function(a,b){this.Za[a]=b;this.Wa=!0},uc:function(a,b){this.Za[a]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.sc=this.ra;this.Bd.Wa=!0},qd:function(a,b){this.qa.setUint16(a,b,!0);this.Wa=!0},ya:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.Wa=!0},Fd:function(a,b){a&1?(this.Za[a]=b,this.Za[a+1]=b>>8):this.de[a>>1]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.zf=this.ya;this.Bd.Wa=!0},ce:function(a,b){this.qa.setInt32(a, +b,!0);this.Wa=!0},va:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.Wa=!0},Xc:function(a,b){a&3?(this.Za[a]=b,this.Za[a+1]=b>>8,this.Za[a+2]=b>>16,this.Za[a+3]=b>>24):this.da[a>>2]=b;this.yb.da[this.A]|=32;this.zb.da[this.B]|=96;this.yf=this.va;this.Bd.Wa=!0}};function Sb(a,b,c){a.ha=b;a.ze=a.Ae=0;c&&(c.F&&(a.F=c.F),(a.ze=c.ze)&&Hc(a,Ic,!1),(a.Ae=c.Ae)&&Jc(a,Ic,!1))} +function Oc(a){a.sc=a.N?a.L:a.xf;a.zf=a.N?a.W:a.zi;a.yf=a.N?a.U:a.ua}function Pc(a){a.pc=a.re;a.sf=a.gg;a.Md=a.si}function Jc(a,b,c){c&&a.Ae||(a.sc=!a.N&&b[1]||a.L,a.zf=!a.N&&b[3]||a.W,a.yf=!a.N&&b[5]||a.U);if(c||void 0===c)a.xf=b[1]||a.L,a.zi=b[3]||a.W,a.ua=b[5]||a.U}function Hc(a,b,c){c&&a.ze||(a.pc=b[0]||a.ia,a.sf=b[2]||a.ka,a.Md=b[4]||a.ea);if(c||void 0===c)a.re=b[0]||a.ia,a.gg=b[2]||a.ka,a.si=b[4]||a.ea}function fc(a,b,c){b||(b=5==a.type?Qc:6==a.type?Sc:Tc);Hc(a,b,c);Jc(a,b,c)} +var Tc=[],lc=[B.prototype.Ea,B.prototype.tc,B.prototype.sb,B.prototype.Cd,B.prototype.Ya,B.prototype.Wc],Ic=[B.prototype.Da,B.prototype.bc,B.prototype.qb,B.prototype.sd,B.prototype.Pa,B.prototype.Vc],Sc=[B.prototype.Ja,B.prototype.Cc,B.prototype.Jb,B.prototype.Gd,B.prototype.fb,B.prototype.hd],Qc=[B.prototype.Ka,B.prototype.Uc,B.prototype.xd,B.prototype.Hd,B.prototype.gb,B.prototype.jd]; +if(Ab)var kc=[B.prototype.Ca,B.prototype.Ub,B.prototype.Tb,B.prototype.qd,B.prototype.Oa,B.prototype.ce],jc=[B.prototype.aa,B.prototype.ra,B.prototype.pa,B.prototype.ya,B.prototype.fa,B.prototype.va],Vc=[B.prototype.Ga,B.prototype.uc,B.prototype.Db,B.prototype.Fd,B.prototype.cb,B.prototype.Xc]; +function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Bg=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Bg*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Nf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype; +l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.ha=d;for(b=0;b=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}} +l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;cc&&(c=60);2>c&&(c=2);var d=1;b&&1a.Y.Bg&&(c=Math.round(c/a.Y.Wd));return c}function Zc(a){a.Y.ne=0;a.uc=a.Ub=a.fb=a.A=0;$c(a);dd(a,1)} +function dd(a,b,c){var d=!1;if(void 0!==b){.8>a.Y.ne/a.Y.He?b=1:d=!0;a.Y.Wd=b;b=a.Y.Bg*a.Y.Wd;if(a.Y.He!=b){a.Y.He=b;b=a.Y.He.toFixed(2)+"Mhz";var e=a.qa.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.X&&a.X.wd()}fd(a,a.Ub);a.Ub=0;a.Y.oe=ta();a.Y.Ie=0;gd(a);return d} +l.Ne=function(a){if(vb(this,!0)){if(!this.la.Ib){dd(this);this.X&&this.X.start(this.Y.oe,cd(this));this.la.Ib=!0;this.la.yi=!0;this.N&&this.N.start();var b=this.qa.run;b&&(b.textContent="Halt");this.X&&(this.X.pd(!0),a&&this.X.wd(!0))}this.Y.Bh>=this.Y.Id&&gd(this,!0);this.Y.Qf=0;this.Y.Cg=ta();this.Y.Ie&&(a=this.Y.Cg-this.Y.Ie,a>this.Y.Dj&&(this.Y.oe+=a,this.Y.oe>this.Y.Cg&&(this.Y.oe=this.Y.Cg)));try{do{var c=this.la.Xe?1:this.Y.bn;if(this.N){hd(this.N);var d=this.N;a=c;var e=d.V[0];if(e.De){var f= +(cd(d.F,d.ka)-e.vd)/d.gb|0,g=id(d,0)-f;6==e.mode&&(g-=f);var h=g*d.gb|0;6==e.mode&&(h>>=1);a>h&&(a=h)}var c=a,k=this.N;a=c;if(k.A&&k.A[11]&64){var m=k.ua-cd(k.F,k.ka);0m&&(a=m)}c=a}try{this.wf(c)}catch(t){if("number"!=typeof t)throw t;}var n=this.fb-this.A;this.Ub+=n;this.Y.Qf+=n;fd(this,0,!0);bd(this,n);this.Y.Pf-=n;0>=this.Y.Pf&&(this.Y.Pf+=this.Y.Fj,this.X&&jd(this.X));this.Y.Of-=n;0>=this.Y.Of&&(this.Y.Of+=this.Y.Ej,this.X&&this.X.pd());this.Y.mf-=n;if(0>=this.Y.mf){this.Y.mf+=this.Y.Ah; +break}}while(this.la.Ib)}catch(t){this.Wb();ad(this);this.X&&this.X.stop(ta(),cd(this));vb(this,!1);zb(this,t.stack||t.message);return}c=setTimeout;d=this.Ai;this.Y.Ie=ta();e=this.Y.Dj;this.Y.Qf&&(e=Math.round(e*this.Y.Qf/this.Y.Ah));e-=this.Y.Ie-this.Y.Cg;if(f=this.Y.Ie-this.Y.oe)this.Y.ne=Math.round(this.Ub/(10*f))/100,864E5<=f&&(this.uc=0,this.N&&hd(this.N,!0),dd(this));if(0>e||this.Y.nee&&(this.Y.oe-=e),e=0;this.Y.Bh+=this.Y.Qf;this.Y.Ie+=e;c(d,e)}else ad(this),this.X&&this.X.stop(ta(), +cd(this))};l.wf=function(){return 0};l.Wb=function(a){wb(this,!0);this.fb-=this.A;this.A=0;fd(this,this.Ub);this.Ub=0;if(this.la.Ib){this.la.Ib=!1;this.N&&this.N.stop();var b=this.qa.run;b&&(b.textContent="Run")}this.la.complete=a};function ad(a,b){a.X&&(jd(a.X,b),a.X.pd(b))} +function kd(a,b,c,d){this.F=a;this.ha=a.ha;this.id=b;this.kc=c||"";this.Z=0;this.Ta=65535;this.Zb=this.Ta+1;this.Lb=this.Gc=this.ext=this.wb=this.type=this.Aa=0;this.Xb=-1;this.ba=this.Tc=2;this.R=this.Ba=65535;this.X=this.uh;this.ga=this.ij;this.qa=this.kj;this.A={Z:-1,Aa:0,Ta:0,wb:0,type:0,ext:0,Xb:-1};1==this.id&&(this.ag=0,this.C=null,this.df=!1,this.N=Array(32),this.B=[]);ld(this,!0,d)}function md(a,b){a.B.push(b);return[a.B.length,1]}l=kd.prototype; +l.uh=function(a){this.Z=a&65535;return this.Aa=this.Z<<4};l.Ag=function(a,b){var c,d,e=this.F;a&=65535;a&4?(c=e.Bc.Aa,d=c+e.Bc.Ta|0):(c=e.Ec,d=e.zd);if(c){c=c+(a&65528)|0;if(d-c|0)return e.A-=15,nd(this,c,a,b);6>this.id&&E.call(e,b&&3==this.id?10:13,a&65532)}return-1};l.Xm=function(a){var b=this.F;a=b.Mc+(a<<2);var c=b.na(a);b.ca&=-769;return this.load(b.na(a+2))+c|0}; +l.Wm=function(a){var b=this.F;a<<=3;var c=b.Mc+a|0;if(7<=(b.Sd-c|0))return this.C=!0,a=nd(this,c,a),-1!==a&&(a+=this.ag),a;E.call(b,13,a|2);return-1};l.ij=function(a){return this.Aa+a|0};l.kj=function(a){return this.Aa+a|0};l.hj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.ug()};l.sl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.ug()};l.ug=function(){E.call(this.F,13,0);return-1};l.jj=function(a,b){return(a>>>0)+b<=this.Zb?this.Aa+a|0:this.vg()}; +l.tl=function(a,b){return(a>>>0)+b>this.Zb?this.Aa+a|0:this.vg()};l.vg=function(){E.call(this.F,13,0);return-1};function sd(a,b,c,d,e){a.Z=b;a.Aa=d;a.Ta=e;a.Zb=(e>>>0)+1;a.wb=c;a.type=c&7936;a.ext=c>>16&192;a.Xb=(b&4?a.F.Bc.Aa:a.F.Ec)+(b&65528)|0;4>a.id&&ld(a,!0)}function td(a,b,c){var d=a.F,e=d.na(b+2),f=d.na(b)|(e&255)<<16,d=d.na(b+4);a.Z=c;a.Aa=f;a.Ta=d;a.Zb=(d>>>0)+1;a.wb=e;a.type=e&7936;a.ext=0;a.Xb=b;4>a.id&&ld(a,!0)} +function nd(a,b,c,d){var e=a.F;if(!d&&c===a.A.Z)return a.Z=c,a.Aa=a.A.Aa,a.Ta=a.A.Ta,a.Zb=(a.A.Ta>>>0)+1,a.wb=a.A.wb,a.type=a.A.type,a.ext=a.A.ext,a.Xb=a.A.Xb,a.A.Z=-1,ld(a,!0,!0,!1),a.Aa;a.A.Z=-1;var f=e.na(b+0),g=e.na(b+4),h=g&7936,k=e.na(b+2)|(g&255)<<16,m=e.na(b+6),n=c&65528;if(80386<=e.ja){var t=f,k=k|(m&65280)<<16,f=f|(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case 1:var q=a.C;a.df=!1;if(q&&1==c&&a.B.length){var A=a.B[a.ag-1];if(A&&!A())return-1}var F=c&3,C=(g&24576)>>13,A=-1,D,L;n||b>=e.Ec&& +b=a.Lb&&(F>a.Lb&&(A=H(e),ud(e,H(e),!0),I(e,A),a.df=!0),A=0);else{if(256==h||2304==h)return vd(a,c,q)?a.Aa:-1;if(1024==h)A=2,L=0,Fh||2048==(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,11,c&65532),-1}break;case 3:if(!n||4096>h||512!=(h&2560))return E.call(e,13,c&65532),-1;if(!(g&32768))return E.call(e,12,c&65532),-1;break; +case 4:q=h&-513;if(!n||256!=q&&2304!=q)return E.call(e,13,c&65532),-1;2304==q&&(a.Zi=k+e.na(k+102)|0,a.ml=k+a.Ta|0);break;case 6:if(!(h&4096)&&768>>0)+1,a.wb=g,a.type=h,a.ext=m,a.Xb=b,ld(a,!0,!0,!1));return k} +function vd(a,b,c){var d=a.F,e=a.Lb,f=d.Sa.Z,g=d.Sa.Aa;if(!c){if(!(d.Sa.type&512))return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb&=-513)}if(-1===d.Sa.load(b))return!1;var h=d.Sa.Aa;if(!1!==c){if(d.Sa.type&512)return E.call(d,13,b&65532),!1;d.jb(d.Sa.Xb+4,d.Sa.wb|=512)}d.Sa.type=d.Sa.type&-513|d.Sa.wb&512;256==d.Sa.type||768==d.Sa.type?(d.jb(g+14,M(d)),d.jb(g+16,Cd(d)),d.jb(g+18,d.G),d.jb(g+20,d.I),d.jb(g+22,d.M),d.jb(g+24,d.H),d.jb(g+26,J(d)),d.jb(g+28,d.P),d.jb(g+30,d.K),d.jb(g+32,d.J),d.jb(g+ +34,d.Xa.Z),d.jb(g+36,d.wa.Z),d.jb(g+38,d.ta.Z),d.jb(g+40,d.vb.Z),d.Bc.load(d.na(h+42)),Dd(d,d.na(h+16)|(c?16384:0)),d.G=d.na(h+18),d.I=d.na(h+20),d.M=d.na(h+22),d.H=d.na(h+24),d.P=d.na(h+28),d.K=d.na(h+30),d.J=d.na(h+32),d.Xa.load(d.na(h+34)),d.vb.load(d.na(h+40)),Ed(d,d.na(h+14),d.na(h+36)),b=38,g=26,a.Lb>>0)+1)}; +function ld(a,b,c,d){void 0===c&&(c=!!(a.F.$a&1));a.bd=!1;if(c)if(a.load=a.Ag,a.Cj=a.Wm,a.mc=a.hj,a.nc=a.jj,void 0===d&&(d=!!(a.F.ca&131072)),d)a.load=a.X,a.mc=a.ga,a.nc=a.qa,a.Lb=a.Gc=3,a.ba=2,a.R=a.Ba=65535,a.Ta=65535,a.Zb=a.Ta+1,a.Tc=a.ba,a.Xb=-1,a.df=!1;else{if(!(a.Z&-4))a.mc=a.ug,a.nc=a.vg;else if(a.type&4096){6144==(a.type&6656)&&(a.mc=a.ug);if(a.type&2048||!(a.type&512))a.nc=a.vg;1024==(a.type&3072)&&(a.mc==a.hj&&(a.mc=a.sl),a.nc==a.jj&&(a.nc=a.tl),a.bd=!0);b&&6>a.id&&a.Z&-4&&-1!==a.Xb&&(c= +a.Xb+5,d=a.F.Qa(c),d&1||a.F.qc(c,d|1))}b&&(a.Lb=a.Z&3,a.Gc=(a.wb&24576)>>13,80386>a.F.ja||!(a.ext&64)?(a.ba=2,a.R=65535):(a.ba=4,a.R=-1),a.Tc=a.ba,a.Ba=a.R)}else a.load=a.uh,a.Cj=a.Xm,a.mc=a.ij,a.nc=a.kj,a.Lb=a.Gc=0,a.Xb=-1,a.df=!1} +function Gd(a){this.ja=+a.model||8088;var b=a.stepping;this.Uc=this.ja+(b?ea(b,16):0);switch(this.ja){default:b=4772727;break;case 80286:b=6E6;break;case 80386:b=16E6}Wc.call(this,a,b);this.bg=61442;this.Cc=1792;this.$f=28672;this.Cd=4;this.ra=255;this.B=80286<=this.ja?Cb:Bb;this.W=Hd;this.fg=Id;this.lg=Jd;this.mg=Kd;if(80186<=this.ja&&(this.W=Hd.slice(),this.fg=Id.slice(),this.lg=Jd.slice(),this.ra=31,this.W[15]=Ld,this.W[96]=Md,this.W[97]=Nd,this.W[98]=Od,this.W[99]=Ld,this.W[100]=Ld,this.W[101]= +Ld,this.W[102]=Ld,this.W[103]=Ld,this.W[104]=Pd,this.W[105]=Qd,this.W[106]=Rd,this.W[107]=Sd,this.W[108]=Td,this.W[109]=Xd,this.W[110]=Yd,this.W[111]=Zd,this.W[192]=ee,this.W[193]=fe,this.W[200]=ge,this.W[201]=he,this.W[241]=ie,this.fg[7]=je,this.lg[7]=je,80286<=this.ja)){this.bg=2;this.Cc|=28672;this.Cd=0;this.W[15]=ke;this.tc=le.slice();for(a=0;a=this.Uc&&(this.tc[166]=te,this.tc[167]=ue)}}this.Hd=[];this.je=[];this.le=0;Zc(this);this.la.complete=this.la.nj=!1;this.Wg=0;this.kd=this.sa=[];this.La=this.Sb=this.Ea=this.Fd=this.hd=this.Gb=this.Db=0;ve(this)}jb(Gd,Wc);function we(a,b,c,d){b=(d?a.kd:a.sa)[b>>>a.La];c?--b.Ae||Oc(b):--b.ze||Pc(b);d&&Xb(a)} +function xe(a){var b;if(a.sa===a.kd){a.sa=Array(a.Fd);a.ke=new B(null,0,0,5,null,a);Sb(a.ke,a.ha);for(b=0;ba.me&&(a.eg[a.me++]=d);a.sa[b]=a.ke}a.Gd=[]}function Xb(a){a.$a&-2147483648&&xe(a)} +function Nc(a,b,c,d){var e=(b&-4194304)>>>20,f=a.kd[(a.Od+e&a.Gb)>>>a.La],g=f.Md(e);if(!(g&1))return d||ye.call(a,b,!1,c),a.jd;if(!(g&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;var h=(b&4190208)>>>10,g=a.kd[((g&-4096)+h&a.Gb)>>>a.La],k=g.Md(h);if(!(k&1))return d||ye.call(a,b,!1,c),a.jd;if(!(k&4)&&3==a.pa)return d||ye.call(a,b,!0,c),a.jd;c=a.kd[((k&-4096)+(b&4095)&a.Gb)>>>a.La];if(d)return c;d=b>>>a.La;k=a.sa[d];b&=-4096;var m;0>2;b.zb=g;b.B=h>>2;Ab&&ic&&c.da&&!c.controller&&!c.ze&&!c.Ae?(b.Za=c.Za,b.de=c.de,b.da=c.da,fc(b,Vc)):(b.ga=c?Gc(32):0,b.V=c?Gc(96):0,fc(b,Sc));Sb(b,a.ha,k);a.sa[d]=b;a.Gd.push(d);return b}function ze(a){a.sa!==a.kd&&(a.sa=a.kd,a.ke=null,a.Gd=null,a.jd=null)}l=Gd.prototype;l.reset=function(){this.la.Ib&&this.Wb();ve(this);Zc(this);this.la.error=!1}; +function Ae(a,b){var c;switch(b){case 0:c=a.G;break;case 1:c=a.I;break;case 2:c=a.M;break;case 3:c=a.H;break;case 4:c=J(a);break;case 5:c=a.P;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Be(a,b,c){switch(b){case 0:a.G=c;break;case 1:a.I=c;break;case 2:a.M=c;break;case 3:a.H=c;break;case 4:I(a,c);break;case 5:a.P=c;break;case 6:a.K=c;break;case 7:a.J=c}} +function ve(a){a.G=0;a.H=0;a.I=0;a.M=0;a.gb=0;a.P=0;a.K=0;a.J=0;a.cb=!1;a.ia=a.va=0;a.aa=0;a.ng=0;a.L=0;a.$a=65520;a.Mc=0;a.Sd=1023;a.ca=a.Pa=0;a.Wc=a.sd=a.Vc=a.Xc=0;a.qb=-1;a.bc=a.sb=-1;a.qe=a.U=-1;a.wa=new kd(a,1,"CS");a.vb=new kd(a,2,"DS");a.Xa=new kd(a,2,"ES");a.ta=new kd(a,3,"SS");I(a,0);ud(a,0);if(80386<=a.ja){switch(a.Uc){case 80562:case 80563:a.M=771;break;case 80578:a.M=772;break;case 80594:a.M=773;break;case 80595:case 80596:a.M=776}a.$a=16;a.ti=0;a.se=0;a.Od=0;a.Ja=[0,0,0,0,null,null,0, +0];a.Ee=[null,null,null,null,null,null,0,0];a.Nb=new kd(a,2,"FS");a.Ob=new kd(a,2,"GS");ze(a)}a.rf=new kd(a,0,"NULL");a.ka=a.vb;a.Ka=a.ta;a.S=a.Ia=0;a.D=a.C=-1;a.$b=a.rf;a.ua=0;if(80286>a.ja)Ed(a,0,65535);else{a.Ec=0;a.zd=65535;a.Bc=new kd(a,5,"LDT",!0);a.Sa=new kd(a,4,"TSS",!0);a.Da=new kd(a,6,"VER",!0);Ed(a,65520,61440);var b,c=M(a);b=a.wa;var d=-65536;80386>b.F.ja&&(d&=16777215);b=b.Aa=d;a.Ha=b+c|0;a.hf=(b>>>0)+(a.wa.Ta>>>0)+1}Dd(a,0);wd(a)} +function Ce(a){2==a.Tc?(a.cc=a.na,a.Oa=De,a.Ya=Ee,a.Jb=Fe,2==a.ba?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=Le,a.ea=Me,a.ya=Ne)):(a.cc=a.oa,a.Oa=Oe,a.Ya=Pe,a.Jb=Qe,2==a.ba?(a.V=cf,a.ea=df,a.ya=ef):(a.V=ff,a.ea=gf,a.ya=hf))}function xd(a,b){a.ba!=b&&(a.Ia|=1024,a.ba=b,a.R=2==b?65535:-1,jf(a))}function jf(a){2==a.ba?(a.Ga=32768,a.tb=a.na,a.rc=a.jb,2==a.Tc?(a.V=Ie,a.ea=Je,a.ya=Ke):(a.V=cf,a.ea=df,a.ya=ef)):(a.Ga=-2147483648,a.tb=a.oa,a.rc=a.nb,2==a.Tc?(a.V=Le,a.ea=Me,a.ya=Ne):(a.V=ff,a.ea=gf,a.ya=hf))} +function kf(a){a.Tc=a.wa.Tc;a.Ba=a.wa.Ba;Ce(a);a.ba=a.wa.ba;a.R=a.wa.R;jf(a);a.Ia&=-3073}l.vj=function(){var a=this.G+this.H+this.I+this.M+J(this)+this.P+this.K+this.J|0;return a=a+M(this)+this.wa.Z+this.vb.Z+this.ta.Z+this.Xa.Z+Cd(this)|0};function lf(a,b,c){void 0===a.Hd[b]&&(a.Hd[b]=[]);a.Hd[b].push(c)}function mf(a,b,c){c&&(null==a.je[b]&&a.le++,a.je[b]=c)}function nf(a,b){var c=a.je[b];null!=c&&(c(--a.le),delete a.je[b])} +function of(a,b){for(var c=a.Ja[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Ja[e],g=g&~(d>>2&3);b?a.sa[g>>>a.La].Rd(g&a.Ea,f,a):(g=a.sa[g>>>a.La],f?--g.Ae||Oc(g):--g.ze||Pc(g))}c>>=2;d>>=4}}function Lc(a,b,c,d){if(!(a.S&8192)&&a.Ja[7]&255){c--;var e=a.Ja[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Ja[g]&&b<=a.Ja[g]+h){a.Ja[6]|=1<>=2;f>>=4}}} +function wd(a,b,c){void 0===b&&(b=!!(a.$a&1));void 0===c&&(c=!!(a.ca&131072));a.mg=b&&!c?pf:Kd;ld(a.wa,!1,b,c);ld(a.vb,!1,b,c);ld(a.ta,!1,b,c);ld(a.Xa,!1,b,c);80386<=a.ja&&(ld(a.Nb,!1,b,c),ld(a.Ob,!1,b,c));kf(a)} +l.save=function(){var a=new qf(this);a.set(0,[this.G,this.H,this.I,this.M,J(this),this.P,this.K,this.J]);var b=M(this),c=this.wa.save(),d=this.vb.save(),e=this.ta.save(),f=this.Xa.save(),g;null!=this.Ec?(g=[this.$a,this.Ec,this.zd,this.Mc,this.Sd,this.Bc.save(),this.Sa.save(),this.Pa],80386<=this.ja&&(g.push(this.ti),g.push(this.se),g.push(this.Od),g.push(this.Ja),g.push(this.Ee))):g=null;b=[b,c,d,e,f,g,Cd(this)];80386<=this.ja&&(b.push(this.Nb.save()),b.push(this.Ob.save()));a.set(1,b);a.set(2,[this.ka.kc, +this.Ka.kc,this.S,this.Ia,this.ua,this.D,this.C]);a.set(3,[0,this.uc,this.Y.Wd]);a.set(4,oc(this.ga,!!(this.$a&-2147483648)));return a.data()}; +l.restore=function(a){var b=a[0];this.G=b[0];this.H=b[1];this.I=b[2];this.M=b[3];var c=b[4];this.P=b[5];this.K=b[6];this.J=b[7];b=a[1];this.wa.restore(b[1]);this.vb.restore(b[2]);this.ta.restore(b[3]);this.Xa.restore(b[4]);var d=b[5];d&&d.length&&(this.$a=d[0],this.Ec=d[1],this.zd=d[2],this.Mc=d[3],this.Sd=d[4],this.Bc.restore(d[5]),this.Sa.restore(d[6]),this.Pa=d[7],80386<=this.ja&&(this.ti=d[8],this.se=d[9],this.Od=d[10],this.Ja=d[11],this.Ee=d[12]),wd(this));Dd(this,b[6]);var d=!1,e;a:{e=this.ga; +var f=a[4],g;for(g=0;g>>0)+(a.wa.Ta>>>0)+1;a.pa=a.wa.Lb;kf(a)}function Ed(a,b,c,d){var e=a.wa;e.ag=b;e.C=d;b=e.load(c);return-1!==b?(tf(a,b+(a.wa.ag&a.wa.R)),a.wa.df):null} +function uf(a,b){b=(a.Ha>>>0)+b;b>a.hf&&(8088>=a.ja||a.wa.Ta==a.wa.Ba?b=a.wa.Aa+(b-a.hf&a.R):E.call(a,13,0));return b|0}function vf(a){a.Ha=a.qe}function J(a){return a.gb&~a.ta.Ba|a.fa-a.ta.Aa}function I(a,b){a.gb=b;a.fa=a.ta.Aa+(b&a.ta.Ba)|0}function wf(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&xf(a),g&2&&yf(a),g&4&&zf(a),g&8&&Af(a),g&16&&Bf(a),g&32&&Cf(a))}f?(a.Wc=d,a.Vc=b):(a.Wc=b,a.Vc=d);a.sd=c;a.Xc=d;a.resultType=e} +function Df(a,b,c,d,e){a.resultType=c|26;a.Xc=b;d?Ef(a):Ff(a);e?Gf(a):Hf(a);return b}function If(a,b,c,d){c&d?Ef(a):Ff(a);(b^c)&d?Gf(a):Hf(a)}function Jf(a){return xf(a)?1:0}function xf(a){a.resultType&1&&(a.ca&=-2,(a.Wc^(a.Wc^a.sd)&(a.sd^a.Vc))&a.resultType&-2147450752&&(a.ca|=1),a.resultType&=-2);return a.ca&1}function yf(a){a.resultType&2&&(a.ca&=-5,38505>>((a.Xc^a.Xc>>4)&15)&1&&(a.ca|=4),a.resultType&=-3);return a.ca&4} +function zf(a){a.resultType&4&&(a.ca&=-17,(a.Vc^a.Wc^a.sd)&16&&(a.ca|=16),a.resultType&=-5);return a.ca&16}function Af(a){a.resultType&8&&(a.ca&=-65,a.Xc&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.ca|=64),a.resultType&=-9);return a.ca&64}function Bf(a){a.resultType&16&&(a.ca&=-129,a.Xc&a.resultType&-2147450752&&(a.ca|=128),a.resultType&=-17);return a.ca&128} +function Cf(a){a.resultType&32&&(a.ca&=-2049,(a.Wc^a.Vc)&(a.sd^a.Vc)&a.resultType&-2147450752&&(a.ca|=2048),a.resultType&=-33);return a.ca&2048}function Ff(a){a.resultType&=-2;a.ca&=-2}function Kf(a){a.resultType&=-5;a.ca&=-17}function Lf(a){a.resultType&=-9;a.ca&=-65}function Hf(a){a.resultType&=-33;a.ca&=-2049}function Ef(a){a.resultType&=-2;a.ca|=1}function Mf(a){a.resultType&=-5;a.ca|=16}function Nf(a){a.resultType&=-9;a.ca|=64}function Gf(a){a.resultType&=-33;a.ca|=2048} +function Cd(a){return a.ca&-2262|xf(a)|yf(a)|zf(a)|Af(a)|Bf(a)|Cf(a)}function Of(a,b){b|=a.$a&1|65520;a.$a=a.$a&-65536|b&65535;a.$a&1&&wd(a,!0)}function Dd(a,b,c){a.$a&1||(b&=~a.$f);void 0===c&&(c=a.pa);c?b=b&-12289|a.ca&12288:a.Pa=(b&12288)>>12;c>a.Pa&&(b=b&-513|a.ca&512);a.resultType=128;a.ca=a.ca&~(a.Cc|2261)|b&(a.Cc|2261)|a.bg;a.ca&256&&(a.ua|=2,a.S|=4)} +function Pf(a,b,c,d){var e=0;if(a.$a&1&&(a.pa>a.Pa||a.ca&131072)&&a.Sa.Zi)for(var f=a.Sa.Zi+(b>>>3),e=(1<>>=8,f++;return e?(z(a,256)&&y(a,"checkIOPM("+v(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),E.call(a,13,0),!1):!0} +l.Pb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.qa[b]=c;this.Wg++;a=!0;break;default:a=this.parent.Pb.call(this,a,b,c)}return a}; +function Qf(a,b,c,d){var e=(d?a.kd:a.sa)[(b&a.Db)>>>a.La];e&&5==e.type&&(e=Nc(a,b,!1,!0));if(e){var f=b&a.Ea;if(!c||1==c)return e.re(f,b);if(2==c)return f>>this.La].pc(a&this.Ea,a)}; +l.na=function(a){var b=a&this.Ea,c=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(b>>this.La;if(b>>this.La].sc(a&this.Ea,b&255,a)}; +l.jb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;c>8&255,a+1))};l.nb=function(a,b){var c=a&this.Ea,d=(a&this.Db)>>>this.La;this.A-=this.B.Kg;if(c>>=8}}; +function Rf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,1);return a.S&1?0:a.Qa(a.D)}function P(a,b){return Rf(a,a.ka,b)}function Sf(a,b){return Rf(a,a.Ka,b)}function Tf(a,b,c){a.$b=b;a.Ca=c&a.Ba;a.D=b.mc(a.Ca,a.ba);return a.S&1?0:a.tb(a.D)}function Q(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function Uf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,2);return a.S&1?0:a.na(a.D)}function R(a,b){a.$b=a.ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)} +function Vf(a,b){a.$b=a.Ka;a.Ca=b&a.Ba;a.D=a.$b.mc(a.Ca,4);return a.S&1?0:a.oa(a.D)}function Wf(a,b){a.S&2||a.qc(a.$b.nc(a.Ca,1),b)}function Xf(a,b){a.S&2||a.jb(a.$b.nc(a.Ca,2),b)}function Yf(a,b){a.S&2||a.nb(a.$b.nc(a.Ca,4),b)}function yd(a,b,c){return a.tb(b.mc(c,a.ba))}l.xa=function(){var a=uf(this,1),b=this.Qa(this.Ha);this.Ha=a;return b};function Zf(a){var b=uf(a,2),c=a.na(a.Ha);a.Ha=b;return c}function T(a){var b=uf(a,a.Tc),c=a.cc(a.Ha);a.Ha=b;return c} +l.Ma=function(){var a=uf(this,this.ba),b=this.tb(this.Ha);this.Ha=a;return b};l.T=function(){var a=uf(this,1),b=this.Qa(this.Ha)<<24>>24;this.Ha=a;return b};function H(a){var b=a.tb(a.fa);a.fa=a.fa+a.ba|0;var c=a.Sg-a.fa|0;0>c&&0<=(a.Sg^a.fa)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?I(a,a.fa-a.ta.Aa&a.ta.Ba):-1>c&&E.call(a,12,0));return b} +function zd(a,b,c,d){c=a.fa-c|0;0>(c-a.qd|0)&&0<=(a.qd^c)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?(I(a,c-a.ta.Aa&a.ta.Ba),c=a.fa):E.call(a,12,0));switch(d){case 1:a.qc(c,b);break;case 2:a.jb(c,b);break;case 4:a.nb(c,b)}a.fa=c}function K(a,b){var c=a.fa-a.ba|0;0>(c-a.qd|0)&&0<=(a.qd^c)&&(8088>=a.ja||!a.ta.bd&&a.ta.Ta==a.ta.Ba||a.ta.bd&&!a.ta.Ta?(I(a,c-a.ta.Aa&a.ta.Ba),c=a.fa):E.call(a,12,0));a.rc(c,b);a.fa=c} +function $f(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ja)2this.ja?0:1,e=0;2>e;e++){switch(d){case 0:if(this.ua&1&&this.ca&512){var f=bg(this.N);if(-1<=f&&(this.ua&=-2,0<=f)){this.ua&=-5; +cg.call(this,f);d=!0;break a}}break;case 1:if(this.ua&2){this.ua&=-3;80386<=this.ja&&(this.Ja[6]|=16384);cg.call(this,1);d=!0;break a}}d=1-d}d=!1}if(d&&!a){this.O("interrupt dispatched");this.S=0;break}if(this.ua&4){this.S=this.A=0;break}}if(b){if(dg(this.ha,this.Ha,c)){this.Wb();break}c=1}this.S=0;this.W[this.xa()].call(this)}while(0>11;ig(this);jg(this,a[b++]);for(c=0;c=kg&&lg(a,13))}function ig(a){a.ma&=-129;a.ma&~a.jc&63&&(a.ma|=128);if(a.ma&128&&!(a.jc&128))return a=a.N,a.ja>=kg?mg(a,13):a.ya&0||cg.call(a.F,2),!0;a=a.N;a.ja>=kg&&lg(a,13);return!1}function xg(a,b){80387<=a.ja||(b&=-65);a.ma|=b;return ig(a)} +function gg(a){return a.ma|a.B<<11}function yg(a,b){return isFinite(b)?!0:!xg(a,Infinity===b?8:16)}function zg(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,yg(a,d)||(d=null));return d}function Ag(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,yg(a,d)||(d=null));return d}function Bg(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,yg(a,d)||(d=null));return d}function Cg(a,b,c){var d=null;null==b||null==c||!c&&xg(a,2)||(d=b/c,yg(a,d)||(d=null));return d} +function Dg(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:b||(d=16384));a.ma=a.ma&-18177|d;return!0}return!1}function Eg(a,b,c){if(null==b)return null;var d=a.jc&3072;d?d=1024==d||3072==d&&0=c){if(xg(a,1))return null;d=-c}else if(d<-c){if(xg(a,1))return null;d=-c}a.L[0]=d|0;2147483648d&&(a.L[1]=-1))}return d} +function Fg(a,b){var c=3;a.C&1<=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Gg(a){var b=a.B+0&7;return a.C&1<>16}function Lg(a){return a.F.oa(a.F.D)}function Mg(a){a.ua[0]=a.F.oa(a.F.D);return a.pa[0]}function Ng(a){a.L[0]=a.F.oa(a.F.D);a.L[1]=a.F.oa(a.F.D+4);return a.W[0]} +function Og(a){a.ga[0]=a.F.oa(a.F.D);a.ga[1]=a.F.oa(a.F.D+4);a.ga[2]=a.F.na(a.F.D+8);return a.ga}l.xi=function(){this.F.nb(this.F.D,this.L[0])};l.Wk=function(){this.F.nb(this.F.D,this.L[0]);this.F.nb(this.F.D+4,this.L[1])};l.Yk=eg.prototype.xi;l.Xk=eg.prototype.Wk;function Pg(a){a.F.nb(a.F.D,a.ga[0]);a.F.nb(a.F.D+4,a.ga[1]);a.F.jb(a.F.D+8,a.ga[2])} +function Qg(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.L[0]=b;a.L[1]=c|(d|e)<<20;return a.W[0]}function Jg(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?d=32767:d?d+=15360:e&=2147483647;a.ga[0]=b<<11;a.ga[1]=e;a.ga[2]=c>>16&32768|d;return a.ga}function Rg(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function Sg(a,b){for(var c=0,d=0;b--;)c|=a%10<>11;ig(a);jg(a,d.tb(b+=d.ba));!(d.$a&1)||d.ca&131072?(a.V=d.tb(b+=d.ba),c=d.tb(b+=d.ba),a.ia=c&2047,a.V|=(c&-4096)<<4,a.ea=-1,a.U=d.tb(b+=d.ba),a.U|=(d.tb(b+=d.ba)&-4096)<<4,a.fa=-1):(a.V=d.tb(b+=d.ba),c=d.tb(b+=d.ba),a.ea=c&65535,a.ia=c>>16&2047,a.U=d.tb(b+=d.ba),a.fa=d.tb(b+=d.ba)&65535);return b+d.ba} +function Wg(a,b){var c=a.F;c.rc(b,a.jc);c.rc(b+=c.ba,gg(a));c.rc(b+=c.ba,hg(a));if(!(c.$a&1)||c.ca&131072){var d=(a.ea<<4)+a.V;c.rc(b+=c.ba,d);c.rc(b+=c.ba,d>>4&-4096|a.ia);d=(a.fa<<4)+a.U;c.rc(b+=c.ba,d);c.rc(b+=c.ba,d>>4&-4096)}else c.rc(b+=c.ba,a.V),c.rc(b+=c.ba,a.ea|a.ia<<16),c.rc(b+=c.ba,a.U),c.rc(b+=c.ba,a.fa);return b+c.ba}var Xg=Math.log(10)/Math.LN2,Yg=Math.LOG2E,Zg=Math.PI,$g=Math.log(2)/Math.LN10,ah=Math.LN2,bh=Math.pow(2,63);function ch(){this.ma&=-32896;ig(this)} +function dh(){Dg(this,U(this,0),U(this,this.A))}function eh(){Dg(this,U(this,0),U(this,this.A))&&Tg(this)}function fh(){eh.call(this)}function gh(){V(this,0,Cg(this,U(this,0),Mg(this)))}function hh(){this.C&=~(1<>20&2047)-1023),this.L[1]=(this.L[1]|1072693248)&-1073741825,Ug(this,this.W[0]))},102:function(){this.B=this.B-1&7;this.ma&=-513},103:function(){this.B=this.B+1&7;this.ma&=-513},112:function(){V(this,0,U(this,0)%U(this,1))},113:function(){V(this,1,U(this, +1)*Math.log(U(this,0)+1)/Math.LN2)&&Tg(this)},114:function(){var a=U(this,0),b=null;if(0<=a||!xg(this,1))b=Math.sqrt(a),yg(this,b)||(b=null);V(this,0,b)},116:function(){V(this,0,Eg(this,U(this,0),bh))},117:function(){var a=U(this,0),b=U(this,1);null!=a&&null!=b&&V(this,0,a*Math.pow(2,0>>0);Ug(this,a)},6:function(){var a=Eg(this,Tg(this));null!=a&&(this.ga[0]= +Sg(a,8),this.ga[1]=Sg(a/1E8,8),this.ga[2]=Sg(a/1E16,2),0>a&&(this.ga[2]|=32768),Pg(this))},7:function(){null!=Eg(this,U(this,0),bh)&&(this.Wk(),Tg(this))},48:function(){hh.call(this);Tg(this)},49:uh,50:ph,51:ph,52:sh}},wh=[ch,ih,jh,kh,lh,mh,qh,nh,rh,sh];Xa(function(){for(var a=tb(document,"pcx86","fpu"),b=0;b>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ij;(bd)&&E.call(this,5);this.S|=2;return a}function Fh(a,b){var c=0;if(b){Lf(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Nf(this);this.A-=11+3*c;return a}function Gh(a,b){var c=0;if(b){Lf(this);for(var d=2==this.ba?15:31,e=1<>>=1;c++;d--}}else Nf(this);this.A-=11+3*c;return a} +function Hh(a,b){a&1<<(b&(2==this.ba?15:31))?Ef(this):Ff(this);this.A-=-1===this.D?3:6;this.S|=2;return a}function Ih(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a^b}function Jh(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a&~b}function Kh(a,b){b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=-1===this.D?6:8;return a|b} +function Lh(a,b){if(-1===this.D)return Hh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=6;this.S|=2;return a}function Mh(a,b){if(-1===this.D)return Ih.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a^b} +function Nh(a,b){if(-1===this.D)return Jh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a&~b}function Oh(a,b){if(-1===this.D)return Kh.call(this,a,b);var c=this.ba<<3;if(b>=c||b<-c)a=Tf(this,this.$b,this.Ca+(b>>(2==this.ba?4:5))*this.ba);b=1<<(b&(2==this.ba?15:31));a&b?Ef(this):Ff(this);this.A-=8;return a|b} +function Ph(a,b){wf(this,a,b,a-b|0,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a}function Qh(a,b){wf(this,a,b,a-b|0,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Ih:this.B.Vb;this.S|=2;return a} +function Rh(a){if(this.Tb){var b=this.Tb,c=this.ng,d=this.L,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=vh[c][f]){if(0>wh.indexOf(e)){var f=b.F,g=f.qe;8087==b.ja&&(f.Ia&16&&g++,f.Ia&32&&g++);b.ea=f.wa.Z;b.V=g-f.wa.Aa;-1!==f.D&&(b.fa=f.$b.Z,b.U=f.D-f.$b.Aa);b.ia=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.D?2:8;return a}function Sh(a){if(80186>this.ja)return W.call(this,a);E.call(this,13,0);return a}function je(a){E.call(this,6);return a} +function W(a){me.call(this);return a}function Th(a,b){a=Uh.call(this,this.T(),b);80386>this.ja&&(this.A-=12);return a}function Vh(a,b){a=this.Ma();a=2==this.ba?Uh.call(this,a,b):Wh.call(this,a,b);80386>this.ja&&(this.A-=12);return a}function Xh(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Yh.call(this,a,b);c&&(this.ia=~this.ia+1|0,this.va=~this.va+(this.ia?0:1)|0)} +function Uh(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767a?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return a&65535}function Wh(a,b){Xh.call(this,a,b);this.va!=this.ia>>31?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.A-=-1===this.D?9:12;return this.ia}function Zh(a,b){this.A-=14+(-1===this.D?0:2);Lf(this);-1!==this.Da.load(b)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(b&3)&&(Nf(this),a=this.Da.wb&-256,2=this.pa)&&this.Da.Gc>=(b&3))return Nf(this),this.Da.Ta;Lf(this);return a}function fi(a,b){if(-1===this.D)return me.call(this),a;ud(this,this.na(this.D+this.ba));this.A-=this.B.pf;return b} +function gi(a,b){this.A-=-1===this.C?-1===this.D?this.B.sk:this.B.rk:this.B.pk;return b}function yi(a,b){switch(this.L>>3&7){case 4:this.aa=this.G;break;case 5:this.aa=this.I;break;case 6:this.aa=this.M;break;case 7:this.aa=this.H}return b}function zi(a,b){return b} +function Ai(a,b){a=this.L>>3&7;switch(a){case 0:this.aa=this.G;break;case 2:this.aa=this.M;break;case 3:this.aa=this.H;break;default:if(80286==this.ja||80386==this.ja&&4!=a&&5!=a)E.call(this,6);else switch(a){case 1:this.aa=this.I;break;case 4:this.aa=J(this);break;case 5:this.aa=this.P;break;case 6:this.aa=this.K;break;case 7:this.aa=this.J}}return gi.call(this,0,b)} +function Bi(a,b){switch(this.L>>3&7){case 0:b=this.Xa.Z;break;case 1:b=this.wa.Z;break;case 2:b=this.ta.Z;break;case 3:b=this.vb.Z;break;case 4:if(80386<=this.ja){b=this.Nb.Z;break}E.call(this,6);b=a;break;case 5:if(80386<=this.ja){b=this.Ob.Z;break}default:E.call(this,6),b=a}-1!==this.C&&xd(this,2);return gi.call(this,0,b)} +function Yh(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d,d=(e>>>16)+b*d,f=d>>>16,d=(d&65535)+c*a;this.ia=d<<16|e&65535;this.va=f+((d>>>16)+b*a)|0}else this.ia=a*b|0,this.va=0}function Ci(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a|b,128)}function Di(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a|b,this.Ga)&this.R} +function Ei(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255}function Fi(a,b){var c=a-b-Jf(this)|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function Gi(){return Cf(this)?1:0}function Hi(){return xf(this)?1:0}function Ii(){return xf(this)?0:1}function Ji(){return Af(this)?1:0}function Ki(){return Af(this)?0:1}function Li(){return xf(this)||Af(this)?1:0} +function Mi(){return xf(this)||Af(this)?0:1}function Ni(){return Bf(this)?1:0}function Oi(){return Bf(this)?0:1}function Pi(){return yf(this)?1:0}function Qi(){return yf(this)?0:1}function Ri(){return!Bf(this)!=!Cf(this)?1:0}function Si(){return!Bf(this)!=!Cf(this)?0:1}function Ti(){return Af(this)||!Bf(this)!=!Cf(this)?1:0}function Ui(){return Af(this)||!Bf(this)!=!Cf(this)?0:1}function Vi(a,b){return Wi.call(this,a,b,this.xa())}function Xi(a,b){return Yi.call(this,a,b,this.xa())} +function Zi(a,b){return Wi.call(this,a,b,this.I&31)}function $i(a,b){return Yi.call(this,a,b,this.I&31)}function aj(a,b){return bj.call(this,a,b,this.xa())}function cj(a,b){return dj.call(this,a,b,this.xa())}function ej(a,b){return bj.call(this,a,b,this.I&31)}function fj(a,b){return dj.call(this,a,b,this.I&31)}function gj(a,b){var c=a-b|0;wf(this,a,b,c,191,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&255} +function hj(a,b){var c=a-b|0;wf(this,a,b,c,this.Ga|63,!0);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return c&this.R}function ij(a,b){Df(this,a&b,128);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Xf:this.B.Xf;this.S|=2;return a}function jj(a,b){Df(this,a&b,this.Ga);this.A-=-1===this.C?-1===this.D?this.B.ji:this.B.Xf:this.B.Xf;this.S|=2;return a}function kj(a,b){var c=this.G&this.R,d=(1<<(this.I&31))-1;return a&~(d<>(this.G&this.R)&(1<<(this.I&31))-1&this.R}function mj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.li}else this.C=this.D,Wf(this,a),this.A-=this.B.ki;return b} +function nj(a,b){if(-1===this.D){switch(this.L&7){case 0:this.G=this.G&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.M=this.M&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:I(this,J(this)&~this.R|a);break;case 5:this.P=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.li}else this.C=this.D,this.S&2||this.rc(this.$b.nc(this.Ca,this.ba),a),this.A-=this.B.ki;return b} +function oj(a,b){a^=b;Df(this,a,128);this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return a}function pj(a,b){this.A-=-1===this.C?-1===this.D?this.B.yc:this.B.Vb:this.B.Nc;return Df(this,a^b,this.Ga)&this.R}function qj(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function rj(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=2;return a&~this.R|b&this.R} +function sj(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1;c=[c>>>0,0];for(a=[a>>>0,b>>>0];0>>=0,b[1]++);e+=e}do 0<=qj(a,c)&&(b=a,f=c,b[0]-=f[0],b[1]-=f[1],0>b[0]&&(b[0]>>>=0,b[1]--),d+=e),b=c,b[0]>>>=1,b[1]&1&&(b[0]=(b[0]|2147483648)>>>0),b[1]>>>=1,e/=2;while(1<=e);this.ia=d;this.va=a[0];return!0}function tj(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=2;return a&~this.R|b&this.R} +function uj(a){this.$a=a;wd(this);this.$a&-2147483648?xe(this):ze(this)}function Fd(a){this.Od=a;Xb(this)}function vj(a){this.S|=1;this.Ya.call(this,a);this.A-=-1===this.D?4:5}function Wi(a,b,c){if(c){16>>16-c)&65535;Df(this,a,32768,d&32768)}return a}function Yi(a,b,c){if(c){var d=a<>>32-c;Df(this,a,-2147483648,d&-2147483648)}return a} +function bj(a,b,c){if(c){16>>c-1;a=(d>>>1|b<<16-c)&65535;Df(this,a,32768,d&1)}return a}function dj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;Df(this,a,-2147483648,d&1)}return a}function wj(){this.A-=-1===this.D?2:this.B.Fk;return 1}function xj(){var a=this.I&255;this.A-=(-1===this.D?this.B.ci:this.B.bi)+(a<this.qb?(-1!=this.bc&&(this.bc!==this.wa.Z&&(this.wa.Lb=this.bc&3,sf(this,this.bc)),this.bc=-1),this.qe!==this.Ha&&tf(this,this.qe),-1!=this.sb&&(this.sb!==this.ta.Z&&ud(this,this.sb),this.sb=-1),-1!==this.U&&(this.U!==this.fa&&I(this,this.gb&~this.ta.Ba|this.U-this.ta.Aa),this.U=-1)):8!=this.qb?(b=0,a=8):(b=0,a=-1,ve(this),e=d=!1)):tf(this,this.qe);var f=a,g=b,h=32,k=Qf(this,this.Ha);204!=k||this.Sd||(d=!1);this.ca&131072&&(6== +f&&99==k||13==f&&205==k)&&(d=!1);!1===d&&(h|=1);983040<=this.Ha&&1048575>=this.Ha&&(d=!1);z(this,h|-2147483648)&&(d=!0);if(z(this,h)||d){var m=this.la.Ib,f="Fault "+u(f)+(null!=g?" ("+v(g)+")":"")+" on opcode "+u(k);d&&m&&(f+=" (blocked)");this.ha?(y(this,f,d||h,!0),d&&(d=m,this.ha.Wb())):(this.Na(f),this.Wb())}if(d&&e)throw-1;if(e)throw this.qb=a,Cj.call(this,a,b,c),this.qe=this.Ha,this.S=1==a?this.S|8192:this.S|4096,a;} +function ye(a,b,c){this.se=a;a=0;b&&(a|=1);c&&(a|=2);3==this.pa&&(a|=4);E.call(this,14,a)}function Ej(a){var b=a.wb&7680;a.Z&65528&&(6144==b||7168==b||7168>b&&a.Gc>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&255;break;case 1:b=this.I&255;break;case 2:b=this.M&255;break;case 3:b=this.H&255;break;case 4:b=this.G>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.H>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=this.G& +-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}} +function Ee(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=P(this,this.H+this.K);this.C=this.D;break;case 1:b=P(this,this.H+this.J);this.C=this.D;break;case 2:b=Sf(this,this.P+this.K);this.C=this.D;break;case 3:b=Sf(this,this.P+this.J);this.C=this.D;break;case 4:b=P(this,this.K);this.C=this.D;break;case 5:b=P(this,this.J);this.C=this.D;break;case 6:b=P(this,T(this));this.C=this.D;break;case 7:b=P(this,this.H);this.C=this.D;break;case 64:b=P(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=P(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Sf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Sf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=P(this,this.K+this.T());this.C=this.D;break;case 69:b=P(this,this.J+this.T());this.C=this.D;break;case 70:b=Sf(this,this.P+this.T());this.C=this.D;break;case 71:b=P(this,this.H+this.T());this.C=this.D;break;case 128:b=P(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=P(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Sf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Sf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=P(this,this.K+T(this));this.C=this.D;break;case 133:b=P(this,this.J+T(this));this.C=this.D;break;case 134:b=Sf(this,this.P+T(this));this.C=this.D;break;case 135:b=P(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G&255;break;case 193:b=this.I&255;break;case 194:b=this.M&255;break;case 195:b=this.H&255;break;case 196:b=this.G>>8&255;break; +case 197:b=this.I>>8&255;break;case 198:b=this.M>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&255;break;case 1:c=this.I&255;break;case 2:c=this.M&255;break;case 3:c=this.H&255;break;case 4:c=this.G>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Wf(this,a);this.A-=this.B.dd;break;case 1:case 2:Wf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Wf(this, +a);this.A-=this.B.Jc;break;case 6:Wf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Wf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Wf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Wf(this,a);this.A-=this.B.ib;break;case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I= +this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}} +function Fe(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=P(this,this.H+this.K);this.C=this.D;break;case 1:c=P(this,this.H+this.J);this.C=this.D;break;case 2:c=Sf(this,this.P+this.K);this.C=this.D;break;case 3:c=Sf(this,this.P+this.J);this.C=this.D;break;case 4:c=P(this,this.K);this.C=this.D;break;case 5:c=P(this,this.J);this.C=this.D;break;case 6:c=P(this,T(this));this.C=this.D;break;case 7:c=P(this,this.H);this.C=this.D;break;case 64:c=P(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=P(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Sf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Sf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=P(this,this.K+this.T());this.C=this.D;break;case 69:c=P(this,this.J+this.T());this.C=this.D;break;case 70:c=Sf(this,this.P+this.T());this.C=this.D;break;case 71:c=P(this,this.H+this.T());this.C=this.D;break;case 128:c=P(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=P(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Sf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Sf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=P(this,this.K+T(this));this.C=this.D;break;case 133:c=P(this,this.J+T(this));this.C=this.D;break;case 134:c=Sf(this,this.P+T(this));this.C=this.D;break;case 135:c=P(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G&255;break;case 193:c=this.I&255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break; +case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Wf(this,a);this.A-=this.B.dd;break;case 1:case 2:Wf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Wf(this,a);this.A-=this.B.Jc;break;case 6:Wf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Wf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Wf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Wf(this, +a);this.A-=this.B.ib;break;case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}} +function Ie(a){var b,c;switch((this.L=this.xa())&199){case 0:c=Q(this,this.H+this.K);this.A-=this.B.dd;break;case 1:c=Q(this,this.H+this.J);this.A-=this.B.ed;break;case 2:c=Uf(this,this.P+this.K);this.A-=this.B.ed;break;case 3:c=Uf(this,this.P+this.J);this.A-=this.B.dd;break;case 4:c=Q(this,this.K);this.A-=this.B.Jc;break;case 5:c=Q(this,this.J);this.A-=this.B.Jc;break;case 6:c=Q(this,T(this));this.A-=this.B.Jd;break;case 7:c=Q(this,this.H);this.A-=this.B.Jc;break;case 64:c=Q(this,this.H+this.K+this.T()); +this.A-=this.B.dc;break;case 65:c=Q(this,this.H+this.J+this.T());this.A-=this.B.ec;break;case 66:c=Uf(this,this.P+this.K+this.T());this.A-=this.B.ec;break;case 67:c=Uf(this,this.P+this.J+this.T());this.A-=this.B.dc;break;case 68:c=Q(this,this.K+this.T());this.A-=this.B.ib;break;case 69:c=Q(this,this.J+this.T());this.A-=this.B.ib;break;case 70:c=Uf(this,this.P+this.T());this.A-=this.B.ib;break;case 71:c=Q(this,this.H+this.T());this.A-=this.B.ib;break;case 128:c=Q(this,this.H+this.K+T(this));this.A-= +this.B.dc;break;case 129:c=Q(this,this.H+this.J+T(this));this.A-=this.B.ec;break;case 130:c=Uf(this,this.P+this.K+T(this));this.A-=this.B.ec;break;case 131:c=Uf(this,this.P+this.J+T(this));this.A-=this.B.dc;break;case 132:c=Q(this,this.K+T(this));this.A-=this.B.ib;break;case 133:c=Q(this,this.J+T(this));this.A-=this.B.ib;break;case 134:c=Uf(this,this.P+T(this));this.A-=this.B.ib;break;case 135:c=Q(this,this.H+T(this));this.A-=this.B.ib;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break; +case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&65535;break;case 1:b=this.I&65535;break;case 2:b=this.M&65535;break;case 3:b=this.H&65535;break;case 4:b=J(this)&65535;break;case 5:b=this.P&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:I(this,J(this)&-65536|a);break;case 5:this.P=this.P&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}} +function Je(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=Q(this,this.H+this.K);this.C=this.D;break;case 1:b=Q(this,this.H+this.J);this.C=this.D;break;case 2:b=Uf(this,this.P+this.K);this.C=this.D;break;case 3:b=Uf(this,this.P+this.J);this.C=this.D;break;case 4:b=Q(this,this.K);this.C=this.D;break;case 5:b=Q(this,this.J);this.C=this.D;break;case 6:b=Q(this,T(this));this.C=this.D;break;case 7:b=Q(this,this.H);this.C=this.D;break;case 64:b=Q(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=Q(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Uf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Uf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=Q(this,this.K+this.T());this.C=this.D;break;case 69:b=Q(this,this.J+this.T());this.C=this.D;break;case 70:b=Uf(this,this.P+this.T());this.C=this.D;break;case 71:b=Q(this,this.H+this.T());this.C=this.D;break;case 128:b=Q(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=Q(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Uf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Uf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=Q(this,this.K+T(this));this.C=this.D;break;case 133:b=Q(this,this.J+T(this));this.C=this.D;break;case 134:b=Uf(this,this.P+T(this));this.C=this.D;break;case 135:b=Q(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G&65535;break;case 193:b=this.I&65535;break;case 194:b=this.M&65535;break;case 195:b=this.H&65535;break;case 196:b=J(this)&65535; +break;case 197:b=this.P&65535;break;case 198:b=this.K&65535;break;case 199:b=this.J&65535;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&65535;break;case 1:c=this.I&65535;break;case 2:c=this.M&65535;break;case 3:c=this.H&65535;break;case 4:c=J(this)&65535;break;case 5:c=this.P&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Xf(this,a);this.A-=this.B.dd;break;case 1:case 2:Xf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Xf(this, +a);this.A-=this.B.Jc;break;case 6:Xf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Xf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Xf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Xf(this,a);this.A-=this.B.ib;break;case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break; +case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}} +function Ke(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=Q(this,this.H+this.K);this.C=this.D;break;case 1:c=Q(this,this.H+this.J);this.C=this.D;break;case 2:c=Uf(this,this.P+this.K);this.C=this.D;break;case 3:c=Uf(this,this.P+this.J);this.C=this.D;break;case 4:c=Q(this,this.K);this.C=this.D;break;case 5:c=Q(this,this.J);this.C=this.D;break;case 6:c=Q(this,T(this));this.C=this.D;break;case 7:c=Q(this,this.H);this.C=this.D;break;case 64:c=Q(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=Q(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Uf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Uf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=Q(this,this.K+this.T());this.C=this.D;break;case 69:c=Q(this,this.J+this.T());this.C=this.D;break;case 70:c=Uf(this,this.P+this.T());this.C=this.D;break;case 71:c=Q(this,this.H+this.T());this.C=this.D;break;case 128:c=Q(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=Q(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Uf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Uf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=Q(this,this.K+T(this));this.C=this.D;break;case 133:c=Q(this,this.J+T(this));this.C=this.D;break;case 134:c=Uf(this,this.P+T(this));this.C=this.D;break;case 135:c=Q(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535; +break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Xf(this,a);this.A-=this.B.dd;break;case 1:case 2:Xf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Xf(this,a);this.A-=this.B.Jc;break;case 6:Xf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Xf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Xf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Xf(this, +a);this.A-=this.B.ib;break;case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}} +function Le(a){var b,c;switch((this.L=this.xa())&199){case 0:c=R(this,this.H+this.K);this.A-=this.B.dd;break;case 1:c=R(this,this.H+this.J);this.A-=this.B.ed;break;case 2:c=Vf(this,this.P+this.K);this.A-=this.B.ed;break;case 3:c=Vf(this,this.P+this.J);this.A-=this.B.dd;break;case 4:c=R(this,this.K);this.A-=this.B.Jc;break;case 5:c=R(this,this.J);this.A-=this.B.Jc;break;case 6:c=R(this,T(this));this.A-=this.B.Jd;break;case 7:c=R(this,this.H);this.A-=this.B.Jc;break;case 64:c=R(this,this.H+this.K+this.T()); +this.A-=this.B.dc;break;case 65:c=R(this,this.H+this.J+this.T());this.A-=this.B.ec;break;case 66:c=Vf(this,this.P+this.K+this.T());this.A-=this.B.ec;break;case 67:c=Vf(this,this.P+this.J+this.T());this.A-=this.B.dc;break;case 68:c=R(this,this.K+this.T());this.A-=this.B.ib;break;case 69:c=R(this,this.J+this.T());this.A-=this.B.ib;break;case 70:c=Vf(this,this.P+this.T());this.A-=this.B.ib;break;case 71:c=R(this,this.H+this.T());this.A-=this.B.ib;break;case 128:c=R(this,this.H+this.K+T(this));this.A-= +this.B.dc;break;case 129:c=R(this,this.H+this.J+T(this));this.A-=this.B.ec;break;case 130:c=Vf(this,this.P+this.K+T(this));this.A-=this.B.ec;break;case 131:c=Vf(this,this.P+this.J+T(this));this.A-=this.B.dc;break;case 132:c=R(this,this.K+T(this));this.A-=this.B.ib;break;case 133:c=R(this,this.J+T(this));this.A-=this.B.ib;break;case 134:c=Vf(this,this.P+T(this));this.A-=this.B.ib;break;case 135:c=R(this,this.H+T(this));this.A-=this.B.ib;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c= +this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G;break;case 1:b=this.I;break;case 2:b=this.M;break;case 3:b=this.H;break;case 4:b=J(this);break;case 5:b=this.P;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.M=a;break;case 3:this.H=a;break;case 4:I(this,a);break; +case 5:this.P=a;break;case 6:this.K=a;break;case 7:this.J=a}} +function Me(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=R(this,this.H+this.K);this.C=this.D;break;case 1:b=R(this,this.H+this.J);this.C=this.D;break;case 2:b=Vf(this,this.P+this.K);this.C=this.D;break;case 3:b=Vf(this,this.P+this.J);this.C=this.D;break;case 4:b=R(this,this.K);this.C=this.D;break;case 5:b=R(this,this.J);this.C=this.D;break;case 6:b=R(this,T(this));this.C=this.D;break;case 7:b=R(this,this.H);this.C=this.D;break;case 64:b=R(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:b=R(this,this.H+this.J+this.T());this.C=this.D;break;case 66:b=Vf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:b=Vf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:b=R(this,this.K+this.T());this.C=this.D;break;case 69:b=R(this,this.J+this.T());this.C=this.D;break;case 70:b=Vf(this,this.P+this.T());this.C=this.D;break;case 71:b=R(this,this.H+this.T());this.C=this.D;break;case 128:b=R(this,this.H+this.K+T(this));this.C=this.D;break;case 129:b=R(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:b=Vf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:b=Vf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:b=R(this,this.K+T(this));this.C=this.D;break;case 133:b=R(this,this.J+T(this));this.C=this.D;break;case 134:b=Vf(this,this.P+T(this));this.C=this.D;break;case 135:b=R(this,this.H+T(this));this.C=this.D;break;case 192:b=this.G;break;case 193:b=this.I;break;case 194:b=this.M;break;case 195:b=this.H;break;case 196:b=J(this);break;case 197:b=this.P;break; +case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G;break;case 1:c=this.I;break;case 2:c=this.M;break;case 3:c=this.H;break;case 4:c=J(this);break;case 5:c=this.P;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 0:case 3:Yf(this,a);this.A-=this.B.dd;break;case 1:case 2:Yf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Yf(this,a);this.A-=this.B.Jc;break;case 6:Yf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Yf(this, +a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Yf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Yf(this,a);this.A-=this.B.ib;break;case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a}} +function Ne(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=R(this,this.H+this.K);this.C=this.D;break;case 1:c=R(this,this.H+this.J);this.C=this.D;break;case 2:c=Vf(this,this.P+this.K);this.C=this.D;break;case 3:c=Vf(this,this.P+this.J);this.C=this.D;break;case 4:c=R(this,this.K);this.C=this.D;break;case 5:c=R(this,this.J);this.C=this.D;break;case 6:c=R(this,T(this));this.C=this.D;break;case 7:c=R(this,this.H);this.C=this.D;break;case 64:c=R(this,this.H+this.K+this.T());this.C=this.D;break; +case 65:c=R(this,this.H+this.J+this.T());this.C=this.D;break;case 66:c=Vf(this,this.P+this.K+this.T());this.C=this.D;break;case 67:c=Vf(this,this.P+this.J+this.T());this.C=this.D;break;case 68:c=R(this,this.K+this.T());this.C=this.D;break;case 69:c=R(this,this.J+this.T());this.C=this.D;break;case 70:c=Vf(this,this.P+this.T());this.C=this.D;break;case 71:c=R(this,this.H+this.T());this.C=this.D;break;case 128:c=R(this,this.H+this.K+T(this));this.C=this.D;break;case 129:c=R(this,this.H+this.J+T(this)); +this.C=this.D;break;case 130:c=Vf(this,this.P+this.K+T(this));this.C=this.D;break;case 131:c=Vf(this,this.P+this.J+T(this));this.C=this.D;break;case 132:c=R(this,this.K+T(this));this.C=this.D;break;case 133:c=R(this,this.J+T(this));this.C=this.D;break;case 134:c=Vf(this,this.P+T(this));this.C=this.D;break;case 135:c=R(this,this.H+T(this));this.C=this.D;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break; +case 198:c=this.K;break;case 199:c=this.J}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 0:case 3:Yf(this,a);this.A-=this.B.dd;break;case 1:case 2:Yf(this,a);this.A-=this.B.ed;break;case 4:case 5:case 7:Yf(this,a);this.A-=this.B.Jc;break;case 6:Yf(this,a);this.A-=this.B.Jd;break;case 64:case 67:case 128:case 131:Yf(this,a);this.A-=this.B.dc;break;case 65:case 66:case 129:case 130:Yf(this,a);this.A-=this.B.ec;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Yf(this, +a);this.A-=this.B.ib;break;case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a}} +function Oe(a){var b,c;switch((this.L=this.xa())&199){case 0:c=P(this,this.G);break;case 1:c=P(this,this.I);break;case 2:c=P(this,this.M);break;case 3:c=P(this,this.H);break;case 4:c=P(this,Gj.call(this,0));break;case 5:c=P(this,T(this));break;case 6:c=P(this,this.K);break;case 7:c=P(this,this.J);break;case 64:c=P(this,this.G+this.T());break;case 65:c=P(this,this.I+this.T());break;case 66:c=P(this,this.M+this.T());break;case 67:c=P(this,this.H+this.T());break;case 68:c=P(this,Gj.call(this,1)+this.T()); +break;case 69:c=Sf(this,this.P+this.T());break;case 70:c=P(this,this.K+this.T());break;case 71:c=P(this,this.J+this.T());break;case 128:c=P(this,this.G+T(this));break;case 129:c=P(this,this.I+T(this));break;case 130:c=P(this,this.M+T(this));break;case 131:c=P(this,this.H+T(this));break;case 132:c=P(this,Gj.call(this,2)+T(this));break;case 133:c=Sf(this,this.P+T(this));break;case 134:c=P(this,this.K+T(this));break;case 135:c=P(this,this.J+T(this));break;case 192:c=this.G&255;break;case 193:c=this.I& +255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&255;break;case 1:b=this.I&255;break;case 2:b=this.M&255;break;case 3:b=this.H&255;break;case 4:b=this.G>>8&255;break;case 5:b=this.I>>8&255;break;case 6:b=this.M>>8&255;break;case 7:b=this.H>>8&255;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.M=this.M&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.G=this.G&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.M=this.M&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}} +function Pe(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=P(this,this.G);this.C=this.D;break;case 1:b=P(this,this.I);this.C=this.D;break;case 2:b=P(this,this.M);this.C=this.D;break;case 3:b=P(this,this.H);this.C=this.D;break;case 4:b=P(this,Gj.call(this,0));this.C=this.D;break;case 5:b=P(this,T(this));this.C=this.D;break;case 6:b=P(this,this.K);this.C=this.D;break;case 7:b=P(this,this.J);this.C=this.D;break;case 64:b=P(this,this.G+this.T());this.C=this.D;break;case 65:b=P(this,this.I+this.T()); +this.C=this.D;break;case 66:b=P(this,this.M+this.T());this.C=this.D;break;case 67:b=P(this,this.H+this.T());this.C=this.D;break;case 68:b=P(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Sf(this,this.P+this.T());this.C=this.D;break;case 70:b=P(this,this.K+this.T());this.C=this.D;break;case 71:b=P(this,this.J+this.T());this.C=this.D;break;case 128:b=P(this,this.G+T(this));this.C=this.D;break;case 129:b=P(this,this.I+T(this));this.C=this.D;break;case 130:b=P(this,this.M+T(this));this.C= +this.D;break;case 131:b=P(this,this.H+T(this));this.C=this.D;break;case 132:b=P(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Sf(this,this.P+T(this));this.C=this.D;break;case 134:b=P(this,this.K+T(this));this.C=this.D;break;case 135:b=P(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G&255;break;case 193:b=this.I&255;break;case 194:b=this.M&255;break;case 195:b=this.H&255;break;case 196:b=this.G>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.M>>8&255;break;case 199:b= +this.H>>8&255;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&255;break;case 1:c=this.I&255;break;case 2:c=this.M&255;break;case 3:c=this.H&255;break;case 4:c=this.G>>8&255;break;case 5:c=this.I>>8&255;break;case 6:c=this.M>>8&255;break;case 7:c=this.H>>8&255;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I= +this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Wf(this,a)}} +function Qe(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=P(this,this.G);this.C=this.D;break;case 1:c=P(this,this.I);this.C=this.D;break;case 2:c=P(this,this.M);this.C=this.D;break;case 3:c=P(this,this.H);this.C=this.D;break;case 4:c=P(this,Gj.call(this,0));this.C=this.D;break;case 5:c=P(this,T(this));this.C=this.D;break;case 6:c=P(this,this.K);this.C=this.D;break;case 7:c=P(this,this.J);this.C=this.D;break;case 64:c=P(this,this.G+this.T());this.C=this.D;break;case 65:c=P(this,this.I+this.T()); +this.C=this.D;break;case 66:c=P(this,this.M+this.T());this.C=this.D;break;case 67:c=P(this,this.H+this.T());this.C=this.D;break;case 68:c=P(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Sf(this,this.P+this.T());this.C=this.D;break;case 70:c=P(this,this.K+this.T());this.C=this.D;break;case 71:c=P(this,this.J+this.T());this.C=this.D;break;case 128:c=P(this,this.G+T(this));this.C=this.D;break;case 129:c=P(this,this.I+T(this));this.C=this.D;break;case 130:c=P(this,this.M+T(this));this.C= +this.D;break;case 131:c=P(this,this.H+T(this));this.C=this.D;break;case 132:c=P(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Sf(this,this.P+T(this));this.C=this.D;break;case 134:c=P(this,this.K+T(this));this.C=this.D;break;case 135:c=P(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G&255;break;case 193:c=this.I&255;break;case 194:c=this.M&255;break;case 195:c=this.H&255;break;case 196:c=this.G>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.M>>8&255;break;case 199:c= +this.H>>8&255;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 192:this.G=this.G&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.M=this.M&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.G=this.G&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.M=this.M&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Wf(this,a)}} +function cf(a){var b,c;switch((this.L=this.xa())&199){case 0:c=Q(this,this.G);break;case 1:c=Q(this,this.I);break;case 2:c=Q(this,this.M);break;case 3:c=Q(this,this.H);break;case 4:c=Q(this,Gj.call(this,0));break;case 5:c=Q(this,T(this));break;case 6:c=Q(this,this.K);break;case 7:c=Q(this,this.J);break;case 64:c=Q(this,this.G+this.T());break;case 65:c=Q(this,this.I+this.T());break;case 66:c=Q(this,this.M+this.T());break;case 67:c=Q(this,this.H+this.T());break;case 68:c=Q(this,Gj.call(this,1)+this.T()); +break;case 69:c=Uf(this,this.P+this.T());break;case 70:c=Q(this,this.K+this.T());break;case 71:c=Q(this,this.J+this.T());break;case 128:c=Q(this,this.G+T(this));break;case 129:c=Q(this,this.I+T(this));break;case 130:c=Q(this,this.M+T(this));break;case 131:c=Q(this,this.H+T(this));break;case 132:c=Q(this,Gj.call(this,2)+T(this));break;case 133:c=Uf(this,this.P+T(this));break;case 134:c=Q(this,this.K+T(this));break;case 135:c=Q(this,this.J+T(this));break;case 192:c=this.G&65535;break;case 193:c=this.I& +65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G&65535;break;case 1:b=this.I&65535;break;case 2:b=this.M&65535;break;case 3:b=this.H&65535;break;case 4:b=J(this)&65535;break;case 5:b=this.P&65535;break;case 6:b=this.K&65535;break;case 7:b=this.J&65535;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G= +this.G&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.M=this.M&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:I(this,J(this)&-65536|a);break;case 5:this.P=this.P&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}} +function df(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=Q(this,this.G);this.C=this.D;break;case 1:b=Q(this,this.I);this.C=this.D;break;case 2:b=Q(this,this.M);this.C=this.D;break;case 3:b=Q(this,this.H);this.C=this.D;break;case 4:b=Q(this,Gj.call(this,0));this.C=this.D;break;case 5:b=Q(this,T(this));this.C=this.D;break;case 6:b=Q(this,this.K);this.C=this.D;break;case 7:b=Q(this,this.J);this.C=this.D;break;case 64:b=Q(this,this.G+this.T());this.C=this.D;break;case 65:b=Q(this,this.I+this.T()); +this.C=this.D;break;case 66:b=Q(this,this.M+this.T());this.C=this.D;break;case 67:b=Q(this,this.H+this.T());this.C=this.D;break;case 68:b=Q(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Uf(this,this.P+this.T());this.C=this.D;break;case 70:b=Q(this,this.K+this.T());this.C=this.D;break;case 71:b=Q(this,this.J+this.T());this.C=this.D;break;case 128:b=Q(this,this.G+T(this));this.C=this.D;break;case 129:b=Q(this,this.I+T(this));this.C=this.D;break;case 130:b=Q(this,this.M+T(this));this.C= +this.D;break;case 131:b=Q(this,this.H+T(this));this.C=this.D;break;case 132:b=Q(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Uf(this,this.P+T(this));this.C=this.D;break;case 134:b=Q(this,this.K+T(this));this.C=this.D;break;case 135:b=Q(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G&65535;break;case 193:b=this.I&65535;break;case 194:b=this.M&65535;break;case 195:b=this.H&65535;break;case 196:b=J(this)&65535;break;case 197:b=this.P&65535;break;case 198:b=this.K&65535;break; +case 199:b=this.J&65535;break;default:b=0}switch(this.L>>3&7){case 0:c=this.G&65535;break;case 1:c=this.I&65535;break;case 2:c=this.M&65535;break;case 3:c=this.H&65535;break;case 4:c=J(this)&65535;break;case 5:c=this.P&65535;break;case 6:c=this.K&65535;break;case 7:c=this.J&65535;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)& +-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Xf(this,a)}} +function ef(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=Q(this,this.G);this.C=this.D;break;case 1:c=Q(this,this.I);this.C=this.D;break;case 2:c=Q(this,this.M);this.C=this.D;break;case 3:c=Q(this,this.H);this.C=this.D;break;case 4:c=Q(this,Gj.call(this,0));this.C=this.D;break;case 5:c=Q(this,T(this));this.C=this.D;break;case 6:c=Q(this,this.K);this.C=this.D;break;case 7:c=Q(this,this.J);this.C=this.D;break;case 64:c=Q(this,this.G+this.T());this.C=this.D;break;case 65:c=Q(this,this.I+this.T()); +this.C=this.D;break;case 66:c=Q(this,this.M+this.T());this.C=this.D;break;case 67:c=Q(this,this.H+this.T());this.C=this.D;break;case 68:c=Q(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Uf(this,this.P+this.T());this.C=this.D;break;case 70:c=Q(this,this.K+this.T());this.C=this.D;break;case 71:c=Q(this,this.J+this.T());this.C=this.D;break;case 128:c=Q(this,this.G+T(this));this.C=this.D;break;case 129:c=Q(this,this.I+T(this));this.C=this.D;break;case 130:c=Q(this,this.M+T(this));this.C= +this.D;break;case 131:c=Q(this,this.H+T(this));this.C=this.D;break;case 132:c=Q(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Uf(this,this.P+T(this));this.C=this.D;break;case 134:c=Q(this,this.K+T(this));this.C=this.D;break;case 135:c=Q(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G&65535;break;case 193:c=this.I&65535;break;case 194:c=this.M&65535;break;case 195:c=this.H&65535;break;case 196:c=J(this)&65535;break;case 197:c=this.P&65535;break;case 198:c=this.K&65535;break; +case 199:c=this.J&65535;break;default:c=0}a=a[this.L>>3&7].call(this,c,b.call(this));switch(d){case 192:this.G=this.G&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.M=this.M&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:I(this,J(this)&-65536|a);break;case 197:this.P=this.P&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Xf(this,a)}} +function ff(a){var b,c;switch((this.L=this.xa())&199){case 0:c=R(this,this.G);break;case 1:c=R(this,this.I);break;case 2:c=R(this,this.M);break;case 3:c=R(this,this.H);break;case 4:c=R(this,Gj.call(this,0));break;case 5:c=R(this,T(this));break;case 6:c=R(this,this.K);break;case 7:c=R(this,this.J);break;case 64:c=R(this,this.G+this.T());break;case 65:c=R(this,this.I+this.T());break;case 66:c=R(this,this.M+this.T());break;case 67:c=R(this,this.H+this.T());break;case 68:c=R(this,Gj.call(this,1)+this.T()); +break;case 69:c=Vf(this,this.P+this.T());break;case 70:c=R(this,this.K+this.T());break;case 71:c=R(this,this.J+this.T());break;case 128:c=R(this,this.G+T(this));break;case 129:c=R(this,this.I+T(this));break;case 130:c=R(this,this.M+T(this));break;case 131:c=R(this,this.H+T(this));break;case 132:c=R(this,Gj.call(this,2)+T(this));break;case 133:c=Vf(this,this.P+T(this));break;case 134:c=R(this,this.K+T(this));break;case 135:c=R(this,this.J+T(this));break;case 192:c=this.G;break;case 193:c=this.I;break; +case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}var d=this.L>>3&7;switch(d){case 0:b=this.G;break;case 1:b=this.I;break;case 2:b=this.M;break;case 3:b=this.H;break;case 4:b=J(this);break;case 5:b=this.P;break;case 6:b=this.K;break;case 7:b=this.J;break;default:b=0}a=a.call(this,b,c);switch(d){case 0:this.G=a;break;case 1:this.I=a;break;case 2:this.M=a;break;case 3:this.H=a;break;case 4:I(this, +a);break;case 5:this.P=a;break;case 6:this.K=a;break;case 7:this.J=a}} +function gf(a){var b,c,d=(this.L=this.xa())&199;switch(d){case 0:b=R(this,this.G);this.C=this.D;break;case 1:b=R(this,this.I);this.C=this.D;break;case 2:b=R(this,this.M);this.C=this.D;break;case 3:b=R(this,this.H);this.C=this.D;break;case 4:b=R(this,Gj.call(this,0));this.C=this.D;break;case 5:b=R(this,T(this));this.C=this.D;break;case 6:b=R(this,this.K);this.C=this.D;break;case 7:b=R(this,this.J);this.C=this.D;break;case 64:b=R(this,this.G+this.T());this.C=this.D;break;case 65:b=R(this,this.I+this.T()); +this.C=this.D;break;case 66:b=R(this,this.M+this.T());this.C=this.D;break;case 67:b=R(this,this.H+this.T());this.C=this.D;break;case 68:b=R(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:b=Vf(this,this.P+this.T());this.C=this.D;break;case 70:b=R(this,this.K+this.T());this.C=this.D;break;case 71:b=R(this,this.J+this.T());this.C=this.D;break;case 128:b=R(this,this.G+T(this));this.C=this.D;break;case 129:b=R(this,this.I+T(this));this.C=this.D;break;case 130:b=R(this,this.M+T(this));this.C= +this.D;break;case 131:b=R(this,this.H+T(this));this.C=this.D;break;case 132:b=R(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:b=Vf(this,this.P+T(this));this.C=this.D;break;case 134:b=R(this,this.K+T(this));this.C=this.D;break;case 135:b=R(this,this.J+T(this));this.C=this.D;break;case 192:b=this.G;break;case 193:b=this.I;break;case 194:b=this.M;break;case 195:b=this.H;break;case 196:b=J(this);break;case 197:b=this.P;break;case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}switch(this.L>> +3&7){case 0:c=this.G;break;case 1:c=this.I;break;case 2:c=this.M;break;case 3:c=this.H;break;case 4:c=J(this);break;case 5:c=this.P;break;case 6:c=this.K;break;case 7:c=this.J;break;default:c=0}a=a.call(this,b,c);switch(d){case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Yf(this,a)}} +function hf(a,b){var c,d=(this.L=this.xa())&199;switch(d){case 0:c=R(this,this.G);this.C=this.D;break;case 1:c=R(this,this.I);this.C=this.D;break;case 2:c=R(this,this.M);this.C=this.D;break;case 3:c=R(this,this.H);this.C=this.D;break;case 4:c=R(this,Gj.call(this,0));this.C=this.D;break;case 5:c=R(this,T(this));this.C=this.D;break;case 6:c=R(this,this.K);this.C=this.D;break;case 7:c=R(this,this.J);this.C=this.D;break;case 64:c=R(this,this.G+this.T());this.C=this.D;break;case 65:c=R(this,this.I+this.T()); +this.C=this.D;break;case 66:c=R(this,this.M+this.T());this.C=this.D;break;case 67:c=R(this,this.H+this.T());this.C=this.D;break;case 68:c=R(this,Gj.call(this,1)+this.T());this.C=this.D;break;case 69:c=Vf(this,this.P+this.T());this.C=this.D;break;case 70:c=R(this,this.K+this.T());this.C=this.D;break;case 71:c=R(this,this.J+this.T());this.C=this.D;break;case 128:c=R(this,this.G+T(this));this.C=this.D;break;case 129:c=R(this,this.I+T(this));this.C=this.D;break;case 130:c=R(this,this.M+T(this));this.C= +this.D;break;case 131:c=R(this,this.H+T(this));this.C=this.D;break;case 132:c=R(this,Gj.call(this,2)+T(this));this.C=this.D;break;case 133:c=Vf(this,this.P+T(this));this.C=this.D;break;case 134:c=R(this,this.K+T(this));this.C=this.D;break;case 135:c=R(this,this.J+T(this));this.C=this.D;break;case 192:c=this.G;break;case 193:c=this.I;break;case 194:c=this.M;break;case 195:c=this.H;break;case 196:c=J(this);break;case 197:c=this.P;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}a=a[this.L>> +3&7].call(this,c,b.call(this));switch(d){case 192:this.G=a;break;case 193:this.I=a;break;case 194:this.M=a;break;case 195:this.H=a;break;case 196:I(this,a);break;case 197:this.P=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Yf(this,a)}} +function Gj(a){var b=this.xa(),c=b>>6,d,e;switch(b>>3&7){case 0:d=this.G;break;case 1:d=this.I;break;case 2:d=this.M;break;case 3:d=this.H;break;case 4:d=0;break;case 5:d=this.P;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:e=this.G;break;case 1:e=this.I;break;case 2:e=this.M;break;case 3:e=this.H;break;case 4:e=J(this);this.ka=this.Ka;break;case 5:a?(e=this.P,this.ka=this.Ka):e=T(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<>8&255;9<(c&15)||zf(this)?(c+=6,80286<=this.ja&&255>8&255;9<(c&15)||zf(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.G=this.G&-65536|d<<8|c;a?Ef(this):Ff(this);b?Mf(this):Kf(this);this.A-=this.B.Je},function(){this.G=tj.call(this,this.G)},function(){this.I=tj.call(this,this.I)},function(){this.M=tj.call(this,this.M)},function(){this.H=tj.call(this,this.H)},function(){I(this,tj.call(this, +J(this)))},function(){this.P=tj.call(this,this.P)},function(){this.K=tj.call(this,this.K)},function(){this.J=tj.call(this,this.J)},function(){this.G=rj.call(this,this.G)},function(){this.I=rj.call(this,this.I)},function(){this.M=rj.call(this,this.M)},function(){this.H=rj.call(this,this.H)},function(){I(this,rj.call(this,J(this)))},function(){this.P=rj.call(this,this.P)},function(){this.K=rj.call(this,this.K)},function(){this.J=rj.call(this,this.J)},function(){K(this,this.G&this.R);this.A-=this.B.Rc}, +function(){K(this,this.I&this.R);this.A-=this.B.Rc},function(){K(this,this.M&this.R);this.A-=this.B.Rc},function(){K(this,this.H&this.R);this.A-=this.B.Rc},function(){K(this,J(this)-2&65535);this.A-=this.B.Rc},function(){K(this,this.P&this.R);this.A-=this.B.Rc},function(){K(this,this.K&this.R);this.A-=this.B.Rc},function(){K(this,this.J&this.R);this.A-=this.B.Rc},function(){this.G=this.G&~this.R|H(this);this.A-=this.B.zc},function(){this.I=this.I&~this.R|H(this);this.A-=this.B.zc},function(){this.M= +this.M&~this.R|H(this);this.A-=this.B.zc},function(){this.H=this.H&~this.R|H(this);this.A-=this.B.zc},function(){I(this,J(this)&~this.R|H(this));this.A-=this.B.zc},function(){this.P=this.P&~this.R|H(this);this.A-=this.B.zc},function(){this.K=this.K&~this.R|H(this);this.A-=this.B.zc},function(){this.J=this.J&~this.R|H(this);this.A-=this.B.zc},Hj,Ij,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Uj,Vj,Wj,Hj,Ij,Jj,Kj,Lj,Mj,Nj,Oj,Pj,Qj,Rj,Sj,Tj,Uj,Vj,Wj,Xj,function(){this.ya.call(this,mk,this.Ma);this.A-=-1===this.C? +1:this.B.Jg},Xj,function(){this.ya.call(this,mk,this.T);this.A-=-1===this.C?1:this.B.Jg},function(){this.Ya.call(this,ij)},function(){this.ea.call(this,jj)},function(){this.Oa.call(this,mj)},function(){this.V.call(this,nj)},Zj,ak,bk,ck,function(){this.S|=1;this.ea.call(this,Bi)},function(){this.S|=1;this.ka=this.Ka=this.rf;this.V.call(this,ai)},function(){var a;this.V.call(this,Ai);switch(this.L>>3&7){case 0:a=this.G;this.G=this.aa;Bd(this,a);break;case 1:a=this.I;this.I=this.aa;sf(this,a);break; +case 2:a=this.M;this.M=this.aa;ud(this,a);break;case 3:a=this.H;this.H=this.aa;Ad(this,a);break;case 4:a=J(this);I(this,this.aa);80386<=this.ja?this.Nb.load(a):Bd(this,a);break;case 5:a=this.P;this.P=this.aa;80386<=this.ja?this.Ob.load(a):sf(this,a);break;case 6:a=this.K;this.K=this.aa;ud(this,a);break;case 7:a=this.J,this.J=this.aa,Ad(this,a)}},function(){this.S|=1;this.U=this.fa;this.aa=H(this);this.ya.call(this,nk,Aj);this.U=-1},function(){this.A-=3},function(){var a=this.G;this.G=this.G&~this.R| +this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.M&this.R;this.M=this.M&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.H&this.R;this.H=this.H&~this.R|a&this.R;this.A-=3},function(){var a=this.G,b=J(this);this.G=this.G&~this.R|b&this.R;I(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.P&this.R;this.P=this.P&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G& +~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.G;this.G=this.G&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.G=2==this.ba?this.G&-65536|this.G<<24>>24&65535:this.G<<16>>16;this.A-=2},function(){this.M=2==this.ba?this.M&-65536|(this.G&32768?65535:0):this.G&-2147483648?-1:0;this.A-=this.B.Kj},function(){Bj.call(this,this.Ma(),Zf(this));this.A-=this.B.Nj},function(){this.A-=3},function(){var a=Cd(this);a&131072&&3>this.Pa?E.call(this, +13,0):(K(this,a&-196609),this.A-=this.B.Rc)},function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var a=H(this),a=a&65535|this.ca&-65536;Dd(this,a);this.A-=this.B.zc}},function(){var a=this.G>>8&255;a&1?Ef(this):Ff(this);a&4?(this.resultType&=-3,this.ca|=4):(this.resultType&=-3,this.ca&=-5);a&16?Mf(this):Kf(this);a&64?Nf(this):Lf(this);a&128?(this.resultType&=-17,this.ca|=128):(this.resultType&=-17,this.ca&=-129);this.A-=this.B.fc},function(){this.G=this.G&-65281|(Cd(this)&213)<<8;this.A-= +this.B.fc},function(){var a=this.G&-256,b;b=T(this);b=this.Qa(this.ka.mc(b,1));this.G=a|b;this.A-=this.B.Sh},function(){this.G=this.G&~this.R|yd(this,this.ka,T(this));this.A-=this.B.Sh},function(){var a=T(this),b=this.G;this.qc(this.ka.nc(a,1),b);this.A-=this.B.Th},function(){var a=T(this),b=this.G;this.rc(this.ka.nc(a,this.ba),b);this.A-=this.B.Th},function(){var a=1,b=0,c=this.Ba,d=this.B.Uh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Wh,this.Ia&256||(this.A-=this.B.Vh));if(a--){var e=this.Qa(this.ka.mc(this.K& +c,1));this.qc(this.Xa.nc(this.J&c,1),e);e=this.ca&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Uh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Wh,this.Ia&256||(this.A-=this.B.Vh));if(a--){var e=yd(this,this.ka,this.K&c);this.rc(this.Xa.nc(this.J&c,this.ba),e);e=this.ca&1024?-this.ba:this.ba;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I- +b&c;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Fh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Hh,this.Ia&256||(this.A-=this.B.Gh));if(a--){var e=Rf(this,this.ka,this.K),f=Rf(this,this.Xa,this.J);this.C=this.D;Ph.call(this,e,f);e=this.ca&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Fh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Hh, +this.Ia&256||(this.A-=this.B.Gh));if(a--){var e=Tf(this,this.ka,this.K&c),f=Tf(this,this.Xa,this.J&c);this.C=this.D;Qh.call(this,e,f);e=this.ca&1024?-this.ba:this.ba;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){Df(this,this.G&this.xa(),128);this.A-=this.B.Je},function(){Df(this,this.G&this.Ma(),this.Ga);this.A-=this.B.Je},function(){var a=1,b=0,c=this.Ba,d=this.B.ei;this.Ia&192&& +(a=this.I&c,b=1,d=this.B.gi,this.Ia&256||(this.A-=this.B.fi));if(a--){var e=this.G;this.qc(this.Xa.nc(this.J&c,1),e);this.I=this.I&~c|this.I-b&c;80546<=this.Uc&&80564>=this.Uc&&!(this.Ia&2048)!=(103!=this.Qa(this.Ha))&&(c^=-65536);this.J=this.J&~c|this.J+(this.ca&1024?-1:1)&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.ei;this.Ia&192&&(a=this.I&c,b=1,d=this.B.gi,this.Ia&256||(this.A-=this.B.fi));if(a--){var e=this.G;this.rc(this.Xa.nc(this.J&c,this.ba),e);this.J= +this.J&~c|this.J+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Mh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Oh,this.Ia&256||(this.A-=this.B.Nh));if(a--){var e=this.Qa(this.ka.mc(this.K&c,1));this.G=this.G&-256|e;this.K=this.K&~c|this.K+(this.ca&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Mh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.Oh, +this.Ia&256||(this.A-=this.B.Nh));if(a--){var e=yd(this,this.ka,this.K&c);this.G=this.G&~this.R|e;this.K=this.K&~c|this.K+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Zh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.ai,this.Ia&256||(this.A-=this.B.$h));if(a--){var e=this.G&255,f=Rf(this,this.Xa,this.J);this.C=this.D;Ph.call(this,e,f);this.J=this.J&~c|this.J+(this.ca&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-= +d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){var a=1,b=0,c=this.Ba,d=this.B.Zh;this.Ia&192&&(a=this.I&c,b=1,d=this.B.ai,this.Ia&256||(this.A-=this.B.$h));if(a--){var e=this.G&this.R,f=Tf(this,this.Xa,this.J&c);this.C=this.D;Qh.call(this,e,f);this.J=this.J&~c|this.J+(this.ca&1024?-this.ba:this.ba)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Vb;a&&Af(this)==(this.Ia&64)&&(vf(this),this.S|=256)}},function(){this.G=this.G&-256|this.xa();this.A-=this.B.fc},function(){this.I= +this.I&-256|this.xa();this.A-=this.B.fc},function(){this.M=this.M&-256|this.xa();this.A-=this.B.fc},function(){this.H=this.H&-256|this.xa();this.A-=this.B.fc},function(){this.G=this.G&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.I=this.I&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.M=this.M&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.H=this.H&-65281|this.xa()<<8;this.A-=this.B.fc},function(){this.G=this.G&~this.R|this.Ma();this.A-=this.B.fc},function(){this.I=this.I& +~this.R|this.Ma();this.A-=this.B.fc},function(){this.M=this.M&~this.R|this.Ma();this.A-=this.B.fc},function(){this.H=this.H&~this.R|this.Ma();this.A-=this.B.fc},function(){I(this,J(this)&~this.R|this.Ma());this.A-=this.B.fc},function(){this.P=this.P&~this.R|this.Ma();this.A-=this.B.fc},function(){this.K=this.K&~this.R|this.Ma();this.A-=this.B.fc},function(){this.J=this.J&~this.R|this.Ma();this.A-=this.B.fc},gk,hk,gk,hk,function(){this.V.call(this,bi)},function(){this.V.call(this,$h)},function(){this.S|= +1;this.Jb.call(this,ok,this.xa)},function(){this.S|=1;this.ya.call(this,ok,this.Ma)},ik,jk,ik,jk,function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var a=this.B.dk;this.qb=-1;Cj.call(this,3,null,a)}},function(){var a=this.xa();if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{var b;a:{b=this.Hd[a];if(void 0!==b)for(var c=0;cthis.Pa)E.call(this,13,0);else{var a=this.B.ek;this.qb=-1;Cj.call(this,4,null,a)}else this.A-=this.B.fk},function(){if(this.ca&131072&&3>this.Pa)E.call(this,13,0);else{this.sb=this.ta.Z;this.U=this.fa;this.A-=this.B.bk;if(this.$a&1&&this.ca&16384){var a=this.na(this.Sa.Aa+0);vd(this.wa,a,!1)}else{var a=this.pa,b=H(this),c=H(this),d=H(this);if(this.ca&131072)d=d&131071|this.ca&-131072;else if(d&131072){var e=H(this),f=H(this),g=H(this),h=H(this),k=H(this),m=H(this);wd(this,!0,!0);ud(this, +f);I(this,e);Bd(this,g);Ad(this,h);this.Nb.load(k);this.Ob.load(m)}null!=Ed(this,b,c,!1)&&(Dd(this,d,a),this.le&&nf(this,this.Ha))}this.sb=this.U=-1}},function(){this.Jb.call(this,dk,wj)},function(){this.ya.call(this,2==this.ba?ek:fk,wj)},function(){this.Jb.call(this,dk,xj)},function(){this.ya.call(this,2==this.ba?ek:fk,xj)},function(){var a=this.xa();if(a){var b=this.G&255;this.G=this.G&-65536|b/a<<8|b%a;Df(this,this.G,128);this.A-=this.B.Hj}else Fj.call(this)},function(){var a=this.G&255,b=(this.G>> +8&255)*this.xa()|0,c=a+b|0;this.G=this.G&-65536|c&255;wf(this,a,b,c,191);this.A-=this.B.Gj},function(){this.G=this.G&-256|(xf(this)?255:0);this.A-=2},function(){this.G=this.G&-256|Rf(this,this.ka,this.H+(this.G&255));this.A-=this.B.Gk},function(){kk.call(this,216)},function(){kk.call(this,217)},function(){kk.call(this,218)},function(){kk.call(this,219)},function(){kk.call(this,220)},function(){kk.call(this,221)},function(){kk.call(this,222)},function(){kk.call(this,223)},function(){var a=this.T(), +b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b&&!Af(this)?(O(this,M(this)+a),this.A-=this.B.mk):this.A-=this.B.Ph},function(){var a=this.T(),b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b&&Af(this)?(O(this,M(this)+a),this.A-=this.B.Qh):this.A-=this.B.Rh},function(){var a=this.T(),b=this.I-1&this.Ba;this.I=this.I&~this.Ba|b;b?(O(this,M(this)+a),this.A-=this.B.lk):this.A-=this.B.Ph},function(){var a=this.T();this.I&this.Ba?this.A-=this.B.Rh:(O(this,M(this)+a),this.A-=this.B.Qh)},function(){var a=this.xa(); +Pf(this,a,1,!0)&&(this.G=this.G&-256|rc(this.ga,a,1,this.Ha-2)&255,this.A-=this.B.Kh)},function(){var a=this.xa();Pf(this,a,this.ba,!0)&&(this.G=this.G&~this.R|rc(this.ga,a,this.ba,this.Ha-2)&this.R,this.A-=this.B.Kh)},function(){var a=this.xa();Pf(this,a,1,!1)&&(zc(this.ga,a,1,this.G&255,this.Ha-2),this.A-=this.B.Yh)},function(){var a=this.xa();Pf(this,a,this.ba,!1)&&(zc(this.ga,a,this.ba,this.G&this.R,this.Ha-2),this.A-=this.B.Yh)},function(){var a=this.Ma(),b=M(this),a=b+a;K(this,b);O(this,a); +this.A-=this.B.Lj},function(){var a=this.Ma();O(this,M(this)+a);this.A-=this.B.Lh},function(){Ed(this,this.Ma(),Zf(this));this.A-=this.B.hk},function(){var a=this.T();O(this,M(this)+a);this.A-=this.B.Lh},function(){var a=this.M&65535;Pf(this,a,1,!0)&&(this.G=this.G&-256|rc(this.ga,a,1,this.Ha-1)&255,this.A-=this.B.Jh)},function(){var a=this.M&65535;Pf(this,a,this.ba,!0)&&(this.G=this.G&~this.R|rc(this.ga,a,this.ba,this.Ha-1)&this.R,this.A-=this.B.Jh)},function(){var a=this.M&65535;Pf(this,a,1,!1)&& +(zc(this.ga,a,1,this.G&255,this.Ha-1),this.A-=this.B.Xh)},function(){var a=this.M&65535;Pf(this,a,2,!1)&&(zc(this.ga,a,this.ba,this.G&this.R,this.Ha-1),this.A-=this.B.Xh)},lk,lk,function(){this.S|=132;this.A-=this.B.nd},function(){this.S|=68;this.A-=this.B.nd},function(){this.ca&131072?E.call(this,13,0):(this.ua|=4,this.A-=2,this.ha&&z(this,-2147483648)?(vf(this),this.ha.Wb()):this.ca&512||(this.ha&&vf(this),this.Wb()))},function(){xf(this)?Ff(this):Ef(this);this.A-=2},function(){this.cb=!1;this.Jb.call(this, +qk,zj);this.cb&&(this.G=this.G&~this.R|this.ia&this.R)},function(){this.cb=!1;this.ya.call(this,rk,zj);this.cb&&(this.G=this.G&~this.R|this.ia&this.R,this.M=this.M&~this.R|this.va&this.R)},function(){Ff(this);this.A-=2},function(){Ef(this);this.A-=2},function(){this.pa>this.Pa?E.call(this,13,0):(this.ca&=-513,this.A-=this.B.Jj)},function(){this.pa>this.Pa?E.call(this,13,0):(this.ca|=512,this.S|=4,this.A-=2)},function(){this.ca&=-1025;this.A-=2},function(){this.ca|=1024;this.A-=2},function(){this.Jb.call(this, +Id,zj)},function(){this.ya.call(this,Jd,zj)}],Yj=[zh,Ci,xh,Ei,Bh,gj,oj,Ph],mk=[Ah,Di,yh,Fi,Ch,hj,pj,Qh],nk=[function(a,b){this.A-=-1===this.C?this.B.zc:this.B.yk;return b},Sh,Sh,Sh,Sh,Sh,Sh,Sh],ok=[function(a,b){this.A-=-1===this.C?this.B.qk:this.B.nk;return b},W,W,W,W,W,W,W],dk=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=7)?(d=a<>8-b)&255):d=a<<7;If(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=7)?(d=a<<8-b,c=(a>>>b|d)&255):d=a;If(this,c,d,128)}return c}, +function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=9)?(c=(a<>9-b)&255,d=a<>b|d<<8-b|a<<9-b)&255,d=a<<8-b):d<<=7;If(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;8>>b-1,a=b>>>1&255,Df(this,a,128,b&1,a&128);return a},W,function(a,b){if(b&=this.ra)9>24>>b-1,a=b>>1&255,Df(this,a,128,b&1);return a}],ek=[function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<>16-b)&65535):d=a<<15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d;(b&=15)?(d=a<<16-b,c=(a>>>b|d)&65535):d=a;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=Jf(this);(b%=17)?(c=(a<>17-b)&65535,d=a<>b|d<<16-b|a<<17-b)&65535,d=a<<16-b):d<<=15;If(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.ra){var d=0;16>>b-1,a=b>>>1&65535,Df(this,a,32768,b&1,a&32768);return a},W,function(a,b){if(b&=this.ra)17>16>>b-1,a=b>>1&65535,Df(this,a,32768,b&1);return a}],fk=[function(a,b){var c=a;if(b&=this.ra)c=a<>>32-b,If(this,c,a<>>b|d;If(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.ra)c=Jf(this),c=a<>>32-b>>>1,If(this,c,a<>>b|c<<32-b|a<<32-b<<1,If(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.ra)a<<=b-1,c=a<<1,Df(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.ra)b=a>>>b-1,a=b>>>1,Df(this,a,-2147483648, +b&1,a&-2147483648);return a},W,function(a,b){if(b&=this.ra)b=a>>b-1,a=b>>1,Df(this,a,-2147483648,b&1);return a}],qk=[function(a,b){b=this.xa();Df(this,a&b,128);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^255},function(a){var b=-a|0;wf(this,0,a,b,191,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&255},function(a){this.ia=(this.G&255)*a&65535;this.ia&65280?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-= +-1===this.D?this.B.uk:this.B.tk;this.S|=2;return a},function(a){var b=(this.G<<24>>24)*(a<<24>>24)|0;this.ia=b&65535;127b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.Zj:this.B.Yj;this.S|=2;return a},function(a,b){if(!a)return Fj.call(this),a;var c=(b=this.G&65535)/a;if(255>24,d= +(b=this.G<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ja&&-128==d)return Fj.call(this),a;this.ia=d&255|(b%c&255)<<8;this.cb=!0;this.A-=-1===this.D?this.B.Vj:this.B.Uj;this.S|=2;return a}],rk=[function(a,b){b=this.Ma();Df(this,a&b,this.Ga);this.A-=-1===this.D?this.B.ii:this.B.hi;this.S|=2;return a},W,function(a){this.A-=-1===this.D?this.B.Wf:this.B.Vf;return a^this.R},function(a){var b=-a|0;wf(this,0,a,b,this.Ga|63,!0);this.A-=-1===this.D?this.B.Wf:this.B.Vf;return b&this.R},function(a,b){2==this.ba? +(b=this.G&65535,b=b*a|0,this.ia=b&65535,this.va=b>>16&65535):(Yh.call(this,a,this.G),80563==this.Uc&&68657152==this.G&&129==a&&(this.va=0));this.va?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D?this.B.wk:this.B.vk;this.S|=2;return a},function(a,b){2==this.ba?(b=this.G&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.ia=b&65535,this.va=b>>16&65535,b=32767b):(Xh.call(this,a,this.G),b=this.va!=this.ia>>31);b?(Ef(this),Gf(this)):(Ff(this),Hf(this));this.cb=!0;this.A-=-1===this.D? +this.B.ak:this.B.$j;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;b=65536*(this.M&65535)+(this.G&65535);var c=b/a;if(65536<=c)return Fj.call(this),a;this.ia=c&65535;this.va=b%a&65535}else{if(!sj.call(this,this.G,this.M,a))return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Tj:this.B.Sj;this.S|=2;return a},function(a,b){if(2==this.ba){if(!a)return Fj.call(this),a;var c=a<<16>>16,d=(b=this.M<<16|this.G&65535)/c|0;if(d!=d<<16>>16||8086== +this.ja&&-32768==d)return Fj.call(this),a;this.ia=d&65535;this.va=b%c&65535}else{b=this.G;var c=this.M,d=a,e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!sj.call(this,b,c,d)||this.ia>2147483647+e||this.va>2147483647+f?b=!1:(e&&(this.ia=-this.ia),f&&(this.va=-this.va),b=!0);if(!b)return Fj.call(this),a;this.ia|=0;this.va|=0}this.cb=!0;this.A-=-1===this.D?this.B.Xj:this.B.Wj;this.S|=2;return a}],Id=[function(a){var b=a+1|0;wf(this,a,1,b,190);this.A-=-1===this.D?this.B.Uf:this.B.Tf; +return b&255},function(a){var b=a-1|0;wf(this,a,1,b,190,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&255},W,W,W,W,W,W],Jd=[function(a){var b=a+1|0;wf(this,a,1,b,this.Ga|62);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){var b=a-1|0;wf(this,a,1,b,this.Ga|62,!0);this.A-=-1===this.D?this.B.Uf:this.B.Tf;return b&this.R},function(a){K(this,M(this));O(this,a);this.A-=-1===this.D?this.B.Pj:this.B.Oj;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);this.U= +this.fa;Bj.call(this,a,this.na(this.D+this.ba));this.A-=this.B.Mj;this.S|=2;this.U=-1;return a},function(a){O(this,a);this.A-=-1===this.D?this.B.jk:this.B.ik;this.S|=2;return a},function(a){if(-1===this.D)return W.call(this,a);Ed(this,a,this.na(this.D+this.ba));this.A-=this.B.gk;this.S|=2;return a},function(a){var b=a;this.S&512&&(a=a-2&65535,80286>this.ja&&(b=a));K(this,b);this.A-=-1===this.D?this.B.Rc:this.B.Ak;this.S|=2;return a},W];function te(){this.V.call(this,lj);this.A-=-1===this.D?6:13} +function ue(){this.ea.call(this,kj);this.A-=-1===this.D?12:19}var le=Array(256);le[0]=function(){16>(this.Qa(this.Ha)&56)&&(this.S|=1);this.ya.call(this,this.mg,zj)};le[1]=function(){this.Qa(this.Ha)&16||(this.S|=1);this.ya.call(this,sk,zj)};le[2]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,Zh)};le[3]=function(){!(this.$a&1)||this.ca&131072?E.call(this,6):this.V.call(this,ei)}; +le[5]=function(){this.pa?E.call(this,13,0,0,!0):(Of(this,this.na(2054)),this.J=this.na(2086),this.K=this.na(2088),this.P=this.na(2090),this.H=this.na(2094),this.M=this.na(2096),this.I=this.na(2098),this.G=this.na(2100),td(this.Xa,2102,this.na(2084)),td(this.wa,2108,this.na(2082)),td(this.ta,2114,this.na(2080)),td(this.vb,2120,this.na(2078)),Dd(this,this.na(2072)),O(this,this.na(2074)),I(this,this.na(2092)),this.Ec=this.na(2126)|this.Qa(2128)<<16,this.zd=this.Ec+this.na(2130),this.Mc=this.na(2138)| +this.Qa(2140)<<16,this.Sd=this.Mc+this.na(2142),td(this.Bc,2132,this.na(2076)),td(this.Sa,2144,this.na(2070)),this.A-=195)};le[6]=function(){this.pa?E.call(this,13,0):(this.$a&=-9,this.A-=2)};le[11]=Ld;le[166]=Ld;le[255]=Ld;var N=[];N[5]=Ld; +N[7]=function(){if(this.pa)E.call(this,13,0,0,!0);else{var a=this.Xa.mc(this.J&this.Ba,204);if(-1!==a){uj.call(this,this.oa(a));var b=this.oa(a+168),c=(b&24576)>>13;Dd(this,this.oa(a+4),c);this.Ec=this.oa(a+112);this.zd=this.Ec+this.oa(a+116);this.Mc=this.oa(a+100);this.Sd=this.Mc+this.oa(a+104);sd(this.Bc,this.oa(a+56),this.oa(a+120),this.oa(a+124),this.oa(a+128));sd(this.Sa,this.oa(a+52),this.oa(a+84),this.oa(a+88),this.oa(a+92));this.J=this.oa(a+12);this.K=this.oa(a+16);this.P=this.oa(a+20);this.H= +this.oa(a+28);this.M=this.oa(a+32);this.I=this.oa(a+36);this.G=this.oa(a+40);sd(this.Ob,this.oa(a+60),this.oa(a+132),this.oa(a+136),this.oa(a+140));sd(this.Nb,this.oa(a+64),this.oa(a+144),this.oa(a+148),this.oa(a+152));sd(this.vb,this.oa(a+68),this.oa(a+156),this.oa(a+160),this.oa(a+164));sd(this.ta,this.oa(a+72),b,this.oa(a+172),this.oa(a+176));sd(this.wa,this.oa(a+76),this.oa(a+180),this.oa(a+184),this.oa(a+188));sd(this.Xa,this.oa(a+80),this.oa(a+192),this.oa(a+196),this.oa(a+200));O(this,this.oa(a+ +8));I(this,this.oa(a+24))}this.A-=122<<(a&3?1:0)}};N[16]=Zj;N[17]=ak;N[18]=bk;N[19]=ck;N[32]=function(){if(this.pa)E.call(this,13,0);else{var a,b=this.xa();switch((b&56)>>3){case 0:a=this.$a;break;case 2:a=this.se;break;case 3:a=this.Od;break;default:me.call(this);return}Be(this,b&7,a);this.A-=6}};N[33]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;4==b||5==b?me.call(this):(Be(this,a&7,this.Ja[b]),this.A-=22)}}; +N[34]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=Ae(this,a&7);switch((a&56)>>3){case 0:uj.call(this,b);this.A-=10;break;case 2:this.se=b;this.A-=4;break;case 3:Fd.call(this,b);this.A-=5;break;default:me.call(this)}}};N[35]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;4==b||5==b?me.call(this):(a=Ae(this,a&7),a!=this.Ja[b]&&(of(this,!1),this.Ja[b]=a,of(this,!0)),this.A-=4>b?22:14)}}; +N[36]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;6>b?me.call(this):(Be(this,a&7,this.Ee[b]),this.A-=12)}};N[38]=function(){if(this.pa)E.call(this,13,0);else{var a=this.xa(),b=(a&56)>>3;6>b?me.call(this):(this.Ee[b]=Ae(this,a&7),this.A-=12)}};N[128]=function(){var a=this.Ma();Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[129]=function(){var a=this.Ma();Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}; +N[130]=function(){var a=this.Ma();xf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[131]=function(){var a=this.Ma();xf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[132]=function(){var a=this.Ma();Af(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[133]=function(){var a=this.Ma();Af(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[134]=function(){var a=this.Ma();xf(this)||Af(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb}; +N[135]=function(){var a=this.Ma();xf(this)||Af(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[136]=function(){var a=this.Ma();Bf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[137]=function(){var a=this.Ma();Bf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[138]=function(){var a=this.Ma();yf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[139]=function(){var a=this.Ma();yf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)}; +N[140]=function(){var a=this.Ma();!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[141]=function(){var a=this.Ma();!Bf(this)==!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[142]=function(){var a=this.Ma();Af(this)||!Bf(this)!=!Cf(this)?(O(this,M(this)+a),this.A-=this.B.ab):this.A-=this.B.bb};N[143]=function(){var a=this.Ma();Af(this)||!Bf(this)!=!Cf(this)?this.A-=this.B.bb:(O(this,M(this)+a),this.A-=this.B.ab)};N[144]=function(){vj.call(this,Gi)}; +N[145]=function(){vj.call(this,Gi)};N[146]=function(){vj.call(this,Hi)};N[147]=function(){vj.call(this,Ii)};N[148]=function(){vj.call(this,Ji)};N[149]=function(){vj.call(this,Ki)};N[150]=function(){vj.call(this,Li)};N[151]=function(){vj.call(this,Mi)};N[152]=function(){vj.call(this,Ni)};N[153]=function(){vj.call(this,Oi)};N[154]=function(){vj.call(this,Pi)};N[155]=function(){vj.call(this,Qi)};N[156]=function(){vj.call(this,Ri)};N[157]=function(){vj.call(this,Si)};N[158]=function(){vj.call(this,Ti)}; +N[159]=function(){vj.call(this,Ui)};N[160]=function(){zd(this,this.Nb.Z,this.ba,2);this.A-=this.B.Ke};N[161]=function(){this.U=this.fa;var a=H(this);this.Nb.load(a);this.A-=this.B.zc;this.U=-1};N[163]=function(){this.ea.call(this,Lh);-1!==this.D&&(this.A-=6)};N[164]=function(){this.ea.call(this,2==this.ba?Vi:Xi);this.A-=-1===this.D?3:7};N[165]=function(){this.ea.call(this,2==this.ba?Zi:$i);this.A-=-1===this.D?3:7};N[168]=function(){zd(this,this.Ob.Z,this.ba,2);this.A-=this.B.Ke}; +N[169]=function(){this.U=this.fa;var a=H(this);this.Ob.load(a);this.A-=this.B.zc;this.U=-1};N[171]=function(){this.ea.call(this,Oh);-1!==this.D&&(this.A-=5)};N[172]=function(){this.ea.call(this,2==this.ba?aj:cj);this.A-=-1===this.D?3:7};N[173]=function(){this.ea.call(this,2==this.ba?ej:fj);this.A-=-1===this.D?3:7};N[175]=function(){this.V.call(this,2==this.ba?Uh:Wh)};N[178]=function(){this.V.call(this,fi)};N[179]=function(){this.ea.call(this,Nh);-1!==this.D&&(this.A-=5)}; +N[180]=function(){this.V.call(this,ci)};N[181]=function(){this.V.call(this,di)}; +N[182]=function(){this.Oa.call(this,yi);switch(this.L>>3&7){case 0:this.G=this.G&~this.R|this.G&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.M=this.M&~this.R|this.M&255;break;case 3:this.H=this.H&~this.R|this.H&255;break;case 4:this.gb=this.gb&~this.R|this.G>>8&255;this.G=this.aa;break;case 5:this.P=this.P&~this.R|this.I>>8&255;this.I=this.aa;break;case 6:this.K=this.K&~this.R|this.M>>8&255;this.M=this.aa;break;case 7:this.J=this.J&~this.R|this.H>>8&255,this.H=this.aa}this.A-= +-1===this.D?3:6};N[183]=function(){xd(this,2);this.V.call(this,zi);switch(this.L>>3&7){case 0:this.G=this.G&65535;break;case 1:this.I=this.I&65535;break;case 2:this.M=this.M&65535;break;case 3:this.H=this.H&65535;break;case 4:this.gb=this.gb&65535;break;case 5:this.P=this.P&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.D?3:6};N[186]=function(){this.ya.call(this,tk,this.xa)};N[187]=function(){this.ea.call(this,Mh);-1!==this.D&&(this.A-=5)}; +N[188]=function(){this.V.call(this,Fh)};N[189]=function(){this.V.call(this,Gh)}; +N[190]=function(){this.Oa.call(this,yi);switch(this.L>>3&7){case 0:this.G=this.G&~this.R|(this.G&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.M=this.M&~this.R|(this.M&255)<<24>>24&this.R;break;case 3:this.H=this.H&~this.R|(this.H&255)<<24>>24&this.R;break;case 4:this.gb=this.gb&~this.R|this.G<<16>>24&this.R;this.G=this.aa;break;case 5:this.P=this.P&~this.R|this.I<<16>>24&this.R;this.I=this.aa;break;case 6:this.K=this.K&~this.R|this.M<<16>>24& +this.R;this.M=this.aa;break;case 7:this.J=this.J&~this.R|this.H<<16>>24&this.R,this.H=this.aa}this.A-=-1===this.D?3:6};N[191]=function(){xd(this,2);this.V.call(this,zi);switch(this.L>>3&7){case 0:this.G=this.G<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.M=this.M<<16>>16;break;case 3:this.H=this.H<<16>>16;break;case 4:this.gb=this.gb<<16>>16;break;case 5:this.P=this.P<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.D?3:6}; +var pf=[function(){this.A-=2+(-1===this.D?0:1);return this.Bc.Z},function(){this.A-=2+(-1===this.D?0:1);return this.Sa.Z},function(a){this.S|=2;this.Bc.load(a);this.A-=17+(-1===this.D?0:2);return a},function(a){this.S|=2;-1!==this.Sa.load(a)&&(this.jb(this.Sa.Xb+4,this.Sa.wb|=512),this.Sa.type|=512);this.A-=17+(-1===this.D?0:2);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!==this.Da.load(a)&&2048!=(this.Da.wb&2560)&&(this.Da.Gc>=this.pa&&this.Da.Gc>=(a&3)||7168==(this.Da.wb&7168)))return Nf(this), +a;Lf(this);return a},function(a){this.S|=2;this.A-=14+(-1===this.D?0:2);if(-1!==this.Da.load(a)&&512==(this.Da.wb&2560)&&this.Da.Gc>=this.pa&&this.Da.Gc>=(a&3))return Nf(this),a;Lf(this);return a},W,W],Kd=[je,je,je,je,je,je,W,W],sk=[function(a){if(-1===this.D)E.call(this,6);else{a=this.zd-this.Ec;var b=this.Ec;80286==this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=11}return a},function(a){if(-1===this.D)E.call(this,6);else{a=this.Sd-this.Mc;var b=this.Mc;80286== +this.ja?b|=-16777216:80386<=this.ja&&2!=this.ba&&(a|=b<<16);this.nb(this.D+2,b);this.A-=12}return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Ec=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.zd=this.Ec+a,this.S|=2,this.A-=11);return a},function(a){-1===this.D||this.ca&131072?E.call(this,6):(this.Mc=this.oa(this.D+2)&(this.R|this.R<<8),a&=65535,this.Sd=this.Mc+a,this.S|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.D?0:1);return this.$a},W,function(a){this.ca&131072? +E.call(this,6):(Of(this,a),this.A-=-1===this.D?3:6,this.S|=2);return a},W],tk=[W,W,W,W,Hh,Kh,Jh,Ih]; +function X(a){bb.call(this,"ChipSet",a,X,32768);var b=a.model;b&&!uk[b]&&w("Unrecognized ChipSet model: "+b);this.ja=uk[b]||vk;this.C=[];b=wk(a[xk]);this.C[0]=[b,b];null==b&&(this.ia=[360,360],(b=a.floppies)&&b.length&&(this.ia=b),yk(this,zk,this.ia.length),yk(this,Ak,a.monitor||(this.ja=kg&&(this.cb=this.Da=2);this.ka=a.scaleTimers||!1;this.Ub=a.rtcDate;this.Db=!1;a.sound&&(this.sb=this.Ea=null,window&&(this.sb=window.AudioContext|| +window.webkitAudioContext),this.sb&&(this.Ea=new this.sb));this.reset(!0);xb(this)}jb(X);var vk=5150.9,kg=5170,uk={5150:5150,5160:5160,5170:kg,att6300:5160.101,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:vk,deskpro386:5180},xk="sw1",Bk="sw2",Ck={jl:1,ONE:0,Io:64,Go:128,xo:192,Lc:192,Xg:6},Dk={Ho:16,to:32,yo:48,Lc:48,Xg:4},zk=1,Ak=4,Ek={5150:[{},{}]};Ek[5150][0][zk]={Lc:192,gd:{1:0,2:64,3:128,4:192},Pd:"Number of Floppy Drives"};Ek[5150][0][3]={Lc:2,gd:{0:0,1:2},Pd:"FPU"}; +Ek[5150][0][Ak]={Lc:48,gd:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Pd:"Monitor Type"};Ek[5150][0][5]={Lc:12,gd:{16:0,32:4,48:8,64:12},Pd:"Base Memory (16Kb Increments)"};Ek[5150][1][6]={Lc:31,gd:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Pd:"Expansion Memory (32Kb Increments)"};Ek[5160]=[{},{}];Ek[5160][0][zk]=Ek[5150][0][zk];Ek[5160][0][3]=Ek[5150][0][3];Ek[5160][0][Ak]=Ek[5150][0][Ak]; +Ek[5160][0][5]={Lc:12,gd:{64:0,128:4,192:8,256:12},Pd:"Base Memory (64Kb Increments)"};Ek[5160][1][6]=Ek[5150][1][6];Ek[5160.101]=[{},{}];Ek[5160.101][0][5]={Lc:143,gd:{128:1,256:130,512:8,640:141},Pd:"Base Memory (128Kb Increments)"};Ek[5160.101][0][3]={Lc:16,gd:{0:0,1:16},Pd:"FPU"};Ek[5160.101][1][2]={Lc:1,gd:{0:0,1:1},Pd:"Floppy Type"};Ek[5160.101][1][zk]=Ek[5150][0][zk];Ek[5160.101][1][Ak]=Ek[5150][0][Ak];l=X.prototype; +l.Pb=function(a,b,c){switch(b){case xk:return this.qa[b]=c,Fk(this,0,b),!0;case Bk:if(5150==(this.ja|0)||5160.101==this.ja)return this.qa[b]=c,Fk(this,1,b),!0;break;case "swdesc":return this.qa[b]=c,!0}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.Tb=Jb(a,"FPU");yk(this,3,this.Tb?1:0,!0);this.B=Jb(a,"Keyboard");this.gb=c.Y.Id/1193181;qc(b,this,Gk);yc(b,this,Hk);this.jab;b++){var c=13>=b?Sk(e,b):e.A[b];a&&(a+="\n");a+="CMOS["+u(b)+"]: "+u(c)}e.ha.O(a)})}lf(c,26,this.Pm.bind(this))}; +l.hc=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; +l.reset=function(a){var b;Tk(this);this.L=Array(this.cb);for(b=0;b=kg){this.N=16;this.ea=0;this.aa=16;this.Ja=0;this.fa=160;512<=Xk(this)&&(this.fa|=16);3==+Yk(this,Ak,void 0)&&(this.fa|=64);5180==(this.ja|0)&&(this.fa|=12);this.Ka= +3;this.ra=Array(8);this.pa=0;a&&(this.A=Array(64));Zk(this,this.Ub);for(a=21;24>=a;a++)this.A[a]=0;for(a=14;46>a;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+Yk(this,Ak,void 0)<b){var d=!1;4!=b&&5!=b||a.A[11]&2||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[11]&4||(d&&128c;c++)b+=a.A[c];a.A[47]=b&255;a.A[46]=b>>8} +l.save=function(){var a=new qf(this);a.set(0,[this.C]);for(var b=[],c=0;c=kg&&(a.set(5,[this.N,this.ea,this.aa,this.Ja,this.fa,this.Ka]),a.set(6,[this.ra[7],this.ra,this.pa,this.A,this.Ga,this.ua]));return a.data()}; +l.restore=function(a){var b,c;b=a[0];Array.isArray(b[0])?this.C=b[0]:(this.C[0][0]=b[0],this.C[1][0]=b[1]&15,this.C[0][1]=b[2],this.C[1][1]=b[3]&15);Tk(this);b=a[1];for(c=0;c=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='
    '+f+"
    \n"}e.innerHTML=d;jl(a,b,c,!0)}function kl(a,b,c){if(b=(a=Ek[a.ja|0])&&a[b])for(var d in b)if(a=b[d],a.Lc&1<g.Ab[0]&&(g.Ab[0]=255,g.Ab[1]--,0>g.Ab[1]&&(g.Ab[1]=255)));return h}function ql(a,b,c,d,e,f){var g=a.L[b];z(a,768)&&x(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Kb+"]",null,!0);a=g.Dc[c];a.Ab[g.Kb]=a.Fc[g.Kb]=e;g.Kb^=1}function rl(a,b,c,d){var e=a.L[b],f=e.Yb|1;e.Yb&=-16;z(a,768)&&x(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f} +function sl(a,b,c,d,e){var f=a.L[b];z(a,768)&&x(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Yb=f.Yb&~(16<>2].Dc[b&3],c,d,e)}function ul(a,b,c){b=a.L[b>>2].Dc[b&3];b.wg&&b.mh&&b.Lg?(c&&(b.done=c),b.Ge||Dl(a,b,!0)):c&&c(!0)} +function Dl(a,b,c){c&&(b.count=b.Ab[1]<<8|b.Ab[0],b.type=b.mode&12,b.uj=b.xg=!1);for(var d=!1;0<=b.count&&(c=b.rg<<16|b.Eb[1]<<8|b.Eb[0],4==b.type?(d=!0,function(c){b.mh.call(b.wg,b.Lg,-1,function(e,g){0>e&&(b.uj||(b.uj=!0),e=255);b.Ge||a.ga.qc(c,e);(d=g)&&setTimeout(function(){El(b)||Dl(a,b)},0)})}(c)):8==b.type?(c=a.ga.Qa(c),0>b.mh.call(b.wg,b.Lg,c)&&(b.xg=!0)):0!=b.type&&(b.xg=!0)),!d&&!El(b););} +function El(a){if(!a.xg&&0<=--a.count&&(a.mode&32?(a.Eb[0]--,0>a.Eb[0]&&(a.Eb[0]=255,a.Eb[1]--,0>a.Eb[1]&&(a.Eb[1]=255))):(a.Eb[0]++,255>3];b=1<<(b&7);d.lc&b||(d.lc|=b,d.nf=c||0,Hl(a))}function lg(a,b){var c=a.vc[b>>3];b=1<<(b&7);c.lc&b&&(c.lc&=~b,Hl(a))}function Hl(a,b){var c,d=-1;1>=1),ed(a.F,e))),b||2!=c||cl(a))}function Ol(a,b,c,d){x(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.Pa:a.Oa} +function Pl(a,b,c,d,e){x(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&192;b?(e=3,a.Pa=d):a.Oa=d;if(192==c){if(!(d&16))for(c=0;2>=c;c++)if(d&2<=c;c++)d&2<>=6;var f=d&1,g=d&14;if(d&=48){e+=c;var h=a.V[e];h.jg=d;h.mode=g;h.gh=f;h.Fc=[0,0];h.Ab=[0,0];h.Be=[0,0];h.td=!1;h.af=!1;h.De=!1;h.ef=!1;Ll(a,e);b||c||lg(a,0);b||2!=c||255!=a.vc[0].Ad||77!=a.W||(b=a.V[0],b.$c[0]= +b.Fc[0],b.$c[1]=b.Fc[1],b.vd=cd(a.F,a.ka))}else Ql(a,e+c)}}function Nl(a,b){a=a.V[b];(b=a.Fc[1]<<8|a.Fc[0])||(b=1==a.md?256:65536);return b}function id(a,b){a=a.V[b];(b=a.$c[1]<<8|a.$c[0])||(b=1==a.md?256:65536);return b}function Ql(a,b){Rk(a,b);var c=a.V[b];c.Be[0]=c.Ab[0];c.Be[1]=c.Ab[1];c.af=!0;Ll(a,b)}function Ll(a,b){a=a.V[b];a.Ed=32==a.jg?1:0;a.md=48==a.jg?2:1} +function Rk(a,b,c){var d=a.V[b];if(d.De&&(2!=b||a.W&1)){var e=cd(a.F,a.ka),f=(e-d.vd)/a.gb|0;0>f&&(d.vd=e,f=0);var g=Nl(a,b),h=id(a,b)-f;0==d.mode?(0>=h&&(h=0),h||(d.td=!0,d.De=!1,b||mg(a,0))):4==d.mode?(d.td=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0))):6==d.mode&&(h-=f,0>=h&&(d.td=!d.td,h=g+h,0>=h&&(h=g),d.$c[0]=h&255,d.$c[1]=h>>8&255,d.vd=e,!b&&d.td&&mg(a,0)));d.Ab[0]=h&255;d.Ab[1]=h>>8&255;c&&(a.vd=0)}return d} +function hd(a,b){for(var c=0;c=kg){b=a.F.Y.Id;c=cd(a.F,a.ka);null==a.fb&&(a.Ga=cd(a.F,a.ka),a.Jb=1024,a.fb=Math.floor(a.F.Y.Id/a.Jb),bl(a));c>=a.ua&&(a.A[12]|=64,a.A[11]&64&&(a.A[12]|=128,mg(a,8)),a.ua=c+a.fb);a.A[0]==a.A[1]&&a.A[2]==a.A[3]&&a.A[4]==a.A[5]&&(a.A[12]|=32,a.A[11]&32&&(a.A[12]|=128,mg(a,8)));var d=c-a.Ga,e=Math.floor(d/b);if(e&&!(a.A[11]&128)){for(;e--;)if(60<=++a.A[0]&&(a.A[0]=0,60<=++a.A[2]&&(a.A[2]=0,24<=++a.A[4]))){a.A[4]=0;a.A[6]=a.A[6]%7+1;var f; +f=a.A[9];var g=va[a.A[8]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[7]>f&&(a.A[7]=1,12<++a.A[8]&&(a.A[8]=1,a.A[9]=(a.A[9]+1)%100))}a.A[12]|=16;a.A[11]&16&&(a.A[12]|=128,mg(a,8))}a.Ga=c-d%b}}l=X.prototype;l.ym=function(a,b){var c=this.Ya;this.Ca&16&&(this.W&128?c=this.C[0][1]:this.B&&(c=Rl(this.B)));x(this,a,null,b,"PPI_A",c);return c};l.Yn=function(a,b,c){x(this,a,b,c,"PPI_A");this.Ya=b};l.zm=function(a,b){var c=this.W;x(this,a,null,b,"PPI_B",c);return c}; +l.Zn=function(a,b,c){x(this,a,b,c,"PPI_B");Sl(this,b)};function Sl(a,b){var c=!!(b&2),d=!!(a.W&2);a.W=b;a.B&&Tl(a.B,!(b&128),!!(b&64));c!=d&&cl(a,c)}l.Am=function(a,b){var c=0,c=5150==(this.ja|0)?this.W&4?c|this.C[1][1]&15:c|this.C[1][1]>>4&1:this.W&8?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.W&1&&Rk(this,2).td&&(c=this.W&2?c|32:c|16);x(this,a,null,b,"PPI_C",c,32896);return c};l.$n=function(a,b,c){x(this,a,b,c,"PPI_C");this.qb=b};l.Bm=function(a,b){var c=this.Ca;x(this,a,null,b,"PPI_CTRL",c);return c}; +l.ao=function(a,b,c){x(this,a,b,c,"PPI_CTRL");this.Ca=b};l.Kl=function(a,b){var c=this.B?Rl(this.B):0;x(this,a,null,b,"8041_KBD",c);this.va&=-2;return c};l.hn=function(a,b,c){x(this,a,b,c,"8041_KBD")};l.Jl=function(a,b){var c=this.W;x(this,a,null,b,"8041_CTRL",c);return c};l.gn=function(a,b,c){x(this,a,b,c,"8041_CTRL");Sl(this,b)};l.Ll=function(a,b){var c=this.va;x(this,a,null,b,"8041_STATUS",c);return c}; +l.Ml=function(a,b){var c=this.Ja;x(this,a,null,b,"8042_OUTBUFF",c,16384);this.N&=-258;this.B&&Ul(this.B);return c}; +l.kn=function(a,b,c){x(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.N&8)switch(this.ea){case 96:Vl(this,b);break;case 209:Wl(this,b);break;default:if(Vl(this,this.aa&-17),this.B){a=this.B;c=b;var d=-1;z(a)&&y(a,"sendCmd("+u(c)+")");switch(a.V||c){case 255:d=250;Xl(a);break;case 243:a.V&&(c=0);Yl(a,250);a.V=c;break;case 237:a.V&&(c=0);Yl(a,250);a.V=c;break;default:y(a,"sendCmd(): unrecognized command")}Zl(this,d)}}this.ea=b;this.N&=-9}; +l.Nl=function(a,b){var c=this.W&-209|(cd(this.F)&64?16:0);x(this,a,null,b,"8042_RWREG",c,16384);return c};l.mn=function(a,b,c){x(this,a,b,c,"8042_RWREG",null,16384);Sl(this,b)};l.Ol=function(a,b){x(this,a,null,b,"8042_STATUS",this.N,16384);a=this.N&255;this.N&256&&(this.N|=1,this.N&=-257);return a}; +l.jn=function(a,b,c){x(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.ea=b;this.N|=8;a=0;240<=this.ea&&(a=this.ea^15,this.ea=240);switch(this.ea){case 32:Zl(this,this.aa);break;case 173:Vl(this,this.aa|16);break;case 174:Vl(this,this.aa&-17);this.B&&Ul(this.B);break;case 170:this.B&&(a=this.B,a.A=[],z(a)&&y(a,"scan codes flushed"));Vl(this,this.aa|16);Zl(this,85);Wl(this,3);break;case 171:Zl(this,0);break;case 192:Zl(this,this.fa);break;case 208:Zl(this,this.Ka);break;case 224:Zl(this,this.aa&16?0: +1);break;case 240:a&1&&ve(this.F)}};function Vl(a,b){a.aa=b;a.N=a.N&-5|b&4;a.B&&Tl(a.B,!!(b&8),!(b&16))}function Zl(a,b,c){0<=b&&(a.Ja=b,c?a.N|=1:(a.N&=-2,a.N|=256))}function Wl(a,b){a.Ka=b;Tb(a.ga,!!(b&2));b&1||ve(a.F)}function $l(a,b){a.ja=c?Sk(this,c):this.A[c];z(this,4352)&&x(this,a,null,b,"CMOS.DATA["+u(c)+"]",d,!0);null!=b&&12==c&&(this.A[c]&=15,d&128&&lg(this,8),d&64&&this.A[11]&64&&bl(this));return d}; +l.Bn=function(a,b,c){var d=this.pa&63;z(this,4352)&&x(this,a,b,c,"CMOS.DATA["+u(d)+"]",null,!0);a=b^this.A[d];if(13>=d){if(c=b,10>d){var e=!1;this.A[11]&4||(c=10*(c>>4)+(c&15),e=!0);if(4==d||5==d)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;11==d&&a&64&&b&64&&bl(this)};l.Nk=function(a,b,c){x(this,a,b,c,"NMI");this.ya=b};l.Ln=function(a,b,c){x(this,a,b,c,"FPU.CLEAR")};l.Mn=function(a,b,c){x(this,a,b,c,"FPU.RESET");this.Tb&&fg(this.Tb)}; +l.Pm=function(a){if(z(this,16)&&pk(this.ha,26,a)){var b=this.F.G>>8;mf(this.F,a,function(a,d){return function(c){d=cd(a.F)-d;var e,g=a.F.M&255,h=a.F.M>>8,k=a.F.M&255,m=a.F.M>>8;if(2==b||3==b)e=" CH(hour)="+v(h)+" CL(min)="+u(g)+" DH(sec)="+u(m);else if(4==b||5==b)e=" CX(year)="+v(a.F.I)+" DH(month)="+u(m)+" DL(day)="+u(k);g=a.ha;h=d;g.message("INT "+u(26)+": C="+(xf(g.F)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,cd(this.F)))}return!0}; +function cl(a,b){if(a.Ea)try{void 0!==b?a.Db=b:b=a.Db&&a.F&&a.F.la.Ib;var c=Math.round(1193181/Nl(a,2));if(20>c||2E4>>4,0,this.X,this.C,this.Qd),delete this.Qd);return!0};cm.prototype.gc=function(){return!0}; +function dm(a,b,c,d){if(d)a.Na("Unable to load system ROM (error "+d+": "+b+")");else{mb(a.ce,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.Qd=e.symbols;if(!a.A.length){w("Empty ROM: "+b);return}if(1==a.A.length){w(a.A[0]);return}}catch(h){a.Na("ROM data error: "+h.message);return}else for(b=c.replace(/\n/gm, +" ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e>>d.La].xf(e&d.A,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.N?b.push(a.N):null!=a.N&&a.N.length&&(b=a.N);for(c=0;cthis.B?21:23,c=a.A[b]|a.A[b+1]<<8,c=c+(this.A>>10);a.A[b]=c&255;a.A[b+1]=c>>8;al(a)}}else w("No RAM allocated")}; +l.save=function(){var a=new qf(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function jm(a){this.N=a;this.C=lm;this.ha=mm;this.B=nm;this.A=null}var km=-2134900736,lm=65535,mm=2575,nm=2,om=[null,0],pm=[function(a){return this.controller.Qa(a)},null,null,function(a,b){this.controller.qc(a,b)},null,null];l=jm.prototype;l.save=function(){return[this.C,this.B]}; +l.restore=function(a){this.qc(0,a[0]&255);this.qc(2,a[1]&255);return!0};l.Qa=function(a){var b=255;2>a?b=a&1?this.ha>>8:this.ha&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};l.qc=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.N.ga;if(b&1)this.A&&(dc(a,917504,131072,this.A),this.A=null);else{this.A||(this.A=ec(a,917504,131072));var c=ec(a,16646144,131072);dc(a,917504,131072,c,b&2?1:hc)}this.C=this.C&-256|b}};l.wj=function(){return om};l.nh=function(){return pm}; +Xa(function(){for(var a=tb(document,"pcx86","ram"),b=0;b"]]=10804;Y[p["/"]]=53;Y[p["?"]]=10805;Y[3016]=54;Y[1044]=55;Y[1018]=56;Y[1032]=57;Y[1020]=58;Y[1112]=59;Y[1113]=60;Y[1114]=61;Y[1115]=62;Y[1116]=63;Y[1117]=64;Y[1118]=65;Y[1119]=66;Y[1120]=67;Y[1121]=68;Y[1144]=69;Y[1145]=70;Y[1036]=71;Y[1038]=72;Y[1033]=73;Y[1109]=74;Y[1037]=75;Y[1101]=76;Y[1039]=77;Y[1107]=78;Y[1035]=79;Y[1040]=80;Y[1034]=81;Y[1045]=82;Y[1046]=83;Y[4027]=84;Y[1122]=87;Y[1123]=88;Y[1091]=91;Y[1093]=93;Y[1224]=91;Y[tm]=7470;Y[4008]=7494;Y[4046]=3677523; +Y[4045]=3677522;Y[4013]=3677468;l=qm.prototype; +l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]= +c,c.onclick=function(){e.X&&e.X.wd();zm(e,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==vm[g]&&"button"==a)return this.qa[f]=c,c.onclick=function(a,b,c){return function(){a.X&&a.X.wd();Am(a,c,!0);zm(a,c,!0)}}(this,g,vm[g]),!0;if(void 0!==wm[b])return this.fa++,this.qa[f]=c,a=function(a,b,c){return function(){zm(a,c)}}(this,b,wm[b]),b=function(a,b,c){return function(){Bm(a,c)}}(this,b,wm[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup= +c.onmouseout=b),!0;if(d)return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();d&&!e.L&&(e.L=d,Cm(e,300))},!0}return!1};function Dm(a,b,c){if(a.fa){for(var d in da)if(b==da[d]){b=+d;(d=ca[d])&&(b=d);break}for(var e in wm)if((d=wm[e]==b)||(d=b,d>=p.ve&&d<=p.z&&(d-=p.ve-p.ue),d=wm[e]==d),d){(a=a.qa["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet")}; +function rm(a,b){var c=0;a.ja=null;"string"==typeof b&&(a.ja=b.toUpperCase(),c=sm.indexOf(a.ja),0>c&&(c=0));if(b=sm[c])a.ra=parseInt(b.substr(2),10)}function Xl(a){y(a,"keyboard reset",65792);a.A=[];Yl(a,170)}function Tl(a,b,c){a.aa!==c&&(a.aa=a.ea=c)&&(a.U=!0);a.W!==b&&(a.W=b)&&!a.ea&&am(a,!0);a.W&&a.ea&&(Xl(a),a.ea=!1)}function Yl(a,b){a.N&&(a.A.unshift(b),a.U=!0,$l(a.N,b))} +function Ul(a){var b=0;a.A.length&&a.U&&(b=a.A[0],a.N&&$l(a.N,b));z(a)&&y(a,b?"scan code "+u(b)+" available":"no scan codes available")}function Rl(a){var b=0;a.A.length&&(b=a.A[0]);z(a)&&y(a,"scan code "+u(b)+" delivered");return b}function am(a,b){0>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.C:a.xc)&b):d||b&255&&(b=255);if(c){a.C&=~b;d&&(a.C|=b);c=b;var f,g;for(g in xm)d="led-"+g,e=xm[g],c&&c!=e||!(f=a.qa[d])||(f.style.backgroundColor=a.C&e?"#00ff00":"#000000")}else a.xc&=~b,d&&(a.xc|=b);return!0}}return!1} +function zm(a,b,c){if(Y[b]&&a.F&&a.F.la.Ib){um[b]&&a.B.length&&0e||(e==a.B.length&&(d={},d.Pe=b,d.xc=a.xc,Dm(a,b,!0),e++),0b.Kd){if(!b.Hf){Bm(a,b.Pe);return}b.Hf=!1;c=a.ua}else c=1==b.Kd++?500:100;b.Zk=setTimeout(function(a){return function(){Fm(a,b)}}(a),c)}} +function Hm(a,b,c){var d=b;if(b>=p.ue&&b<=p.og)!(a.xc&515)==c&&(d=b+(p.ve-p.ue));else if(b>=p.ve&&b<=p.z)!!(a.xc&515)==c&&(d=b-(p.ve-p.ue));else if(!!(a.xc&3)==c){if(a=da[b])d=a}else if(a=ca[b])d=a;return d}l.Mg=function(a){a||(this.xc&=-256)}; +function ym(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode,h=Hm(a,g,!0);a.kh&&h==p["`"]&&(g=h=27);if(Y[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Am(a,h,!1,c)){if(20==g||144==g||145==g)a.pa||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k=p.ue&&b<=p.og||b>=p.ve&&b<=p.z;e>>>=8;){var g=0,h=e&255;224==f||225==f?d.push(f|(c?0:128)):(42==h?a.C&3||a.C&512&&b||(g=h):29==h?a.C&12||(g=h):56==h?a.C&48||(g=h):d.push(f|(c?0:128)),g&&(c?d.unshift(g):d.push(g|128)))}for(c=0;ce.A.length?(z(e)&&y(e,"scan code "+u(f)+" buffered"),e.A.push(f), +1==e.A.length&&e.N&&$l(e.N,f)):(20==e.A.length&&e.A.push(255),y(e,"scan code buffer overflow")));d=!0}return d}Xa(function(){for(var a=tb(document,"pcx86","keyboard"),b=0;bc.length)c=[!1,0,null,null,0,Array(5>b?Zm:$m)];this.ha=a.ha;this.type=e[0];this.port=e[1];this.Ua=b;this.ob=e[2];this.ac=e[3];this.Dd=d||e[4];65536<=this.Dd&&720896<=this.ob&&(this.ac=Math.min(this.Dd>>2,32768));this.Hc=c[0];this.fd=c[1];this.tf=c[2];this.ma=c[3];this.Ac=c[4]&255;this.Qg=c[4]>>8&255;this.mb=c[5];this.wh=Zm;this.qg=an;if(5<=b){this.wh=$m;this.qg=bn;(b=c[6])||(b=[!1,0,Array(20),0,3==f? +0:1,0,0,Array(5),0,0,0,Array(9),0,[this.ob,this.ac,this.Dd],Array(this.Dd>>2),-2147478512,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.Ze=b[0];this.Nd=b[1];this.Sc=b[2];this.$g=cn;this.Tg=b[3];this.vf=b[4];this.ig=b[5];this.ae=b[6];this.Me=b[7];this.bh=dn;this.Qk=b[8];this.Rk=b[9];this.$d=b[10];this.Zd=b[11];this.ah=en;this.Fb=b[12];d=b[13];"number"==typeof d&&(d=[this.ob,this.ac,d]);this.ob=d[0];this.ac=d[1];d=this.Dd>>2;if((this.rd=b[14])&&this.rd.length>this.controller.mi&255};gn[17408]=function(a){return(this.controller.Fb=this.da[(a&-4)+this.C])>>((a&3)<<3)&255};gn[5120]=function(a){a+=this.C;var b=this.controller.Fb=this.da[a&-2];return(a&1?b>>8:b)&255};gn[1280]=function(a){a+=this.C;a=this.controller.Fb=this.da[a];for(var b=this.controller.yh,c=this.controller.xh&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d}; +gn[0]=function(a,b){a+=this.C;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[32]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[96]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b&=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[160]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b|=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +gn[224]=function(a,b){a+=this.C;b=b>>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Yd|this.controller.pe;b^=this.controller.Fb;b=b&this.controller.Mb|this.controller.Fb&~this.controller.Mb;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)};gn[4]=function(a,b){var c=(a&-4)+this.C;a=(a&3)<<3;b=b<>this.controller.cd|b<<8-this.controller.cd&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Mb;b=this.controller.Yf&b|this.controller.Fb&~b;b=b&this.controller.rb|this.da[a]&~this.controller.rb;this.da[a]!=b&&(this.da[a]=b,this.Wa=!0)}; +function hn(a){var b=[];if(void 0!==a.Ua){b[0]=a.Hc;b[1]=a.fd;b[2]=a.tf;b[3]=a.ma;b[4]=a.Ac|a.Qg<<8;b[5]=a.mb;if(5<=a.Ua){var c=[];c[0]=a.Ze;c[1]=a.Nd;c[2]=a.Sc;c[3]=a.Tg;c[4]=a.vf;c[5]=a.ig;c[6]=a.ae;c[7]=a.Me;c[8]=a.Qk;c[9]=a.Rk;c[10]=a.$d;c[11]=a.Zd;c[12]=a.Fb;c[13]=[a.ob,a.ac,a.Dd];var d;if(d=a.rd){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h>1;f[e++]=k;h=m}f.length>3;for(c=0;c=d&&(A=d,g=!0);break; +case "p":0<=d&&3>=d&&(F=d);break;case "w":d=b.ob&&(f-=b.ob);a="";for(c=0;cF?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.qg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Sc, +b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.ig),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.fd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Dg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0c&&(a=Math.round(c/b*100)+"%")}this.rf?(this.ka.style.width=a,this.ka.style.width=a,this.ka.style.display="block",this.ka.style.margin="auto"):(this.ia.style.width=a,this.ia.style.height="auto");this.ia.style.backgroundColor="black";this.ia.Ye();a=!0}this.X&&this.X.focus()}return a}; +function Lm(a,b){!b&&a.ia&&(a.rf?a.ka.style.width=a.ka.style.height="":a.ia.style.width=a.ia.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.kh=b)}l.Fe=function(a){var b=!1;this.X&&(a?this.X.Fe&&(this.X.Fe(),this.V&&this.V.Zf(!0),b=!0):this.X.$k&&(this.X.$k(),this.V&&this.V.Zf(!1),b=!0),this.X&&this.X.focus());return b};l.Zf=function(a){this.V&&(this.V.Zf(a),this.B&&(this.B.kh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.bl)}; +function tn(a,b){var c=a.X;c&&!a.ke&&(c.addEventListener("touchstart",function(b){vn(a,b,!0)},!1),c.addEventListener("touchmove",function(b){vn(a,b)},!0),c.addEventListener("touchend",function(b){vn(a,b,!1)},!1),a.ke=b,a.uc=a.Cc=a.mg=-1,a.Hd=!1,a.Xc=null,a.Gd=!1,a.so=function(){a.Gd=!0;a.V.he(wn,!0)})}l.Mg=function(a){this.B&&this.B.Mg(a)}; +function vn(a,b,c){var d,e,f=0,g=0;e=a.ka;do isNaN(e.offsetLeft)||(f+=e.offsetLeft,g+=e.offsetTop);while(e=e.offsetParent);var h=a.ra/a.ka.offsetWidth,k=a.Da/a.ka.offsetHeight;b.targetTouches&&b.targetTouches.length?(d=b.targetTouches[0].pageX,e=b.targetTouches[0].pageY):(d=b.pageX,e=b.pageY);d=(d-f)*h;e=(e-g)*k;if(1==a.ke)d=d/(a.ra/3)|0,e=e/(a.Da/3)|0,1!=e?e?zm(a.B,1040,!0):zm(a.B,1038,!0):1!=d&&(d?zm(a.B,1039,!0):zm(a.B,1037,!0));else if(a.V){g=a.Hd;f=b.timeStamp-a.mg;!0===c?(a.Hd=500f){a.V.he(wn,!0);a.V.he(wn,!1);return}}if(c||0>a.uc||0>a.Cc)a.uc=d,a.Cc=e;c=Math.round(d-a.uc);b=Math.round(e-a.Cc);a.uc=d;a.Cc=e;a.V.Kf(c,b,a.uc,a.Cc)}}l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0}; +l.reset=function(){var a=!0,b=0;this.N&&(b=+Yk(this.N,Ak,void 0));this.ja||(this.Ua=3==b?1:3);this.va=3;switch(this.Ua){case hm:b=7;break;case 5:var c=Om[this.Vc];c&&(b=c[0]);b||(b=4);break;case 1:b=3;this.va=7;break;default:b=2}this.ya!==b&&(this.ya=b,a=!0);this.C=null;this.pa=this.qd=new Xm(this,1);this.aa=this.Wc=new Xm(this,3);5>this.Ua?this.A=new Xm:(this.A=new Xm(this,this.Ua,null,this.Dd),xn(this));Xn(this);this.Ga=null;this.cb=this.ua=-1;this.Pa=0;Yn(this,this.va);if(this.C.ob&&a){a=this.C.ob+ +this.Ub;for(b=this.C.ob;b>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);nc(this.ga,b,c|d<<8)}un(this,!0)}};function xn(a){a.A.vf&1?(a.pa=a.qd,a.aa=a.A):(a.pa=a.A,a.aa=a.Wc)}l.save=function(){var a=new qf(this);a.set(0,hn(this.qd));a.set(1,hn(this.Wc));a.set(2,[this.ya,this.va,this.Ga]);a.set(3,hn(this.A));return a.data()}; +l.restore=function(a){var b=a[2];this.ya=b[0];this.va=b[1];this.Ga=b[2];this.C=null;this.pa=this.qd=new Xm(this,1,a[0]);this.aa=this.Wc=new Xm(this,3,a[1]);this.A=new Xm(this,this.Ua,a[3],this.Dd);this.A.Hc&&xn(this);Xn(this);if(!Zn(this))return!1;$n(this);return!0}; +function Mm(a,b,c,d){if(d)a.Na("Unable to load font ROM (error "+d+": "+b+")");else{mb(a.ce,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){w("Empty font ROM: "+b);return}if(1==f.length){w(f[0]);return}if(8192==f.length)gm(a,f,[6144,0]);else if(2048==f.length)gm(a,f,[0]);else{a.Na("Unrecognized font data length ("+f.length+")");return}}catch(g){a.Na("Font ROM data error: "+g.message);return}(a.ea||a.ha)&&xb(a)}} +function ao(a,b){if(1==b)return a.Ca[0]=Rm[0],a.Ca[1]=Rm[7],a.Ca;if(2==b){var c=a.C.tf;if(a.C===a.A){var d=a.A.Sc[0],c=d&7;d&16&&(c|=8);18!=a.A.Sc[1]&&(c|=32)}a.Ca[0]=Rm[c&15];c=c&32?Tm:Sm;for(d=0;de;e++)f=d[e]||0,g=f<<2&252,h=f>>4&252,f=f>>10&252,a.Ca[e]=[g,h,f,255];else{var k=d&&d[255];b=null!=c.Sc[15]?c.Sc:Um;for(e=0;16>e;e++)f=b[e]&63,k?(f|= +(c.Sc[20]&12)<<4,c.Sc[16]&128&&(f&=-49,f|=(c.Sc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.Ca[e]=[g,h,f,255]}a.qb=!0}return a.Ca}function gm(a,b,c,d){a.Uc=b;a.Jb=c;a.Tb=d} +function Xn(a,b){var c=!1;if(window&&a.Uc&&(!b||a.U)){b=0;var d=a.Tb?a.Tb:8,e=ao(a);null!=a.Jb[0]&&bo(a,3,a.Jb[0],b,d,8,a.Uc,e)&&(c=!0);b=a.Tb?0:2048;d=a.Tb?a.Tb:9;null!=a.Jb[1]&&(bo(a,1,a.Jb[1],b,d,14,a.Uc,Pm,Qm)&&(c=!0),a.Tb&&bo(a,a.Ua,a.Jb[1],0,a.Tb,14,a.Uc,e)&&(c=!0))}return c}function bo(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(co(a,b,c,d,e,f,g,h,k)&&(m=!0),a.ro&&co(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m} +function co(a,b,c,d,e,f,g,h,k){var m=!1,n=b&1?0:1,t=a.Oa[b],q=16>h.length?h.length:16;t||(t={Pc:e<ga||!L?ga:8,Pa=Ja.createImageData(m.Pc,m.Qc);for(Da=0;256>Da;Da++){for(Ka=0;Ka=ga-2,Rc=S[Ka>(8<=Wa&&192<=Da&&223>=Da?7:Wa)?A:ab;eo(Pa,Ge,Wd,He);C&&eo(Pa,Ge+1,Wd,He)}Ja.putImageData(Pa,(Da&15)*m.Pc,(Da>>4)*m.Qc)}m.Re[F]="#"+r(A[0],2)+r(A[1],2)+r(A[2],2);m.Yi[F]=A;m.Zg[F]=la;m=!0}}a.Oa[b]=t;return m}function fo(a){0a.cb&&(a.cb=0):a.cb=-1} +function $n(a){if(a.U){for(var b=10;15>=b;b++)if(null==a.C.mb[b])return;var c=a.C.mb[10],b=c&31,d=a.C.mb[11]&31,e=a.C.mb[9]&31,f=!1;a.C===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)go(a);else{c=a.C.mb[15]+((a.C.mb[14]&63)<<8);a.ua!=c&&(go(a),a.ua=c);d=d-b+1;if(a.ng!=b||a.Ee!=d)a.ng=b,a.Ee=d;a.Ya=e+1;fo(a)}}} +function go(a){if(0<=a.ua){if(void 0!==a.fa){var b=a.fa[a.ua];if(b&131072){var b=b&-131073,c=a.ua%a.L,d=a.ua/a.L|0;a.U&&a.Oa[a.U]&&(a.gb&&ho(a,c,d,b,a.gb),ho(a,c,d,b));a.fa[a.ua]=b}}a.ua=-1}} +function io(a){var b,c=a.C;a.hf=!1;var d=c.Zd[5];if(null!=d){b=1024;var e=0,f=c.Zd[3]&31;switch(d&3){case 0:if(f){e=32;switch(f&24){case 8:e=96;break;case 16:e=160;break;case 24:e=224}c.cd=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ua==hm&&(e=3,c.cd=f&7)}d&8&&(b=1280);c=c.Me[4];null!=c&&(c&4||(b|=4096,e|=16),d&64&&(c&8&&(b|=16384,e|=4),a.hf=!0));b|=e}return b} +function jo(a,b){var c=a.C;return c&&null!=b&&b!=c.Dg?(c.Vg(b),a.ga.Vg(c.ob,c.ac,c.nh(),!0),!0):!1} +function Zn(a,b){var c,d=a.Ga,e=a.C;if(e)if(1==e.Ua)d=7;else if(5<=e.Ua){var d=null,f=e.Dd>>2,g=32768=e.mb[18]?19:20:21:g&128||350>f?d= +m?13:14:480<=f&&(d=3==a.ya?17:18):d=m?7-d:6:d-=m?2:0);c=io(a)}}else e.fd&8&&(e.fd&2?(d=e.fd&16?6:5,e.fd&4||--d):(d=e.fd&1?3:1,e.fd&4&&--d));else a.Ga=null,null==d&&(d=a.va);if(!Yn(a,d,b))return!1;jo(a,c);return!0} +function Yn(a,b,c){if(null!=b&&(b!=a.Ga||c)){a.Wg=0;a.Ga=b;a.qb=!1;b=a.C||(7==b?a.pa:a.aa);if(b!=a.C||b.ob!=a.ob||b.ac!=a.ac){go(a);if(a.ob){if(!gc(a.ga,a.ob,a.ac))return!1;a.C&&(a.C.Hc=!1)}a.C=b;b.Hc=!0;a.ob=b.ob;a.ac=b.ac;if(!Ub(a.ga,b.ob,b.ac,3,b===a.A?b:null))return!1}a:{a.U=0;a.L=a.jd;a.W=a.je;a.Db=a.L;a.hd=Jm[7][2];b=0;if(c=Jm[a.Ga])a.L=c[0],a.W=c[1],a.hd=c[2],b=c[3],a.U=c[4],4!=a.ya&&7!=a.ya||a.C!==a.A||3!=a.U||(7==(a.A.mb[9]&31)?a.W=350>kn(a.A,18)?43:50:a.U=a.Ua);a.eg=a.L*a.W|0;a.bg=a.eg/ +a.hd|0;a.Ub=a.bg;a.sd=0;void 0!==b&&(a.Ub=(a.Ub<<1)+b|0,a.sd=a.Ub+b>>1);if(a.Oa.length){a.Ja=a.ra/a.L|0;a.Ka=a.Da/a.W|0;if(a.U){b=a.Oa[a.U];if(!b)break a;c=a.Oa[a.U<<1];a.$f&&80==a.L?c&&a.Ja>=3*c.Pc>>2&&(a.U<<=1,b=c):(c&&a.Ja>=c.Pc&&(a.U<<=1,b=c),a.$f||(a.Ja=b.Pc,a.Ka=b.Qc));a.bc=a.tc=0;b&&(a.bc=a.L*b.Pc,a.tc=a.W*b.Qc)}else a.Ja=a.Ka=1,a.bc=a.L,a.tc=a.W;a.sb=a.ea.createImageData(a.bc,a.tc);a.fb=document.createElement("canvas");a.fb.width=a.bc;a.fb.height=a.tc;a.gb=a.fb.getContext("2d");a.le=a.me= +0;a.Cd=a.ra;a.Fd=a.Da;b=a.ra-a.L*a.Ja;c=a.Da-a.W*a.Ka;0>1,a.Cd-=b);0>1,a.Fd-=c);if(b||c)a.ea.fillStyle=a.ka.style.backgroundColor,a.ea.fillRect(0,0,a.ra,a.Da)}}ko(a,!0);un(a)}return!0}function eo(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function lo(a){a.Pa=-1;a.Ea=!1;var b=a.bg;if(void 0===a.fa||a.fa.length!=b)a.fa=Array(b)}function ko(a,b){b||(a.qb=!1);lo(a)} +function ho(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.Oa[a.U];h.Af&&(d=h.Af[d]);var k=g>>4&15;h.Af&&(k=h.Af[k]);e?(b*=h.Pc,c*=h.Qc,e.fillStyle=h.Re[k],e.fillRect(b,c,h.Pc,h.Qc)):(b=b*a.Ja+a.le,c=c*a.Ka+a.me,a.ea.fillStyle=h.Re[k],a.ea.fillRect(b,c,a.Ja,a.Ka));g&256&&(k=(f&15)*h.Pc,f=(f>>4)*h.Qc,e?e.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,h.Pc,h.Qc):a.ea.drawImage(h.Zg[d],k,f,h.Pc,h.Qc,b,c,a.Ja,a.Ka));g&512&&(f=a.ng,g=a.Ee,e?(a.Ya&&a.Ya!==h.Qc&&(f=f*h.Qc/a.Ya|0,g=g*h.Qc/a.Ya|0),e.fillStyle=h.Re[d], +e.fillRect(b,c+f,h.Pc,g)):(a.Ya&&a.Ya!==a.Ka&&(f=f*a.Ka/a.Ya|0,g=g*a.Ka/a.Ya|0),a.ea.fillStyle=h.Re[d],a.ea.fillRect(b,c+f,a.Ja,g)))} +function un(a,b){if(a.la.ic){var c=!1,d=a.C;d&&(d!==a.A?d.fd&8&&(c=!0):d.Nd&32&&(c=!0));if(c||b){if(b)lo(a);else if(void 0===a.fa)return;var e=!1;!(b||++a.Wg&15)&&0<=a.cb&&(a.cb++,e=!0);var f=0,g=a.eg,h=a.ob,c=h,k=c+a.ac;19<=a.Ga&&(h=c=655360,k=c+65536);if(mo(a,d)&8||d.qf&&d.qf=a.Ga&&(m<<= +1));c+m>k&&(m=k-c,0>m&&(m=0));k=c+m;if(b=!b&&a.Ea){b=a.ga;for(var n=!0,t=c>>>b.La;0f)return;g=f+1}}if(a.U){if(a.Oa[a.U]){d=f;f=0;e=a.Pa=0;h=1048575;m=a.C.fd&32;5<=a.Ua&&(m=a.C.Sc[16]&8);b=a.ua-a.C.Ld;m&&(e=32768,h&=~e,a.cb&2||(h&=-65537));for(c+=d<<1;c>8|(q&255)<<8;var D=e,L=16;m>=h))>>(L-=h);eo(a.sb,m++,n,b[ga])}m>A&&(A=m);n=C&&(C=n+1)}k+=2;d++;if(m>=a.L){m=0;n+=2;if(n>a.W)break;n==a.W&&(n=1,k=c+a.sd)}}a.Ea= +!0;ta.L?a.Db-a.L-q>>3:0;c>=8;b>t&&(t=b);m=F&&(F=m+1)}c+=C;if(b>=a.L){b=0;if(++m>a.W)break;c+=D}}q||(a.Ea=!0);na.L?a.Db-a.L-F>>3:0;cD&&(L=D)):(q<<=F,L-=F,a.Ea=!1):(a.Ea&&q===a.fa[d]?(h+=L,L=0):a.fa[d]=q,d++);if(L){hn&&(n=h);b=A&&(A=b+1)}if(h>=a.L){h=0;if(++b>a.W)break;c+=C}}F||(a.Ea=!0);ma&&(b.Eh=a,a=-a|0);a%b.zh>b.an&&(c|=1);a%b.Ch>b.cn&&(c|=9);b.ni=a/b.Ch|0;return c}l.um=function(a,b){return no(this,this.pa,a,b)};l.Vn=function(a,b,c){var d=this.pa;d.Qg=d.Ac;d.Ac=b&31;x(this,a,b,c,"CRTC.INDX")};l.tm=function(a,b){return oo(this,this.pa,a,b)};l.Un=function(a,b,c){po(this,this.pa,a,b,c)};l.vm=function(a,b){return qo(this,this.pa,b)};l.Wn=function(a,b,c){a=this.pa;x(this,a.port+4,b,c,"MODE");a.fd=b;Zn(this,!1)}; +l.wm=function(a,b){return ro(this,this.pa,b)};l.Mk=function(a,b,c){this.A.ig=this.A.ig&-4|b&3;x(this,a,b,c,"FEAT")};l.Tl=function(a,b){a=this.A.Nd;b&&!z(this)||x(this,960,null,b,"ATC.INDX",a);return a};l.kl=function(a,b){a=this.A.Sc[this.A.Nd&31];b&&!z(this)||x(this,960,null,b,"ATC."+this.A.$g[this.A.Nd&31],a);return a}; +l.Lk=function(a,b,c){var d=this.A,e=d.Nd&32;if(d.Ze){d.Ze=!1;var f=d.Nd&31;if(16<=f||!e)c&&!z(this)||x(this,a,b,c,"ATC."+d.$g[f]),d.Sc[f]=b,ko(this,!1)}else d.Nd=b,x(this,a,b,c,"ATC.INDX"),d.Ze=!0,b&32&&!e&&Xn(this,!0)&&un(this,!0),a=(d.mb[12]<<8)+d.mb[13]|0,d.Ld!=a&&(d.Ld=a,ko(this)),d.qf=0}; +l.Gm=function(a,b){a=0;if(5==this.Ua)a=3-((this.A.vf&12)>>2),a=(this.Vc&1<>this.A.Kc&63;b&&!z(this)||x(this,969,null,b,"DAC.DATA["+u(this.A.od)+"]["+u(this.A.Kc)+"]",a);this.A.Kc+=6;12Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ca().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height= +(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||eb.aspect);f&&.3<=f&&3.33>=f&&(Va("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Z(d,e,g,f,c);sb(d,c)}}); +function so(a){this.V=a.adapter;switch(this.V){case 1:this.X=956;this.C=7;break;case 2:this.X=888;this.C=7;break;case 3:this.X=632;this.C=5;break;default:w("Unrecognized parallel adapter #"+this.V);return}this.A=this.B=null;bb.call(this,"ParallelPort",a,so,4194304);a=a.binding;"console"==a?this.B="":rb(this,a,to)}jb(so);var to="buffer";l=so.prototype;l.Pb=function(a,b,c){switch(b){case to:return this.qa[b]=this.A=c,!0}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet");qc(b,this,uo,this.X);yc(b,this,vo,this.X);xb(this)};l.hc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){wo(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.L;c[b++]=this.Yb;c[b]=this.Df;a.set(0,c);return a.data()};l.restore=function(a){return wo(this,a[0])}; +function wo(a,b){var c=0;b||(b=[0,0,0]);a.L=b[c++];a.Yb=b[c++];a.Df=b[c];return!0}l.hm=function(a,b){var c=this.L;x(this,a,null,b,"DATA",c);return c};l.Fm=function(a,b){var c=this.Yb;x(this,a,null,b,"STAT",c);return c};l.dm=function(a,b){var c=this.Df;x(this,a,null,b,"CTRL",c);return c}; +l.Hn=function(a,b,c){x(this,a,b,c,"DATA");this.L=b;this.Yb|=64;a=!1;y(this,"transmitByte("+u(b)+")");this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.O(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Yb&=-65);xo(this)};l.Cn=function(a,b,c){x(this,a,b,c,"CTRL");this.Df=b;xo(this)}; +function xo(a){a.N&&a.C&&(a.Df&16&&!(a.Yb&64)?mg(a.N,a.C):lg(a.N,a.C))}var uo={0:so.prototype.hm,1:so.prototype.Fm,2:so.prototype.dm},vo={0:so.prototype.Hn,2:so.prototype.Cn};Xa(function(){for(var a=tb(document,"pcx86","parallel"),b=0;b=b)a.preventDefault&&a.preventDefault(),64");if(2==b.length){var c=qa(b[0]);if(c!=this.xd)return;b=qa(b[1]);if(this.ia=ob(b)){var d=this.ia.exports;if(d){var e=d.connect;e&&e.call(this.ia);if(this.ra=d.receiveData){this.status(this.ce+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}}; +l.hc=function(a,b){if(!b)if(this.zj(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.gc=function(a){return a?this.save():!0};l.reset=function(){Co(this)};l.save=function(){var a=new qf(this),b=0,c=[];c[b++]=this.va;c[b++]=this.Da;c[b++]=this.fa;c[b++]=this.pa;c[b++]=this.U;c[b++]=this.B;c[b++]=this.C;c[b++]=this.A;c[b++]=this.Ca;c[b]=this.aa;a.set(0,c);return a.data()};l.restore=function(a){return Co(this,a[0])}; +function Co(a,b){var c=0;b||(b=[0,0,384,0,1,0,0,96,48,[]]);a.va=b[c++];a.Da=b[c++];a.fa=b[c++];a.pa=b[c++];a.U=b[c++];a.B=b[c++];a.C=b[c++];a.A=b[c++];a.Ca=b[c++];a.aa=b[c];return!0}l.hg=function(a){if("number"==typeof a)this.aa.push(a);else if("string"==typeof a)for(var b=0;b>8:this.pa;x(this,a,null,b,this.B&128?"DLM":"IER",c);return c};l.pm=function(a,b){var c=this.U;x(this,a,null,b,"IIR",c);return c}; +l.qm=function(a,b){var c=this.B;x(this,a,null,b,"LCR",c);return c};l.sm=function(a,b){var c=this.C;x(this,a,null,b,"MCR",c);return c};l.rm=function(a,b){var c=this.A;x(this,a,null,b,"LSR",c);return c};l.xm=function(a,b){var c=this.Ca;x(this,a,null,b,"MSR",c);return c}; +l.eo=function(a,b,c){x(this,a,b,c,this.B&128?"DLL":"THR");if(this.B&128)this.fa=this.fa&-256|b;else{this.Da=b;this.A&=-97;a=!1;y(this,"transmitByte("+u(b)+")");this.ra&&this.ra.call(this.ia,b)&&(a=!0);if(this.L)13==b?this.ea=0:8==b?(this.L.value=this.L.value.slice(0,-1),0":String.fromCharCode(b),c=a.length,32>b&&1==c&&(c=0),9==b&&(b=this.Ga||8,c=b-this.ea%b,this.Ga&&(a=pa("",c))),this.Ea&&!this.ea&&c&&(a=String.fromCharCode(this.Ea)+a),this.L.value+=a,this.L.scrollTop= +this.L.scrollHeight,this.ea+=c),a=!0;else if(null!=this.W){if(10==b||1024<=this.W.length)this.O(this.W),this.W="";10!=b&&(this.W+=String.fromCharCode(b));a=!0}a&&(this.A|=96)}};l.Rn=function(a,b,c){x(this,a,b,c,this.B&128?"DLM":"IER");this.B&128?this.fa=this.fa&255|b<<8:this.pa=b};l.Sn=function(a,b,c){x(this,a,b,c,"LCR");this.B=b}; +l.Tn=function(a,b,c){var d=this.C;x(this,a,b,c,"MCR");this.C=b;this.V&&(d^b)&3&&(a=this.V,b=this.C,(c=3==(b&3))?a.Hc||(d=!1,a.C&2||(a.reset(),y(a,"serial mouse reset"),d=!0),a.C&1||(y(a,"serial mouse ID requested"),d=!0),d&&(a.N.hg([77,77]),y(a,"serial mouse ID sent")),Eo(a),a.Hc=c):a.Hc&&(y(a,"serial mouse inactive"),Fo(a),a.Hc=c),a.C=b)}; +var Ao={0:yo.prototype.Cm,1:yo.prototype.om,2:yo.prototype.pm,3:yo.prototype.qm,4:yo.prototype.sm,5:yo.prototype.rm,6:yo.prototype.xm},Bo={0:yo.prototype.eo,1:yo.prototype.Rn,3:yo.prototype.Sn,4:yo.prototype.Tn};Xa(function(){for(var a=tb(document,"pcx86","serial"),b=0;ba.L||0>a.V)a.L=b.clientX,a.V=b.clientY;a.fa?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.clientX-a.L,d=b.clientY-a.V);a.L=b.clientX;a.V=b.clientY;a.Kf(c,d,a.L,a.V)}} +l.he=function(a,b){if(this.Hc&&this.F&&this.F.la.Ib){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case wn:if(this.aa!=b){this.aa=b;Ko(this,c);return}break;case 2:if(this.ea!=b){this.ea=b;Ko(this,c);return}}y(this,c+": ignored")}};l.Kf=function(a,b,c,d){this.Hc&&this.F&&this.F.la.Ib&&(a||b)&&(this.U=a,this.W=b,Ko(this,null,c,d))}; +function Ko(a,b,c,d){var e=64|(a.aa?32:0)|(a.ea?16:0)|(a.W&192)>>4|(a.U&192)>>6,f=a.U&63,g=a.W&63;z(a,8388608)&&y(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+u(e)+","+u(f)+","+u(g)+"]",0,!0);a.N.hg([e,f,g]);a.U=a.W=0}Xa(function(){for(var a=tb(document,"pcx86","mouse"),b=0;b>9]);if(f){if(e+c<=f.length)return cp(a.za,f,e,c);for(e=d=0;c--;)d|=ap(a,b++,1)<=e.oi&&a<=e.Ik){d=a-=e.oi;var f,g;for(g in e.we){var h=e.we[g],k=a-h[0];if(!k){c=this.kg+"!"+h[1];break}b&&0>2;var e=d=0,a=new DataView(a,0,c);g.A=Array(g.Bb);for(c=0;cb.indexOf("/api/v1/dump")&&(a=ka(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=hp(this,b),this.yg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):ma(b, +"/")&&(c="dir"),f=Ba()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.cf?"":d)+"&format=json"));return!!Aa(f,null,!0,function(a,b,c){ip(g,a,b,c)})}; +function ip(a,b,c,d){var e=null;a.ff=!1;var f=0>d&&a.X&&!a.X.la.ic;if(a.yg)d?a.controller.Na('Unable to connect to disk "'+a.V+'" (error '+d+": "+c+")",f):(a.N=!0,jp(a),e=a);else if(d)a.controller.Na('Unable to load disk "'+a.ga+'" (error '+d+": "+b+")",f);else{mb(a.controller.ce,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)w(h[0]);else{a.Bb=h.length;a.ub=h[0].length;a.lb=h[0][0].length;var k=h[0][0][0];a.Va=k&&k.length||512;for(d=c=0;d>2,n=k.pattern;void 0===n&&(n=k.pattern=0);var t=k.data;if(void 0===t){var q=k.bytes;if(void 0!==q&&q.length){for(var A= +m<<2,F=q.length;Fb;b++){if(128==cp(a,e,c+0,1)){d.cg=cp(a,e,c+8,4);(e=bp(a,d.cg))&&(f=!0);break}c+=16}if(!f)return}d.Jf||(d.Jf=cp(a,e,19,2)||cp(a,e,32,4),d.If=cp(a,e,14,2),d.th=d.If+cp(a,e,22,2)*cp(a,e,16,1),d.Dh=cp(a,e,17,2),d.Mf=cp(a,e,13,1));d.rh=d.th+((32*d.Dh+(d.Va-1))/d.Va|0);d.$m=(d.Jf-d.rh)/d.Mf|0;d.Gg=4084>=d.$m?12:16;d.Gl=12==d.Gg?4086:65526;b=[];for(e=d.th;e>=8;f+=2;if(k)for(;m--;)ap(d,f,1),254>=k?(n=k,t=ap(d,f+1),f+=3):(n=ap(d,f+3,1),t=ap(d,f+4),f+=6),d.yd[n]&&(d.yd[n].we[h]=[t]),d.A[h]=[n,t],h++;else h+=m}(g=dp(e,Yo,c))&&ep(e,g+c);g=dp(e,Zo,c);h=dp(e,Wo,c);g&&h&&ep(e,g,g+h)}}}} +function mp(a,b,c,d,e){var f,g=a.C.length,h=b.Va/32|0;b.Mo=d+"\\";for(var k=0;kF)break;for(var C=q.rh+(F-2)*q.Mf,D=0;D>3,1),d?e=16==b.Gg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e} +function bp(a,b){var c=a.ub*a.lb,d=b/c|0;return dg)break;e|=g<=f)break;e+=String.fromCharCode(f)}return e}function gp(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.Hl=b;a.Il=c;a.ud=a.Zc=0;a.Wa=!1;return a} +function hp(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;b+="&machine="+a.controller.gf();b+="&user="+a.controller.ie();return Ba()+"/api/v1/disk?"+b} +function op(a,b,c,d,e,f,g){if(a.N){var h;h="action=read&volume="+a.V;h+="&chs="+a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.controller.gf());h+="&user="+a.controller.ie();Aa(Ba()+"/api/v1/disk?"+h,null,f,function(h,m,n){h=[b,c,d,e,f,g];var k=!1,q=h[0],A=h[1],F=h[2],C=h[3];if(!n){m=JSON.parse(m);for(k=0;C--;){var D=a.seek(q,A,F,!0);if(!D)break;kp(D,m,k);k+=D.length;F++}k=h[4]}(h=h[5])&&h(n,k)})}else g&&g(-1,!1)} +function pp(a,b,c,d,e,f,g){if(a.N){var h={};a.fa=!0;h.action="write";h.volume=a.V;h.chs=a.Bb+":"+a.ub+":"+a.lb+":"+a.Va;h.addr=b+":"+c+":"+d+":"+e;h.machine=a.controller.gf();h.user=a.controller.ie();h.data=JSON.stringify(f);Aa(Ba()+"/api/v1/disk",h,g,function(f,h,n){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],A=k[3],k=k[4];a.fa=!1;if(0<=f&&fb&&(b=0);2E3>2,e=Array(d),f=0;f>2,e=a.data;a=a.pattern;for(var f=0;f>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b>2,c=(d>((b&3)<<3)&255;return c}; +l.write=function(a,b,c){if(this.ff)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Zc?f=a.ud+a.Zc&&(a.Zc+=f-(a.ud+a.Zc)+1):(a.ud=f,a.Zc=1);d[f]=d[f]&~(255<=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.ff){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;kb?-2!=b&&this.controller.Na("Unable to restore disk '"+this.ga+": "+c):jp(this);return b}; +l.toJSON=function(){var a;a=0;for(var b;b=bp(this,a++);)up(b);a=JSON.stringify(this.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function up(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function vp(a){bb.call(this,"FDC",a,vp,524288);this.dmaRead=this.el;this.dmaWrite=this.fl;this.dmaFormat=this.vl;this.U=a.autoMount||null;this.fa=a.sortBy||"name";"none"==this.fa&&(this.fa=null);this.B=[];this.ia=!La("Mobi")&&window&&"FileReader"in window}jb(vp);aa={}; +var wp={3:{Ud:3,ge:0,name:aa.Fo},4:{Ud:2,ge:1,name:aa.Do},5:{Ud:9,ge:7,name:aa.Jo},6:{Ud:9,ge:7,name:aa.zo},7:{Ud:2,ge:0,name:aa.Bo},8:{Ud:1,ge:2,name:aa.Eo},10:{Ud:2,ge:7,name:aa.Ao},13:{Ud:6,ge:7,name:aa.wo},15:{Ud:3,ge:0,name:aa.Co}};l=vp.prototype; +l.Pb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.fa){b=[];for(a=0;a'+b+"");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ea(c.value,10);null!=a&&xp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&yp(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ia){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&& +((a=d.A[ea(a.value,10)||0])?(a=a.za)?(a=Na(tp(a),"octet-stream",!0,a.Ug.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(this.ia)return this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;yp(d,ja(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +l.Ic=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;this.X=a;this.N=Jb(a,"ChipSet");if((this.U=Yc(this.X,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}zp(this);qc(b,this,Ap);yc(b,this,Bp);Cp(this,"None","",!0);this.ia&&Cp(this,"Local Disk","?");Cp(this,"Remote Disk","??");Dp(this)||xb(this)}; +l.hc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.X.lh){this.B=[];for(a=0;ag.za.restore(A)&&(h=!1);h&&g.za&&void 0!==g.eb&&(g.pb=g.za.seek(g.Qb,g.kb,g.xb));h||(e=!1)}a.W=b[c++]||0;a.jc=b[c]||0;return e} +function Fp(a){var b=0,c=[];c[b++]=a.hb;c[b++]=0;c[b++]=a.ma;c[b++]=a.V;c[b++]=a.L;c[b++]=a.C;c[b++]=a.aa;for(var d=b++,e=0,f=[],g=0;gGp(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){var f=a,g=c,h;for(h=0;ha.Bb||f[1]>a.ub)&&(this.Na('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.hb)),b=null);b?(a.za=b,a.Tk=c,a.Oe=d,Hp(this,c,d,b),f=b.info(),this.W|=128,this.Na('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.hb),a.Ce||e),a.Fg=f[0],a.Rf=f[1],a.Sf=f[2],this.X&&this.X.wd()):a.bf=!1;a.Ce&&(a.Ce=!1,--this.ea||xb(this));xp(this,a.hb)}; +function Cp(a,b,c,d){if((a=a.qa.listDisks)&&a.options){for(var e=0;e=this.C&&(this.ma&=-81,this.L=this.C=0);return c}; +l.Jn=function(a,b,c){z(this)&&x(this,a,b,c,"DATA["+this.C+"]");this.C=wp[a].Ud){b=!1;this.L=0;a=Jp(this);var d,e,f,g,h=a&31;switch(h){case 3:Jp(this);Jp(this);Kp(this);break;case 4:c=Jp(this);this.hb=c&3;d=this.A[this.hb];Kp(this);Lp(this,(d.Cb&-16777216)>>>24);break;case 5:case 6:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];d.kb=b;c=d.Qb=Jp(this);e=Jp(this);f=d.xb=Jp(this);g=Jp(this);d.Hb=128<>2&1;this.hb=c&3;d= +this.A[this.hb];c=d.Qb;e=d.kb=b;f=d.xb=1;g=0;d.Cb=0;d.za&&(d.pb=d.za.seek(d.Qb,d.kb,d.xb))?g=d.pb.length>>8:d.Cb=72;Mp(this,d,a,b,c,e,f,g);b=!0;break;case 13:c=Jp(this);b=c>>2&1;this.hb=c&3;d=this.A[this.hb];c=d.Qb;e=d.kb=b;f=1;g=Jp(this);d.Hb=128<>2&1,c=Jp(this),d.Qb+=c-d.ee,0>d.Qb&&(d.Qb=0),d.Qb>=d.Bb&&(d.Qb=d.Bb-1),d.ee=c,d.Cb=32,d.Qb||(d.Cb|=268435456),Kp(this),b=!0}0>>8);Lp(a,(b.Cb&16711680)>>>16);var k=0;if(e!=b.Qb||f!=b.kb)k=g=1;c&128&&(f^=k,d||(k=0));Lp(a,e+k);Lp(a,f);Lp(a,g);Lp(a,h)}function Jp(a){var b=a.V[a.L];a.L++;return b}function Kp(a){a.L=a.C=0}function Lp(a,b){a.V[a.C++]=b}l.el=function(a,b,c){void 0===b||0>b?this.Le(a,c):c(-1,!1)};l.fl=function(a,b){return void 0!==b&&0<=b?Np(a,b):-1}; +l.vl=function(a,b){if(void 0!==b&&0<=b)a:if(a.Cb)a=-1;else{a.ld[a.We++]=b;if(a.We==a.ld.length){a.Qb=a.ld[0];a.kb=a.ld[1];a.xb=a.ld[2];a.Hb=128<Np(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a};l.Le=function(a,b){var c=-1,d=null,e=0;if(!a.Cb&&a.za){do{if(a.pb&&(e=a.eb,0<=(c=a.za.read(a.pb,a.eb++)))){d=a.pb;break}a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=1088;break}a.eb=0;Op(a)}while(1)}b(c,!1,d,e)}; +function Np(a,b){if(a.Cb||!a.za)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.pb=a.za.seek(a.Qb,a.kb,a.xb);if(!a.pb){a.Cb=8256;b=-1;break}a.eb=0;Op(a)}while(1);return b}function Op(a){a.xb++;a.xb>=a.Sf+1&&(a.xb=1,a.kb++,a.kb>=a.Rf&&(a.kb=0,a.Qb++))}var Ap={1009:vp.prototype.jm,1012:vp.prototype.lm,1013:vp.prototype.im,1015:vp.prototype.km},Bp={1010:vp.prototype.Kn,1013:vp.prototype.Jn,1015:vp.prototype.In}; +Xa(function(){for(var a=tb(document,"pcx86","fdc"),b=0;bk.za.restore(g)&&(A=!1),A&&void 0!==k.eb&&(k.pb=k.za.seek(k.be,k.kb,k.xb+k.sg)));A||(e=!1);null!=a.pa&& +1>=d&&(a.pa|=(f.type&3)<<(1-d<<1))}0<=a.hb&&(a.B=a.A[a.hb]);return e} +function Yp(a){var b=0,c=[];a.ia?(c[b++]=a.W,c[b++]=a.Pa,c[b++]=a.aa,c[b++]=a.Ca,c[b++]=a.ya,c[b++]=a.va,c[b++]=a.ra,c[b++]=a.ma,c[b++]=a.Da,c[b++]=[a.fa,a.hb]):(c[b++]=a.pa,c[b++]=a.ma,c[b++]=a.V,c[b++]=a.L,c[b++]=a.C,c[b++]=a.Oa,c[b++]=a.Ka,c[b++]=a.Ja,c[b++]=a.ka);for(var d=0,e=[],f=0;f=this.C&&(this.L=this.C=0,this.ma&=-15);return c};l.ho=function(a,b,c){x(this,a,b,c,"DATA["+this.C+"]");this.C=a&&(this.ma|=2,this.ma&=-2,$p(this))};l.Mm=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.L=a.B.Va?(a.ma=128,a.Le(a.B,function(b){0<=b?(bq(a),a.N&&5180==a.N.ja&&(a.ma=0),a.ma|=88):(a.ma=1,a.W=16)},!1)):a.ma=80));return d}l.il=function(a,b){return aq(this,a,b)|aq(this,a,b)<<8}; +function cq(a,b,c,d){if(a.B&&a.B.Hb>=a.B.Va)if(0>dq(a.B,c))a.ma=1,a.W=16;else if(1==a.B.eb||a.B.eb==a.B.Va)z(a,1048832)&&x(a,b,c,d,"DATA["+a.B.eb+"]"),1=a.B.Va&&(a.ma|=8))}l.qn=function(a,b,c){cq(this,a,b&255,c);cq(this,a,b>>8&255,c)};l.Sl=function(a,b){var c=this.W;x(this,a,null,b,"ERROR",c);return c};l.vn=function(a,b,c){x(this,a,b,c,"WPREC");this.Pa=b};l.Ul=function(a,b){var c=this.aa;x(this,a,null,b,"SECCNT",c);return c}; +l.tn=function(a,b,c){x(this,a,b,c,"SECCNT");this.aa=b};l.Vl=function(a,b){var c=this.Ca;x(this,a,null,b,"SECNUM",c);return c};l.un=function(a,b,c){x(this,a,b,c,"SECNUM");this.Ca=b};l.Ql=function(a,b){var c=this.ya;x(this,a,null,b,"CYLLO",c);return c};l.pn=function(a,b,c){x(this,a,b,c,"CYLLO");this.ya=b};l.Pl=function(a,b){var c=this.va;x(this,a,null,b,"CYLHI",c);return c};l.on=function(a,b,c){x(this,a,b,c,"CYLHI");this.va=b};l.Rl=function(a,b){var c=this.ra;x(this,a,null,b,"DRVHD",c);return c}; +l.rn=function(a,b,c){x(this,a,b,c,"DRVHD");this.ra=b;this.ma=this.A[this.ra&16?1:0]?this.ma|80:this.ma&-65};l.Wl=function(a,b){var c=this.ma;x(this,a,null,b,"STATUS",c);this.ma&64&&(this.ma&=-129);return c};l.nn=function(a,b,c){x(this,a,b,c,"COMMAND");this.Da=b;this.N&&lg(this.N,14);eq(this)};l.sn=function(a,b,c){x(this,a,b,c,"FDR");this.fa&4&&!(b&4)&&(this.W=1);this.fa=b}; +function eq(a){var b=!1,c=a.Da,d=a.ra&16?1:0,e=a.ra&15,f=a.ya|(a.va&3)<<8,g=a.Ca,h=a.aa||256;a.hb=-1;a.B=null;a.W=0;a.ma=80;var k=a.A[d];k?(k.be=f,k.kb=e,k.xb=g,k.Hb=h*k.Va,c=144<=c?c:c&240,k.pb=null,k.eb=0,k.errorCode=0,a.hb=d,a.B=k):c=-1;switch(c&240){case 16:b=!0;break;case 32:a.ma=128;a.Le(k,function(b){0<=b&&a.N?(bq(a),a.ma=88):(a.ma=1,a.W=16)},!1);break;case 48:a.ma=8;break;case 64:b=!0;break;case 112:b=!0;break;case 144:a.W=1;b=!0;break;case 145:k.ub=e+1,k.lb=h,b=!0}b&&bq(a)} +function bq(a){!a.N||a.fa&2||mg(a.N,14,120)} +function $p(a){a.L=0;var b=fq(a),c=fq(a),d=c&32,e=d>>5,f=c&31,g=fq(a),h=fq(a),k=g<<2&768|h,m=g&63,n=fq(a),t=fq(a),q=a.A[e];q&&(q.be=k,q.kb=f,q.xb=m,q.Hb=n*q.Va);switch(b){case 3:gq(a,q?q.errorCode:4);hq(a,c);hq(a,g);hq(a,h);hq(a,0|d);b=-1;break;case 12:for(c=0;0<=(b=fq(a));)q&&cb?this.Le(a,c):c(-1,!1)};l.hl=function(a,b){return void 0!==b&&0<=b?dq(a,b):-1}; +l.wl=function(a,b){void 0!==b&&0<=b?(a.ebdq(a,a.cj)){a=-1;break a}a.tg++}a.tg>=a.fe&&(b=-1);a=b}else a=-1;return a}; +function iq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaRead",b);ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function jq(a,b,c){b.errorCode=4;if(b.za&&(b.pb=null,a.N)){b.errorCode=0;Cl(a.N,3,a,"dmaWrite",b);ul(a.N,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)} +function kq(a,b,c){b.errorCode=4;b.Ue&&b.Ue.length==b.Hb||(b.Ue=Array(b.Hb));b.eb=0;a.N?(b.errorCode=0,Cl(a.N,3,a,"dmaWriteBuffer",b),ul(a.N,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)} +l.Le=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.pb&&(f=a.eb,d=a.za.read(a.pb,a.eb),a.eb+=g,0<=d))return e=a.pb,b&&b(d,!1,e,f),d;if(b){if(a.za)return a.za.seek(a.be,a.kb,a.xb+a.sg,!1,function(c,k){(a.pb=c)?(e=c,f=a.eb=0,lq(a),d=a.za.read(a.pb,a.eb),a.eb+=g):a.errorCode=20;b(d,k,e,f)}),d;a.errorCode=20;b(d,!1,e,f)}return d}; +function dq(a,b){if(a.errorCode)return-1;do{if(a.pb&&a.za.write(a.pb,a.eb++,b))break;a.za&&a.za.seek(a.be,a.kb,a.xb+a.sg,!0,function(b){a.pb=b});if(!a.pb){a.errorCode=20;b=-1;break}a.eb=0;lq(a)}while(1);return b}function lq(a){a.xb++;var b=1-a.sg;a.xb>=a.lb+b&&(a.xb=b,a.kb++,a.kb>=a.ub&&(a.kb=0,a.be++))}l.Nm=function(){var a=this.F.M&255;!(this.F.G>>8)&&128>8||!this.N)||(a=!(this.N.vc[0].Ad&64));return a?!0:!1}; +var Tp={800:Pp.prototype.Lm,801:Pp.prototype.Mm,802:Pp.prototype.Km},Sp={496:Pp.prototype.il,497:Pp.prototype.Sl,498:Pp.prototype.Ul,499:Pp.prototype.Vl,500:Pp.prototype.Ql,501:Pp.prototype.Pl,502:Pp.prototype.Rl,503:Pp.prototype.Wl},Vp={800:Pp.prototype.ho,801:Pp.prototype.ko,802:Pp.prototype.jo,803:Pp.prototype.io,807:Pp.prototype.pi,811:Pp.prototype.pi,815:Pp.prototype.pi},Up={496:Pp.prototype.qn,497:Pp.prototype.vn,498:Pp.prototype.tn,499:Pp.prototype.un,500:Pp.prototype.pn,501:Pp.prototype.on, +502:Pp.prototype.rn,503:Pp.prototype.nn,1014:Pp.prototype.sn};Xa(function(){for(var a=tb(document,"pcx86","hdc"),b=0;b=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};mq.prototype.oh=function(){return-1};mq.prototype.ph=function(){}; +mq.prototype.Pk=function(a,b){return a.replace("["+b+"]","unimplemented")};mq.prototype.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.va?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; +function oq(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} +function pq(a,b,c){var d;if(b){b=qq(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0>2;this.Ba=b.Eg;this.bc=new kd(this.F,7,"DBG");this.Ga=Mq;80186<=this.F.ja&&(this.Ga=Mq.slice(),this.Ga[15]=Kq,80286<=this.F.ja&&(this.Ga[15]=Lq,80386<=this.F.ja&&(this.Ja=8)));Qk(this,64,function(a){Qq(d,d.F.kd,a[0])});Qk(this,4,function(a){if(a=a[0]){var b=rq(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Rq(d, +b,2),d.O("dumpSel("+v(a?a.Z:b)+"): %"+r(a?a.Xb:null,d.Da)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else{var e=Sq[a.type];e&&(c=e[0],b=e[1])}!c||a.wb&32768||(c+=",not present");d.O((b?"seg="+v(a.Aa&65535)+" off="+v(a.Ta):"base="+r(a.Aa,d.Da)+" limit="+Tq(a.Ta))+" type="+u(a.type>>8)+" ("+c+") ext="+v(a.ext&-65296)+ +" dpl="+u(a.Gc))}}else d.O("no selector")});Qk(this,134217728,function(a){var b;(a=a[0])&&(b=rq(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+v(b)+")");b;){a=wq(d,0,b);var c=d.Qa(a,1),e=d.na(a,2),k=d.na(a,5);if(77!=c&&90!=c)break;d.O(Uq(0,b)+": '"+String.fromCharCode(c)+"' PID="+v(e)+" LEN="+v(k)+' "'+Vq(d,a,8)+'"');b+=1+k}});Qk(this,128,function(a){Qq(d,d.F.sa,a[0],d.F.sa!==d.F.kd)});Qk(this,8,function(a){a:{if(a=a[0]){var b=rq(d,a);if(void 0===b){d.O("invalid task selector: "+a); +break a}a=Rq(d,b,2)}else a=d.F.Sa;d.O("dumpTSS("+v(a?a.Z:b)+"): %"+r(a?a.Aa:null,d.Da));if(a){var b="",c=a.type&-513,e=256==c?4:8,k=256==c?Wq:Xq,m,n,t,q;for(q in k)m=k[q],n=a.Aa+m,t=Qf(d.F,n,2),2304==c&&(t|=Qf(d.F,n+2,2)<<16),b&&(b+="\n"),b+=v(m)+" "+pa(q+":",11)+r(t,e);if(2304==c)for(q=0,m=t>>>16;mq;)n=a.Aa+m,t=Qf(d.F,n,2),b+="\n"+v(m)+" ports "+v(q)+"-"+v(q+15)+": "+ha(t,2),q+=16,m+=2;d.O(b)}}});this.L=null;this.sb=0;this.fb=!1;lf(this.F,48,this.Qm.bind(this));lf(this.F,65,this.Rm.bind(this)); +this.ka=null;lf(this.F,104,this.Sm.bind(this));xb(this)};function Yq(a,b,c,d,e,f){b=Vq(a,b);var g=Rq(a,d),g=g?g.Ta+1:0,h=(e?"_CODE":"_DATA")+r(c,2);f&&z(a,128)&&a.message(b+" "+(e?"code":"data")+"("+r(c,4)+")=#"+r(d,4)+" len "+r(g));e=Zq(a,b,c);e[b+h]=0;fm(a,b,c,d,0,null,g,e)} +function $q(a,b,c,d){var e=a.na(b,2),f=a.na(b,2),g=a.oa(b,4),h=a.oa(b,4),k=wq(a,a.oa(b,4),a.na(b,2));b=wq(a,a.oa(b,4),a.na(b,2));b=Vq(a,b).toUpperCase();var k=Vq(a,k).toUpperCase(),m=(c?"_CODE":"_DATA")+r(e,2);d&&z(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+r(e,4)+")="+r(f,4)+":"+r(g)+" len "+r(h));c=Zq(a,k,e);c[k+m]=g;fm(a,k,e,f,g,null,h,c)}function ar(a,b,c){c=Vq(a,c).toUpperCase();br(a,c,b)} +l.Qm=function(){var a=this.F;if(null!=this.L&&2752554==a.G){var b=a.M&65535,c=a.K&65535,d=wq(this,J(a)+12,a.ta.Z);switch(this.oa(d)){case 336:$q(this,wq(this,a.H,b),!c,!!this.L)}}return!0}; +l.Rm=function(a){var b=this.F,c=b.G&65535,d=b.H&65535,e=b.I&65535,f=b.M&65535,g=b.K&65535,h=b.J&65535,k=b.Xa.Z;if(null==this.L)return 79==c&&mf(b,a,function(a){return function(){62342!=(b.G&65535)?(b.G=b.G&-65536|62342,y(a,"INT 0x41 handling enabled",128),a.L=!0):(y(a,"INT 0x41 monitoring enabled",128),a.L=!1)}}(this)),!0;switch(c){case 79:this.L&&(b.G=b.G&-65536|62342,y(this,"INT 0x41 handling enabled",128));break;case 80:Yq(this,wq(this,h,k),d+1,e,!(g&1),!!this.L);break;case 82:br(this,null,d); +break;case 127:this.L&&(b.G=b.G&-65536|(this.fb?0:1));break;case 131:this.L&&(a=wq(this,b.M,e),this.sb++?(this.O("TRAPFAULT failed"),cr(this,this.B,a,!0,!0),this.sb=0,this.Wb()):(this.O("INT 0x41 TRAPFAULT: fault="+v(d)+" error="+r(b.K,8,!0)+" addr="+dr(a)),this.Rd(this.B,a,!0),yq(this,!0)));break;case 141:this.L&&(b.G=b.G&-65536|1);break;case 336:$q(this,wq(this,b.H,f),!g,!!this.L);break;case 338:ar(this,d,wq(this,b.J,f))}this.fb=!1;return!this.L}; +l.Sm=function(a){var b=this.F,c=b.G&255,d=b.G>>8&255,e=b.H&65535,f=b.I&65535,g=b.M&65535,h=b.J&65535,k=b.Xa.Z;if(null==this.ka){if(67==d){if(609437257==b.oa((b.wa.Z<<4)+10)||1111835735==b.oa((b.wa.Z<<4)+95))return!0;mf(b,a,function(a){return function(){62342!=(b.G&65535)?(b.G=b.G&-65536|62342,y(a,"INT 0x68 handling enabled",128),a.L=a.ka=!0):(y(a,"INT 0x68 monitoring enabled",128),a.ka=!1)}}(this))}return!0}switch(d){case 67:this.ka&&(b.G=b.G&-65536|62342);break;case 68:this.ka&&(a=md(b.wa,this.rl.bind(this)))&& +(b.J=a[0],Bd(b,a[1]));break;case 72:br(this,null,e);break;case 80:32==c?Yq(this,wq(this,h,k),0,f,!0,!!this.ka):128>c?Yq(this,wq(this,h,k),e+1,c&64?g:f,!(c&1),!!this.ka):$q(this,wq(this,h,k),!(c&1),!!this.ka),this.ka&&(b.G=b.G&-256|1)}return!this.ka};l.rl=function(){var a=this.F;5==(a.G&255)&&(a.I=a.K=0,a.G=a.G&-256|1);return!1}; +l.Pb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Ka=this.qa[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode)b=c.value,c.value="",Aq(d,b,!0);else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A>>0)+1;a.wb=f;a.type=g;a.ext=k;a.Xb=d;ld(a,!0,!0,!1)}}return a}l.cc=function(a,b,c){var d=a&&a.Fa;if(null==d&&(d=-1,a)){var e=Rq(this,a.Z,a.type);e&&(b=a.Ra||0,c=c||1,d=e=-1===e.Xb||e.bd&&(b>>>0)+c>e.Zb||!e.bd&&(b>>>0)+c<=e.Zb?e.Aa+b|0:-1,a.Fa=d)}return d};l.Qa=function(a,b){var c=255,d=this.cc(a,!1,1);-1!==d&&(c=Qf(this.F,d,1,5==a.type)|0,b&&fr(this,a,b));return c}; +l.tb=function(a,b){return a.Rb?this.oa(a,b?4:0):this.na(a,b?2:0)};l.na=function(a,b){var c=65535,d=this.cc(a,!1,2);-1!==d&&(c=Qf(this.F,d,2,5==a.type),b&&fr(this,a,b));return c};l.oa=function(a,b){var c=-1,d=this.cc(a,!1,4);-1!==d&&(c=Qf(this.F,d,4,5==a.type),b&&fr(this,a,b));return c};l.qc=function(a,b,c,d){var e=this.cc(a,!0,1);if(-1!==e){if(5!=a.type)this.F.qc(e,b);else{var f=this.ga;f.sa[(e&f.Gb)>>>f.La].xf(e&f.A,b&255,e)}c&&fr(this,a,c);d||ad(this.F,!0)}}; +l.jb=function(a,b,c){var d=this.cc(a,!0,2);-1!==d&&(5!=a.type?this.F.jb(d,b):nc(this.ga,d,b),c&&fr(this,a,c),ad(this.F,!0))};function wq(a,b,c,d,e,f,g){return gr(a,{},b,c,d,e,f,g)}function gr(a,b,c,d,e,f,g,h){b.Ra=c||0;b.Z=d;b.Fa=e;b.type=f||(er(a)?2:1);b.Rb=null!=g?g:a.F&&4==a.F.wa.ba;b.oc=null!=h?h:a.F&&4==a.F.wa.Tc;b.Vd=!1;return b}function hr(a){return[a.Ra,a.Z,a.Fa,a.Vd,a.Rb,a.oc,a.Ve,a.jh]}function ir(a){return{Ra:a[0],Z:a[1],Fa:a[2],Vd:a[3],Rb:a[4],oc:a[5],Ve:a[6],jh:a[7]}} +function jr(a,b,c){if(null!=b.Z&&(a=Rq(a,b.Z,b.type))){var d=b.Ra&a.Ba;if(!a.bd){if(d>>>0>=a.Zb)return!1}else if(d>>>0f?null!=h?(g=pq(a,b,void 0),f=null):(f=pq(a,b,void 0),null==f&&(g=null)):(h=pq(a,b.substring(0,f),void 0),g=pq(a,b.substring(f+1),void 0),f=null)}null!=g&&(e=wq(a,g,h,f,c),d||jr(a,e,!0)||(a.O("invalid offset: "+dr(e)),e=null));return e}function lr(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.ll=a.Ng(b.Sk=c[2]))}l.Pk=function(a,b){var c=kr(this,b);return a.replace("["+b+"]",c?r(this.tb(c),c.Rb?8:4):"undefined")}; +function fr(a,b,c){c=c||1;null!=b.Fa&&(b.Fa+=c);null!=b.Z&&(b.Ra+=c,jr(a,b)||(b.Ra=0,b.Fa=null))}function Uq(a,b,c){return null!=b?r(b,4)+":"+r(a,a&-65536||c?8:4):r(a)}function dr(a){var b;switch(a.type){case 1:case 3:b="&";break;case 2:b="#";break;case 4:b="%";break;case 5:b="%%";break;default:b=a.Z?"":"%"}return 4<=a.type||null==a.Z?b+r(a.Fa):b+Uq(a.Ra,a.Z,a.oc)} +function Vq(a,b,c){var d="";for(c=c||256;d.length>>a.F.La;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&5==d.type&&(d=Nc(a.F,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=Yb[c],6==c&&(d=d.Bd,h+=" -> "+Yb[d.type]),d&&a.O(r(d.id,8)+" %"+r(f<c&&(c=ya(Iq,a.substr(b,2))));return c}; +function nr(a,b){var c=0,d=a.ph(b);if(null!=d)switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c=2;break;case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 22:case 16:case 17:case 18:case 19:case 20:case 21:c=4;break;case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 56:c=8;break;case 23:c=a.Ja}return c?r(d,c):"??"} +l.ph=function(a){var b;if(0<=a){var c=this.F;switch(a){case 0:b=c.G&255;break;case 1:b=c.I&255;break;case 2:b=c.M&255;break;case 3:b=c.H&255;break;case 4:b=c.G>>8&255;break;case 5:b=c.I>>8&255;break;case 6:b=c.M>>8&255;break;case 7:b=c.H>>8&255;break;case 8:b=c.G&65535;break;case 9:b=c.I&65535;break;case 10:b=c.M&65535;break;case 11:b=c.H&65535;break;case 12:b=J(c)&65535;break;case 13:b=c.P&65535;break;case 14:b=c.K&65535;break;case 15:b=c.J&65535;break;case 22:b=M(c)&65535;break;case 23:b=Cd(c); +break;case 16:b=c.Xa.Z;break;case 17:b=c.wa.Z;break;case 18:b=c.ta.Z;break;case 19:b=c.vb.Z;break;default:if(80286==this.F.ja)32==a&&(b=c.$a);else if(80386<=this.F.ja)switch(a){case 24:b=c.G;break;case 25:b=c.I;break;case 26:b=c.M;break;case 27:b=c.H;break;case 28:b=J(c);break;case 29:b=c.P;break;case 30:b=c.K;break;case 31:b=c.J;break;case 32:b=c.$a;break;case 33:b=c.ti;break;case 34:b=c.se;break;case 35:b=c.Od;break;case 20:b=c.Nb.Z;break;case 21:b=c.Ob.Z;break;case 56:b=M(c)}}}return b}; +function or(a,b){b=qq(a,b);for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.oh(b,c+1),0<=e&&(b=b.substr(0,c)+nr(a,e)+b.substr(c+1+Iq[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=ea(e,16),null!=d&&32<=d&&128>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=kr(a,e))?(d=e+' "'+Vq(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=kr(a,e))?(fr(a,d),d= +e+' "'+Vq(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+dr(wq(this,M(this.F),this.F.wa.Z))+" (%"+r(this.F.Ha)+")");this.Pa&&a==this.Pa||(this.Pa=a,this.wc&-2147483648&&(this.Wb(),a+=" (cpu halted)"),this.O(a),this.F&&(a=this.F,a.fb-=a.A,a.A=0,a.Y.mf=0,ad(a)))}; +function pk(a,b,c,d){var e,f;if(!d&&(d=z(a,1)&&0>Cq.indexOf(b),!d)){var g=Bq[b];g&&(d=z(a,g)?!0:524288==g&&z(a,g=1048576))}d&&(e=a.F.G>>8&255,f=a.F.M&255,33==b&&11==e||524288==g&&128<=f||1048576==g&&128>f)&&(d=!1);d&&((g=(g=Db[b])&&g[e]||"")&&(g=" "+or(a,g)),a.message("INT "+u(b)+": AH="+u(e)+" at "+Uq(c-2-a.F.wa.Aa,a.F.wa.Z)+g));return d} +function ub(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.wc&h)==h)h=null,null!=e&&(h=a.F.wa.Z,e-=a.F.wa.Aa),a.message(b.xd+"."+(null!=d?"outPort":"inPort")+"("+v(c)+","+(f?f:"unknown")+(null!=d?","+u(d):"")+")"+(null!=g?": "+u(g):"")+(null!=e?" at "+Uq(e,h):""))}l.qh=function(){this.O("Type ? for help with PCx86 Debugger commands");this.pd();if(this.qb){var a=this.qb;this.qb=null;Aq(this,a)}}; +function yq(a,b){var c;if(ag(a)){if(!a.ia||!a.ia.length){a.ia=Array(1E3);for(c=0;c>>f.La].Rd(e&f.Ea,a==this.fa);g&&Xb(f)}}d&&(a.push(b),c?(null!=b.Fa&&(b.Z=null),b.Vd=!0):(ur(this,a,a.length-1,"set"),yq(this)));return d}; +function cr(a,b,c,d,e){for(var f=!1,g=vr(a,a.cc(c)),h=1;h>3&7,A=(3>(g>>6&3)?0:48)+q;(217==f||219==f)&&52<=A&&(A=q<<4|g&7);(q=Oq[f])&&(t=q[A]);t&&(n=Fq,k=t,m=k[0])}m>=n.length&&(g=a.Qa(b,1),k=Pq[m-n.length][g>>3&7],m=k[0]);n=n[m];q=k.length-1;t="";b.Rb&&(18==m? +n="CWDE":28==m?n="CDQ":104<=m&&107>=m&&(n+="D"));if(164<=f&&167>=f||170<=f&&175>=f)q=0,b.Rb&&"W"==n.slice(-1)&&(n=n.slice(0,-1)+"D");for(var f=-1,A=!0,F=1;F<=q;F++){var C,D;C="";D=k[F];if(void 0!==D){0>f&&(f=D>>14);80==m&&(2==f?t="[%800]":3==f&&(t="ES:["+(b.oc?"E":"")+"DI]"));var L=D&15;if(L)if(8==L)A=!1;else{var G=D&240;if(128<=G)if(0>g&&(g=a.Qa(b,1)),160>G){G=a;C=D;var ga=q;D=b;var S="",ab=g>>6,la=g&7;if(3>ab){L=!n.indexOf("FI");if(!ab&&(!D.oc&&6==la||D.oc&&5==la))ab=2;else{if(D.oc)if(4!=la)la+= +8;else{var S=G,Ja=ab,Da=D,Wa=S.Qa(Da,1),Ka=Wa>>6,Vb=Wa>>3&7,Wa=Wa&7,Pa="";if(Ja||5!=Wa)Pa=Jq[Wa+8];4!=Vb&&(Pa&&(Pa+="+"),Pa+=Jq[Vb+8],Ka&&(Pa+="*"+(1<>24),2)):S+("+"+r(G,2))):2==ab&&(S&&(S+="+"),D.oc?(G=G.oa(D,4),S+=r(G)):(G=G.na(D,2),S+=r(G,4)));S="["+S+"]";if(1==ga){G="";C&=15;4==C&&(C=D.Rb?5:3);switch(C){case 7:G="FAR";break;case 1:G="BYTE";break;case 3:if(L){G="INT16";break}G="WORD"; +break;case 5:G="DWORD";break;case 11:if(L){G="INT32";break}case 11:G="REAL32";break;case 12:if(L){G="INT64";break}case 12:G="REAL64";break;case 13:G="REAL80";break;case 14:G="BCD80"}G&&(S=G+" "+S)}}else S=zr(G,la,C,D);C=S}else C=160==G?zr(a,g&7,D,b):zr(a,g>>3&7,D,b);else if(16==G)C="1";else if(G)32==G?(b.oc?(C=8,D=a.oa(b,4)):(C=4,D=a.na(b,2)),C="["+r(D,C)+"]"):48==G?(C=1==L?a.Qa(b,1)<<24>>24:a.tb(b,!0),D=b.Ra+C&(b.Rb?-1:65535),C=r(D,b.Rb?8:4),D=Ar(a,wq(a,D,b.Z)),D[0]&&(C+=" ("+D[0]+")")):96==G?C= +9==L?"ST":10==L?"ST("+(g&7)+")":zr(a,(D&3840)>>8,D,b):112==G?C=zr(a,(D&3840)>>8,192,b):64==G?C="DS:[SI]":80==G&&(C="ES:[DI]");else{C=a;L=D;G=b;D=" ";switch(L&15){case 1:L&12288&&(D=r(C.Qa(G,1),2));break;case 2:D=r(C.Qa(G,1)<<24>>24,G.Rb?8:4);break;case 4:if(G.Rb){D=r(C.oa(G,4));break}case 3:D=r(C.na(G,2),4);break;case 7:G=wq(C,C.tb(G,!0),C.na(G,2),null,G.type,G.Rb,G.oc);D=dr(G);C=Ar(C,G);C[0]&&(D+=" ("+C[0]+")");break;default:D="imm("+v(L)+")"}C=D}if(!C||!C.length){t="INVALID";break}0a.F.ja)return"??";b+=16}else if(208==e)b+=32;else if(224==e)b+=40;else if(240==e)b+=48;else if(a=c&15,3<=a&&(8>b&&(b+=8),5==a||4==a&&d.Rb))b+=16;return Iq[b]} +function Cr(a,b){switch(b){case "V":a=Cf(a.F);break;case "D":a=a.F.ca&1024;break;case "I":a=a.F.ca&512;break;case "T":a=a.F.ca&256;break;case "S":a=Bf(a.F);break;case "Z":a=Af(a.F);break;case "A":a=zf(a.F);break;case "P":a=yf(a.F);break;case "C":a=xf(a.F);break;default:a=0}return b+(a?"1":"0")+" "}function Tq(a){return r(a,a&-65536?8:4)}function Dr(a,b){8<=b&&15>=b&&4a.F.ja&&(d="\n"+d,c+=e,e="");c+="\n"+Er(a,a.F.wa,b)+" ";80386<=a.F.ja&&(e+="\n",c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+"\n");c+=Fr(a,"LD",a.F.Bc.Z,a.F.Bc.Aa,a.F.Bc.Aa+a.F.Bc.Ta)+" "+Fr(a,"GD",null,a.F.Ec,a.F.zd)+" "+Fr(a,"ID", +null,a.F.Mc,a.F.Sd)+" ";c=c+(d+" "+e)+Dr(a,32);80386<=a.F.ja&&(c+=Dr(a,34)+Dr(a,35))}else 80386<=a.F.ja&&(c+=Er(a,a.F.Nb,b)+" "+Er(a,a.F.Ob,b)+" ");return c+=Dr(a,23)+Cr(a,"V")+Cr(a,"D")+Cr(a,"I")+Cr(a,"T")+Cr(a,"S")+Cr(a,"Z")+Cr(a,"A")+Cr(a,"P")+Cr(a,"C")}l.lj=function(a,b){return a[0]>b[0]?1:a[0]>>0,n],C=sa(A,q,a.lj);0>C&&A.splice(-(C+1),0,q)}F&&(t.a=F.replace(/''/g,'"'))}a.N.push({kg:b,dn:c,Z:d,Ra:e,Fa:f,Vm:g,Qd:h,Xi:m})} +function br(a,b,c){for(var d=0;d>>0,f=a.cc(b)>>>0,g=0;g>>0,n=h.Fa;null!=n&&(n>>>=0);var t=h.Vm;48==k&&(k=40);if(k==b.Z&&e>=m&&e=n&&fc?(a.O("out of data at address "+dr(b)),n=!0):(a.qc(b,c,1,!0),m++)})})(a,g);ad(a.F, +!0);a.O(m+" bytes read at "+b)}else a.O("sector "+e+" request out of range");else a.O("drive "+d+" not loaded");else a.O("invalid drive: "+d)}else a.O("disk controller not present")}}else a.O("load commands:"),a.O("\tl [address] [drive #] [sector #] [# sectors]")} +function qr(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Tb&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{var d;null==c&&(c=!0);if(b&&1f;f++){var g=c,e=null;if(f=a.Ja&&(h=null);switch(h){case "AL":a.F.G=a.F.G& +-256|g&255;break;case "AH":a.F.G=a.F.G&-65281|g<<8&255;break;case "AX":a.F.G=a.F.G&-65536|g&65535;break;case "BL":a.F.H=a.F.H&-256|g&255;break;case "BH":a.F.H=a.F.H&-65281|g<<8&255;break;case "BX":a.F.H=a.F.H&-65536|g&65535;break;case "CL":a.F.I=a.F.I&-256|g&255;break;case "CH":a.F.I=a.F.I&-65281|g<<8&255;break;case "CX":a.F.I=a.F.I&-65536|g&65535;break;case "DL":a.F.M=a.F.M&-256|g&255;break;case "DH":a.F.M=a.F.M&-65281|g<<8&255;break;case "DX":a.F.M=a.F.M&-65536|g&65535;break;case "SP":I(a.F,J(a.F)& +-65536|g&65535);break;case "BP":a.F.P=a.F.P&-65536|g&65535;break;case "SI":a.F.K=a.F.K&-65536|g&65535;break;case "DI":a.F.J=a.F.J&-65536|g&65535;break;case "DS":Ad(a.F,g);break;case "ES":Bd(a.F,g);break;case "SS":ud(a.F,g);break;case "CS":sf(a.F,g);a.aa=wq(a,M(a.F),a.F.wa.Z);break;case "IP":case "EIP":O(a.F,g);a.aa=wq(a,M(a.F),a.F.wa.Z);break;case "PC":case "PS":Dd(a.F,g);break;case "C":g?Ef(a.F):Ff(a.F);break;case "P":g?(e=a.F,e.resultType&=-3,e.ca|=4):(e=a.F,e.resultType&=-3,e.ca&=-5);break;case "A":g? +Mf(a.F):Kf(a.F);break;case "Z":g?Nf(a.F):Lf(a.F);break;case "S":g?(e=a.F,e.resultType&=-17,e.ca|=128):(e=a.F,e.resultType&=-17,e.ca&=-129);break;case "I":g?(e=a.F,e.ca|=512):(e=a.F,e.ca&=-513);break;case "D":g?(e=a.F,e.ca|=1024):(e=a.F,e.ca&=-1025);break;case "V":g?Gf(a.F):Hf(a.F);break;default:var k=!0;if(80286<=a.F.ja)switch(k=!1,h){case "MS":Of(a.F,g);break;case "TR":-1===a.F.Sa.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.F.ja)switch(k=!1,h){case "EAX":a.F.G=g;break;case "EBX":a.F.H=g;break; +case "ECX":a.F.I=g;break;case "EDX":a.F.M=g;break;case "ESP":I(a.F,g);break;case "EBP":a.F.P=g;break;case "ESI":a.F.K=g;break;case "EDI":a.F.J=g;break;case "FS":a.F.Nb.load(g);break;case "GS":a.F.Ob.load(g);break;case "CR0":a.F.$a=g;uj.call(a.F,g);break;case "CR2":a.F.se=g;break;case "CR3":a.F.Od=g;Fd.call(a.F,g);break;default:k=!0}}if(k){a.O("unknown register: "+e);return}}if(!f){a.O("invalid value: "+b);return}ad(a.F);a.O("updated registers:")}}a.O(Gr(a,d));c&&(a.aa=wq(a,M(a.F),a.F.wa.Z),rr(a,dr(a.aa)))}} +function Nr(a,b){b=qa(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(or(a,c[2])):pq(a,b,!0)}function Or(a,b,c){for(var d=null,e=b.Ra,f=e,g=1;6>=g&&e;g++){if(2h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.O(m)}h[3]&&(g=h[3],f=null);f=yr(a,b,g,f);b.jh||d||d++;a.O(f);a.aa=b;e-=b.Fa-k;c++}}} +l.Ng=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(qa(a.substring(d,f))),d=f+1}}return b}; +function xr(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.va&&(a.O("ended assemble at "+dr(a.ua)),a.aa=a.ua,a.va=!1),b="";else if(!c){var e=">> ";a.F.$a&1&&(e=a.F.ca&131072?"-- ":"## ");a.O(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.Pa=null;if(yb(a)&&0n||"z">>20;za.$i=a.F.Od+za.Jk;za.yb=ae.sa[(za.$i&ae.Gb)>>>ae.La];za.Aj=za.yb.Md(za.Jk);za.Kk=(Re&4190208)>>>10;za.aj=(za.Aj&-4096)+za.Kk;za.zb=ae.sa[(za.aj&ae.Gb)>>>ae.La];za.Bj=za.zb.Md(za.Kk);za.nl=(za.Bj&-4096)+(Re&4095)}if($d=za){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var od="%"+r(Re),od=od+(" %%"+mr($d.$i,$d.Aj)),od=od+(" %%"+mr($d.aj,$d.Bj,!0)), +od=od+(" %%"+r($d.nl));a.O(od)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==la){if("disk"==Ja){S[0]="l";S[1]="json";Mr(a,S);break a}for(ab in Eb)if(S[1]==ab){var yn=a.cb[ab];yn?(S.shift(),S.shift(),yn(S)):a.O("no dump registered for "+Ja);break a}Ja||(la=a.Cc||"db")}else a.Cc=la;if("dh"==la){var zn=Ja,An=Da,Bn="",Cn=0,Zb=a.Ea,sc=a.ia;if(sc.length){var Lb=+zn||a.Ub,Se=+An||10;isNaN(Lb)?Lb=Se:Bn="more ";Lb>sc.length&&(a.O("note: only "+sc.length+" available"),Lb=sc.length); +Zb-=Lb;0>Zb&&(null==sc[sc.length-1].Z?(Lb=Zb+Lb,Zb=0):Zb+=sc.length);var ii=[];"call"==An&&(Se=1E5,ii=["CALL"]);for(void 0!==zn&&a.O(Lb+" instructions earlier:");0=sc.length&&(Zb=0);a.Ub=Lb;Cn++;Se--}}Cn||(a.O("no "+Bn+"history available"),a.Ub=void 0)}else if("di"==la){S.shift(); +var ji=S[0];if(ji){var Ue=rq(a,ji);if(void 0===Ue||0>Ue||255>> +0,65536>4||1;ks--&&0qg?String.fromCharCode(qg):".";pg--}Ve&&(Ve+="\n");Ve+=Ja+" "+li+(0==Xe?" "+In:"")}Ve&&a.O(Ve);a.Db=be}}}}}break;case "e":if("else"==g[0])break;var rg=1,Jn=255,Kn=a.Qa,Ln=a.qc;"ew"== +g[0]&&(rg=2,Jn=65535,Kn=a.na,Ln=a.jb);var Mn=rg<<1,Nn=g[1];if(null==Nn)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var sg=kr(a,Nn);if(sg)for(var tg=2;tgri;){for(var tc=null,ps=256;Uc.Ra>>>0>>0;){$e.Ra=a.tb(Uc,!0);if(null==Uc.Fa||!ps--)break;$e.Z=Pn;if(tc=Or(a,$e))break;$e.Z=a.tb(Uc);if(tc=Or(a,$e,!0)){Pn=a.tb(Uc,!0);0\nLicense: GPL version 3 or later ");for(b=0;bTr){if(d.load(this.aa)){this.X=new qf(this,"1.30.3","failsafe");this.X.load()&&(Zr(this,d),a=2,$r(this.X));this.X.set("timestamp",ua());as(this.X);var e=this.A&&!this.V;if(1==a||Ea("Click OK to restore the previous PCx86 machine state, or CANCEL to reset the machine.")){if(c=Yr(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g): +("error"==f&&"no machine state"!=g?(this.Na("Error: "+g),"unable to verify user"==g&&(Ia("user",""),this.B=null)):this.O(f+": "+g),$r(d),d.load()?(c=Yr(d),e=!0):c=!1))}e&&Xr(this,c?d:null)}else 2==a&&d.clear()}else Xr(this);delete this.aa;delete this.ea}e=nb(this.id);for(f=0;fa[1];a=a[2];this.va=!0;this.la.ic=!0;var d=this.qa.power;d&&(d.textContent="Shutdown");this.F&&(bs(this,this.F,b,c,a),this.F.Cf());this.ka&&(Zr(this,b),b.clear());!c&&this.X&&(this.X.clear(),delete this.X);this.N=0}; +function Zr(a,b){if(Ea("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.ie();b=b.toString();var d={app:"PCx86",ver:"1.30.3"};d.url=a.ua;d.user=c;d.type="bug";d.data=b;Aa("http://www.pcjs.org/api/v1/report",d,!0)}} +function Qr(a,b,c){var d,e="none";if(a.N)return null;a.N--;var f=new qf(a,"1.30.3"),g=new qf(a,"1.30.3","validate"),h=ua();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",Ca());a.F&&a.F.gc&&(c&&a.F.Wb(),d=a.F.gc(b,c),"object"===typeof d&&f.set(a.F.id,d),c&&(a.F.la.ic=!1,!1===d&&(e=null)));for(var h=nb(a.id),k=0;k>>b.La;d=d+e-1>>>b.La;c.ih=0;for(c.Td=0;f<=d;)e=b.sa[f],c.ih+=e.size,e.size&&(c.Yg.push(wa(Nb,f,0,0,e.type)),c.Td++),f++;a.A=c;a.ya=a.A.Td*a.ga.Sb/691200;d=0;a.A.fj=0;a.A.Bf||(a.A.Bf=[]);e=-1;b=0;for(var g=-1,c=0;c>1),g=f.y+(f.A>>1),h=f.A,f.ad>1,b.U+=(b.W>>1)-2,Pb(b,e),b.ra&&(b.N.restore(),b.ra=!1)}}else Pb(a,"This space intentionally left blank");a.context.drawImage(a.aa,0,0,a.aa.width,a.aa.height,a.sb,a.Jb,a.Ya,a.fb);a.Ja=!1}} +Xa(function(){for(var a=tb(document,"pcx86-machine"),b=0;bf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PCx86$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Aa(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);ts(a,b,c)}})}else c(a,null)} +function us(a,b,c,d){function e(a){if(void 0===h){var b=g&&tb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=oa(a))}function f(a){e("Error: "+a);k&&(--fs||Za(!0));k=!1}var g,h,k=!0;fs++;lb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=m:t.appendChild(document.createTextNode(m));n.appendChild(t)}c|| +(c="/versions/pcx86/1.30.3/components.xsl");m=function(d,h){h?gs(c,null,null,!1,e,function(d,k){k?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--fs||Za(!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),--fs||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gs(b,a,d,!0,e,m):hs(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(q){f(q.message)}return k}function vs(a,b,c,d){Za(!1);return us(a,b,c,d)}window.embedPC=vs;window.embedPCx86=vs;window.enableEvents=Za;window.sendEvent=$a; +function ws(a,b,c,d){if(!c&&b){d.push(b);a=lb[d[0]];b=null;for(var e in a)if(ma(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Aa(b,null,!0,function(a,b){xs(b,d)}):xs(null,d)}else w("Error ("+c+") requesting "+a)} +function xs(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=lb[f],k={},m;for(m in h){var n=h[m],t=ka(m);if("xml"==t){for(t=/[ \t]*]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;d=t.exec(h[m]);){var q=d[2];q&&(h[q]||(n=n.replace(d[0],"")))}d=m=ja(m)}else"xsl"==t&&(e=m=ja(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?(a=JSON.stringify(k),g+=".js",c=c[1]+"var resources="+a+";"+c[2]+c[3],c=c.replace(/\u00A9/g, +"©"),a=Na(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')+('
    \n')+"...\n",a=a+(' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + float: + + + + js + + + +
    + + + + + + + + + + js + + + "" + + + + + +
    +
    + + + + + + + + + + + + + + + , + + + + + + + + + + + + + .machine + . + . + + + + + + + + + + + + + + + + + + + + ,comment:'' + + + + + + border:1px solid black;border-radius:15px; + border:; + + + + + + left:; + + + + + + top:; + + + + + + + + width:; + width:;max-width:; + width:auto;max-width:; + + + + + + + + height:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto;clear:both; + position:; + position:relative; + + + + + overflow:auto;width:100%; + background-color:; + + + + - -component + +
    + + + + + + +
    + + + + + + + + --object -screen + + +
    +
    + +
    + +
    +
    + + + + +
    + + +
    [XML]
    + +
    + + +
    +
    +
    +
    + + + + + text-align:center; + + + +

    +
    + + +
    +
    + + + + + + +
    +
    + + + + type:'' + + + binding:'' + + + value:'' + + + + border:1px solid black; + border:; + + + + + + width:; + + + + + + height:; + + + + + + left:; + + + + + + top:; + + + + + + padding:; + + padding-top:; + padding-right:; + padding-bottom:; + padding-left:; + + + + + + float:left; + float:right; + margin:0 auto; + clear:both; + position:; + position:relative; + text-align:; + float:left; + + + + + + + + + + + + + + + + + + +
    + + + font-size:; + + + + + -label + + + + width:; + width:; + + + + + + + + text-align:right; + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + ; + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + desc:'' + + ,href:'' + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8088 + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + + null + + + + + + 0 + + + + + + + -1 + + + + + + + -1 + + + + + + + -1 + + + + + + ,model:'',stepping:'',fpu:,cycles:,multiplier:,autoStart:,addrReset:,csStart:,csInterval:,csStop: + + + + + + + + + + + + + + + 8087 + + + + + + + + + + + + ,model:'',stepping:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + {} + + + + + + + + + + + + + + + + + chipset + ,model:'',scaleTimers:,sw1:'',sw2:'',sound:,floppies:,monitor:'',rtcDate:'' + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + device + ,type:'',baudReceive:,baudTransmit:,autoMount:'' + + + + + + + + + + + + + + + + + + + + keyboard + ,model:'' + + + + + + + + + + + + + + + 0 + + + + + + + + + + + parallel + ,adapter:,binding:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + + + false + + + + + serial + ,adapter:,baudReceive:,baudTransmit:,binding:'',tabSize:,charBOL:,upperCase: + + + + + + + + + + + + + + + + + + + + mouse + ,serial:'' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fdc + ,autoMount:'',sortBy:'' + + + + + + + + + + + + + + + + + + + + + xt + + + + + hdc + ,drives:'',type:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + null + + + + + + + + + + + + + + + + + rom + ,addr:,size:,alias:,file:'',notify:'' + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + null + + + + + + null + + + + + + true + + + + + ram + ,addr:,size:,file:'',load:,exec:,test: + + + + + + + + + + + + + + + + + + + + + null + + + + + + + 256 + + + + + + + 224 + + + + + + + black + + + + + + 0 + + + + + + 0 + + + + + + false + + + + + + 1bpp + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + false + + + + + + 1 + + + + + + 1 + + + + + + + 80 + + + + + + + 25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + null + + + + + + 0 + + + + + + 60 + + + + + video + ,model:'',mode:,screenWidth:,screenHeight:,screenColor:'',screenRotate:,bufferAddr:,bufferRAM:,bufferFormat:'',bufferCols:,bufferRows:,bufferBits:,bufferLeft:,bufferRotate:,memory:,switches:'',scale:,cellWidth:,cellHeight:,charCols:,charRows:,fontROM:'',fontColor:'',touchScreen:'',autoLock:,aspectRatio:,smoothing:,interruptRate:,refreshRate: + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + debugger + ,base:,commands:'',messages:'' + + + + + + + + + + + + + + panel + + + + + + + + + + + + + + + + + + + + + true + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + computer + ,autoPower:,busWidth:,resume:,state:'' + + + + + + + + diff --git a/versions/pdpjs/1.30.3/document.css b/versions/pdpjs/1.30.3/document.css new file mode 100644 index 000000000..7072b406e --- /dev/null +++ b/versions/pdpjs/1.30.3/document.css @@ -0,0 +1,162 @@ +@CHARSET "UTF-8"; + +.page { + margin: 2% 2%; + padding: 2% 2%; + min-width: 30em; + overflow: auto; + font-size: large; + font-family: Helvetica, Arial, sans-serif; + background: #303030; + color: #ccc; + +} +.page-header { +} +.page-header-title { + text-align: center; + +} +.page a { + color: #7fc07f; + text-decoration: none; +} +a.footlink, a.paralink { + text-decoration: none; +} +a.footlink:link, a.paralink:link { + color: blue; +} +a.footlink:visited, a.paralink:visited { + color: blue; +} +.galleryitem { + float: left; + width: 200px; +} +.item { + float: left; + width: 2em; + text-indent: 1em; +} +.list { + margin-left: 3em; + text-indent: 0; + text-align: justify; +} +ul { + list-style: none; +} +div.pnumber { + float: left; + width: 2em; + text-indent: 1em; +} +div.pitem { + margin-left: 10em; +} +p.indent, .justified p { + text-indent: 2em; + text-align: justify; + line-height: 1.5em; +} +p.noindent { + text-indent: 0; + text-align: justify; +} +p.center, .center { + text-align: center; +} +li.para { + margin-top: 1em; + margin-bottom: 1em; +} +.left { + text-align: left; +} +.right { + text-align: right; +} +blockquote.tag { + font-size: small; + font-family: Monaco, Fixed, monospace; + margin-top: 0; + margin-bottom: 0; +} +.blockquote { + padding-left: 1em; + text-indent: 0; + text-align: justify; +} +.italics { + font-style: italic; +} +.medium { + font-size: medium; +} +.small { + font-size: x-small; +} +.smallcaps { + font-variant: small-caps; +} +.strike { + text-decoration: line-through; +} +.summation, .bracelist { + display: inline-block; + position: relative; + vertical-align: middle; + text-align: center; + margin-bottom: 0.5ex; + text-indent: 0; +} +.bracelist-symbol { + font-size: 3em; + vertical-align: -40%; +} +.summation .summation-lower, .summation .summation-upper, .bracelist-item { + display: block; + font-size: 75%; + text-align: center; +} +.summation .summation-upper { + margin-bottom: 0; + margin-left: 0.8ex; + font-style: italic; +} +.summation .summation-lower{ + margin-bottom: -0.6ex; + font-style: italic; +} +.summation .summation-symbol { + font-size: 2em; +} +p sup { + vertical-align: baseline; + position: relative; + bottom: .5em; + font-size: small; +} +p sub { + vertical-align: baseline; + position: relative; + bottom: -.5em; + font-size: small; +} +.footnote { + font-size: medium; + text-indent: 1em; + text-align: justify; + margin-top: .5em; +} +.image-right { + float: right; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} +.image-caption { + font-size: small; + text-align: center; +} \ No newline at end of file diff --git a/versions/pdpjs/1.30.3/document.xsl b/versions/pdpjs/1.30.3/document.xsl new file mode 100644 index 000000000..6a90bf163 --- /dev/null +++ b/versions/pdpjs/1.30.3/document.xsl @@ -0,0 +1,452 @@ + + + + + +]> + + + + + + + + + +

    +
    + + + + + + + +

    +
    + +

    +
    +
    +
    + + + + + + +
    +
    + + +
    + +   + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +

    +
    + + +

    +
    + + +

    +
    + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + +
  • +
    + + +
    image
    +
    + + +
    +
    + + + + +
    {.}
    +
    + +
    {.}
    +
    +
    +
    + + + + + + + + + + < + > + + + + × + + ÷ + σ + + + + + + + + + + + + { + + + + + + + + + + [] + + + + +
    + +
    +
    + + + , and + + + + + MDY + + + + + + + + + + + + + + + + + + + + January + February + March + April + May + June + July + August + September + October + November + December + + + , + + + + + +

    + +
    +
    + + +
    + {.}
    +
    +
    +
    + + + +

    Timeline

    +
    + +

    +
    +
    + +
    +
    + + + + + + + + + +

    +
    + +
    +
    +
    + + + +

    People

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + +

    +
      + +
    +
    + + + + + + + + + + +
  • + +
  • +
    + + + +

    +
    +

    + +

    +
    +
    + + + + false + + + + + + [Original] + + + + + + + + + + [] + + +
    by
    + + +
    + [Source: + + + + + + + ] +
    +
    +
    + + + +

    Resources

    +
    + +

    +
    +
    + +
    +
    + + +

    + +
    + + + +

    +
    +
      + +
    +
    + + +
  • +
    + + + +

    +
    +
    + +
    +
    + + + +

    +
    + +
    + + + +

    +
    +
      + +
    +
    + + + + + +
      + +
    +
    + + + + +
  • +
    + +
  • +
    + +
  • +
    +
    +
    + + +
  • +
    + + + + + + + + + + +
    + < ="" + + ></> + ></> + /> + +
    +
    + +
    diff --git a/versions/pdpjs/1.30.3/machine.xsl b/versions/pdpjs/1.30.3/machine.xsl new file mode 100644 index 000000000..bc4ba1842 --- /dev/null +++ b/versions/pdpjs/1.30.3/machine.xsl @@ -0,0 +1,49 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    +
    + + + + js + , + +
    +
    + +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pdpjs/1.30.3/manifest.xsl b/versions/pdpjs/1.30.3/manifest.xsl new file mode 100644 index 000000000..f7cef7ae3 --- /dev/null +++ b/versions/pdpjs/1.30.3/manifest.xsl @@ -0,0 +1,247 @@ + + + + +]> + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Document Manifest

    +
    +
      + + + + None + + + + + + + + + + + + + + + + +
    +
    +
    +

    + +
    +
    +
    + + +
    + + + + + + + + + + + <xsl:value-of select="$SITEHOST"/> + + + + +
    + +
    +

    Software Manifest

    +
    +
      + + + + None + + + + + Unknown + + + + + None + + + + + None + + + + + + + + + + + + + UpdatedReleased + + Unknown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + +

    No default machine specified for '' in manifest.xml

    +
    + +
    +
    +
    + + + + -dbg + + + + + + +
    + + + + + Unknown + +
  • +
      + + + + + + + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
      • + + + + + + +
      • +
        +
      +
      +
    • +
      + + + + + + + + +
    +
  • +
    +
    + +
    diff --git a/versions/pdpjs/1.30.3/outline.xsl b/versions/pdpjs/1.30.3/outline.xsl new file mode 100644 index 000000000..c87cd1682 --- /dev/null +++ b/versions/pdpjs/1.30.3/outline.xsl @@ -0,0 +1,47 @@ + + + + +]> + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/> + + + + + +
    +
    + +
    +
    + + + + -dbg + + + + + + +
    + +
    diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js new file mode 100644 index 000000000..a117aa5f8 --- /dev/null +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -0,0 +1,318 @@ +(function(){/* + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rl11.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 +*/ +for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} +function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function Fa(a,b){var c,d={ea:null,ia:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.B.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.A&&this.A.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.bd=function(a){a||this.b.B.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function qc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; +k.pa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; +k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; +function yc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.pe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.ga};k.$d=function(){this.b.ga=0};k.od=function(){return this.b.Ac}; +k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return gc(this.b)};k.ne=function(a){Oc(this.b,a&-1809|gc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KISDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.ld, +K.prototype.ee,"KISAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Pd, +K.prototype.Ge,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.A||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +var ed=[],Zc=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],ad=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Xc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.B.Z=!1;this.B.Yb=!1;this.B.tb=a.autoStart;this.B.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} +function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Wd=function(){if(this.B.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.B.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.A&&this.A.$(void 0),this.Vb=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.rb(!0),this.A.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);$b(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; +function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; +function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function ud(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=gc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Oc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.wa);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; +function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Yd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Yd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Yd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ae(this,a,b,c)};k.Qc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Yd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; +k.Ke=function(a,b){this.w.hb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} +function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Yb?-1:0,c=a?this.B.Yb?0:1:-1;this.B.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} +function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} +function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} +function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Le(a,b){a^=b;R(this,a);return a&65535}function Me(a){T(this,a,ee(this,a),me);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} +function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} +function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Ta()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Ta()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Ta()!=!wd(this))} +function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Ta()!=!wd(this))}function df(a){U(this,a,this.Ta())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Ta())}function gf(){this.qa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.qa(24,2);this.b-=25} +function pf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.qa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; +function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} +var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, +Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], +dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, +ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} +var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= +this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> +6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; +function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; +ng.prototype.Ha=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Ga=function(){return!0}; +function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; +k.wc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Qg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Qg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Qg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, +e.Ka));a.B.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){jh(a,b,c,d)})} +function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} +function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.A&&this.A.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; +function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; +k.we=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; +var wh={},rh=(wh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],wh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],wh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],wh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],wh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); +var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.tc=function(){return-1};xh.prototype.uc=function(){}; +function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Ah(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} +function Bh(a,b,c){var d;if(b){b=Ch(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0this.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=gc(this.b):21==a&&this.f&&fc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} +function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; +function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,gc(d)):21==b&&a.f&&fc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;zg++;Jb--}}zg||(a.j("no "+yg+"history available"),a.ub=void 0)}else{var Lb=Qh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Fi),Ac=Dh(a,La)>>>0,65536>4||1,Nb="";Hi--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Cg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var Ma=null,Ki=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Ki--)break;if(!(Rd.F&1)){for(var Li=a,Gc=Rd,Eg=null,Tb=Gc.F,Fg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< +Sd){Gc.F=Tb;var Hc=di(Li,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Tb-=2}Gc.F=Fg;if(Ma=Eg)break}}if(!Ma||null==Ma)break;var Hg=null;if("ks"==Ji){var Ig=Ma.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}Ma=xa(Ma,50)+" ;"+(Hg||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.3","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Ca());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ri(a,b,c)}})}else c(a,null)} +function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!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),--Ei||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js new file mode 100644 index 000000000..a7aa8a71e --- /dev/null +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -0,0 +1,242 @@ +(function(){/* + http://pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/messages.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/debugger.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/defines.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/panel.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/bus.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/device.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/memory.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpu.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpustate.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/cpuops.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rom.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/ram.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/keyboard.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/serialport.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/pc11.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/disk.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/rl11.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 + http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 +*/ +for(var h,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return""+c}function m(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function q(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function oa(a){return a.replace(/[&<>"']/g,function(a){return na[a]})} +function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var qa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"},ra=Date.now||function(){return+new Date}; +function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== +typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} +function ta(a,b){var c,d={K:null,X:null,ga:null,fa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);for(var e in this.c)bb(this,e,this.c[e][0])};h.la=function(a,b){b||(gb(),this.reset());return!0}; +h.ka=function(){return!0};function hb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)hb(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.j.U||(this.h.reset(),jb(this.a),ab(this,"ENABLE")&&kb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))kb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} +h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; +h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; +h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; +h.Kc=function(){return sb(this.a)};h.Cd=function(a){Vb(this.a,a&-1809|sb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, +L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, +L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, +"R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, +L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= +[null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),cc(this,Zb?dc:ec);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},oa:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ea:function(a,b){this.o[a]=b;this.ua=!0},qa:function(a,b){this.o[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ua=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&gc(a,ic,!1),(a.m=c.m)&&jc(a,ic,!1))}function jc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function gc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function cc(a,b){b||(b=kc);gc(a,b,void 0);jc(a,b,void 0)} +var kc=[],fc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],ic=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var ec=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],dc=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; +function lc(a,b){x.call(this,"CPU",a,lc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(lc);var mc=["power","reset"];h=lc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=qc(a)&&(a.Qa=a.Ra=-1,pc(a),G(a),c=!0);c&&a.T(qc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&tc(a.l)}mb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;sc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+uc(a))} +function lb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function uc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.kd=function(){if(this.j.U){this.vb>=this.gb&&sc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=uc(this,!0);this.Ta+=b;this.aa+=b;nb(this,b);lb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); +this.l&&this.l.stop(ra(),qc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,rc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; +function kb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{rc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,qc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){uc(a);mb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),qc(a));b=!0}a.j.complete=void 0;return b} +function vc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;lc.call(this,a,6666667);this.decode=1120==this.Za?wc.bind(this):xc.bind(this);yc(this);this.sa=0;this.N=null;this.j.complete=!1}z(vc,lc);h=vc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);yc(this);oc(this);this.j.error=!1;this.parent.reset.call(this)}; +function yc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;jb(a)}function jb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function zc(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];rc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Cc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ec(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=sb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Vb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Gc(a,a.Ia);Gc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Hc(a){var b=Ic(a),c=Ic(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Vb(a,c);a.u&=-17} +function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Jc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Ic(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Gc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Jc(this,a,2));this.sa--;return a}; +h.Xa=function(a,b){this.Ba?(this.sa++,Kc(this,Jc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Jc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Lc(this,a,b,c)};h.hc=function(a,b,c){return Jc(this,Lc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Jc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Jc(this,a,4),b)}; +function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Lc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Nc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Lc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Jc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} +function Oc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Pc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Lc(a,b,c,8)}function Rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Kc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Kc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Bc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ac(this))}while(0>1|b<<16;Ec(this,a);return a&65535}function $c(a,b){a=b&2048|b>>1|b<<8;Ec(this,a<<8);return a&255}function ad(a,b){a=b&~a;S(this,a);return a}function bd(a,b){a=b&~a;S(this,a<<8);return a}function cd(a,b){a|=b;S(this,a);return a}function dd(a,b){a|=b;S(this,a<<8);return a}function ed(a,b){a=~b|65536;Cc(this,a);return a&65535}function fd(a,b){a=~b|256;Cc(this,a<<8);return a&255} +function gd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function hd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function id(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function jd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function kd(a,b){a=-b;Cc(this,a,a&b&32768);return a&65535}function ld(a,b){a=-b;Cc(this,a<<8,(a&b&128)<<8);return a&255} +function md(a,b){a=b<<1|this.m>>16&1;Ec(this,a);return a&65535}function nd(a,b){a=b<<1|this.m>>16&1;Ec(this,a<<8);return a&255}function od(a,b){a=(this.m&65536|b)>>1|b<<16;Ec(this,a);return a&65535}function pd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ec(this,a<<8);return a&255}function qd(a,b){var c=b-a;Fc(this,c,a,b);return c&65535}function rd(a,b){var c=b-a;Fc(this,c<<8,a<<8,b<<8);return c&255}function sd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function td(a,b){a^=b;S(this,a);return a&65535}function ud(a){U(this,a,Pc(this,a),Vc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function vd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function wd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function xd(a){V(this,a,!R(this))}function yd(a){V(this,a,R(this))} +function zd(a){U(this,a,Pc(this,a),ad);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){U(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Oc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Dd(a){S(this,Pc(this,a)&Sc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){S(this,(Oc(this,a)&Rc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){V(this,a,this.i&65535?0:4)}function Gd(a){V(this,a,!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Id(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Jd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Kd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Ld(a){V(this,a,!this.za()!=!(this.f&32768))}function Md(a){V(this,a,this.za())}function Nd(a){V(this,a,!!(this.i&65535))}function Od(a){V(this,a,!this.za())}function Pd(){K(this,12,1);this.a-=5}function Qd(a){V(this,a,!0)}function Rd(a){V(this,a,!(this.f&32768))}function Sd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Td(a){var b=Pc(this,a);a=Sc(this,a);Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ud(a){var b=Oc(this,a)<<8;a=Rc(this,a)<<8;Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Vd(a){var b=Sc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Wd(){K(this,24,2);this.a-=25} +function Xd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Yd(){K(this,16,4);this.a-=25}var Zd=[0,7,7,10,7,11,9,13];function $d(a){this.G=this.a;P(this,Qc(this,a));this.a=this.G-Zd[this.c]}var ae=[0,14,14,17,14,18,16,20];function be(a){this.G=this.a;var b=Qc(this,a);a=a>>6&7;Gc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-ae[this.c]}var ce=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function de(a){var b=Pc(this,a);this.G=this.a;S(this,Uc(this,a,b));this.a=this.G-ce[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ee(a){var b=Oc(this,a);S(this,Tc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var fe=[7,13,13,17,14,18,17,21]; +function ge(a){var b=Sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function me(a){U(this,a,Pc(this,a),qd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function ne(a){U(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)}function oe(){K(this,28,5);this.a-=5}function pe(){this.u&4||this.l&&this.l.da();this.u|=4;Bc(this,-2);this.a-=3}function qe(a){U(this,a,Pc(this,a),td);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function wc(a){re[a>>12].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a&15].call(this,a)} +function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)} +var re=[function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,Y,function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ie=[function(a){Ke[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,Y,Y,Y],te=[function(a){Cc(this,Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0, +kd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Cc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Ke=[function(a){Le[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,Y,ye,Ae,ne,ne,ne,ne],Le=[Xd,pe,je,Pd,Yd,ie,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[he,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Be=[he,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Je=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Cc(this, +Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,ld);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Cc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],He=[function(a){T(this,a,0,pd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function xc(a){Me[a>>12].call(this,a)} +var Me=[function(a){Ne[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,function(a){Oe[a>>8&15].call(this,a)},function(a){Pe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ne=[function(a){Qe[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,function(a){Re[a>>6&3].call(this,a)},Y,Y],Re=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Mc(this,a,0);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G= +this.a;Nc(this,a,0,b);S(this,b);this.a=this.G-fe[this.c]},function(a){S(this,Uc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Qe=[function(a){Se[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ye,Ae,ne,ne,ne,ne],Se=[Xd,pe,je,Pd,Yd,ie,function(){Hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Oe=[ge,ge,Vd,Vd,vd,vd,wd,wd,qe,qe,Y,Y,Y,Y,le,le],Pe=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,function(a){Te[a>>6& +3].call(this,a)},Y,Y],Te=[Y,function(a){a=Mc(this,a,65536);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G=this.a;Nc(this,a,65536,b);S(this,b);this.a=this.G-fe[this.c]},Y]; +function Ue(a){x.call(this,"ROM",a,Ue);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ve(c)})}}z(Ue);Ue.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Ve(this)}; +Ue.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ue.prototype.ka=function(){return!0}; +function Ve(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,bc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.ea=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.ea)});cb(b,this,af);F(this)}; +h.Kb=function(){if(!this.v){var a=nc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ka=function(a){return a?this.save():!0};h.reset=function(){bf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return bf(this)};function bf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Rb(this.a,this.P,1E3/Math.round(this.I/10))}};var cf={},af=(cf[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],cf[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],cf[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],cf[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],cf);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&ff(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ff(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=gf(a);var e=this;if((this.c=nc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&qf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));nf(a)})}function kf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){xf(a,b,c,d)})} +function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=zf(this,a++);)Bf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function Bf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; +h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Cf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Df(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=zf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Cf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ef(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Ef(this,a[0])};function Hf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Jf(a,e,b,c,!1,d)}else If(a,e)} +function Jf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,If(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,wf(new sf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&tc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Cf(this,a.wb)}; +function Gf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; +var Kf={},Ff=(Kf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Kf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Kf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Kf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Kf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Kf); +function Lf(a,b,c){x.call(this,"Computer",a,Lf);this.j.O=!1;Mf(this,b);this.A=nc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Nf;this.v=null;this.m=this.I=!1;this.P=nc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Of(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bNf){if(Pf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Pf(this.i)&&(Uf(this,d),a=2,Vf(this.i));this.i.set("timestamp",sa());Wf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Tf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Vf(d),Pf(d)?(c=Tf(d),e=!0):c=!1))}e&&Sf(this,c?d:null)}else 2==a&&d.clear()}else Sf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Xf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Uf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +function Uf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function $f(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);gg(a,b,c)}})}else c(a,null)} +function hg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--dg||Ja(!0));l=!1}var g,k,l=!0;dg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?eg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--dg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--dg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?eg(b,a,d,!0,e,n):fg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return hg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map From 0d11d279bbb691b2752b97e5b06d405233efe318 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Nov 2016 17:19:15 -0700 Subject: [PATCH 20/30] Changed SDR and SAR register references to PDR and PAR, which seems in keeping with more of DEC's own literature --- .../machine/1170/panel/debugger/README.md | 75 +-- modules/pdp11/lib/defines.js | 192 ++++---- modules/pdp11/lib/device.js | 168 +++---- modules/pdp11/lib/panel.js | 17 +- versions/pdpjs/1.30.3/pdp11-dbg.js | 456 +++++++++--------- versions/pdpjs/1.30.3/pdp11.js | 332 ++++++------- 6 files changed, 631 insertions(+), 609 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 10083ceb1..e4b0bf9a5 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -134,7 +134,7 @@ which should produce these results: >> d 17000500 l1 00017000500 070707 -If you also want to see all the hardware register activity, use the Debugger's "m bus on" command to turn bus messages on: +If you also want to see all the hardware register activity, use the Debugger's "m bus on" command to turn Bus messages on: >> m bus on messages on: bus @@ -162,12 +162,12 @@ If you also want to see all the hardware register activity, use the Debugger's " LOCATION CONTENTS INSTRUCTIONS & NOTES - 17772300 077406 KIPDR 0 - 17772316 077406 KIPDR 7 = I/O page for program - 17772340 000000 KIPAR 0 ; Load 200 if using trap catchers - 17772356 177600 KIPAR 7 = I/O page for program + 17772300 077406 KIPDR0 + 17772316 077406 KIPDR7 = I/O page for program + 17772340 000000 KIPAR0 ; Load 200 if using trap catchers + 17772356 177600 KIPAR7 = I/O page for program 17777700 000000 R0 = Start Virtual Address - 17777701 172340 R1 = KIPAR 0 Address + 17777701 172340 R1 = KIPAR0 Address 17777702 177572 R2 = MMR0 Address 17777703 177760 R3 = System size register Address 17777704 172516 R4 = MMR3 Address @@ -211,22 +211,22 @@ The above "toggle-in" can be entered with the PDPjs Debugger as follows: e 17772260 000200 021311 003402 005000 000776 005312 000000; r pc 172240 -which should produce the following results when bus messages are turned on ("m bus on"): +which should produce the following results when Bus messages are turned on ("m bus on"): >> m bus on messages on: bus >> e 17772300 077406 changing 00017772300 to 077406 - KISDR0.writeWord(00017772300,077406) + KIPDR0.writeWord(00017772300,077406) >> e 17772316 077406 changing 00017772316 to 077406 - KISDR7.writeWord(00017772316,077406) + KIPDR7.writeWord(00017772316,077406) >> e 17772340 000000 changing 00017772340 to 000000 - KISAR0.writeWord(00017772340,000000) + KIPAR0.writeWord(00017772340,000000) >> e 17772356 177600 changing 00017772356 to 177600 - KISAR7.writeWord(00017772356,177600) + KIPAR7.writeWord(00017772356,177600) >> e 17777700 000000 changing 00017777700 to 000000 R0SET0.writeWord(00017777700,000000) @@ -253,43 +253,58 @@ which should produce the following results when bus messages are turned on ("m b PSW.writeWord(00017777776,000000) >> e 17772240 012714 000020 005212 010520 020027 017776 003774 062711 changing 00017772240 to 012714 - SISAR0.writeWord(00017772240,012714) + SIPAR0.writeWord(00017772240,012714) changing 00017772242 to 000020 - SISAR1.writeWord(00017772242,000020) + SIPAR1.writeWord(00017772242,000020) changing 00017772244 to 005212 - SISAR2.writeWord(00017772244,005212) + SIPAR2.writeWord(00017772244,005212) changing 00017772246 to 010520 - SISAR3.writeWord(00017772246,010520) + SIPAR3.writeWord(00017772246,010520) changing 00017772250 to 020027 - SISAR4.writeWord(00017772250,020027) + SIPAR4.writeWord(00017772250,020027) changing 00017772252 to 017776 - SISAR5.writeWord(00017772252,017776) + SIPAR5.writeWord(00017772252,017776) changing 00017772254 to 003774 - SISAR6.writeWord(00017772254,003774) + SIPAR6.writeWord(00017772254,003774) changing 00017772256 to 062711 - SISAR7.writeWord(00017772256,062711) + SIPAR7.writeWord(00017772256,062711) >> e 17772260 000200 021311 003402 005000 000776 005312 000000 changing 00017772260 to 000200 - SDSAR0.writeWord(00017772260,000200) + SDPAR0.writeWord(00017772260,000200) changing 00017772262 to 021311 - SDSAR1.writeWord(00017772262,021311) + SDPAR1.writeWord(00017772262,021311) changing 00017772264 to 003402 - SDSAR2.writeWord(00017772264,003402) + SDPAR2.writeWord(00017772264,003402) changing 00017772266 to 005000 - SDSAR3.writeWord(00017772266,005000) + SDPAR3.writeWord(00017772266,005000) changing 00017772270 to 000776 - SDSAR4.writeWord(00017772270,000776) + SDPAR4.writeWord(00017772270,000776) changing 00017772272 to 005312 - SDSAR5.writeWord(00017772272,005312) + SDPAR5.writeWord(00017772272,005312) changing 00017772274 to 000000 - SDSAR6.writeWord(00017772274,000000) + SDPAR6.writeWord(00017772274,000000) >> r pc 172240 updated registers: R0=000000 R1=172340 R2=177572 R3=177760 R4=172516 R5=123123 SP=177676 PC=172240 PS=000000 SW=00000000 T0 N0 Z0 V0 C0 - SISAR0.readWord(172240): 012714 - SISAR1.readWord(172242): 000020 - SISAR0.readWord(172240): 012714 - SISAR1.readWord(172242): 000020 + SIPAR0.readWord(172240): 012714 + SIPAR1.readWord(172242): 000020 + SIPAR0.readWord(172240): 012714 + SIPAR1.readWord(172242): 000020 172240: 012714 000020 MOV #20,@R4 +All the "Supervisor I Page Address Register" (SIPAR) and "Supervisor D Page Address Register" (SDPAR) reads and writes +merely reflect where the above code is being loaded and executed from; those registers are essentially being used as scratch +RAM. + +As the **Maintenance Service Guide** goes on to say: + + The program should halt when all of memory is cleared. If it doesn't halt, examine the CPU error, Memory system error + and HI/LO error address registers to determine the cause. Trap catchers can be used by depositing 200 in KIPAR 0 (17772340) + instead of zero, and setting up vector locations with their address + 2 and the Vector + 2 with a 0 (halt). + + Note: When loading the program you must be in console physical [i.e., the ADDRESS select switch must be set to "CONS PHY", + which is the default setting of the PDPjs Front Panel]. + +Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will +slow execution to a crawl. diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 66d74768b..ec6e1895e 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -365,70 +365,70 @@ var PDP11 = { */ UNIBUS: { //16-bit 18-bit 22-bit Hex Description UNIMAP: 0o170200, // UNIBUS Mapping Registers (0-31) 64 words (ends at 0o170372) - SISDR0: 0o172200, // Supervisor I Space Descriptor Register 0 - SISDR1: 0o172202, // Supervisor I Space Descriptor Register 1 - SISDR2: 0o172204, // Supervisor I Space Descriptor Register 2 - SISDR3: 0o172206, // Supervisor I Space Descriptor Register 3 - SISDR4: 0o172210, // Supervisor I Space Descriptor Register 4 - SISDR5: 0o172212, // Supervisor I Space Descriptor Register 5 - SISDR6: 0o172214, // Supervisor I Space Descriptor Register 6 - SISDR7: 0o172216, // Supervisor I Space Descriptor Register 7 - SDSDR0: 0o172220, // Supervisor D Space Descriptor Register 0 - SDSDR1: 0o172222, // Supervisor D Space Descriptor Register 1 - SDSDR2: 0o172224, // Supervisor D Space Descriptor Register 2 - SDSDR3: 0o172226, // Supervisor D Space Descriptor Register 3 - SDSDR4: 0o172230, // Supervisor D Space Descriptor Register 4 - SDSDR5: 0o172232, // Supervisor D Space Descriptor Register 5 - SDSDR6: 0o172234, // Supervisor D Space Descriptor Register 6 - SDSDR7: 0o172236, // Supervisor D Space Descriptor Register 7 - SISAR0: 0o172240, // Supervisor I Space Address Register 0 - SISAR1: 0o172242, // Supervisor I Space Address Register 1 - SISAR2: 0o172244, // Supervisor I Space Address Register 2 - SISAR3: 0o172246, // Supervisor I Space Address Register 3 - SISAR4: 0o172250, // Supervisor I Space Address Register 4 - SISAR5: 0o172252, // Supervisor I Space Address Register 5 - SISAR6: 0o172254, // Supervisor I Space Address Register 6 - SISAR7: 0o172256, // Supervisor I Space Address Register 7 - SDSAR0: 0o172260, // Supervisor D Space Address Register 0 - SDSAR1: 0o172262, // Supervisor D Space Address Register 1 - SDSAR2: 0o172264, // Supervisor D Space Address Register 2 - SDSAR3: 0o172266, // Supervisor D Space Address Register 3 - SDSAR4: 0o172270, // Supervisor D Space Address Register 4 - SDSAR5: 0o172272, // Supervisor D Space Address Register 5 - SDSAR6: 0o172274, // Supervisor D Space Address Register 6 - SDSAR7: 0o172276, // Supervisor D Space Address Register 7 - KISDR0: 0o172300, // Kernel I Space Descriptor Register 0 - KISDR1: 0o172302, // Kernel I Space Descriptor Register 1 - KISDR2: 0o172304, // Kernel I Space Descriptor Register 2 - KISDR3: 0o172306, // Kernel I Space Descriptor Register 3 - KISDR4: 0o172310, // Kernel I Space Descriptor Register 4 - KISDR5: 0o172312, // Kernel I Space Descriptor Register 5 - KISDR6: 0o172314, // Kernel I Space Descriptor Register 6 - KISDR7: 0o172316, // Kernel I Space Descriptor Register 7 - KDSDR0: 0o172320, // Kernel D Space Descriptor Register 0 - KDSDR1: 0o172322, // Kernel D Space Descriptor Register 1 - KDSDR2: 0o172324, // Kernel D Space Descriptor Register 2 - KDSDR3: 0o172326, // Kernel D Space Descriptor Register 3 - KDSDR4: 0o172330, // Kernel D Space Descriptor Register 4 - KDSDR5: 0o172332, // Kernel D Space Descriptor Register 5 - KDSDR6: 0o172334, // Kernel D Space Descriptor Register 6 - KDSDR7: 0o172336, // Kernel D Space Descriptor Register 7 - KISAR0: 0o172340, // Kernel I Space Address Register 0 - KISAR1: 0o172342, // Kernel I Space Address Register 1 - KISAR2: 0o172344, // Kernel I Space Address Register 2 - KISAR3: 0o172346, // Kernel I Space Address Register 3 - KISAR4: 0o172350, // Kernel I Space Address Register 4 - KISAR5: 0o172352, // Kernel I Space Address Register 5 - KISAR6: 0o172354, // Kernel I Space Address Register 6 - KISAR7: 0o172356, // Kernel I Space Address Register 7 - KDSAR0: 0o172360, // Kernel D Space Address Register 0 - KDSAR1: 0o172362, // Kernel D Space Address Register 1 - KDSAR2: 0o172364, // Kernel D Space Address Register 2 - KDSAR3: 0o172366, // Kernel D Space Address Register 3 - KDSAR4: 0o172370, // Kernel D Space Address Register 4 - KDSAR5: 0o172372, // Kernel D Space Address Register 5 - KDSAR6: 0o172374, // Kernel D Space Address Register 6 - KDSAR7: 0o172376, // Kernel D Space Address Register 7 + SIPDR0: 0o172200, // Supervisor I Page Descriptor Register 0 + SIPDR1: 0o172202, // Supervisor I Page Descriptor Register 1 + SIPDR2: 0o172204, // Supervisor I Page Descriptor Register 2 + SIPDR3: 0o172206, // Supervisor I Page Descriptor Register 3 + SIPDR4: 0o172210, // Supervisor I Page Descriptor Register 4 + SIPDR5: 0o172212, // Supervisor I Page Descriptor Register 5 + SIPDR6: 0o172214, // Supervisor I Page Descriptor Register 6 + SIPDR7: 0o172216, // Supervisor I Page Descriptor Register 7 + SDPDR0: 0o172220, // Supervisor D Page Descriptor Register 0 + SDPDR1: 0o172222, // Supervisor D Page Descriptor Register 1 + SDPDR2: 0o172224, // Supervisor D Page Descriptor Register 2 + SDPDR3: 0o172226, // Supervisor D Page Descriptor Register 3 + SDPDR4: 0o172230, // Supervisor D Page Descriptor Register 4 + SDPDR5: 0o172232, // Supervisor D Page Descriptor Register 5 + SDPDR6: 0o172234, // Supervisor D Page Descriptor Register 6 + SDPDR7: 0o172236, // Supervisor D Page Descriptor Register 7 + SIPAR0: 0o172240, // Supervisor I Page Address Register 0 + SIPAR1: 0o172242, // Supervisor I Page Address Register 1 + SIPAR2: 0o172244, // Supervisor I Page Address Register 2 + SIPAR3: 0o172246, // Supervisor I Page Address Register 3 + SIPAR4: 0o172250, // Supervisor I Page Address Register 4 + SIPAR5: 0o172252, // Supervisor I Page Address Register 5 + SIPAR6: 0o172254, // Supervisor I Page Address Register 6 + SIPAR7: 0o172256, // Supervisor I Page Address Register 7 + SDPAR0: 0o172260, // Supervisor D Page Address Register 0 + SDPAR1: 0o172262, // Supervisor D Page Address Register 1 + SDPAR2: 0o172264, // Supervisor D Page Address Register 2 + SDPAR3: 0o172266, // Supervisor D Page Address Register 3 + SDPAR4: 0o172270, // Supervisor D Page Address Register 4 + SDPAR5: 0o172272, // Supervisor D Page Address Register 5 + SDPAR6: 0o172274, // Supervisor D Page Address Register 6 + SDPAR7: 0o172276, // Supervisor D Page Address Register 7 + KIPDR0: 0o172300, // Kernel I Page Descriptor Register 0 + KIPDR1: 0o172302, // Kernel I Page Descriptor Register 1 + KIPDR2: 0o172304, // Kernel I Page Descriptor Register 2 + KIPDR3: 0o172306, // Kernel I Page Descriptor Register 3 + KIPDR4: 0o172310, // Kernel I Page Descriptor Register 4 + KIPDR5: 0o172312, // Kernel I Page Descriptor Register 5 + KIPDR6: 0o172314, // Kernel I Page Descriptor Register 6 + KIPDR7: 0o172316, // Kernel I Page Descriptor Register 7 + KDPDR0: 0o172320, // Kernel D Page Descriptor Register 0 + KDPDR1: 0o172322, // Kernel D Page Descriptor Register 1 + KDPDR2: 0o172324, // Kernel D Page Descriptor Register 2 + KDPDR3: 0o172326, // Kernel D Page Descriptor Register 3 + KDPDR4: 0o172330, // Kernel D Page Descriptor Register 4 + KDPDR5: 0o172332, // Kernel D Page Descriptor Register 5 + KDPDR6: 0o172334, // Kernel D Page Descriptor Register 6 + KDPDR7: 0o172336, // Kernel D Page Descriptor Register 7 + KIPAR0: 0o172340, // Kernel I Page Address Register 0 + KIPAR1: 0o172342, // Kernel I Page Address Register 1 + KIPAR2: 0o172344, // Kernel I Page Address Register 2 + KIPAR3: 0o172346, // Kernel I Page Address Register 3 + KIPAR4: 0o172350, // Kernel I Page Address Register 4 + KIPAR5: 0o172352, // Kernel I Page Address Register 5 + KIPAR6: 0o172354, // Kernel I Page Address Register 6 + KIPAR7: 0o172356, // Kernel I Page Address Register 7 + KDPAR0: 0o172360, // Kernel D Page Address Register 0 + KDPAR1: 0o172362, // Kernel D Page Address Register 1 + KDPAR2: 0o172364, // Kernel D Page Address Register 2 + KDPAR3: 0o172366, // Kernel D Page Address Register 3 + KDPAR4: 0o172370, // Kernel D Page Address Register 4 + KDPAR5: 0o172372, // Kernel D Page Address Register 5 + KDPAR6: 0o172374, // Kernel D Page Address Register 6 + KDPAR7: 0o172376, // Kernel D Page Address Register 7 MMR3: 0o172516, // 772516 17772516 @@ -456,38 +456,38 @@ var PDP11 = { MMR1: 0o177574, // 777574 17777574 MMR2: 0o177576, // 777576 17777576 - UISDR0: 0o177600, // User I Space Descriptor Register 0 - UISDR1: 0o177602, // User I Space Descriptor Register 1 - UISDR2: 0o177604, // User I Space Descriptor Register 2 - UISDR3: 0o177606, // User I Space Descriptor Register 3 - UISDR4: 0o177610, // User I Space Descriptor Register 4 - UISDR5: 0o177612, // User I Space Descriptor Register 5 - UISDR6: 0o177614, // User I Space Descriptor Register 6 - UISDR7: 0o177616, // User I Space Descriptor Register 7 - UDSDR0: 0o177620, // User D Space Descriptor Register 0 - UDSDR1: 0o177622, // User D Space Descriptor Register 1 - UDSDR2: 0o177624, // User D Space Descriptor Register 2 - UDSDR3: 0o177626, // User D Space Descriptor Register 3 - UDSDR4: 0o177630, // User D Space Descriptor Register 4 - UDSDR5: 0o177632, // User D Space Descriptor Register 5 - UDSDR6: 0o177634, // User D Space Descriptor Register 6 - UDSDR7: 0o177636, // User D Space Descriptor Register 7 - UISAR0: 0o177640, // User I Space Address Register 0 - UISAR1: 0o177642, // User I Space Address Register 1 - UISAR2: 0o177644, // User I Space Address Register 2 - UISAR3: 0o177646, // User I Space Address Register 3 - UISAR4: 0o177650, // User I Space Address Register 4 - UISAR5: 0o177652, // User I Space Address Register 5 - UISAR6: 0o177654, // User I Space Address Register 6 - UISAR7: 0o177656, // User I Space Address Register 7 - UDSAR0: 0o177660, // User D Space Address Register 0 - UDSAR1: 0o177662, // User D Space Address Register 1 - UDSAR2: 0o177664, // User D Space Address Register 2 - UDSAR3: 0o177666, // User D Space Address Register 3 - UDSAR4: 0o177670, // User D Space Address Register 4 - UDSAR5: 0o177672, // User D Space Address Register 5 - UDSAR6: 0o177674, // User D Space Address Register 6 - UDSAR7: 0o177676, // User D Space Address Register 7 + UIPDR0: 0o177600, // User I Page Descriptor Register 0 + UIPDR1: 0o177602, // User I Page Descriptor Register 1 + UIPDR2: 0o177604, // User I Page Descriptor Register 2 + UIPDR3: 0o177606, // User I Page Descriptor Register 3 + UIPDR4: 0o177610, // User I Page Descriptor Register 4 + UIPDR5: 0o177612, // User I Page Descriptor Register 5 + UIPDR6: 0o177614, // User I Page Descriptor Register 6 + UIPDR7: 0o177616, // User I Page Descriptor Register 7 + UDPDR0: 0o177620, // User D Page Descriptor Register 0 + UDPDR1: 0o177622, // User D Page Descriptor Register 1 + UDPDR2: 0o177624, // User D Page Descriptor Register 2 + UDPDR3: 0o177626, // User D Page Descriptor Register 3 + UDPDR4: 0o177630, // User D Page Descriptor Register 4 + UDPDR5: 0o177632, // User D Page Descriptor Register 5 + UDPDR6: 0o177634, // User D Page Descriptor Register 6 + UDPDR7: 0o177636, // User D Page Descriptor Register 7 + UIPAR0: 0o177640, // User I Page Address Register 0 + UIPAR1: 0o177642, // User I Page Address Register 1 + UIPAR2: 0o177644, // User I Page Address Register 2 + UIPAR3: 0o177646, // User I Page Address Register 3 + UIPAR4: 0o177650, // User I Page Address Register 4 + UIPAR5: 0o177652, // User I Page Address Register 5 + UIPAR6: 0o177654, // User I Page Address Register 6 + UIPAR7: 0o177656, // User I Page Address Register 7 + UDPAR0: 0o177660, // User D Page Address Register 0 + UDPAR1: 0o177662, // User D Page Address Register 1 + UDPAR2: 0o177664, // User D Page Address Register 2 + UDPAR3: 0o177666, // User D Page Address Register 3 + UDPAR4: 0o177670, // User D Page Address Register 4 + UDPAR5: 0o177672, // User D Page Address Register 5 + UDPAR6: 0o177674, // User D Page Address Register 6 + UDPAR7: 0o177676, // User D Page Address Register 7 R0SET0: 0o177700, R1SET0: 0o177701, diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 11eeb48fc..6286eedd6 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -305,78 +305,78 @@ DevicePDP11.prototype.writeUNIMAP = function(data, addr) }; /** - * readSISDR(addr) + * readSIPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + * @param {number} addr (eg, PDP11.UNIBUS.SIPDR0--SIPDR7 or 172200--172216) * @return {number} */ -DevicePDP11.prototype.readSISDR = function(addr) +DevicePDP11.prototype.readSIPDR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPDR[1][reg]; }; /** - * writeSISDR(data, addr) + * writeSIPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.SISDR0--SISDR7 or 172200--172216) + * @param {number} addr (eg, PDP11.UNIBUS.SIPDR0--SIPDR7 or 172200--172216) */ -DevicePDP11.prototype.writeSISDR = function(data, addr) +DevicePDP11.prototype.writeSIPDR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPDR[1][reg] = data & 0xff0f; }; /** - * readSDSDR(addr) + * readSDPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + * @param {number} addr (eg, PDP11.UNIBUS.SDPDR0--SDPDR7 or 172220--172236) * @return {number} */ -DevicePDP11.prototype.readSDSDR = function(addr) +DevicePDP11.prototype.readSDPDR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPDR[1][reg]; }; /** - * writeSDSDR(data, addr) + * writeSDPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.SDSDR0--SDSDR7 or 172220--172236) + * @param {number} addr (eg, PDP11.UNIBUS.SDPDR0--SDPDR7 or 172220--172236) */ -DevicePDP11.prototype.writeSDSDR = function(data, addr) +DevicePDP11.prototype.writeSDPDR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPDR[1][reg] = data & 0xff0f; }; /** - * readSISAR(addr) + * readSIPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + * @param {number} addr (eg, PDP11.UNIBUS.SIPAR0--SIPAR7 or 172240--172256) * @return {number} */ -DevicePDP11.prototype.readSISAR = function(addr) +DevicePDP11.prototype.readSIPAR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPAR[1][reg]; }; /** - * writeSISAR(data, addr) + * writeSIPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.SISAR0--SISAR7 or 172240--172256) + * @param {number} addr (eg, PDP11.UNIBUS.SIPAR0--SIPAR7 or 172240--172256) */ -DevicePDP11.prototype.writeSISAR = function(data, addr) +DevicePDP11.prototype.writeSIPAR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPAR[1][reg] = data; @@ -385,26 +385,26 @@ DevicePDP11.prototype.writeSISAR = function(data, addr) }; /** - * readSDSAR(addr) + * readSDPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + * @param {number} addr (eg, PDP11.UNIBUS.SDPAR0--SDPAR7 or 172260--172276) * @return {number} */ -DevicePDP11.prototype.readSDSAR = function(addr) +DevicePDP11.prototype.readSDPAR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPAR[1][reg]; }; /** - * writeSDSAR(data, addr) + * writeSDPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.SDSAR0--SDSAR7 or 172260--172276) + * @param {number} addr (eg, PDP11.UNIBUS.SDPAR0--SDPAR7 or 172260--172276) */ -DevicePDP11.prototype.writeSDSAR = function(data, addr) +DevicePDP11.prototype.writeSDPAR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPAR[1][reg] = data; @@ -412,78 +412,78 @@ DevicePDP11.prototype.writeSDSAR = function(data, addr) }; /** - * readKISDR(addr) + * readKIPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + * @param {number} addr (eg, PDP11.UNIBUS.KIPDR0--KIPDR7 or 172300--172316) * @return {number} */ -DevicePDP11.prototype.readKISDR = function(addr) +DevicePDP11.prototype.readKIPDR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPDR[0][reg]; }; /** - * writeKISDR(data, addr) + * writeKIPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.KISDR0--KISDR7 or 172300--172316) + * @param {number} addr (eg, PDP11.UNIBUS.KIPDR0--KIPDR7 or 172300--172316) */ -DevicePDP11.prototype.writeKISDR = function(data, addr) +DevicePDP11.prototype.writeKIPDR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPDR[0][reg] = data & 0xff0f; }; /** - * readKDSDR(addr) + * readKDPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + * @param {number} addr (eg, PDP11.UNIBUS.KDPDR0--KDPDR7 or 172320--172336) * @return {number} */ -DevicePDP11.prototype.readKDSDR = function(addr) +DevicePDP11.prototype.readKDPDR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPDR[0][reg]; }; /** - * writeKDSDR(data, addr) + * writeKDPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.KDSDR0--KDSDR7 or 172320--172336) + * @param {number} addr (eg, PDP11.UNIBUS.KDPDR0--KDPDR7 or 172320--172336) */ -DevicePDP11.prototype.writeKDSDR = function(data, addr) +DevicePDP11.prototype.writeKDPDR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPDR[0][reg] = data & 0xff0f; }; /** - * readKISAR(addr) + * readKIPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + * @param {number} addr (eg, PDP11.UNIBUS.KIPAR0--KIPAR7 or 172340--172356) * @return {number} */ -DevicePDP11.prototype.readKISAR = function(addr) +DevicePDP11.prototype.readKIPAR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPAR[0][reg]; }; /** - * writeKISAR(data, addr) + * writeKIPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.KISAR0--KISAR7 or 172340--172356) + * @param {number} addr (eg, PDP11.UNIBUS.KIPAR0--KIPAR7 or 172340--172356) */ -DevicePDP11.prototype.writeKISAR = function(data, addr) +DevicePDP11.prototype.writeKIPAR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPAR[0][reg] = data; @@ -492,26 +492,26 @@ DevicePDP11.prototype.writeKISAR = function(data, addr) }; /** - * readKDSAR(addr) + * readKDPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + * @param {number} addr (eg, PDP11.UNIBUS.KDPAR0--KDPAR7 or 172360--172376) * @return {number} */ -DevicePDP11.prototype.readKDSAR = function(addr) +DevicePDP11.prototype.readKDPAR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPAR[0][reg]; }; /** - * writeKDSAR(data, addr) + * writeKDPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.KDSAR0--KDSAR7 or 172360--172376) + * @param {number} addr (eg, PDP11.UNIBUS.KDPAR0--KDPAR7 or 172360--172376) */ -DevicePDP11.prototype.writeKDSAR = function(data, addr) +DevicePDP11.prototype.writeKDPAR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPAR[0][reg] = data; @@ -519,78 +519,78 @@ DevicePDP11.prototype.writeKDSAR = function(data, addr) }; /** - * readUISDR(addr) + * readUIPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + * @param {number} addr (eg, PDP11.UNIBUS.UIPDR0--UIPDR7 or 177600--177616) * @return {number} */ -DevicePDP11.prototype.readUISDR = function(addr) +DevicePDP11.prototype.readUIPDR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPDR[3][reg]; }; /** - * writeUISDR(data, addr) + * writeUIPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.UISDR0--UISDR7 or 177600--177616) + * @param {number} addr (eg, PDP11.UNIBUS.UIPDR0--UIPDR7 or 177600--177616) */ -DevicePDP11.prototype.writeUISDR = function(data, addr) +DevicePDP11.prototype.writeUIPDR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPDR[3][reg] = data & 0xff0f; }; /** - * readUDSDR(addr) + * readUDPDR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + * @param {number} addr (eg, PDP11.UNIBUS.UDPDR0--UDPDR7 or 177620--177636) * @return {number} */ -DevicePDP11.prototype.readUDSDR = function(addr) +DevicePDP11.prototype.readUDPDR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPDR[3][reg]; }; /** - * writeUDSDR(data, addr) + * writeUDPDR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.UDSDR0--UDSDR7 or 177620--177636) + * @param {number} addr (eg, PDP11.UNIBUS.UDPDR0--UDPDR7 or 177620--177636) */ -DevicePDP11.prototype.writeUDSDR = function(data, addr) +DevicePDP11.prototype.writeUDPDR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPDR[3][reg] = data & 0xff0f; }; /** - * readUISAR(addr) + * readUIPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + * @param {number} addr (eg, PDP11.UNIBUS.UIPAR0--UIPAR7 or 177640--177656) * @return {number} */ -DevicePDP11.prototype.readUISAR = function(addr) +DevicePDP11.prototype.readUIPAR = function(addr) { var reg = (addr >> 1) & 7; return this.cpu.mmuPAR[3][reg]; }; /** - * writeUISAR(data, addr) + * writeUIPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.UISAR0--UISAR7 or 177640--177656) + * @param {number} addr (eg, PDP11.UNIBUS.UIPAR0--UIPAR7 or 177640--177656) */ -DevicePDP11.prototype.writeUISAR = function(data, addr) +DevicePDP11.prototype.writeUIPAR = function(data, addr) { var reg = (addr >> 1) & 7; this.cpu.mmuPAR[3][reg] = data; @@ -599,26 +599,26 @@ DevicePDP11.prototype.writeUISAR = function(data, addr) }; /** - * readUDSAR(addr) + * readUDPAR(addr) * * @this {DevicePDP11} - * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + * @param {number} addr (eg, PDP11.UNIBUS.UDPAR0--UDPAR7 or 177660--177676) * @return {number} */ -DevicePDP11.prototype.readUDSAR = function(addr) +DevicePDP11.prototype.readUDPAR = function(addr) { var reg = ((addr >> 1) & 7) + 8; return this.cpu.mmuPAR[3][reg]; }; /** - * writeUDSAR(data, addr) + * writeUDPAR(data, addr) * * @this {DevicePDP11} * @param {number} data - * @param {number} addr (eg, PDP11.UNIBUS.UDSAR0--UDSAR7 or 177660--177676) + * @param {number} addr (eg, PDP11.UNIBUS.UDPAR0--UDPAR7 or 177660--177676) */ -DevicePDP11.prototype.writeUDSAR = function(data, addr) +DevicePDP11.prototype.writeUDPAR = function(data, addr) { var reg = ((addr >> 1) & 7) + 8; this.cpu.mmuPAR[3][reg] = data; @@ -1043,23 +1043,23 @@ DevicePDP11.prototype.writeIgnored = function(data, addr) */ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.UNIMAP]: /* 170200 */ [null, null, DevicePDP11.prototype.readUNIMAP, DevicePDP11.prototype.writeUNIMAP, "UNIMAP", 64, PDP11.MODEL_1170], - [PDP11.UNIBUS.SISDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSISDR, DevicePDP11.prototype.writeSISDR, "SISDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.SDSDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDSDR, DevicePDP11.prototype.writeSDSDR, "SDSDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.SISAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSISAR, DevicePDP11.prototype.writeSISAR, "SISAR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.SDSAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDSAR, DevicePDP11.prototype.writeSDSAR, "SDSAR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.KISDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKISDR, DevicePDP11.prototype.writeKISDR, "KISDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.KDSDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDSDR, DevicePDP11.prototype.writeKDSDR, "KDSDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.KISAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKISAR, DevicePDP11.prototype.writeKISAR, "KISAR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.KDSAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDSAR, DevicePDP11.prototype.writeKDSAR, "KDSAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SIPDR0]: /* 172200 */ [null, null, DevicePDP11.prototype.readSIPDR, DevicePDP11.prototype.writeSIPDR, "SIPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SDPDR0]: /* 172220 */ [null, null, DevicePDP11.prototype.readSDPDR, DevicePDP11.prototype.writeSDPDR, "SDPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SIPAR0]: /* 172240 */ [null, null, DevicePDP11.prototype.readSIPAR, DevicePDP11.prototype.writeSIPAR, "SIPAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.SDPAR0]: /* 172260 */ [null, null, DevicePDP11.prototype.readSDPAR, DevicePDP11.prototype.writeSDPAR, "SDPAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KIPDR0]: /* 172300 */ [null, null, DevicePDP11.prototype.readKIPDR, DevicePDP11.prototype.writeKIPDR, "KIPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KDPDR0]: /* 172320 */ [null, null, DevicePDP11.prototype.readKDPDR, DevicePDP11.prototype.writeKDPDR, "KDPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KIPAR0]: /* 172340 */ [null, null, DevicePDP11.prototype.readKIPAR, DevicePDP11.prototype.writeKIPAR, "KIPAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.KDPAR0]: /* 172360 */ [null, null, DevicePDP11.prototype.readKDPAR, DevicePDP11.prototype.writeKDPAR, "KDPAR", 8, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR3]: /* 172516 */ [null, null, DevicePDP11.prototype.readMMR3, DevicePDP11.prototype.writeMMR3, "MMR3", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.LKS]: /* 177546 */ [null, null, DevicePDP11.prototype.readLKS, DevicePDP11.prototype.writeLKS, "LKS"], [PDP11.UNIBUS.MMR0]: /* 177572 */ [null, null, DevicePDP11.prototype.readMMR0, DevicePDP11.prototype.writeMMR0, "MMR0", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR1]: /* 177574 */ [null, null, DevicePDP11.prototype.readMMR1, DevicePDP11.prototype.writeIgnored, "MMR1", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.MMR2]: /* 177576 */ [null, null, DevicePDP11.prototype.readMMR2, DevicePDP11.prototype.writeIgnored, "MMR2", 1, PDP11.MODEL_1145], - [PDP11.UNIBUS.UISDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUISDR, DevicePDP11.prototype.writeUISDR, "UISDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.UDSDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDSDR, DevicePDP11.prototype.writeUDSDR, "UDSDR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.UISAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUISAR, DevicePDP11.prototype.writeUISAR, "UISAR", 8, PDP11.MODEL_1145], - [PDP11.UNIBUS.UDSAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDSAR, DevicePDP11.prototype.writeUDSAR, "UDSAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UIPDR0]: /* 177600 */ [null, null, DevicePDP11.prototype.readUIPDR, DevicePDP11.prototype.writeUIPDR, "UIPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UDPDR0]: /* 177620 */ [null, null, DevicePDP11.prototype.readUDPDR, DevicePDP11.prototype.writeUDPDR, "UDPDR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UIPAR0]: /* 177640 */ [null, null, DevicePDP11.prototype.readUIPAR, DevicePDP11.prototype.writeUIPAR, "UIPAR", 8, PDP11.MODEL_1145], + [PDP11.UNIBUS.UDPAR0]: /* 177660 */ [null, null, DevicePDP11.prototype.readUDPAR, DevicePDP11.prototype.writeUDPAR, "UDPAR", 8, PDP11.MODEL_1145], [PDP11.UNIBUS.R0SET0]: /* 177700 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R0SET0"], [PDP11.UNIBUS.R1SET0]: /* 177701 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R1SET0"], [PDP11.UNIBUS.R2SET0]: /* 177702 */ [null, null, DevicePDP11.prototype.readRSET0, DevicePDP11.prototype.writeRSET0, "R2SET0"], diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 0723ec4f0..edf37292a 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -268,11 +268,11 @@ PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) default: /* - * Square (default) or round LEDs are defined in machine XML files like so: + * Square ("led") or round ("rled") LEDs are defined in machine XML files like so: * * * - * Only *type* and *binding* attributes are required; if *value* is omitted, the default value is 0 (off). + * Only *type* and *binding* attributes are required; if *value* is omitted, the default value is 0 ("off"). */ if (sType == "led" || sType == "rled") { this.bindings[sBinding] = control; @@ -576,9 +576,12 @@ PanelPDP11.prototype.processStart = function(value, index) * If value == 1 (our initial value), then the 'STEP' switch is set to "S INST" (step one instruction); * otherwise, it's set to "S BUS CYCLE" (step one bus cycle). * - * However, since we can't currently support cycle-stepping, I've decided to change the meaning of this - * switch: the normal ("up") position means that successive 'EXAM' and 'DEP' operations will first add 2 - * to the 'ADDRESS' register, while the opposite ("down") position means they will first subtract 2. + * However, since we can't currently support cycle-stepping, I've decided to innovate a little and + * change the meaning of this switch: the normal ("up") position means that successive 'EXAM' and 'DEP' + * operations will first add 2 to the 'ADDRESS' register, while the opposite ("down") position means + * they will first subtract 2. + * + * See processLEDTest() for more of these exciting "innovations". ;-) * * @this {PanelPDP11} * @param {number} value @@ -760,6 +763,10 @@ PanelPDP11.prototype.processLEDTest = function(value, index) } else { this.fLEDTest = false; this.displayLEDs(); + /* + * This is another one of my "innovations": when you're done testing the LEDs, all the switches reset as well. + */ + this.setSwitches(0); } }; diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index a117aa5f8..27b43d075 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -63,256 +63,256 @@ k.ta=function(a,b,c,d){if(this.A&&this.A.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d) a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} k.bd=function(a){a||this.b.B.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0c;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} -function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} -function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} -function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} -function qc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; -k.pa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; -k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; -function yc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +function jc(a,b,c){u.call(this,"Bus",a,jc,64);this.b=b;this.i=c;this.K=a.busWidth||16;this.A=0;this.v=[];this.g=null;this.H=1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.C=[];this.Ic=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function mc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function nc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function oc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function rc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; +k.pa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; +k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; +function zc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Oc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; k.pe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.ga};k.$d=function(){this.b.ga=0};k.od=function(){return this.b.Ac}; -k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return gc(this.b)};k.ne=function(a){Oc(this.b,a&-1809|gc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KISDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.ld, -K.prototype.ee,"KISAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Pd, -K.prototype.Ge,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return hc(this.b)};k.ne=function(a){Pc(this.b,a&-1809|hc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.ld, +K.prototype.ee,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Pd, +K.prototype.Ge,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, "R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Xc(this,Tc?Yc:Zc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); +1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.A||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} -var ed=[],Zc=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],ad=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Xc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; -function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.B.Z=!1;this.B.Yb=!1;this.B.tb=a.autoStart;this.B.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; -k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} +b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&cd(a,bd,!1),(a.A=c.A)&&ad(a,bd,!1))}function ed(a,b){b?--a.A||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function ad(a,b,c){c&&a.A||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function cd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Xc(a,b){b||(b=fd);cd(a,b,void 0);ad(a,b,void 0)} +var fd=[],$c=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],bd=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Zc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Yc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; +function gd(a,b){u.call(this,"CPU",a,gd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.B.Z=!1;this.B.Yb=!1;this.B.tb=a.autoStart;this.B.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(gd);var hd=["power","reset"];k=gd.prototype; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=md(a)&&(a.yb=a.zb=-1,kd(a),a.ha(),c=!0);c&&a.j(md(a)+" cycles: checksum="+p(a.Hb))}} k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} -function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Wd=function(){if(this.B.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.B.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.A&&this.A.$(void 0),this.Vb=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, -e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.rb(!0),this.A.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);$b(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; -function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; -function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function ud(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} -function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=gc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Oc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.wa);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; -function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Yd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Yd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Yd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ae(this,a,b,c)};k.Qc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Yd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; -k.Ke=function(a,b){this.w.hb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} -function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Yb?-1:0,c=a?this.B.Yb?0:1:-1;this.B.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} -function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} -function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} -function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Le(a,b){a^=b;R(this,a);return a&65535}function Me(a){T(this,a,ee(this,a),me);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} -function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} -function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Ta()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Ta()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Ta()!=!wd(this))} -function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Ta()!=!wd(this))}function df(a){U(this,a,this.Ta())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Ta())}function gf(){this.qa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} -function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.qa(24,2);this.b-=25} -function pf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.qa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; -function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} -function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} -var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, -Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], -dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, -ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} -var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= -this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> -6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; -function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; -ng.prototype.Ha=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Ga=function(){return!0}; -function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; -k.wc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ga=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;ba.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;od(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+pd(a))} +function qd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function pd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Wd=function(){if(this.B.Z){this.vb>=this.mb&&od(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=qd(this,this.B.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=pd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.A&&this.A.$(void 0),this.Vb=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),md(this));vb(this, +e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,nd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;nd(this);this.B.Z=!0;this.B.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.rb(!0),this.A.start(this.R,md(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){pd(this);$b(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),md(this));b=!0}this.B.complete=a;return b}; +function rd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;gd.call(this,a,6666667);this.decode=1120==this.xb?sd.bind(this):td.bind(this);ud(this);this.L=0;this.N=null;this.B.complete=!1}z(rd,gd);k=rd.prototype;k.reset=function(){this.status("model "+this.xb);this.B.Z&&this.ha();ud(this);jd(this);this.B.error=!1;this.parent.reset.call(this)}; +function ud(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,rc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,rc(a.w,16))}function vd(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];nd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Bd(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Cd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Dd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Ed(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=hc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Pc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Wd(this,this.wa);Wd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; +function Xd(a){var b=Yd(a),c=Yd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Pc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Zd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Ad(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ad(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=$d(this,Zd(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Zd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,ae(this,Zd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Zd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return be(this,a,b,c)};k.Qc=function(a,b,c){return Zd(this,be(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Zd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; +k.Ke=function(a,b){this.w.hb(Zd(this,a,4),b)};function ce(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=be(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function de(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=be(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Zd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} +function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?$d(a,a.ca(b,c,3)):a.u[c]&255}function fe(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function ge(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return be(a,b,c,8)}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?$d(a,a.ca(b,c,3)):a.u[c]&255}function ie(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),ae(a,e,d.call(a,c,$d(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function je(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ae(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function ke(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.B.complete=!0;var b=this.i&&le(this.i)?1:this.B.Yb?-1:0,c=a?this.B.Yb?0:1:-1;this.B.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&me(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(Ad(this,2),this.I&=-5),this.qa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(zd(this))}while(0>1|b<<16;Dd(this,a);return a&65535}function se(a,b){a=b&2048|b>>1|b<<8;Dd(this,a<<8);return a&255}function te(a,b){a=b&~a;R(this,a);return a}function ue(a,b){a=b&~a;R(this,a<<8);return a}function ve(a,b){a|=b;R(this,a);return a}function we(a,b){a|=b;R(this,a<<8);return a} +function xe(a,b){a=~b|65536;Bd(this,a);return a&65535}function ye(a,b){a=~b|256;Bd(this,a<<8);return a&255}function ze(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function Ae(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Be(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Ce(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} +function De(a,b){a=-b;Bd(this,a,a&b&32768);return a&65535}function Ee(a,b){a=-b;Bd(this,a<<8,(a&b&128)<<8);return a&255}function Fe(a,b){a=b<<1|this.T>>16&1;Dd(this,a);return a&65535}function Ge(a,b){a=b<<1|this.T>>16&1;Dd(this,a<<8);return a&255}function He(a,b){a=(this.T&65536|b)>>1|b<<16;Dd(this,a);return a&65535}function Ie(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Dd(this,a<<8);return a&255}function Je(a,b){var c=b-a;Ed(this,c,a,b);return c&65535} +function Ke(a,b){var c=b-a;Ed(this,c<<8,a<<8,b<<8);return c&255}function Le(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Me(a,b){a^=b;R(this,a);return a&65535}function Ne(a){T(this,a,fe(this,a),ne);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Oe(a){var b=ie(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} +function Pe(a){var b=ie(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Qe(a){U(this,a,!wd(this))}function Re(a){U(this,a,wd(this))} +function Se(a){T(this,a,fe(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){T(this,a,fe(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){S(this,a,ee(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function We(a){R(this,fe(this,a)&ie(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){R(this,(ee(this,a)&he(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ye(a){U(this,a,yd(this))}function Ze(a){U(this,a,!this.Ta()==!xd(this))}function $e(a){U(this,a,!yd(this)&&!this.Ta()==!xd(this))}function af(a){U(this,a,!wd(this)&&!yd(this))}function bf(a){U(this,a,yd(this)||!this.Ta()!=!xd(this))} +function cf(a){U(this,a,wd(this)||yd(this))}function df(a){U(this,a,!this.Ta()!=!xd(this))}function ef(a){U(this,a,this.Ta())}function ff(a){U(this,a,!yd(this))}function gf(a){U(this,a,!this.Ta())}function hf(){this.qa(12,1);this.b-=5}function jf(a){U(this,a,!0)}function kf(a){U(this,a,!xd(this))}function lf(a){U(this,a,xd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function mf(a){var b=fe(this,a);a=ie(this,a);Ed(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function nf(a){var b=ee(this,a)<<8;a=he(this,a)<<8;Ed(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function of(a){var b=ie(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function pf(){this.qa(24,2);this.b-=25} +function qf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?rf(this.i):this.ha();this.b-=7}function sf(){this.qa(16,4);this.b-=25}var tf=[0,7,7,10,7,11,9,13];function uf(a){this.J=this.b;O(this,ge(this,a));this.b=this.J-tf[this.g]}var vf=[0,14,14,17,14,18,16,20];function wf(a){this.J=this.b;var b=ge(this,a);a=a>>6&7;Wd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-vf[this.g]}var xf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function yf(a){var b=fe(this,a);this.J=this.b;R(this,ke(this,a,b));this.b=this.J-xf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function zf(a){var b=ee(this,a);R(this,je(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Af=[7,13,13,17,14,18,17,21]; +function Bf(a){var b=ie(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Hf(a){T(this,a,fe(this,a),Je);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function If(a){T(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}function Jf(){this.qa(28,5);this.b-=5}function Kf(){this.I&4||this.A&&this.A.$();this.I|=4;Ad(this,-2);this.b-=3}function Lf(a){T(this,a,fe(this,a),Me);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=rf(b);b||this.qa(8,6)}function sd(a){Mf[a>>12].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)} +function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a&15].call(this,a)}function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)} +var Mf=[function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Ne,W,function(a){dg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Hf,W],cg=[function(a){eg[a>>4&15].call(this,a)},jf,ff,Ye,Ze,df,$e,bf,wf,wf,Nf,Pf,Rf,W,W,W],Of=[function(a){Bd(this,ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Qf=[function(a){T(this,a,0, +De);this.b-=this.g?11:6},function(a){T(this,a,wd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,wd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ie(this,a);Bd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Sf=[function(a){T(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}], +eg=[function(a){fg[a&15].call(this,a)},W,W,W,uf,uf,uf,uf,Ff,W,Tf,Vf,If,If,If,If],fg=[qf,Kf,Ef,hf,sf,Df,W,W,W,W,W,W,W,W,W,W],Uf=[Cf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Wf=[Cf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],dg=[gf,ef,af,cf,kf,lf,Qe,Re,pf,Jf,Xf,Zf,ag,W,W,W],Yf=[function(a){Bd(this, +je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}],$f=[function(a){S(this,a,0,Ee);this.b-=this.g?11:6},function(a){S(this,a,wd(this)?1:0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,wd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Bd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],bg=[function(a){S(this,a,0,Ie);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,se);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)}];function td(a){gg[a>>12].call(this,a)} +var gg=[function(a){hg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Ne,function(a){ig[a>>8&15].call(this,a)},function(a){jg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Hf,W],hg=[function(a){kg[a>>4&15].call(this,a)},jf,ff,Ye,Ze,df,$e,bf,wf,wf,Nf,Pf,Rf,function(a){lg[a>>6&3].call(this,a)},W,W],lg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ce(this,a,0);Wd(this,a);R(this,a);this.b-=11},function(a){var b=Yd(this);this.J= +this.b;de(this,a,0,b);R(this,b);this.b=this.J-Af[this.g]},function(a){R(this,ke(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],kg=[function(a){mg[a&15].call(this,a)},W,W,W,uf,uf,uf,uf,Ff,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Tf,Vf,If,If,If,If],mg=[qf,Kf,Ef,hf,sf,Df,function(){Xd(this);this.b-=13},W,W,W,W,W,W,W,W,W],ig=[Bf,Bf,of,of,Oe,Oe,Pe,Pe,Lf,Lf,W,W,W,W,Gf,Gf],jg=[gf,ef,af,cf,kf,lf,Qe,Re,pf,Jf,Xf,Zf,ag,function(a){ng[a>> +6&3].call(this,a)},W,W],ng=[W,function(a){a=ce(this,a,65536);Wd(this,a);R(this,a);this.b-=11},function(a){var b=Yd(this);this.J=this.b;de(this,a,65536,b);R(this,b);this.b=this.J-Af[this.g]},W]; +function og(a){u.call(this,"ROM",a,og);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);pg(c)})}}z(og);og.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;pg(this)}; +og.prototype.Ha=function(){this.ia&&(this.i&&qg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};og.prototype.Ga=function(){return!0}; +function pg(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(uc(a.w,b,a.g,Wc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():vd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ka))});this.na=Nc(52,4);this.aa=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.na)});Cb(b,this,Pg);H(this)}; +k.wc=function(){if(!this.J){var a=id(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Qg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Qg(this)};function Qg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Qg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Qg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Qg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, -e.Ka));a.B.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;d'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Ug(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ug(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Vg(a);var e=this;if((this.g=id(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.da=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&dh(a,b,c,d,e.ea,e.La, +e.Ka));a.B.$a=!1;a.D&&(a.D--,a.D||H(a));ah(a)})}function Yg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){jh(a,b,c,d)})} -function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;fd&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&ph(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&qh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=mh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} -function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} -k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.A&&this.A.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; -function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ph(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){rh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return rh(this,a[0])};function uh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}wh(a,e,b,c,!1,d)}else vh(a,e)} +function wh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,vh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,jh(new fh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.A&&this.A.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));ph(this,a.fc)}; +function th(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; +k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Jc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Jc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; k.we=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; -var wh={},rh=(wh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],wh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],wh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],wh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],wh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); -var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.tc=function(){return-1};xh.prototype.uc=function(){}; -function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function Ah(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Lc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; +var xh={},sh=(xh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],xh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],xh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],xh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],xh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],xh);function yh(a){u.call(this,"Debugger",a,yh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(yh); +var zh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yh.prototype.tc=function(){return-1};yh.prototype.uc=function(){}; +function Ah(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Bh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Bh(a,b,c){var d;if(b){b=Ch(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Gh(a,b){if(b)return Fh(a,b,a.Y[b]);var c=0;for(b in a.Y)Fh(a,b,a.Y[b]),c++;return 0this.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=gc(this.b):21==a&&this.f&&fc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} -function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; -function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,gc(d)):21==b&&a.f&&fc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;zg++;Jb--}}zg||(a.j("no "+yg+"history available"),a.ub=void 0)}else{var Lb=Qh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Fi),Ac=Dh(a,La)>>>0,65536>4||1,Nb="";Hi--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Cg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= -2;FcQd;){for(var Ma=null,Ki=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Ki--)break;if(!(Rd.F&1)){for(var Li=a,Gc=Rd,Eg=null,Tb=Gc.F,Fg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< -Sd){Gc.F=Tb;var Hc=di(Li,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Tb-=2}Gc.F=Fg;if(Ma=Eg)break}}if(!Ma||null==Ma)break;var Hg=null;if("ks"==Ji){var Ig=Ma.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}Ma=xa(Ma,50)+" ;"+(Hg||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.3","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Ca());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lthis.b.xb?Ph:[];Qh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Rh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=hc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,pd(a),a.ua=0,a.A&&a.A.$(void 0)))};function Jh(a){var b;if(!le(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Yh(this):Zh(this)}};function Xh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Jh(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;$h(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Th(this.L));a.set(1,Th(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Uh(a[b++]),this.P=Uh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function rf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} +function Ih(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||ai(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(bi(this,a,a.length-1,"set"),Jh(this)));return d}; +function ai(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Jh(a);break}}return f}function ci(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Wh(y);break;case 8:x="@"+Wh(y);break;case 16:7>y?x="("+Wh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Wh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Wh(y)+")";break;case 40:x="@-("+Wh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Wh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Wh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Wh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,hc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function hi(a){var b,c="";for(b=0;6>b;b++)c+=gi(a,b);c=c+"\n"+(gi(a,6)+gi(a,7));c+=gi(a,20)+gi(a,21);return c+=fi(a,"T")+fi(a,"N")+fi(a,"Z")+fi(a,"V")+fi(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function ii(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(hi(a));c&&(a.L=Z(d.u[7]),Zh(a,J(a,a.L.F)))}}function mi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ei(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function di(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==yg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==xg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;Ag++;Jb--}}Ag||(a.j("no "+zg+"history available"),a.ub=void 0)}else{var Lb=Rh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Gi),Ac=Eh(a,La)>>>0,65536>4||1,Nb="";Ii--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Dg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Rh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var Ma=null,Li=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Fg=null,Tb=Gc.F,Gg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< +Sd){Gc.F=Tb;var Hc=ei(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Hg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Hg+1)-Hg-1)/2==Gg){Fg=Hc;break}}}Tb-=2}Gc.F=Gg;if(Ma=Fg)break}}if(!Ma||null==Ma)break;var Ig=null;if("ks"==Ki){var Jg=Ma.match(/[0-9A-F]+$/);Jg&&(Ig=li(a,Jg[0]))}Ma=xa(Ma,50)+" ;"+(Ig||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){li(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bri){if(ti(d,this.J)){this.C=new P(this,"1.30.3","failsafe");ti(this.C)&&(yi(this,d),a=2,zi(this.C));this.C.set("timestamp",Ca());Ai(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=xi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ti(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),zi(d),ti(d)?(c=xi(d),e=!0):c=!1))}e&&wi(this,c?d:null)}else 2==a&&d.clear()}else wi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Bi(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(yi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function yi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function oi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ri(a,b,c)}})}else c(a,null)} -function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!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),--Ei||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +k.ta=function(a,b,c){var d=this;switch(b){case "power":return this.G[b]=c,c.onclick=function(){d.v||(d.B.ja?oi(d,!1,!0):vi(d,d.Jb))},!0;case "reset":return this.G[b]=c,c.onclick=function(){if(d.B.ja&&!d.v)if(d.g&&!d.H){var a=Ha("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");oi(d,a,!0);!a&&d.N?window&&window.location.reload():(a||(d.rc=!0),d.Jb(ri),d.rc=!1)}else d.reset(),d.b&&d.b.tb()},!0;case "save":if(ua(Ga(),"pcjs.org"))c.parentNode.removeChild(c); +else return this.G[b]=c,c.onclick=function(){var a=si(d,!0);if(a){var b=!!(d.g&&!d.H||d.N),c=oi(d,b);b?Ci(d,a,c):d.O("Resume disabled, machine state not saved")}},!0}return!1}; +function si(a,b){var c=a.A;c||((c=Na("user"),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=Di(a,c))||a.O("The user ID is invalid.")):b&&a.O("Browser local storage is not available"));return c} +function Di(a,b){a.A=null;b=Ea(Ga()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Oa("user",b.data),a.A=b.data)}catch(d){q(d.message+" ("+c+")")}return a.A}function ui(a){var b=null;a.A&&(b=Ga()+"/api/v1/user?req=load&user="+a.A+"&state="+Ei(a,"1.30.3"));return b} +function Ci(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Ei(a,"1.30.3");d.data=c;b=Ea(Ga()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Si(a,b,c)}})}else c(a,null)} +function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Fi||Za(!0));l=!1}var g,h,l=!0;Fi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Fi||Za(!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),--Fi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index a7aa8a71e..46a8d9ca8 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -55,188 +55,188 @@ x.prototype={constructor:x,parent:null,toString:function(){return this.name?this this.F=function(a){this.T(a,this.Pa)}),!0;default:return!1}},log:function(){},T:function(){},status:function(a){this.T(this.Pa+": "+a)},F:function(a,b,c){c=c||this.type;b||u((c?c+": ":"")+a)},la:function(){return this.j.O=!0},ka:function(a,b){b&&(this.j.O=!1);return!0}};function Va(a,b){a.j.pb?(a.j.Fa=!1,a.j.pb=!1):a.j.error?a.T(a.toString()+" error"):a.j.Fa=b}function F(a,b){a.j.error||(a.j.ready=!1!==b,a.j.ready&&(b=a.jb,a.jb=null,b&&b()))} function Wa(a,b){b&&(a.j.ready?b():a.jb=b);return a.j.ready}function Xa(a,b){a.j.error=!0;a.F(b)}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;ba;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.i=this.f=this.s=0;this.w=this.A=this.v=!1;this.C=$a;this.m={};this.c={START:[1,!0,!1,this.qc],STEP:[1,!1,!1,this.rc],ENABLE:[1,!1,!1,this.mc],CONT:[1,!0,!1,this.kc],DEP:[0,!0,!1,this.lc],EXAM:[1,!0,!1,this.nc],LOAD:[1,!0,!1,this.pc],TEST:[0,!0,!1,this.oc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);for(var e in this.c)bb(this,e,this.c[e][0])};h.la=function(a,b){b||(gb(),this.reset());return!0}; -h.ka=function(){return!0};function hb(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)hb(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.j.U||(this.h.reset(),jb(this.a),ab(this,"ENABLE")&&kb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))kb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} -h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.la=function(a,b){b||(hb(),this.reset());return!0};h.ka=function(){return!0}; +function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +h.qc=function(a){a||this.a.j.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][0]=0&1<>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function yb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function zb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} +h.kb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Nb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Vb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return sb(this.a)};h.Cd=function(a){Vb(this.a,a&-1809|sb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; -var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SISDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDSDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SISAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDSAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KISDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDSDR",8,1145],N[62688]=[null,null,L.prototype.zc, -L.prototype.td,"KISAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDSAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UISDR",8,1145],N[65424]=[null,null,L.prototype.cd, -L.prototype.Vd,"UDSDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UISAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDSAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, +h.Kc=function(){return tb(this.a)};h.Cd=function(a){Wb(this.a,a&-1809|tb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.zc, +L.prototype.td,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.cd, +L.prototype.Vd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, "R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= [null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),cc(this,Zb?dc:ec);else{a=this.a=Array(this.size>> -2);for(f=0;f>1),this.a=new Int32Array(this.b,0,this.size>>2),dc(this,$b?ec:fc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},oa:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ea:function(a,b){this.o[a]=b;this.ua=!0},qa:function(a,b){this.o[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ua=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&gc(a,ic,!1),(a.m=c.m)&&jc(a,ic,!1))}function jc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function gc(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function cc(a,b){b||(b=kc);gc(a,b,void 0);jc(a,b,void 0)} -var kc=[],fc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],ic=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var ec=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],dc=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; -function lc(a,b){x.call(this,"CPU",a,lc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(lc);var mc=["power","reset"];h=lc.prototype; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=qc(a)&&(a.Qa=a.Ra=-1,pc(a),G(a),c=!0);c&&a.T(qc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&tc(a.l)}mb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;sc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+uc(a))} -function lb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function uc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} -h.kd=function(){if(this.j.U){this.vb>=this.gb&&sc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=uc(this,!0);this.Ta+=b;this.aa+=b;nb(this,b);lb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); -this.l&&this.l.stop(ra(),qc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,rc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; -function kb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{rc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,qc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){uc(a);mb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),qc(a));b=!0}a.j.complete=void 0;return b} -function vc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;lc.call(this,a,6666667);this.decode=1120==this.Za?wc.bind(this):xc.bind(this);yc(this);this.sa=0;this.N=null;this.j.complete=!1}z(vc,lc);h=vc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);yc(this);oc(this);this.j.error=!1;this.parent.reset.call(this)}; -function yc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;jb(a)}function jb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function zc(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];rc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Cc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Dc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ec(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=sb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Vb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Gc(a,a.Ia);Gc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Hc(a){var b=Ic(a),c=Ic(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Vb(a,c);a.u&=-17} -function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Jc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Ic(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Gc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Bc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Jc(this,a,2));this.sa--;return a}; -h.Xa=function(a,b){this.Ba?(this.sa++,Kc(this,Jc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Jc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Lc(this,a,b,c)};h.hc=function(a,b,c){return Jc(this,Lc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Jc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Jc(this,a,4),b)}; -function Mc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Lc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Nc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Lc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Jc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} -function Oc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Pc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Qc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Lc(a,b,c,8)}function Rc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Sc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Kc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Tc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Kc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Uc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Bc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ac(this))}while(0>1|b<<16;Ec(this,a);return a&65535}function $c(a,b){a=b&2048|b>>1|b<<8;Ec(this,a<<8);return a&255}function ad(a,b){a=b&~a;S(this,a);return a}function bd(a,b){a=b&~a;S(this,a<<8);return a}function cd(a,b){a|=b;S(this,a);return a}function dd(a,b){a|=b;S(this,a<<8);return a}function ed(a,b){a=~b|65536;Cc(this,a);return a&65535}function fd(a,b){a=~b|256;Cc(this,a<<8);return a&255} -function gd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function hd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function id(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function jd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function kd(a,b){a=-b;Cc(this,a,a&b&32768);return a&65535}function ld(a,b){a=-b;Cc(this,a<<8,(a&b&128)<<8);return a&255} -function md(a,b){a=b<<1|this.m>>16&1;Ec(this,a);return a&65535}function nd(a,b){a=b<<1|this.m>>16&1;Ec(this,a<<8);return a&255}function od(a,b){a=(this.m&65536|b)>>1|b<<16;Ec(this,a);return a&65535}function pd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ec(this,a<<8);return a&255}function qd(a,b){var c=b-a;Fc(this,c,a,b);return c&65535}function rd(a,b){var c=b-a;Fc(this,c<<8,a<<8,b<<8);return c&255}function sd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function td(a,b){a^=b;S(this,a);return a&65535}function ud(a){U(this,a,Pc(this,a),Vc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function vd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function wd(a){var b=Sc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function xd(a){V(this,a,!R(this))}function yd(a){V(this,a,R(this))} -function zd(a){U(this,a,Pc(this,a),ad);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ad(a){T(this,a,Oc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){U(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Oc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Dd(a){S(this,Pc(this,a)&Sc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ed(a){S(this,(Oc(this,a)&Rc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){V(this,a,this.i&65535?0:4)}function Gd(a){V(this,a,!this.za()==!(this.f&32768))}function Hd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Id(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Jd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Kd(a){V(this,a,R(this)||(this.i&65535?0:4))}function Ld(a){V(this,a,!this.za()!=!(this.f&32768))}function Md(a){V(this,a,this.za())}function Nd(a){V(this,a,!!(this.i&65535))}function Od(a){V(this,a,!this.za())}function Pd(){K(this,12,1);this.a-=5}function Qd(a){V(this,a,!0)}function Rd(a){V(this,a,!(this.f&32768))}function Sd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Td(a){var b=Pc(this,a);a=Sc(this,a);Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Ud(a){var b=Oc(this,a)<<8;a=Rc(this,a)<<8;Fc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Vd(a){var b=Sc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Wd(){K(this,24,2);this.a-=25} -function Xd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Yd(){K(this,16,4);this.a-=25}var Zd=[0,7,7,10,7,11,9,13];function $d(a){this.G=this.a;P(this,Qc(this,a));this.a=this.G-Zd[this.c]}var ae=[0,14,14,17,14,18,16,20];function be(a){this.G=this.a;var b=Qc(this,a);a=a>>6&7;Gc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-ae[this.c]}var ce=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function de(a){var b=Pc(this,a);this.G=this.a;S(this,Uc(this,a,b));this.a=this.G-ce[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ee(a){var b=Oc(this,a);S(this,Tc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var fe=[7,13,13,17,14,18,17,21]; -function ge(a){var b=Sc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function me(a){U(this,a,Pc(this,a),qd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function ne(a){U(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)}function oe(){K(this,28,5);this.a-=5}function pe(){this.u&4||this.l&&this.l.da();this.u|=4;Bc(this,-2);this.a-=3}function qe(a){U(this,a,Pc(this,a),td);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function wc(a){re[a>>12].call(this,a)}function se(a){te[a>>6&3].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a&15].call(this,a)} -function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a>>6&3].call(this,a)}function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)} -var re=[function(a){Ie[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,Y,function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ie=[function(a){Ke[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,Y,Y,Y],te=[function(a){Cc(this,Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ed);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,gd);this.a-=this.c?9:3+(7==this.b?2:0)}],ve=[function(a){U(this,a,0, -kd);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Vc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Cc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Ke=[function(a){Le[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,Y,ye,Ae,ne,ne,ne,ne],Le=[Xd,pe,je,Pd,Yd,ie,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],ze=[he,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Be=[he,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Je=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,Y,Y,Y],De=[function(a){Cc(this, -Tc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],Fe=[function(a){T(this,a,0,ld);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Rc(this,a);Cc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],He=[function(a){T(this,a,0,pd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}];function xc(a){Me[a>>12].call(this,a)} -var Me=[function(a){Ne[a>>8&15].call(this,a)},de,Td,Dd,zd,Bd,ud,function(a){Oe[a>>8&15].call(this,a)},function(a){Pe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,me,Y],Ne=[function(a){Qe[a>>4&15].call(this,a)},Qd,Nd,Fd,Gd,Ld,Hd,Jd,be,be,se,ue,we,function(a){Re[a>>6&3].call(this,a)},Y,Y],Re=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Mc(this,a,0);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G= -this.a;Nc(this,a,0,b);S(this,b);this.a=this.G-fe[this.c]},function(a){S(this,Uc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Qe=[function(a){Se[a&15].call(this,a)},Y,Y,Y,$d,$d,$d,$d,ke,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ye,Ae,ne,ne,ne,ne],Se=[Xd,pe,je,Pd,Yd,ie,function(){Hc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Oe=[ge,ge,Vd,Vd,vd,vd,wd,wd,qe,qe,Y,Y,Y,Y,le,le],Pe=[Od,Md,Id,Kd,Rd,Sd,xd,yd,Wd,oe,Ce,Ee,Ge,function(a){Te[a>>6& -3].call(this,a)},Y,Y],Te=[Y,function(a){a=Mc(this,a,65536);Gc(this,a);S(this,a);this.a-=11},function(a){var b=Ic(this);this.G=this.a;Nc(this,a,65536,b);S(this,b);this.a=this.G-fe[this.c]},Y]; -function Ue(a){x.call(this,"ROM",a,Ue);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);Ve(c)})}}z(Ue);Ue.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Ve(this)}; -Ue.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ue.prototype.ka=function(){return!0}; -function Ve(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,bc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):zc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.ea=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.ea)});cb(b,this,af);F(this)}; -h.Kb=function(){if(!this.v){var a=nc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ka=function(a){return a?this.save():!0};h.reset=function(){bf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return bf(this)};function bf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1]=b;this.ua=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,jc,!1),(a.m=c.m)&&kc(a,jc,!1))}function kc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function dc(a,b){b||(b=lc);ic(a,b,void 0);kc(a,b,void 0)} +var lc=[],gc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],jc=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var fc=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],ec=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; +function mc(a,b){x.call(this,"CPU",a,mc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(mc);var nc=["power","reset"];h=mc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=rc(a)&&(a.Qa=a.Ra=-1,qc(a),G(a),c=!0);c&&a.T(rc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&uc(a.l)}nb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;tc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+vc(a))} +function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function vc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} +h.kd=function(){if(this.j.U){this.vb>=this.gb&&tc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=vc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); +this.l&&this.l.stop(ra(),rc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,sc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; +function lb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{sc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,rc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){vc(a);nb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),rc(a));b=!0}a.j.complete=void 0;return b} +function wc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;mc.call(this,a,6666667);this.decode=1120==this.Za?xc.bind(this):yc.bind(this);zc(this);this.sa=0;this.N=null;this.j.complete=!1}z(wc,mc);h=wc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);zc(this);pc(this);this.j.error=!1;this.parent.reset.call(this)}; +function zc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Cb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Cb(a.h,16))}function Ac(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];sc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Dc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Fc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=tb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Wb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Hc(a,a.Ia);Hc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Ic(a){var b=Jc(a),c=Jc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Wb(a,c);a.u&=-17} +function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Kc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Jc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Hc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Kc(this,a,2));this.sa--;return a}; +h.Xa=function(a,b){this.Ba?(this.sa++,Lc(this,Kc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Kc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Mc(this,a,b,c)};h.hc=function(a,b,c){return Kc(this,Mc(this,a,b,c),c)};h.Tb=function(a){return Lb(this.h,a)};h.gd=function(a){return Lb(this.h,Kc(this,a,2))};h.$b=function(a,b){Mb(this.h,a,b&65535)};h.Zd=function(a,b){Mb(this.h,Kc(this,a,4),b)}; +function Nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Mc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Oc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Mc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Kc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} +function Pc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Mc(a,b,c,8)}function Sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Lc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Lc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Cc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Bc(this))}while(0>1|b<<16;Fc(this,a);return a&65535}function ad(a,b){a=b&2048|b>>1|b<<8;Fc(this,a<<8);return a&255}function bd(a,b){a=b&~a;S(this,a);return a}function cd(a,b){a=b&~a;S(this,a<<8);return a}function dd(a,b){a|=b;S(this,a);return a}function ed(a,b){a|=b;S(this,a<<8);return a}function fd(a,b){a=~b|65536;Dc(this,a);return a&65535}function gd(a,b){a=~b|256;Dc(this,a<<8);return a&255} +function hd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function id(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function jd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function kd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function ld(a,b){a=-b;Dc(this,a,a&b&32768);return a&65535}function md(a,b){a=-b;Dc(this,a<<8,(a&b&128)<<8);return a&255} +function nd(a,b){a=b<<1|this.m>>16&1;Fc(this,a);return a&65535}function od(a,b){a=b<<1|this.m>>16&1;Fc(this,a<<8);return a&255}function pd(a,b){a=(this.m&65536|b)>>1|b<<16;Fc(this,a);return a&65535}function qd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Fc(this,a<<8);return a&255}function rd(a,b){var c=b-a;Gc(this,c,a,b);return c&65535}function sd(a,b){var c=b-a;Gc(this,c<<8,a<<8,b<<8);return c&255}function td(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function ud(a,b){a^=b;S(this,a);return a&65535}function vd(a){U(this,a,Qc(this,a),Wc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function wd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function xd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function yd(a){V(this,a,!R(this))}function zd(a){V(this,a,R(this))} +function Ad(a){U(this,a,Qc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){U(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){T(this,a,Pc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Ed(a){S(this,Qc(this,a)&Tc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){S(this,(Pc(this,a)&Sc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){V(this,a,this.i&65535?0:4)}function Hd(a){V(this,a,!this.za()==!(this.f&32768))}function Id(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Kd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,R(this)||(this.i&65535?0:4))}function Md(a){V(this,a,!this.za()!=!(this.f&32768))}function Nd(a){V(this,a,this.za())}function Od(a){V(this,a,!!(this.i&65535))}function Pd(a){V(this,a,!this.za())}function Qd(){K(this,12,1);this.a-=5}function Rd(a){V(this,a,!0)}function Sd(a){V(this,a,!(this.f&32768))}function Td(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ud(a){var b=Qc(this,a);a=Tc(this,a);Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Vd(a){var b=Pc(this,a)<<8;a=Sc(this,a)<<8;Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Wd(a){var b=Tc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Xd(){K(this,24,2);this.a-=25} +function Yd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Zd(){K(this,16,4);this.a-=25}var $d=[0,7,7,10,7,11,9,13];function ae(a){this.G=this.a;P(this,Rc(this,a));this.a=this.G-$d[this.c]}var be=[0,14,14,17,14,18,16,20];function ce(a){this.G=this.a;var b=Rc(this,a);a=a>>6&7;Hc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-be[this.c]}var de=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function ee(a){var b=Qc(this,a);this.G=this.a;S(this,Vc(this,a,b));this.a=this.G-de[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function fe(a){var b=Pc(this,a);S(this,Uc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ge=[7,13,13,17,14,18,17,21]; +function he(a){var b=Tc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ne(a){U(this,a,Qc(this,a),rd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function oe(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)}function pe(){K(this,28,5);this.a-=5}function qe(){this.u&4||this.l&&this.l.da();this.u|=4;Cc(this,-2);this.a-=3}function re(a){U(this,a,Qc(this,a),ud);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function xc(a){se[a>>12].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a&15].call(this,a)} +function Be(a){Ce[a&15].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)} +var se=[function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,Y,function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Je=[function(a){Le[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,Y,Y,Y],ue=[function(a){Dc(this,Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0, +ld);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Dc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ye=[function(a){U(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Le=[function(a){Me[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,Y,ze,Be,oe,oe,oe,oe],Me=[Yd,qe,ke,Qd,Zd,je,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[ie,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ce=[ie,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ke=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,Y,Y,Y],Ee=[function(a){Dc(this, +Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],Ge=[function(a){T(this,a,0,md);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Dc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Ie=[function(a){T(this,a,0,qd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}];function yc(a){Ne[a>>12].call(this,a)} +var Ne=[function(a){Oe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,function(a){Pe[a>>8&15].call(this,a)},function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Oe=[function(a){Re[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,function(a){Se[a>>6&3].call(this,a)},Y,Y],Se=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Nc(this,a,0);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.G= +this.a;Oc(this,a,0,b);S(this,b);this.a=this.G-ge[this.c]},function(a){S(this,Vc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){Te[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ze,Be,oe,oe,oe,oe],Te=[Yd,qe,ke,Qd,Zd,je,function(){Ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Pe=[he,he,Wd,Wd,wd,wd,xd,xd,re,re,Y,Y,Y,Y,me,me],Qe=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,function(a){Ue[a>>6& +3].call(this,a)},Y,Y],Ue=[Y,function(a){a=Nc(this,a,65536);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.G=this.a;Oc(this,a,65536,b);S(this,b);this.a=this.G-ge[this.c]},Y]; +function Ve(a){x.call(this,"ROM",a,Ve);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);We(c)})}}z(Ve);Ve.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;We(this)}; +Ve.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ve.prototype.ka=function(){return!0}; +function We(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Fb(a.h,b,a.c,cc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):Ac(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.ea=Ub(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.ea)});cb(b,this,bf);F(this)}; +h.Kb=function(){if(!this.v){var a=oc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ka=function(a){return a?this.save():!0};h.reset=function(){cf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return cf(this)};function cf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Rb(this.a,this.P,1E3/Math.round(this.I/10))}};var cf={},af=(cf[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],cf[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],cf[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],cf[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],cf);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&ff(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;ff(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=gf(a);var e=this;if((this.c=nc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&qf(a,b,c,d,e.K,e.ga,e.fa)); -a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));nf(a)})}function kf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){xf(a,b,c,d)})} -function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&gf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=hf(a);var e=this;if((this.c=oc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Ub(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&rf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));of(a)})}function lf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){yf(a,b,c,d)})} +function yf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function Af(a,b){var c=a.Z*a.S,d=b/c|0;return dg)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=zf(this,a++);)Bf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Bf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Cf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Df(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=zf(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Df(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Ef(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Af(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Cf(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ef(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Ef(this,a[0])};function Hf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Jf(a,e,b,c,!1,d)}else If(a,e)} -function Jf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,If(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,wf(new sf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&tc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Cf(this,a.wb)}; -function Gf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Df(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ff(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Ff(this,a[0])};function If(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Kf(a,e,b,c,!1,d)}else Jf(a,e)} +function Kf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Jf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,xf(new tf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&uc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Df(this,a.wb)}; +function Hf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var Kf={},Ff=(Kf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Kf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Kf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Kf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Kf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Kf); -function Lf(a,b,c){x.call(this,"Computer",a,Lf);this.j.O=!1;Mf(this,b);this.A=nc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Nf;this.v=null;this.m=this.I=!1;this.P=nc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Of(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bNf){if(Pf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Pf(this.i)&&(Uf(this,d),a=2,Vf(this.i));this.i.set("timestamp",sa());Wf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Tf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Pf(d,g):("error"== -f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Vf(d),Pf(d)?(c=Tf(d),e=!0):c=!1))}e&&Sf(this,c?d:null)}else 2==a&&d.clear()}else Sf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Xf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Uf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; -function Uf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function $f(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bOf){if(Qf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Qf(this.i)&&(Vf(this,d),a=2,Wf(this.i));this.i.set("timestamp",sa());Xf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Uf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Qf(d,g):("error"== +f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Wf(d),Qf(d)?(c=Uf(d),e=!0):c=!1))}e&&Tf(this,c?d:null)}else 2==a&&d.clear()}else Tf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Yf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Vf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +function Vf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function ag(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);gg(a,b,c)}})}else c(a,null)} -function hg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--dg||Ja(!0));l=!1}var g,k,l=!0;dg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?eg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--dg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--dg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?eg(b,a,d,!0,e,n):fg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return hg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map +h.$=function(a,b,c){var d=this;switch(b){case "power":return this.o[b]=c,c.onclick=function(){d.l||(d.j.O?ag(d,!1,!0):Sf(d,d.Wa))},!0;case "reset":return this.o[b]=c,c.onclick=function(){if(d.j.O&&!d.l)if(d.b&&!d.s){var a=ua("Click OK to save changes to this PDPjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");ag(d,a,!0);!a&&d.C?window&&window.location.reload():(a||(d.Hb=!0),d.Wa(Of),d.Hb=!1)}else d.reset(),d.a&&d.a.Ua()},!0;case "save":if(ma(v(),"pcjs.org"))c.parentNode.removeChild(c); +else return this.o[b]=c,c.onclick=function(){var a=Pf(d,!0);if(a){var b=!!(d.b&&!d.s||d.C),c=ag(d,b);b?bg(d,a,c):d.F("Resume disabled, machine state not saved")}},!0}return!1}; +function Pf(a,b){var c=a.c;c||((c=za("user"),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=cg(a,c))||a.F("The user ID is invalid.")):b&&a.F("Browser local storage is not available"));return c} +function cg(a,b){a.c=null;b=r(v()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Aa("user",b.data),a.c=b.data)}catch(d){u(d.message+" ("+c+")")}return a.c}function Rf(a){var b=null;a.c&&(b=v()+"/api/v1/user?req=load&user="+a.c+"&state="+dg(a,"1.30.3"));return b} +function bg(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=dg(a,"1.30.3");d.data=c;b=r(v()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);hg(a,b,c)}})}else c(a,null)} +function ig(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--eg||Ja(!0));l=!1}var g,k,l=!0;eg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?fg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--eg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--eg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?fg(b,a,d,!0,e,n):gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return ig(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map From 93c6ce7236d8a4fc8bbba365a781292a6db44037 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Nov 2016 18:55:43 -0700 Subject: [PATCH 21/30] README tweak --- devices/pdp11/machine/1170/panel/debugger/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index e4b0bf9a5..e4a2e7faf 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -299,12 +299,13 @@ RAM. As the **Maintenance Service Guide** goes on to say: - The program should halt when all of memory is cleared. If it doesn't halt, examine the CPU error, Memory system error - and HI/LO error address registers to determine the cause. Trap catchers can be used by depositing 200 in KIPAR 0 (17772340) - instead of zero, and setting up vector locations with their address + 2 and the Vector + 2 with a 0 (halt). + The program should halt when all of memory is cleared. If it doesn't halt, examine the CPU error, + Memory system error and HI/LO error address registers to determine the cause. Trap catchers can be + used by depositing 200 in KIPAR 0 (17772340) instead of zero, and setting up vector locations with + their address + 2 and the Vector + 2 with a 0 (halt). - Note: When loading the program you must be in console physical [i.e., the ADDRESS select switch must be set to "CONS PHY", - which is the default setting of the PDPjs Front Panel]. + Note: When loading the program you must be in console physical [i.e., the ADDRESS select switch + must be set to "CONS PHY", which is the default setting of the PDPjs Front Panel]. Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will slow execution to a crawl. From a7a44a828801ba27e7b23dc522984057a053201e Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 4 Nov 2016 13:35:20 -0700 Subject: [PATCH 22/30] Cleaned up the PDP-11 updateDisplay(s) code, and removed the update hack inside the WAIT instruction; display updates now occur in sync with the machine's 60Hz clock --- modules/pdp11/lib/computer.js | 42 +-- modules/pdp11/lib/cpu.js | 24 +- modules/pdp11/lib/cpuops.js | 12 +- modules/pdp11/lib/debugger.js | 38 +-- modules/pdp11/lib/defines.js | 2 +- modules/pdp11/lib/device.js | 4 +- modules/pdp11/lib/panel.js | 63 ++-- versions/pdpjs/1.30.3/pdp11-dbg.js | 492 ++++++++++++++--------------- versions/pdpjs/1.30.3/pdp11.js | 268 ++++++++-------- 9 files changed, 485 insertions(+), 460 deletions(-) diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index 4fe1afd01..3d983268f 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -744,7 +744,7 @@ ComputerPDP11.prototype.donePowerOn = function(aParms) * TODO: Do we not care about the return value here? (ie, is checking fRestoreError sufficient)? */ this.powerRestore(this.cpu, stateComputer, fRepower, fRestore); - this.updateStatus(); + this.updateDisplays(); this.cpu.autoStart(); } @@ -958,7 +958,7 @@ ComputerPDP11.prototype.powerOff = function(fSave, fShutdown) * * Ditto for the CPU, in part because if the Front Panel resets before the CPU, it will end up * snapping/displaying the PC as of the last instruction executed, before the CPU resets the PC, - * causing the Front Panel to display a stale address when we call updateStatus() at the end. + * causing the Front Panel to display a stale address when we call updateDisplays() at the end. * * @this {ComputerPDP11} */ @@ -980,7 +980,7 @@ ComputerPDP11.prototype.reset = function() component.reset(); } } - this.updateStatus(true); + this.updateDisplays(-1); }; /** @@ -1005,7 +1005,7 @@ ComputerPDP11.prototype.start = function(ms, nCycles) component.start(ms, nCycles); } } - this.updateStatus(true); + this.updateDisplays(-1); }; /** @@ -1030,19 +1030,20 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) component.stop(ms, nCycles); } } - this.updateStatus(true); + this.updateDisplays(-1); }; /** - * updateStatus(fForce) + * updateDisplays(nUpdate) * - * TODO: Notify all (other) components with an updateStatus() method that the computer's state has changed. + * TODO: Notify all components with an updateDisplay() method that the computer's state has changed (not + * just the hard-coded ones below). * - * If any DOM controls were bound to the CPU, then we need to call its updateStatus() handler; if there are no - * such bindings, then cpu.updateStatus() does nothing. + * If any DOM controls were bound to the CPU, then we need to call its updateDisplay() handler; if there are no + * such bindings, then cpu.updateDisplay() does nothing. * - * Similarly, if there's a Panel, then we need to call its updateStatus() handler, in case it created its own canvas - * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateStatus() also does nothing. + * Similarly, if there's a Panel, then we need to call its updateDisplay() handler, in case it created its own canvas + * and implemented its own register display (eg, dumpRegisters()); if not, then panel.updateDisplay() also does nothing. * * In practice, there will *either* be a Panel with a custom canvas *or* a set of DOM controls bound to the CPU *or* * neither. In theory, there could be BOTH, but that would be unusual. @@ -1054,21 +1055,20 @@ ComputerPDP11.prototype.stop = function(ms, nCycles) * Panel. * * @this {ComputerPDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) - */ -ComputerPDP11.prototype.updateStatus = function(fForce) + * @param {number} [nUpdate] (1 for periodic, -1 for forced, 0 or undefined otherwise) + */ +ComputerPDP11.prototype.updateDisplays = function(nUpdate) { /* - * fForce is generally set to true whenever the CPU is transitioning to/from a running state, in which case - * cpu.updateStatus() will definitely want to hide/show register contents; however, at other times, when the + * nUpdate is generally set to -1 whenever the CPU is transitioning to/from a running state, in which case + * cpu.updateDisplay() will definitely want to hide/show register contents; however, at other times, when the * CPU is running, constantly updating the DOM controls too frequently can adversely impact overall performance. * - * So fForce serves as a hint to help cpu.updateStatus() make a more informed decision. panel.updateStatus() - * currently doesn't care, on the theory that canvas updates should be significantly faster than DOM updates, - * but we still pass fForce on. + * nUpdate will also be -1 whenever the Debugger has modified the state of the machine, implying that we're + * not sure what, if anything, actually changed. */ - if (this.cpu) this.cpu.updateStatus(fForce); - if (this.panel) this.panel.updateStatus(fForce); + if (this.cpu) this.cpu.updateDisplay(nUpdate); + if (this.panel) this.panel.updateDisplay(nUpdate); }; /** diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index e5e1dffc8..aa09ba5ab 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -505,26 +505,28 @@ CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) }; /** - * updateComputer(fForce) + * updateDisplays(nUpdate) + * + * Simpler wrapper around the Computer's updateDisplays() method. * * @this {CPUPDP11} - * @param {boolean} [fForce] + * @param {number} [nUpdate] (1 for periodic, -1 for forced, 0 or undefined otherwise) */ -CPUPDP11.prototype.updateComputer = function(fForce) +CPUPDP11.prototype.updateDisplays = function(nUpdate) { - if (this.cmp) this.cmp.updateStatus(fForce); + if (this.cmp) this.cmp.updateDisplays(nUpdate); }; /** - * updateStatus(fForce) + * updateDisplay(nUpdate) * - * Some of the CPU bindings provide feedback and therefore need to be updated periodically. This is called - * via the Computer's updateStatus() handler several times per second; see YIELDS_PER_STATUS. + * Some of the CPU bindings provide feedback and therefore need to be updated periodically. + * However, this should be called via the Computer's updateDisplays() interface, not directly. * * @this {CPUPDP11} - * @param {boolean} [fForce] + * @param {number} [nUpdate] (1 for periodic, -1 for forced, 0 or undefined otherwise) */ -CPUPDP11.prototype.updateStatus = function(fForce) +CPUPDP11.prototype.updateDisplay = function(nUpdate) { var controlSpeed = this.bindings["speed"]; if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent(); @@ -1101,7 +1103,7 @@ CPUPDP11.prototype.runCPU = function() if (this.nCyclesNextYield <= 0) { this.nCyclesNextYield += this.nCyclesPerYield; if (++this.nYieldsSinceStatusUpdate >= CPUPDP11.YIELDS_PER_STATUS) { - this.updateComputer(); + this.updateDisplays(); this.nYieldsSinceStatusUpdate = 0; } break; @@ -1216,7 +1218,7 @@ CPUPDP11.prototype.yieldCPU = function() * odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not, * so I've added this call to try to keep things looking synchronized. */ - this.updateComputer(); + this.updateDisplays(); }; if (NODE) module.exports = CPUPDP11; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 960be5b01..53e732724 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -1754,13 +1754,13 @@ PDP11.opWAIT = function(opCode) * NOTE: It's almost always a bad idea to add more checks to the inner stepCPU() loop, because every additional * check can have a measurable (negative) impact on performance. Which is why it's important to use opFlags bits * whenever possible, since we can test for multiple (up to 32) exceptional conditions with a single check. + * + * Finally, we used to update the machine's displays whenever transitioning to the WAIT state. However, + * it makes more sense to decouple display updates from specific instructions and rely on timers instead; + * the PDP-11 KW11 (60Hz Line Clock) timer is the perfect candidate. See device.js. + * + * if (!(this.opFlags & PDP11.OPFLAG.WAIT) && this.cmp) this.cmp.updateDisplays(); */ - if (!(this.opFlags & PDP11.OPFLAG.WAIT)) { - /* - * Since here we're actually transitioning to WAIT, let's update the Panel's LEDs (well, OK, among other things). - */ - if (this.cmp) this.cmp.updateStatus(); - } this.opFlags |= PDP11.OPFLAG.WAIT; this.advancePC(-2); this.nStepCycles -= 3; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 0def5db5c..c6447a1af 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -464,8 +464,8 @@ if (DEBUGGER) { DebuggerPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) { this.bus = bus; - this.cpu = cpu; this.cmp = cmp; + this.cpu = cpu; this.panel = cmp.panel; /* @@ -677,7 +677,7 @@ if (DEBUGGER) { this.cpu.setByteDirect(addr, b); } if (inc) this.incAddr(dbgAddr, inc); - this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target + this.cmp.updateDisplays(-1); } }; @@ -699,7 +699,7 @@ if (DEBUGGER) { this.cpu.setWordDirect(addr, w); } if (inc) this.incAddr(dbgAddr, inc); - this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target + this.cmp.updateDisplays(-1); } }; @@ -1313,15 +1313,15 @@ if (DEBUGGER) { }; /** - * stepCPU(nCycles, fRegs, fUpdateStatus) + * stepCPU(nCycles, fRegs, fUpdateDisplays) * * @this {DebuggerPDP11} * @param {number} nCycles (0 for one instruction without checking breakpoints) * @param {boolean} [fRegs] is true to display registers after step (default is false) - * @param {boolean} [fUpdateStatus] is false to disable Computer status updates (default is true) + * @param {boolean} [fUpdateDisplays] is false to disable Computer display updates (default is true) * @return {boolean} */ - DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateStatus) + DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateDisplays) { if (!this.checkCPU()) return false; @@ -1363,15 +1363,11 @@ if (DEBUGGER) { /* * Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the Computer's update code, - * and then update our own state. Normally, the only time fUpdateStatus will be false is when doTrace() - * is calling us in a loop, in which case it will perform its own updateStatus() when it's done. + * and then update our own state. Normally, the only time fUpdateDisplays will be false is when doTrace() + * is calling us in a loop, in which case it will perform its own updateDisplays() when it's done. */ - if (fUpdateStatus !== false) { - /* - * Make an effort to keep any Front Panel in sync with us. - */ - if (this.panel && this.panel.stop) this.panel.stop(); - this.cmp.updateStatus(); + if (fUpdateDisplays !== false) { + this.cmp.updateDisplays(-1); } this.updateStatus(fRegs || false); @@ -2729,7 +2725,7 @@ if (DEBUGGER) { if (asArgs[2] === undefined) { this.println("begin assemble at " + this.toStrAddr(dbgAddr)); this.fAssemble = true; - this.cmp.updateStatus(); + this.cmp.updateDisplays(); return; } @@ -3438,7 +3434,7 @@ if (DEBUGGER) { this.println("unknown register: " + sReg); return; } - this.cmp.updateStatus(); + this.cmp.updateDisplays(); this.println("updated registers:"); } @@ -3682,13 +3678,13 @@ if (DEBUGGER) { }, function onCountStepComplete() { /* - * We explicitly called stepCPU() with fUpdateStatus === false, because repeatedly - * calling updateStatus() can be very slow, especially if a Control Panel is present - * with displayLiveRegs enabled, so once the repeat count has been exhausted, we must - * perform a final updateStatus(). + * We explicitly called stepCPU() with fUpdateDisplays set to false, because repeatedly + * calling updateDisplays() can be very slow, especially if a Control Panel is present with + * displayLiveRegs enabled, so once the repeat count has been exhausted, we must perform + * a final updateDisplays(). */ if (dbg.panel && dbg.panel.stop) dbg.panel.stop(); - dbg.cmp.updateStatus(); + dbg.cmp.updateDisplays(); dbg.setBusy(false); } ); diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index ec6e1895e..5822957da 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -569,7 +569,7 @@ var PDP11 = { DATA: 0x00FF // Transmitted Data (W/O) TODO: Determine why pdp11.js effectively defined this as 0x7F } }, - KW11: { // KW11-L Line Time Clock + KW11: { // KW11-L Line Time Clock (60Hz; well, OK, or 50Hz, if you're in the UK, I suppose...) PRI: 6, VEC: 0o100, DELAY: 0, diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 6286eedd6..a54bed8e1 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -60,7 +60,7 @@ function DevicePDP11(parmsDevice) { Component.call(this, "Device", parmsDevice, DevicePDP11, MessagesPDP11.DEVICE); - this.kw11 = { // LW11 registers + this.kw11 = { // KW11 registers csr: 0, timer: -1 // initBus() will initialize this timer ID }; @@ -115,6 +115,7 @@ DevicePDP11.M9312 = [ DevicePDP11.prototype.initBus = function(cmp, bus, cpu, dbg) { this.bus = bus; + this.cmp = cmp; this.cpu = cpu; this.dbg = dbg; @@ -153,6 +154,7 @@ DevicePDP11.prototype.kw11_interrupt = function() this.cpu.setTrigger(this.kw11.trigger); this.cpu.setTimer(this.kw11.timer, 1000/60); } + if (this.cmp) this.cmp.updateDisplays(1); }; /** diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index edf37292a..fafecc456 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -60,6 +60,8 @@ function PanelPDP11(parmsPanel) * TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both). */ this.cLiveRegs = 0; + this.nPeriodicCount = 0; + this.nPeriodicLimit = 60; this.fDisplayLiveRegs = true; /* @@ -672,14 +674,14 @@ PanelPDP11.prototype.processContinue = function(value, index) this.stop(); /* - * Going through the normal channels (ie, the Computer's updateStatus() interface) ensures that ALL - * updateStatus() handlers will be called, including ours. + * Going through the normal channels (ie, the Computer's updateDisplays() interface) ensures that + * ALL updateDisplay() handlers will be called, including ours. * - * NOTE: If we used the Debugger's stepCPU() function, then that includes a call to updateStatus(); + * NOTE: If we used the Debugger's stepCPU() function, then that includes a call to updateDisplay(); * unfortunately, it will have happened BEFORE we called stop() to update the 'ADDRESS' register, so * we still need to call it again. */ - if (this.cmp) this.cmp.updateStatus(); + if (this.cmp) this.cmp.updateDisplays(); } else { this.cpu.startCPU(); @@ -803,13 +805,26 @@ PanelPDP11.prototype.setAddr = function(value) /** * advanceAddr() * + * This should also take care of the following Front Panel behaviors when the accessing the general-purpose + * registers: + * + * 1) ADDRESS display incremented by 1 (instead of 2) + * 2) The STEP after the last register is 177700, such that the addresses are looped + * + * A third behavior is NOT emulated: preventing the ADDRESS from stepping to the first General Register (177700) + * from 177676. + * * @this {PanelPDP11} * @return {number} */ PanelPDP11.prototype.advanceAddr = function() { - var inc = this.getSwitch(PanelPDP11.SWITCH.STEP)? 2 : -2; - this.regAddr = (this.regAddr + inc) & this.bus.nBusMask; + var nRegs = this.cpu.model < PDP11.MODEL_1145? 8 : 16; + var fGenRegs = (this.regAddr >= PDP11.UNIBUS.R0SET0 /*177700*/ && this.regAddr < PDP11.UNIBUS.R0SET0 + nRegs); + var inc = fGenRegs? 1 : 2; + var mask = fGenRegs? 0xf : this.bus.nBusMask; + if (!this.getSwitch(PanelPDP11.SWITCH.STEP)) inc = -inc; + this.regAddr = (this.regAddr & ~mask) | ((this.regAddr + inc) & mask); this.setLEDArray("A", this.regAddr, 22); return this.regAddr; }; @@ -906,26 +921,36 @@ PanelPDP11.prototype.stop = function(ms, nCycles) }; /** - * updateStatus(fForce) + * updateDisplay(nUpdate) * - * Called by the Computer component at appropriate intervals to update any register displays, LEDs, etc. + * Called by the Computer component at intervals to update registers, LEDs, etc. * * @this {PanelPDP11} - * @param {boolean} [fForce] (true will display registers even if the CPU is running and "live" registers are not enabled) + * @param {number} [nUpdate] (< 0 for forced, > 0 for periodic, undefined otherwise) */ -PanelPDP11.prototype.updateStatus = function(fForce) +PanelPDP11.prototype.updateDisplay = function(nUpdate) { if (this.cLiveRegs) { - if (fForce || !this.cpu.isRunning() || this.fDisplayLiveRegs) { - for (var i = 0; i < this.cpu.regsGen.length; i++) { - this.displayValue('R'+i, this.cpu.regsGen[i]); + if (nUpdate < 0 || !this.cpu.isRunning() || this.fDisplayLiveRegs) { + /* + * We arbitrarily separate the display elements into two categories: cheap and expensive. + * + * LEDs are considered cheap, register displays are not. So we'll skip the latter if this + * is a periodic update AND our periodic update counter hasn't reached the periodic update limit. + */ + if (!(nUpdate > 0 && (this.nPeriodicCount += nUpdate) < this.nPeriodicLimit)) { + for (var i = 0; i < this.cpu.regsGen.length; i++) { + this.displayValue('R'+i, this.cpu.regsGen[i]); + } + var regPSW = this.cpu.getPSW(); + this.displayValue("PS", regPSW); + this.displayValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); + this.displayValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); + this.displayValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); + this.displayValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); + this.nPeriodicCount = 0; } - var regPSW = this.cpu.getPSW(); - this.displayValue("PS", regPSW); - this.displayValue("NF", (regPSW & PDP11.PSW.NF)? 1 : 0, 1); - this.displayValue("ZF", (regPSW & PDP11.PSW.ZF)? 1 : 0, 1); - this.displayValue("VF", (regPSW & PDP11.PSW.VF)? 1 : 0, 1); - this.displayValue("CF", (regPSW & PDP11.PSW.CF)? 1 : 0, 1); + this.setLEDArray("D", this.regData, 16); this.setLEDArray("A", this.regAddr, 22); /* diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 27b43d075..4c459ac95 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -40,54 +40,53 @@ function xa(a,b){return(a+" ").slice(0,b) function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ia:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.B.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.qc=b.comment;this.Sc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; -k.ta=function(a,b,c,d){if(this.A&&this.A.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; -function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.bd=function(a){a||this.b.B.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0c;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.C=[];this.Ic=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} -function mc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} -function nc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} -function oc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} -function rc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; -k.pa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; -k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; -function zc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Oc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +function yb(a){u.call(this,"Panel",a,yb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=zb;this.C={};this.g={START:[1,!0,!1,this.bd],STEP:[1,!1,!1,this.cd],ENABLE:[1,!1,!1,this.Yc],CONT:[1,!0,!1,this.Wc],DEP:[0,!0,!1,this.Xc],EXAM:[1,!0,!1,this.Zc],LOAD:[1,!0,!1,this.ad],TEST:[0,!0,!1,this.$c]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ga()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].gc(a&this.w,a);this.la--;return a}; +k.oa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].hc(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Zb(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; +k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].lc(c,b&65535,a);this.la--}; +function yc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.qb};k.je=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.pe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.ga};k.$d=function(){this.b.ga=0};k.od=function(){return this.b.Ac}; -k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return hc(this.b)};k.ne=function(a){Pc(this.b,a&-1809|hc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.pe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.fa};k.$d=function(){this.b.fa=0};k.od=function(){return this.b.Ac}; +k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return Oc(this.b)};k.ne=function(a){Pc(this.b,a&-1809|Oc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.ld, K.prototype.ee,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Pd, K.prototype.Ge,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, @@ -95,224 +94,225 @@ K.prototype.Ge,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= [null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Xc(this,Tc?Yc:Zc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&cd(a,bd,!1),(a.A=c.A)&&ad(a,bd,!1))}function ed(a,b){b?--a.A||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function ad(a,b,c){c&&a.A||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function cd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Xc(a,b){b||(b=fd);cd(a,b,void 0);ad(a,b,void 0)} -var fd=[],$c=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],bd=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Zc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Yc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; -function gd(a,b){u.call(this,"CPU",a,gd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.B.Z=!1;this.B.Yb=!1;this.B.tb=a.autoStart;this.B.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(gd);var hd=["power","reset"];k=gd.prototype; -k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=md(a)&&(a.yb=a.zb=-1,kd(a),a.ha(),c=!0);c&&a.j(md(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;od(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+pd(a))} -function qd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function pd(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Wd=function(){if(this.B.Z){this.vb>=this.mb&&od(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=qd(this,this.B.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=pd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.A&&this.A.$(void 0),this.Vb=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),md(this));vb(this, -e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,nd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;nd(this);this.B.Z=!0;this.B.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.rb(!0),this.A.start(this.R,md(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){pd(this);$b(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),md(this));b=!0}this.B.complete=a;return b}; -function rd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;gd.call(this,a,6666667);this.decode=1120==this.xb?sd.bind(this):td.bind(this);ud(this);this.L=0;this.N=null;this.B.complete=!1}z(rd,gd);k=rd.prototype;k.reset=function(){this.status("model "+this.xb);this.B.Z&&this.ha();ud(this);jd(this);this.B.error=!1;this.parent.reset.call(this)}; -function ud(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,rc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,rc(a.w,16))}function vd(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];nd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Bd(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Cd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} -function Dd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Ed(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=hc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Pc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Wd(this,this.wa);Wd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; -function Xd(a){var b=Yd(a),c=Yd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Pc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Zd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Ad(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ad(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=$d(this,Zd(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Zd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,ae(this,Zd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Zd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return be(this,a,b,c)};k.Qc=function(a,b,c){return Zd(this,be(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Zd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; -k.Ke=function(a,b){this.w.hb(Zd(this,a,4),b)};function ce(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=be(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function de(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=be(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Zd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} -function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?$d(a,a.ca(b,c,3)):a.u[c]&255}function fe(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function ge(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return be(a,b,c,8)}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?$d(a,a.ca(b,c,3)):a.u[c]&255}function ie(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),ae(a,e,d.call(a,c,$d(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function je(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ae(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function ke(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.B.complete=!0;var b=this.i&&le(this.i)?1:this.B.Yb?-1:0,c=a?this.B.Yb?0:1:-1;this.B.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&me(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(Ad(this,2),this.I&=-5),this.qa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(zd(this))}while(0>1|b<<16;Dd(this,a);return a&65535}function se(a,b){a=b&2048|b>>1|b<<8;Dd(this,a<<8);return a&255}function te(a,b){a=b&~a;R(this,a);return a}function ue(a,b){a=b&~a;R(this,a<<8);return a}function ve(a,b){a|=b;R(this,a);return a}function we(a,b){a|=b;R(this,a<<8);return a} -function xe(a,b){a=~b|65536;Bd(this,a);return a&65535}function ye(a,b){a=~b|256;Bd(this,a<<8);return a&255}function ze(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function Ae(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Be(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Ce(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} -function De(a,b){a=-b;Bd(this,a,a&b&32768);return a&65535}function Ee(a,b){a=-b;Bd(this,a<<8,(a&b&128)<<8);return a&255}function Fe(a,b){a=b<<1|this.T>>16&1;Dd(this,a);return a&65535}function Ge(a,b){a=b<<1|this.T>>16&1;Dd(this,a<<8);return a&255}function He(a,b){a=(this.T&65536|b)>>1|b<<16;Dd(this,a);return a&65535}function Ie(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Dd(this,a<<8);return a&255}function Je(a,b){var c=b-a;Ed(this,c,a,b);return c&65535} -function Ke(a,b){var c=b-a;Ed(this,c<<8,a<<8,b<<8);return c&255}function Le(a,b){this.I&128||(this.X=this.ba=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Me(a,b){a^=b;R(this,a);return a&65535}function Ne(a){T(this,a,fe(this,a),ne);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Oe(a){var b=ie(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} -function Pe(a){var b=ie(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Qe(a){U(this,a,!wd(this))}function Re(a){U(this,a,wd(this))} -function Se(a){T(this,a,fe(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){S(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){T(this,a,fe(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){S(this,a,ee(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function We(a){R(this,fe(this,a)&ie(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){R(this,(ee(this,a)&he(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ye(a){U(this,a,yd(this))}function Ze(a){U(this,a,!this.Ta()==!xd(this))}function $e(a){U(this,a,!yd(this)&&!this.Ta()==!xd(this))}function af(a){U(this,a,!wd(this)&&!yd(this))}function bf(a){U(this,a,yd(this)||!this.Ta()!=!xd(this))} -function cf(a){U(this,a,wd(this)||yd(this))}function df(a){U(this,a,!this.Ta()!=!xd(this))}function ef(a){U(this,a,this.Ta())}function ff(a){U(this,a,!yd(this))}function gf(a){U(this,a,!this.Ta())}function hf(){this.qa(12,1);this.b-=5}function jf(a){U(this,a,!0)}function kf(a){U(this,a,!xd(this))}function lf(a){U(this,a,xd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} -function mf(a){var b=fe(this,a);a=ie(this,a);Ed(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function nf(a){var b=ee(this,a)<<8;a=he(this,a)<<8;Ed(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function of(a){var b=ie(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function pf(){this.qa(24,2);this.b-=25} -function qf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?rf(this.i):this.ha();this.b-=7}function sf(){this.qa(16,4);this.b-=25}var tf=[0,7,7,10,7,11,9,13];function uf(a){this.J=this.b;O(this,ge(this,a));this.b=this.J-tf[this.g]}var vf=[0,14,14,17,14,18,16,20];function wf(a){this.J=this.b;var b=ge(this,a);a=a>>6&7;Wd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-vf[this.g]}var xf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function yf(a){var b=fe(this,a);this.J=this.b;R(this,ke(this,a,b));this.b=this.J-xf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function zf(a){var b=ee(this,a);R(this,je(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Af=[7,13,13,17,14,18,17,21]; -function Bf(a){var b=ie(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Hf(a){T(this,a,fe(this,a),Je);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function If(a){T(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)}function Jf(){this.qa(28,5);this.b-=5}function Kf(){this.I&4||this.A&&this.A.$();this.I|=4;Ad(this,-2);this.b-=3}function Lf(a){T(this,a,fe(this,a),Me);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=rf(b);b||this.qa(8,6)}function sd(a){Mf[a>>12].call(this,a)}function Nf(a){Of[a>>6&3].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)} -function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a&15].call(this,a)}function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)} -var Mf=[function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Ne,W,function(a){dg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Hf,W],cg=[function(a){eg[a>>4&15].call(this,a)},jf,ff,Ye,Ze,df,$e,bf,wf,wf,Nf,Pf,Rf,W,W,W],Of=[function(a){Bd(this,ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Qf=[function(a){T(this,a,0, -De);this.b-=this.g?11:6},function(a){T(this,a,wd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,wd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ie(this,a);Bd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Sf=[function(a){T(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}], -eg=[function(a){fg[a&15].call(this,a)},W,W,W,uf,uf,uf,uf,Ff,W,Tf,Vf,If,If,If,If],fg=[qf,Kf,Ef,hf,sf,Df,W,W,W,W,W,W,W,W,W,W],Uf=[Cf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Wf=[Cf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],dg=[gf,ef,af,cf,kf,lf,Qe,Re,pf,Jf,Xf,Zf,ag,W,W,W],Yf=[function(a){Bd(this, -je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}],$f=[function(a){S(this,a,0,Ee);this.b-=this.g?11:6},function(a){S(this,a,wd(this)?1:0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,wd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Bd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],bg=[function(a){S(this,a,0,Ie);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,se);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)}];function td(a){gg[a>>12].call(this,a)} -var gg=[function(a){hg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Ne,function(a){ig[a>>8&15].call(this,a)},function(a){jg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Hf,W],hg=[function(a){kg[a>>4&15].call(this,a)},jf,ff,Ye,Ze,df,$e,bf,wf,wf,Nf,Pf,Rf,function(a){lg[a>>6&3].call(this,a)},W,W],lg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ce(this,a,0);Wd(this,a);R(this,a);this.b-=11},function(a){var b=Yd(this);this.J= -this.b;de(this,a,0,b);R(this,b);this.b=this.J-Af[this.g]},function(a){R(this,ke(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],kg=[function(a){mg[a&15].call(this,a)},W,W,W,uf,uf,uf,uf,Ff,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Tf,Vf,If,If,If,If],mg=[qf,Kf,Ef,hf,sf,Df,function(){Xd(this);this.b-=13},W,W,W,W,W,W,W,W,W],ig=[Bf,Bf,of,of,Oe,Oe,Pe,Pe,Lf,Lf,W,W,W,W,Gf,Gf],jg=[gf,ef,af,cf,kf,lf,Qe,Re,pf,Jf,Xf,Zf,ag,function(a){ng[a>> -6&3].call(this,a)},W,W],ng=[W,function(a){a=ce(this,a,65536);Wd(this,a);R(this,a);this.b-=11},function(a){var b=Yd(this);this.J=this.b;de(this,a,65536,b);R(this,b);this.b=this.J-Af[this.g]},W]; -function og(a){u.call(this,"ROM",a,og);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);pg(c)})}}z(og);og.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;pg(this)}; -og.prototype.Ha=function(){this.ia&&(this.i&&qg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};og.prototype.Ga=function(){return!0}; -function pg(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(uc(a.w,b,a.g,Wc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():vd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ka))});this.na=Nc(52,4);this.aa=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.na)});Cb(b,this,Pg);H(this)}; -k.wc=function(){if(!this.J){var a=id(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ga=function(a){return a?this.save():!0};k.reset=function(){Qg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Qg(this)};function Qg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Xc(this,Tc?Yc:Zc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.hc(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&cd(a,bd,!1),(a.B=c.B)&&ad(a,bd,!1))}function ed(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function ad(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function cd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Xc(a,b){b||(b=fd);cd(a,b,void 0);ad(a,b,void 0)} +var fd=[],$c=[I.prototype.S,I.prototype.wa,I.prototype.ca,I.prototype.Na],bd=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var Zc=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.lb],Yc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; +function gd(a,b){u.call(this,"CPU",a,gd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(gd);var hd=["power","reset"];k=gd.prototype; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=nd(a)&&(a.yb=a.zb=-1,kd(a),a.ga(),c=!0);c&&a.j(nd(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;pd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+qd(a))} +function rd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function qd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} +k.Wd=function(){if(this.A.Z){this.wb>=this.mb&&pd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=rd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=qd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),nd(this));vb(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.vc;this.$=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,od(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;od(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,nd(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){qd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),nd(this));b=!0}this.A.complete=a;return b}; +function sd(a){this.pb=+a.model||1170;this.Ob=a.addrReset||0;gd.call(this,a,6666667);this.decode=1120==this.pb?td.bind(this):ud.bind(this);vd(this);this.L=0;this.M=null;this.A.complete=!1}z(sd,gd);k=sd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();vd(this);jd(this);this.A.error=!1;this.parent.reset.call(this)}; +function vd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.M=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ba=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function wd(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ga()||ld(a.i))}k.sc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];od(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Cd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Dd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Ed(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Fd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Oc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Pc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Xd(this,this.wa);Xd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; +function Yd(a){var b=Zd(a),c=Zd(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Pc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function $d(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=ae(this,$d(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc($d(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,be(this,$d(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc($d(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ce(this,a,b,c)};k.Qc=function(a,b,c){return $d(this,ce(this,a,b,c),c)};k.zc=function(a){return this.w.oa(a)};k.Td=function(a){return this.w.oa($d(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; +k.Ke=function(a,b){this.w.hb($d(this,a,4),b)};function de(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ce(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function ee(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ce(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=$d(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +function fe(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function he(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ce(a,b,c,8)}function ie(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),be(a,e,d.call(a,c,ae(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ke(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?be(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function le(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.A.complete=!0;var b=this.i&&me(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&ne(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Yd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Bd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Ad(this))}while(0>1|b<<16;Ed(this,a);return a&65535}function te(a,b){a=b&2048|b>>1|b<<8;Ed(this,a<<8);return a&255}function ue(a,b){a=b&~a;R(this,a);return a}function ve(a,b){a=b&~a;R(this,a<<8);return a}function we(a,b){a|=b;R(this,a);return a}function xe(a,b){a|=b;R(this,a<<8);return a} +function ye(a,b){a=~b|65536;Cd(this,a);return a&65535}function ze(a,b){a=~b|256;Cd(this,a<<8);return a&255}function Ae(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Be(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Ce(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function De(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Ee(a,b){a=-b;Cd(this,a,a&b&32768);return a&65535}function Fe(a,b){a=-b;Cd(this,a<<8,(a&b&128)<<8);return a&255}function Ge(a,b){a=b<<1|this.T>>16&1;Ed(this,a);return a&65535}function He(a,b){a=b<<1|this.T>>16&1;Ed(this,a<<8);return a&255}function Ie(a,b){a=(this.T&65536|b)>>1|b<<16;Ed(this,a);return a&65535}function Je(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Ed(this,a<<8);return a&255}function Ke(a,b){var c=b-a;Fd(this,c,a,b);return c&65535} +function Le(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function Me(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ne(a,b){a^=b;R(this,a);return a&65535}function Oe(a){T(this,a,ge(this,a),oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Pe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Qe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Re(a){U(this,a,!xd(this))}function Se(a){U(this,a,xd(this))} +function Te(a){T(this,a,ge(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,fe(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){T(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){S(this,a,fe(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Xe(a){R(this,ge(this,a)&je(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ye(a){R(this,(fe(this,a)&ie(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){U(this,a,zd(this))}function $e(a){U(this,a,!this.Ta()==!yd(this))}function af(a){U(this,a,!zd(this)&&!this.Ta()==!yd(this))}function bf(a){U(this,a,!xd(this)&&!zd(this))}function cf(a){U(this,a,zd(this)||!this.Ta()!=!yd(this))} +function df(a){U(this,a,xd(this)||zd(this))}function ef(a){U(this,a,!this.Ta()!=!yd(this))}function ff(a){U(this,a,this.Ta())}function gf(a){U(this,a,!zd(this))}function hf(a){U(this,a,!this.Ta())}function jf(){this.pa(12,1);this.b-=5}function kf(a){U(this,a,!0)}function lf(a){U(this,a,!yd(this))}function mf(a){U(this,a,yd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function nf(a){var b=ge(this,a);a=je(this,a);Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function of(a){var b=fe(this,a)<<8;a=ie(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function pf(a){var b=je(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function qf(){this.pa(24,2);this.b-=25} +function rf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?sf(this.i):this.ga();this.b-=7}function tf(){this.pa(16,4);this.b-=25}var uf=[0,7,7,10,7,11,9,13];function vf(a){this.J=this.b;O(this,he(this,a));this.b=this.J-uf[this.g]}var wf=[0,14,14,17,14,18,16,20];function xf(a){this.J=this.b;var b=he(this,a);a=a>>6&7;Xd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-wf[this.g]}var yf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function zf(a){var b=ge(this,a);this.J=this.b;R(this,le(this,a,b));this.b=this.J-yf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Af(a){var b=fe(this,a);R(this,ke(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Bf=[7,13,13,17,14,18,17,21]; +function Cf(a){var b=je(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function If(a){T(this,a,ge(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Jf(a){T(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}function Kf(){this.pa(28,5);this.b-=5}function Lf(){this.I|=4;Bd(this,-2);this.b-=3}function Mf(a){T(this,a,ge(this,a),Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=sf(b);b||this.pa(8,6)}function td(a){Nf[a>>12].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)}function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a>>6&3].call(this,a)} +function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} +var Nf=[function(a){dg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,W,function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],dg=[function(a){fg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,W,W,W],Pf=[function(a){Cd(this,le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0, +Ee);this.b-=this.g?11:6},function(a){T(this,a,xd(this)?1:0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,xd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Cd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Tf=[function(a){T(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)}], +fg=[function(a){gg[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,W,Uf,Wf,Jf,Jf,Jf,Jf],gg=[rf,Lf,Ff,jf,tf,Ef,W,W,W,W,W,W,W,W,W,W],Vf=[Df,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Xf=[Df,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],eg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,W,W,W],Zf=[function(a){Cd(this, +ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],ag=[function(a){S(this,a,0,Fe);this.b-=this.g?11:6},function(a){S(this,a,xd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,xd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ie(this,a);Cd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],cg=[function(a){S(this,a,0,Je);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} +var hg=[function(a){ig[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],ig=[function(a){lg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,function(a){mg[a>>6&3].call(this,a)},W,W],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=de(this,a,0);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J= +this.b;ee(this,a,0,b);R(this,b);this.b=this.J-Bf[this.g]},function(a){R(this,le(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Uf,Wf,Jf,Jf,Jf,Jf],ng=[rf,Lf,Ff,jf,tf,Ef,function(){Yd(this);this.b-=13},W,W,W,W,W,W,W,W,W],jg=[Cf,Cf,pf,pf,Pe,Pe,Qe,Qe,Mf,Mf,W,W,W,W,Hf,Hf],kg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,function(a){og[a>> +6&3].call(this,a)},W,W],og=[W,function(a){a=de(this,a,65536);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J=this.b;ee(this,a,65536,b);R(this,b);this.b=this.J-Bf[this.g]},W]; +function pg(a){u.call(this,"ROM",a,pg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);qg(c)})}}z(pg);pg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;qg(this)}; +pg.prototype.Ha=function(){this.ha&&(this.i&&rg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};pg.prototype.Ga=function(){return!0}; +function qg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Wc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():wd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ja))});this.ma=Mc(52,4);this.$=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Qg);H(this)}; +k.wc=function(){if(!this.J){var a=id(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Rg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Rg(this)};function Rg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Rg={},Pg=(Rg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Rg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Rg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Rg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Rg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Ug(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Ug(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Vg(a);var e=this;if((this.g=id(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.da=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&dh(a,b,c,d,e.ea,e.La, -e.Ka));a.B.$a=!1;a.D&&(a.D--,a.D||H(a));ah(a)})}function Yg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;d'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Vg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Vg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Wg(a);var e=this;if((this.g=id(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.ca=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&eh(a,b,c,d,e.da,e.La, +e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));bh(a)})}function Zg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){kh(a,b,c,d)})} -function kh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;fd&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=mh(this,a++);)oh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function oh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&ph(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&qh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=mh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&qh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&rh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=nh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ph(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){rh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return rh(this,a[0])};function uh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}wh(a,e,b,c,!1,d)}else vh(a,e)} -function wh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,vh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,jh(new fh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} -k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.A&&this.A.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));ph(this,a.fc)}; -function th(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Jc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Jc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; -k.we=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Lc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; -var xh={},sh=(xh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],xh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],xh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],xh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],xh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],xh);function yh(a){u.call(this,"Debugger",a,yh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(yh); -var zh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};yh.prototype.tc=function(){return-1};yh.prototype.uc=function(){}; -function Ah(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function Bh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;rh(d,sa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=id(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}sh(this);this.P=Mc(112,5);Cb(b,this,th,2097152);uh(this,"None","",!0);this.L&&uh(this,"Local Disk","?");uh(this,"Remote Disk","??");vh(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.rc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";qh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){sh(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return sh(this,a[0])};function vh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}xh(a,e,b,c,!1,d)}else wh(a,e)} +function xh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,wh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,kh(new gh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.sb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));qh(this,a.fc)}; +function uh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ac(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Ac(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.ea&65535}; +k.we=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; +var yh={},th=(yh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],yh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],yh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],yh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],yh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],yh);function zh(a){u.call(this,"Debugger",a,zh);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(zh); +var Ah={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};zh.prototype.tc=function(){return-1};zh.prototype.uc=function(){}; +function Bh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Ch(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Ch(a,b,c){var d;if(b){b=Dh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Gh(a,b){if(b)return Fh(a,b,a.Y[b]);var c=0;for(b in a.Y)Fh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Hh(a,b){if(b)return Gh(a,b,a.Y[b]);var c=0;for(b in a.Y)Gh(a,b,a.Y[b]),c++;return 0this.b.xb?Ph:[];Qh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Rh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=hc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,pd(a),a.ua=0,a.A&&a.A.$(void 0)))};function Jh(a){var b;if(!le(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Yh(this):Zh(this)}};function Xh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Jh(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;$h(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Th(this.L));a.set(1,Th(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Uh(a[b++]),this.P=Uh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function rf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} -function Ih(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||ai(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(bi(this,a,a.length-1,"set"),Jh(this)));return d}; -function ai(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Jh(a);break}}return f}function ci(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Wh(y);break;case 8:x="@"+Wh(y);break;case 16:7>y?x="("+Wh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Wh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Wh(y)+")";break;case 40:x="@-("+Wh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Wh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Wh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Wh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,hc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function hi(a){var b,c="";for(b=0;6>b;b++)c+=gi(a,b);c=c+"\n"+(gi(a,6)+gi(a,7));c+=gi(a,20)+gi(a,21);return c+=fi(a,"T")+fi(a,"N")+fi(a,"Z")+fi(a,"V")+fi(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function ii(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(hi(a));c&&(a.L=Z(d.u[7]),Zh(a,J(a,a.L.F)))}}function mi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ei(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function di(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==yg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==xg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;Ag++;Jb--}}Ag||(a.j("no "+zg+"history available"),a.ub=void 0)}else{var Lb=Rh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Gi),Ac=Eh(a,La)>>>0,65536>4||1,Nb="";Ii--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Dg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Rh(a,Nd);if(Ec)for(var Fc= -2;FcQd;){for(var Ma=null,Li=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Fg=null,Tb=Gc.F,Gg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< -Sd){Gc.F=Tb;var Hc=ei(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Hg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Hg+1)-Hg-1)/2==Gg){Fg=Hc;break}}}Tb-=2}Gc.F=Gg;if(Ma=Fg)break}}if(!Ma||null==Ma)break;var Ig=null;if("ks"==Ki){var Jg=Ma.match(/[0-9A-F]+$/);Jg&&(Ig=li(a,Jg[0]))}Ma=xa(Ma,50)+" ;"+(Ig||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){li(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bri){if(ti(d,this.J)){this.C=new P(this,"1.30.3","failsafe");ti(this.C)&&(yi(this,d),a=2,zi(this.C));this.C.set("timestamp",Ca());Ai(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=xi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ti(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),zi(d),ti(d)?(c=xi(d),e=!0):c=!1))}e&&wi(this,c?d:null)}else 2==a&&d.clear()}else wi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Bi(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(yi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function yi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function oi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Si(a,b,c)}})}else c(a,null)} -function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Fi||Za(!0));l=!1}var g,h,l=!0;Fi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Fi||Za(!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),--Fi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Ph=[0],Qh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Ih.prototype; +k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.f=a.f;(a=id(a,"messages"))&&Lh(this,a);this.wb=Oh;this.Ob=1145>this.b.pb?Qh:[];Rh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Sh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Oc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,qd(a),a.ua=0,a.qa()))};function Kh(a){var b;if(!me(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?Zh(a):$h(a)}}function Yh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Kh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;ai(this);a||ld(this)};k.save=function(){var a=new P(this);a.set(0,Uh(this.L));a.set(1,Uh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Vh(a[b++]),this.P=Vh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function sf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} +function Jh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||bi(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ci(this,a,a.length-1,"set"),Kh(this)));return d}; +function bi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Kh(a);break}}return f}function di(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Xh(y);break;case 8:x="@"+Xh(y);break;case 16:7>y?x="("+Xh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Xh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Xh(y)+")";break;case 40:x="@-("+Xh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Xh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Xh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Xh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Oc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ii(a){var b,c="";for(b=0;6>b;b++)c+=hi(a,b);c=c+"\n"+(hi(a,6)+hi(a,7));c+=hi(a,20)+hi(a,21);return c+=gi(a,"T")+gi(a,"N")+gi(a,"Z")+gi(a,"V")+gi(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ha:e,mc:f})}function ji(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ii(a));c&&(a.L=Z(d.u[7]),$h(a,J(a,a.L.F)))}}function ni(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=fi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function ei(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Id=[];"call"==zg&&(Kb=1E5,Id=["CALL"]);for(void 0!==yg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Bg++;Kb--}}Bg||(a.j("no "+Ag+"history available"),a.vb=void 0)}else{var Mb=Sh(a,ma);if(Mb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Hi),Bc=Fh(a,La)>>>0,65536>4||1,Ob="";Ji--&&0Ec?String.fromCharCode(Ec):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Jd+(0==Pb?" "+Eg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Xb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.oa,Md=a.hb):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Sh(a,Od);if(Fc)for(var Gc= +2;GcRd;){for(var Ma=null,Mi=256;65536>Tb.F>>>0;){Sd.F=a.oa(Tb,2);if(null==Tb.F||!Mi--)break;if(!(Sd.F&1)){for(var Ni=a,Hc=Sd,Gg=null,Ub=Hc.F,Hg=Ub,Td=1;6>=Td&&Ub;Td++){if(2< +Td){Hc.F=Ub;var Ic=fi(Ni,Hc);if(0<=Ic.indexOf("JSR")){var Ig=Ic.indexOf(" ");if(Ub+(Ic.indexOf(" ",Ig+1)-Ig-1)/2==Hg){Gg=Ic;break}}}Ub-=2}Hc.F=Hg;if(Ma=Gg)break}}if(!Ma||null==Ma)break;var Jg=null;if("ks"==Li){var Kg=Ma.match(/[0-9A-F]+$/);Kg&&(Jg=mi(a,Kg[0]))}Ma=xa(Ma,50)+" ;"+(Jg||"stack="+J(a,Tb.F));a.j(Ma);Rd++}Rd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){mi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Ud=0;Ud\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsi){if(ui(d,this.J)){this.C=new P(this,"1.30.3","failsafe");ui(this.C)&&(zi(this,d),a=2,Ai(this.C));this.C.set("timestamp",Ca());Bi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ui(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Ai(d),ui(d)?(c=yi(d),e=!0):c=!1))}e&&xi(this,c?d:null)}else 2==a&&d.clear()}else xi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ci(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(zi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function zi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function pi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;l(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ti(a,b,c)}})}else c(a,null)} +function Ui(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Gi||Za(!0));l=!1}var g,h,l=!0;Gi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Ri(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Gi||Za(!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),--Gi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ri(b,a,d,!0,e,m):Si(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ui(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index 46a8d9ca8..e5c23d23b 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -40,48 +40,47 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={K:null,X:null,ga:null,fa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Kb=b.comment;this.jc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; -h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.w="DEP"==b,a.A="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.la=function(a,b){b||(hb(),this.reset());return!0};h.ka=function(){return!0}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.i=this.f=this.w=this.s=0;this.A=this.C=this.v=!1;this.F=$a;this.m={};this.c={START:[1,!0,!1,this.qc],STEP:[1,!1,!1,this.rc],ENABLE:[1,!1,!1,this.mc],CONT:[1,!0,!1,this.kc],DEP:[0,!0,!1,this.lc],EXAM:[1,!0,!1,this.nc],LOAD:[1,!0,!1,this.pc],TEST:[0,!0,!1,this.oc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, +b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.j.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.j.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.pb=!0),b=!a.j.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][0]=0&1<>2;this.l=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function yb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function zb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} -h.kb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Nb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Za&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Vb(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Ya[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Ya[c]=b&1?this.a.Ya[c]&65535|(a&63)<<16:this.a.Ya[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.qc=function(a){a||this.a.l.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.pb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} +h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ia)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +function Mb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; +h.yd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; +h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return tb(this.a)};h.Cd=function(a){Wb(this.a,a&-1809|tb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; +h.Kc=function(){return Vb(this.a)};h.Cd=function(a){Wb(this.a,a&-1809|Vb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.zc, L.prototype.td,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.cd, L.prototype.Vd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, @@ -89,42 +88,42 @@ L.prototype.Vd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= [null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),dc(this,$b?ec:fc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},oa:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Eb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},ea:function(a,b){this.o[a]=b;this.ua=!0},qa:function(a,b){this.o[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ua=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,jc,!1),(a.m=c.m)&&kc(a,jc,!1))}function kc(a,b,c){c&&a.m||(a.Db=!a.l&&b[1]||a.f,a.ob=!a.l&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function dc(a,b){b||(b=lc);ic(a,b,void 0);kc(a,b,void 0)} -var lc=[],gc=[I.prototype.N,I.prototype.ra,I.prototype.oa,I.prototype.xa],jc=[I.prototype.G,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Ya)var fc=[I.prototype.C,I.prototype.ea,I.prototype.P,I.prototype.sa],ec=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.wa]; -function mc(a,b){x.call(this,"CPU",a,mc);var c=a.multiplier||1;this.gb=a.cycles||b;this.ra=c;this.ub=Math.round(this.gb/1E4)/100;this.wa=this.ub*this.ra;this.j.U=!1;this.j.Bb=!1;this.j.Ua=a.autoStart;this.j.fb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.kd.bind(this);F(this)}z(mc);var nc=["power","reset"];h=mc.prototype; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=rc(a)&&(a.Qa=a.Ra=-1,qc(a),G(a),c=!0);c&&a.T(rc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.ea/a.wa&&(b=1);a.ra=b;b=a.ub*a.ra;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&uc(a.l)}nb(a,a.aa);a.aa=0;a.R=ra();a.pa=0;tc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.gb*a.ra/1E3*c|0,a.I[b][0]=c+vc(a))} -function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function vc(a,b){var c=a.qa-=a.a;a.a=a.G=0;b&&(a.qa=0);return c} -h.kd=function(){if(this.j.U){this.vb>=this.gb&&tc(this,!0);this.Ta=0;this.bb=ra();if(this.pa){var a=this.bb-this.pa;a>this.Nb&&(this.R+=a,this.R>this.bb&&(this.R=this.bb))}try{do{for(var b,c=this.j.fb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=vc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.l&&this.l.da(void 0),this.Ob=0);break}}while(this.j.U)}catch(f){G(this); -this.l&&this.l.stop(ra(),rc(this));Xa(this,f.stack||f.message);return}if(this.j.U){a=setTimeout;b=this.Qb;this.pa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.pa-this.bb;if(d=this.pa-this.R)this.ea=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ta=0,sc(this));if(0>c||this.eac&&(this.R-=c),c=0;this.vb+=this.Ta;this.pa+=c;a(b,c)}}}; -function lb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.U)a.T(a.toString()+" busy");else{sc(a);a.j.U=!0;a.j.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.R,rc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.j.U){vc(a);nb(a,a.aa);a.aa=0;a.j.U=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),rc(a));b=!0}a.j.complete=void 0;return b} -function wc(a){this.Za=+a.model||1170;this.Jb=a.addrReset||0;mc.call(this,a,6666667);this.decode=1120==this.Za?xc.bind(this):yc.bind(this);zc(this);this.sa=0;this.N=null;this.j.complete=!1}z(wc,mc);h=wc.prototype;h.reset=function(){this.status("model "+this.Za);this.j.U&&G(this);zc(this);pc(this);this.j.error=!1;this.parent.reset.call(this)}; -function zc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Ya=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.tb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.$a=0;a.Mb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Cb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Cb(a.h,16))}function Ac(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.da())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.ta,this.ra]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.ta=b[1];sc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Dc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Fc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.sa){var d=!1;0>a.Ia?a.Ia=tb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Wb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Hc(a,a.Ia);Hc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Ic(a){var b=Jc(a),c=Jc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Wb(a,c);a.u&=-17} -function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Ya[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Kc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.$a=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.$a<<5|a.ab<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.l,c&255,b)}function Jc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Hc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4>1),this.a=new Int32Array(this.b,0,this.size>>2),dc(this,$b?ec:fc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,jc,!1),(a.m=c.m)&&kc(a,jc,!1))}function kc(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function dc(a,b){b||(b=lc);ic(a,b,void 0);kc(a,b,void 0)} +var lc=[],gc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],jc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var fc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],ec=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; +function mc(a,b){x.call(this,"CPU",a,mc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.ub=Math.round(this.fb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.gb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Pb=this.kd.bind(this);F(this)}z(mc);var nc=["power","reset"];h=mc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=rc(a)&&(a.Qa=a.Ra=-1,qc(a),G(a),c=!0);c&&a.T(rc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&uc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;tc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+vc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +function vc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} +h.kd=function(){if(this.l.U){this.vb>=this.fb&&tc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Nb&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=vc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.va(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),rc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Pb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,sc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; +function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{sc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,rc(a));setTimeout(a.Pb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){vc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),rc(a));b=!0}a.l.complete=void 0;return b} +function wc(a){this.Wa=+a.model||1170;this.Jb=a.addrReset||0;mc.call(this,a,6666667);this.decode=1120==this.Wa?xc.bind(this):yc.bind(this);zc(this);this.ra=0;this.N=null;this.l.complete=!1}z(wc,mc);h=wc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);zc(this);pc(this);this.l.error=!1;this.parent.reset.call(this)}; +function zc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.qb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.ab=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function Ac(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Ib=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];sc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Dc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Fc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Vb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Wb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Hc(a,a.Ia);Hc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Ic(a){var b=Jc(a),c=Jc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Wb(a,c);a.u&=-17} +function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Kc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Jc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Hc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.sa++;a=this.Tb(Kc(this,a,2));this.sa--;return a}; -h.Xa=function(a,b){this.Ba?(this.sa++,Lc(this,Kc(this,a,5),b),this.sa--):this.h.Xa(a,b)};h.lb=function(a,b){this.Ba?(this.sa++,this.$b(Kc(this,a,4),b),this.sa--):this.h.lb(a,b)};h.gc=function(a,b,c){return Mc(this,a,b,c)};h.hc=function(a,b,c){return Kc(this,Mc(this,a,b,c),c)};h.Tb=function(a){return Lb(this.h,a)};h.gd=function(a){return Lb(this.h,Kc(this,a,2))};h.$b=function(a,b){Mb(this.h,a,b&65535)};h.Zd=function(a,b){Mb(this.h,Kc(this,a,4),b)}; -function Nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Mc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Oc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Mc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Kc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} -function Pc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Mc(a,b,c,8)}function Sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.tb=a.J(b,e,7),Lc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Lc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.j.complete=!0;var b=a?this.j.Bb?0:1:-1;this.j.Bb=!1;this.qa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Cc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Bc(this))}while(0=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Kc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Lc(this,Kc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Kc(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Mc(this,a,b,c)};h.hc=function(a,b,c){return Kc(this,Mc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Kc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Kc(this,a,4),b)}; +function Nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Mc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Oc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Mc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Kc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Pc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Mc(a,b,c,8)}function Sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.qb=a.J(b,e,7),Lc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Lc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Cc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Bc(this))}while(0>1|b<<16;Fc(this,a);return a&65535}function ad(a,b){a=b&2048|b>>1|b<<8;Fc(this,a<<8);return a&255}function bd(a,b){a=b&~a;S(this,a);return a}function cd(a,b){a=b&~a;S(this,a<<8);return a}function dd(a,b){a|=b;S(this,a);return a}function ed(a,b){a|=b;S(this,a<<8);return a}function fd(a,b){a=~b|65536;Dc(this,a);return a&65535}function gd(a,b){a=~b|256;Dc(this,a<<8);return a&255} function hd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function id(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function jd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function kd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function ld(a,b){a=-b;Dc(this,a,a&b&32768);return a&65535}function md(a,b){a=-b;Dc(this,a<<8,(a&b&128)<<8);return a&255} function nd(a,b){a=b<<1|this.m>>16&1;Fc(this,a);return a&65535}function od(a,b){a=b<<1|this.m>>16&1;Fc(this,a<<8);return a&255}function pd(a,b){a=(this.m&65536|b)>>1|b<<16;Fc(this,a);return a&65535}function qd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Fc(this,a<<8);return a&255}function rd(a,b){var c=b-a;Gc(this,c,a,b);return c&65535}function sd(a,b){var c=b-a;Gc(this,c<<8,a<<8,b<<8);return c&255}function td(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} @@ -135,101 +134,102 @@ function Ed(a){S(this,Qc(this,a)&Tc(this,a));this.a-=this.c?4+(this.C&&6<=this.b function Kd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,R(this)||(this.i&65535?0:4))}function Md(a){V(this,a,!this.za()!=!(this.f&32768))}function Nd(a){V(this,a,this.za())}function Od(a){V(this,a,!!(this.i&65535))}function Pd(a){V(this,a,!this.za())}function Qd(){K(this,12,1);this.a-=5}function Rd(a){V(this,a,!0)}function Sd(a){V(this,a,!(this.f&32768))}function Td(a){V(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ud(a){var b=Qc(this,a);a=Tc(this,a);Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Vd(a){var b=Pc(this,a)<<8;a=Sc(this,a)<<8;Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} function Wd(a){var b=Tc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Xd(){K(this,24,2);this.a-=25} -function Yd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Zd(){K(this,16,4);this.a-=25}var $d=[0,7,7,10,7,11,9,13];function ae(a){this.G=this.a;P(this,Rc(this,a));this.a=this.G-$d[this.c]}var be=[0,14,14,17,14,18,16,20];function ce(a){this.G=this.a;var b=Rc(this,a);a=a>>6&7;Hc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.G-be[this.c]}var de=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ee(a){var b=Qc(this,a);this.G=this.a;S(this,Vc(this,a,b));this.a=this.G-de[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function fe(a){var b=Pc(this,a);S(this,Uc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ge=[7,13,13,17,14,18,17,21]; +function Yd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Zd(){K(this,16,4);this.a-=25}var $d=[0,7,7,10,7,11,9,13];function ae(a){this.F=this.a;P(this,Rc(this,a));this.a=this.F-$d[this.c]}var be=[0,14,14,17,14,18,16,20];function ce(a){this.F=this.a;var b=Rc(this,a);a=a>>6&7;Hc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-be[this.c]}var de=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function ee(a){var b=Qc(this,a);this.F=this.a;S(this,Vc(this,a,b));this.a=this.F-de[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function fe(a){var b=Pc(this,a);S(this,Uc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ge=[7,13,13,17,14,18,17,21]; function he(a){var b=Tc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ne(a){U(this,a,Qc(this,a),rd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function oe(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)}function pe(){K(this,28,5);this.a-=5}function qe(){this.u&4||this.l&&this.l.da();this.u|=4;Cc(this,-2);this.a-=3}function re(a){U(this,a,Qc(this,a),ud);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function xc(a){se[a>>12].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a&15].call(this,a)} -function Be(a){Ce[a&15].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)} +function oe(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)}function pe(){K(this,28,5);this.a-=5}function qe(){this.u|=4;Cc(this,-2);this.a-=3}function re(a){U(this,a,Qc(this,a),ud);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function xc(a){se[a>>12].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a&15].call(this,a)} +function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)} var se=[function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,Y,function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Je=[function(a){Le[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,Y,Y,Y],ue=[function(a){Dc(this,Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0, ld);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Dc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ye=[function(a){U(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}], Le=[function(a){Me[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,Y,ze,Be,oe,oe,oe,oe],Me=[Yd,qe,ke,Qd,Zd,je,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[ie,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ce=[ie,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ke=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,Y,Y,Y],Ee=[function(a){Dc(this, Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],Ge=[function(a){T(this,a,0,md);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Dc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Ie=[function(a){T(this,a,0,qd);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9+(this.tb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}];function yc(a){Ne[a>>12].call(this,a)} -var Ne=[function(a){Oe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,function(a){Pe[a>>8&15].call(this,a)},function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Oe=[function(a){Re[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,function(a){Se[a>>6&3].call(this,a)},Y,Y],Se=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Nc(this,a,0);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.G= -this.a;Oc(this,a,0,b);S(this,b);this.a=this.G-ge[this.c]},function(a){S(this,Vc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){Te[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ze,Be,oe,oe,oe,oe],Te=[Yd,qe,ke,Qd,Zd,je,function(){Ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Pe=[he,he,Wd,Wd,wd,wd,xd,xd,re,re,Y,Y,Y,Y,me,me],Qe=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,function(a){Ue[a>>6& -3].call(this,a)},Y,Y],Ue=[Y,function(a){a=Nc(this,a,65536);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.G=this.a;Oc(this,a,65536,b);S(this,b);this.a=this.G-ge[this.c]},Y]; -function Ve(a){x.call(this,"ROM",a,Ve);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.l=a.file;this.m=q(this.l);if(this.l){a=this.l;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.F("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Sa(c.oa,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.l=null);We(c)})}}z(Ve);Ve.prototype.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;We(this)}; -Ve.prototype.la=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ve.prototype.ka=function(){return!0}; -function We(a){if(!Wa(a)){if(a.l){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Fb(a.h,b,a.c,cc)){var c;for(c=0;c>12].call(this,a)} +var Ne=[function(a){Oe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,function(a){Pe[a>>8&15].call(this,a)},function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Oe=[function(a){Re[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,function(a){Se[a>>6&3].call(this,a)},Y,Y],Se=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Nc(this,a,0);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F= +this.a;Oc(this,a,0,b);S(this,b);this.a=this.F-ge[this.c]},function(a){S(this,Vc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){Te[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ze,Be,oe,oe,oe,oe],Te=[Yd,qe,ke,Qd,Zd,je,function(){Ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Pe=[he,he,Wd,Wd,wd,wd,xd,xd,re,re,Y,Y,Y,Y,me,me],Qe=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,function(a){Ue[a>>6& +3].call(this,a)},Y,Y],Ue=[Y,function(a){a=Nc(this,a,65536);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F=this.a;Oc(this,a,65536,b);S(this,b);this.a=this.F-ge[this.c]},Y]; +function Ve(a){x.call(this,"ROM",a,Ve);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);We(c)})}}z(Ve);Ve.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;We(this)}; +Ve.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ve.prototype.ja=function(){return!0}; +function We(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,cc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Xa(p++,b[t++]&255);else p&1?G(a.a):Ac(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Ac(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.ea=Ub(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.ea)});cb(b,this,bf);F(this)}; -h.Kb=function(){if(!this.v){var a=oc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.la=function(a,b){if(!b)if(this.Kb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ka=function(a){return a?this.save():!0};h.reset=function(){cf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return cf(this)};function cf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.G&&!this.s&&c&&(b=String.fromCharCode(this.G)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var df={},bf=(df[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],df[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],df[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],df[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],df);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;be.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.da=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.da)});cb(b,this,bf);F(this)}; +h.Lb=function(){if(!this.v){var a=oc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Lb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){cf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return cf(this)};function cf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Rb(this.a,this.P,1E3/Math.round(this.I/10))}};var df={},bf=(df[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],df[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],df[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],df[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],df);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&gf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=hf(a);var e=this;if((this.c=oc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Ub(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.F('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.oa,e,f),(e=ta(e,f))&&rf(a,b,c,d,e.K,e.ga,e.fa)); -a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));of(a)})}function lf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +d.o.listTapes;a&&gf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=hf(a);var e=this;if((this.c=oc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&rf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));of(a)})}function lf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.tb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){yf(a,b,c,d)})} -function yf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.F("Unable to restore disk '"+this.va+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.ua+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Af(this,a++);)Cf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function Cf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Df(d,a)},!0;case "loadDrive":return this.o[b]= c,c.onclick=function(){var a=d.o.listDisks;a&&Ef(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Af(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Df(this,0)}}return!0};h.ka=function(a){return a?this.save():!0};h.reset=function(){Ff(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Ff(this,a[0])};function If(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.F("Unable to load the selected drive");else if(c)if("?"==c)a.F('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Kf(a,e,b,c,!1,d)}else Jf(a,e)} -function Kf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Jf(a,b,!0),k.rb?a.F("RL11 busy"):(k.rb=!0,e&&(k.qb=!0,a.s++),k.ib=!!f,xf(new tf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.rb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.F('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.va=c,a.Ea=d,this.F('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.qb||e),this.l&&uc(this.l)):a.ib=!1;a.qb&&(a.qb=!1,--this.s||F(this));Df(this,a.wb)}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;if((this.f=oc(this.j,"autoMount")||this.f)&&"string"==typeof this.f)try{this.f=eval("("+this.f+")")}catch(e){u("RL11 auto-mount error: "+e.message+" ("+this.f+")"),this.f=null}Ff(this);this.F=Sb(112,5);cb(b,this,Gf,2097152);Hf(this,"None","",!0);this.A&&Hf(this,"Local Disk","?");Hf(this,"Remote Disk","??");If(this)||F(this)}; +h.ka=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.j.Hb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Df(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Ff(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Ff(this,a[0])};function If(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Kf(a,e,b,c,!1,d)}else Jf(a,e)} +function Kf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Jf(a,b,!0),k.sb?a.G("RL11 busy"):(k.sb=!0,e&&(k.rb=!0,a.s++),k.ib=!!f,xf(new tf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} +h.dc=function(a,b,c,d,e){var f;a.sb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.rb||e),this.j&&uc(this.j)):a.ib=!1;a.rb&&(a.rb=!1,--this.s||F(this));Df(this,a.wb)}; function Hf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; +h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.G))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.F))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; var Lf={},Gf=(Lf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Lf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Lf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Lf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Lf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Lf); -function Mf(a,b,c){x.call(this,"Computer",a,Mf);this.j.O=!1;Nf(this,b);this.A=oc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Of;this.v=null;this.m=this.I=!1;this.P=oc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Pf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new vb({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bOf){if(Qf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Qf(this.i)&&(Vf(this,d),a=2,Wf(this.i));this.i.set("timestamp",sa());Xf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Uf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Qf(d,g):("error"== -f&&"no machine state"!=g?(this.F("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Wf(d),Qf(d)?(c=Uf(d),e=!0):c=!1))}e&&Tf(this,c?d:null)}else 2==a&&d.clear()}else Tf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Yf(this,this.a,b,c,a),this.da(),this.a.Ua());this.G&&(Vf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.l=0}; +function Tf(a,b){var c=new Q(a,"1.30.3","validate");if(Qf(c)&&Uf(c)){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.G("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}h=Mf.prototype; +h.Xa=function(a){void 0===a&&(a=this.b||(this.v?1:Of));if(!this.j){this.j++;var b=!1,c=!1;this.F=!1;var d=this.w||new Q(this,"1.30.3");if(-1==a)b=!0;else if(a>Of){if(Qf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Qf(this.i)&&(Vf(this,d),a=2,Wf(this.i));this.i.set("timestamp",sa());Xf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Uf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Qf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Wf(d),Qf(d)?(c=Uf(d),e=!0):c=!1))}e&&Tf(this,c?d:null)}else 2==a&&d.clear()}else Tf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Yf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Vf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; function Vf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function ag(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ka&&(c&&G(a.a),d=a.a.ka(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;a Date: Fri, 4 Nov 2016 17:09:50 -0700 Subject: [PATCH 23/30] Fixed the memory clear "toggle-in", by returning the correct amount of installed RAM, and passing properly masked addresses to all the I/O handlers --- .../machine/1170/panel/debugger/README.md | 18 +- modules/pdp11/lib/bus.js | 95 +++- modules/pdp11/lib/cpustate.js | 32 +- modules/pdp11/lib/debugger.js | 103 ++-- modules/pdp11/lib/defines.js | 2 +- modules/pdp11/lib/device.js | 14 +- versions/pdpjs/1.30.3/pdp11-dbg.js | 492 +++++++++--------- versions/pdpjs/1.30.3/pdp11.js | 360 ++++++------- 8 files changed, 605 insertions(+), 511 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index e4a2e7faf..91dfa2d21 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -186,7 +186,7 @@ If you also want to see all the hardware register activity, use the Debugger's " 17772262 021311 CMP (R3),(R1) ; Top of Memory? 17772264 003402 BLE 2$ 17772266 005000 CLR R0 ; Start at Virtual Address 0 - 17772270 000776 BR 1$ + 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --@jeffpar] 17772272 005312 2$: DEC (R2) ; Disable Relocation 17772274 000000 HLT @@ -208,7 +208,7 @@ The above "toggle-in" can be entered with the PDPjs Debugger as follows: e 17777706 177676; e 17777776 000000; e 17772240 012714 000020 005212 010520 020027 017776 003774 062711; - e 17772260 000200 021311 003402 005000 000776 005312 000000; + e 17772260 000200 021311 003402 005000 000766 005312 000000; r pc 172240 which should produce the following results when Bus messages are turned on ("m bus on"): @@ -268,7 +268,7 @@ which should produce the following results when Bus messages are turned on ("m b SIPAR6.writeWord(00017772254,003774) changing 00017772256 to 062711 SIPAR7.writeWord(00017772256,062711) - >> e 17772260 000200 021311 003402 005000 000776 005312 000000 + >> e 17772260 000200 021311 003402 005000 000766 005312 000000 changing 00017772260 to 000200 SDPAR0.writeWord(00017772260,000200) changing 00017772262 to 021311 @@ -277,8 +277,8 @@ which should produce the following results when Bus messages are turned on ("m b SDPAR2.writeWord(00017772264,003402) changing 00017772266 to 005000 SDPAR3.writeWord(00017772266,005000) - changing 00017772270 to 000776 - SDPAR4.writeWord(00017772270,000776) + changing 00017772270 to 000766 + SDPAR4.writeWord(00017772270,000766) changing 00017772272 to 005312 SDPAR5.writeWord(00017772272,005312) changing 00017772274 to 000000 @@ -309,3 +309,11 @@ As the **Maintenance Service Guide** goes on to say: Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will slow execution to a crawl. + +If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address, +not one of the physical (22-bit) addresses shown above. For example, to break on this instruction: + + 17772256 062711 ADD #200,(R1) ; Step Page + +use the command "bp 172256", because while the code *is* physically located at 17772256, it is being executed at virtual +address 172256, and execution breakpoints operate on virtual addresses. diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index a69972c09..a72eb5dca 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -94,7 +94,7 @@ function BusPDP11(parmsBus, cpu, dbg) * as a result, our IOController functions assume that all incoming offsets are within a single 8Kb block. */ this.addrTotal = 1 << this.nBusWidth; - this.nBusLimit = this.nBusMask = (this.addrTotal - 1); + this.nBusMask = (this.addrTotal - 1); this.nBlockSize = BusPDP11.IOPAGE_LENGTH; this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2) this.nBlockLen = this.nBlockSize >> 2; @@ -135,6 +135,7 @@ function BusPDP11(parmsBus, cpu, dbg) this.fIOBreakAll = false; this.nDisableFaults = 0; this.fFault = false; + this.cbRAM = 0; /* * Array of RESET notification handlers registered by Device components. @@ -242,21 +243,28 @@ BusPDP11.IOController = { var b = -1; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { - b = afn[BusPDP11.IOHANDLER.READ_BYTE](addr); + b = afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked); } else if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - if (!(addr & 0x1)) { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr) & 0xff; + if (!(addrMasked & 0x1)) { + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked) & 0xff; } else { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked & ~0x1) >> 8; } } - } else if (addr & 0x1) { + } else if (addrMasked & 0x1) { afn = bus.aIOHandlers[off & ~0x1]; if (afn) { if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8; + b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked & ~0x1) >> 8; } } } @@ -288,12 +296,19 @@ BusPDP11.IOController = { var fWrite = false; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { /* * If a writeByte() handler exists, call it; we're done. */ if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { - afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addr); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addrMasked); fWrite = true; } /* @@ -306,15 +321,15 @@ BusPDP11.IOController = { */ else if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; - if (!(addr & 0x1)) { - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addr); + if (!(addrMasked & 0x1)) { + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addrMasked); fWrite = true; } else { - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr & ~0x1); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addrMasked & ~0x1); fWrite = true; } } - } else if (addr & 0x1) { + } else if (addrMasked & 0x1) { /* * If no handler existed, and this address was odd, then perhaps a handler exists for the even address; * if so, call the readWord() handler first to get the original data, then call writeWord() with the new @@ -327,9 +342,9 @@ BusPDP11.IOController = { afn = bus.aIOHandlers[off & ~0x1]; if (afn) { if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { - addr &= ~0x1; + addrMasked &= ~0x1; w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; - afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr); + afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addrMasked); fWrite = true; } } @@ -359,11 +374,18 @@ BusPDP11.IOController = { var w = -1; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.READ_WORD]) { - w = afn[BusPDP11.IOHANDLER.READ_WORD](addr); + w = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked); } else if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { - w = afn[BusPDP11.IOHANDLER.READ_BYTE](addr) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addr + 1) << 8); + w = afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked + 1) << 8); } } if (w >= 0) { @@ -393,13 +415,20 @@ BusPDP11.IOController = { var fWrite = false; var bus = this.controller; var afn = bus.aIOHandlers[off]; + + /* + * Since addr is primarily used to advise an I/O handler of the target IOPAGE address, and since we don't want + * our handlers to worry about the current IOPAGE location, we truncate addr to 16 bits (the IOPAGE's lowest location). + */ + var addrMasked = addr & 0xffff; + if (afn) { if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) { - afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addr); + afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addrMasked); fWrite = true; } else if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { - afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addr); - afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addr + 1); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addrMasked); + afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addrMasked + 1); fWrite = true; } } @@ -458,7 +487,7 @@ BusPDP11.prototype.setIOPageRange = function(nRange) if (nRange) { this.nIOPageRange = nRange; addr = (1 << nRange); - this.nBusLimit = this.nBusMask = (addr - 1); + this.nBusMask = (addr - 1); addr -= BusPDP11.IOPAGE_LENGTH; this.aIOPrevBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH); if (this.aIOPageBlocks) { @@ -633,6 +662,9 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) } if (sizeLeft <= 0) { + if (type == MemoryPDP11.TYPE.RAM && !this.cbRAM) { + this.cbRAM += size; + } this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); return true; } @@ -1203,6 +1235,27 @@ BusPDP11.prototype.restoreMemory = function(a) return true; }; +/** + * getMemorySize(type) + * + * NOTE: The original pdp11.js defined MAX_MEMORY as IOBASE_UNIBUS - 16384, where IOBASE_UNIBUS + * is 4Mb less 256Kb, and then subtracted another 16Kb so that BSD 2.9 could boot. + * + * @this {BusPDP11} + * @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported) + * @return {number} (size of initial allocation, in bytes) + */ +BusPDP11.prototype.getMemorySize = function(type) +{ + var cb = 0; + switch(type) { + case MemoryPDP11.TYPE.RAM: + cb = this.cbRAM; + break; + } + return cb; +}; + /** * addIOHandlers(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName) * @@ -1331,7 +1384,7 @@ BusPDP11.prototype.fault = function(addr, err, access) * @this {BusPDP11} * @return {boolean} */ -BusPDP11.prototype.checkFault= function() +BusPDP11.prototype.checkFault = function() { var f = this.fFault; this.fFault = false; diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index c735f81ef..80cc6358b 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -278,6 +278,9 @@ CPUStatePDP11.prototype.setMemoryAccess = function() /** * getMMR0() * + * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 + * nonr leng read trap unus unus ena mnt cmp -mode- i/d --page-- enable + * * @this {CPUStatePDP11} * @return {number} */ @@ -1257,6 +1260,11 @@ CPUStatePDP11.prototype.getTrapStatus = function() * address are added to 22 bits of the selected mapping register to produce the 22-bit physical address. The lowest * order bit of all mapping registers is always a zero, since relocation is always on word boundaries. * + * Sadly, because these mappings occur at a word-granular level, we can't implement the mappings by simply shuffling + * the underlying block around in the Bus component; it would be much more efficient if we could. That's EXACTLY how + * we move the IOPAGE in response to addressing changes. If it turns out that block-granular addresses are commonly + * stored in the unibusMap registers, we could add code to detect that and perform block remapping in those cases. + * * @this {CPUStatePDP11} * @param {number} addr * @return {number} @@ -1295,15 +1303,33 @@ CPUStatePDP11.prototype.mapUnibus = function(addr) * it again if all worked. If however something happens to cause a trap then no restore is * done as setPSW() will have been invoked as part of the trap, which will resynchronize mmuMode. * - * A PDP 11/70 is different to other PDP 11's in that the highest 18 bit space (017000000 & above) + * A PDP-11/70 is different from other PDP-11s in that the highest 18 bit space (017000000 & above) * maps directly to UNIBUS space - including low memory. This doesn't appear to be particularly * useful as it restricts maximum system memory - although it does appear to allow software * testing of the unibus map. This feature also appears to confuse some OSes which test consecutive * memory locations to find maximum memory -- and on a full memory system find themselves accessing * low memory again at high addresses. * - * 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 MMR0 - * nonr leng read trap unus unus ena mnt cmp -mode- i/d --page-- enable + * Construction of a Physical Address + * ---------------------------------- + * + * Virtual Addr (VA) 12 11 10 9 8 7 6 5 4 3 2 1 0 + * Page Addr Field (PAF) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + * + ----------------------------------------------------------------- + * Physical Addr (PA) 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 + * + * The Page Address Field (PAF) comes from a Page Address Register (PAR) that is selected by Virtual Address (VA) + * bits 15-13. You can see from the above alignments that the VA contributes to the low 13 bits, providing an 8Kb + * range. + * + * VA bits 0-5 pass directly through to the PA; those are also called the DIB (Displacement in Block) bits. + * VA bits 6-12 are added to the low 7 bits of the PAF and are also called the BN (Block Number) bits. + * + * You can also think of the entire PAF as a block number, where each block is 64 bytes. This is consistent with + * the LSIZE register at 177760, which is supposed to contain the number of 64-byte blocks of memory installed. + * + * Note that if a PAR is initialized to zero, successively adding 0200 (0x80) to the PAR will advance the base + * physical address to the next 8Kb page. * * @this {CPUStatePDP11} * @param {number} virtualAddress diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index c6447a1af..f5be91339 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -770,7 +770,7 @@ if (DEBUGGER) { * done later, by getAddr(), which returns PDP11.ADDR_INVALID for invalid segments, out-of-range offsets, * etc. The Debugger's low-level get/set memory functions verify all getAddr() results, but even if an * invalid address is passed through to the Bus memory interfaces, the address will simply be masked with - * BusPDP11.nBusLimit; in the case of PDP11.ADDR_INVALID, that will generally refer to the top of the physical + * bus.nBusMask; in the case of PDP11.ADDR_INVALID, that will generally refer to the top of the physical * address space. * * @this {DebuggerPDP11} @@ -2013,64 +2013,59 @@ if (DEBUGGER) { if (fTemporary && !dbgAddrBreak.fTemporary) continue; /* - * We used to calculate the linear address of the breakpoint at the time the - * breakpoint was added, so that a breakpoint set in one mode (eg, in real-mode) - * would still work as intended if the mode changed later (eg, to protected-mode). - * - * However, that created difficulties setting protected-mode breakpoints in segments - * that might not be defined yet, or that could move in physical memory. - * - * If you want to create a real-mode breakpoint that will break regardless of mode, - * use the physical address of the real-mode memory location instead. + * Since we're checking an execution address, which is always virtual, and virtual + * addresses are always restricted to 16 bits, let's mask the breakpoint address to match + * (the user should know better, but we'll be nice). */ - var addrBreak = this.getAddr(dbgAddrBreak); + var addrBreak = this.getAddr(dbgAddrBreak) & 0xffff; for (var n = 0; n < nb; n++) { - if (addr + n == addrBreak) { - var a; - fBreak = true; - if (dbgAddrBreak.fTemporary) { - this.findBreakpoint(aBreak, dbgAddrBreak, true, true); - fTemporary = true; - } - if (a = dbgAddrBreak.aCmds) { - /* - * When one or more commands are attached to a breakpoint, we don't halt by default. - * Instead, we set fBreak to true only if, at the completion of all the commands, the - * CPU is halted; in other words, you should include "h" as one of the breakpoint commands - * if you want the breakpoint to stop execution. - * - * Another useful command is "if", which will return false if the expression is false, - * at which point we'll jump ahead to the next "else" command, and if there isn't an "else", - * we abort. - */ - fBreak = false; - for (var j = 0; j < a.length; j++) { - if (!this.doCommand(a[j], true)) { - if (a[j].indexOf("if")) { - fBreak = true; // the failed command wasn't "if", so abort - break; - } - var k = j + 1; - for (; k < a.length; k++) { - if (!a[k].indexOf("else")) break; - j++; - } - if (k == a.length) { // couldn't find an "else" after the "if", so abort - fBreak = true; - break; - } - /* - * If we're still here, we'll execute the "else" command (which is just a no-op), - * followed by any remaining commands. - */ + + if ((addr + n) != addrBreak) continue; + + var a; + fBreak = true; + if (dbgAddrBreak.fTemporary) { + this.findBreakpoint(aBreak, dbgAddrBreak, true, true); + fTemporary = true; + } + if (a = dbgAddrBreak.aCmds) { + /* + * When one or more commands are attached to a breakpoint, we don't halt by default. + * Instead, we set fBreak to true only if, at the completion of all the commands, the + * CPU is halted; in other words, you should include "h" as one of the breakpoint commands + * if you want the breakpoint to stop execution. + * + * Another useful command is "if", which will return false if the expression is false, + * at which point we'll jump ahead to the next "else" command, and if there isn't an "else", + * we abort. + */ + fBreak = false; + for (var j = 0; j < a.length; j++) { + if (!this.doCommand(a[j], true)) { + if (a[j].indexOf("if")) { + fBreak = true; // the failed command wasn't "if", so abort + break; } + var k = j + 1; + for (; k < a.length; k++) { + if (!a[k].indexOf("else")) break; + j++; + } + if (k == a.length) { // couldn't find an "else" after the "if", so abort + fBreak = true; + break; + } + /* + * If we're still here, we'll execute the "else" command (which is just a no-op), + * followed by any remaining commands. + */ } - if (!this.cpu.isRunning()) fBreak = true; - } - if (fBreak) { - if (!fTemporary) this.printBreakpoint(aBreak, i, "hit"); - break; } + if (!this.cpu.isRunning()) fBreak = true; + } + if (fBreak) { + if (!fTemporary) this.printBreakpoint(aBreak, i, "hit"); + break; } } } diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 5822957da..acd6440cf 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -518,7 +518,7 @@ var PDP11 = { UNDEF1: 0o177754, UNDEF2: 0o177756, - LSIZE: 0o177760, // Lower Size Register (last 32-word block) (11/70 only) + LSIZE: 0o177760, // Lower Size Register (last 64-byte block #) (11/70 only) HSIZE: 0o177762, // Upper Size Register (always zero) (11/70 only) SYSID: 0o177764, // System ID Register (11/70 only) CPUERR: 0o177766, // CPU error (11/70 only) diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index a54bed8e1..a5a8f5fcf 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -38,6 +38,7 @@ if (NODE) { var Component = require("../../shared/lib/component"); var State = require("../../shared/lib/state"); var BusPDP11 = require("./bus"); + var MemoryPDP11 = require("./memory"); var MessagesPDP11 = require("./messages"); var PC11 = require("./pc11"); var RL11 = require("./rl11"); @@ -854,13 +855,24 @@ DevicePDP11.prototype.writeCTRL = function(data, addr) /** * readSIZE(addr) * + * We're adhering to DEC's documentation, which says: + * + * This read-only register specifies the memory size of the system. It is defined to indicate the + * last addressable block of 32 words in memory (bit 0 is equivalent to bit 6 of the Physical Address). + * + * Looking at the Memory Clear "toggle-in" code in /devices/pdp11/machine/1170/panel/debugger/README.md, the + * memory loop gives up when the block number stored in KIPAR0 is >= LSIZE, suggesting that LSIZE is actually + * the total number of 64-byte blocks, rather than the block number of the last block. But that code is + * not conclusive, since it writes 8192 bytes at a time rather than 64, so it doesn't really matter if LSIZE + * is off by one. + * * @this {DevicePDP11} * @param {number} addr (eg, PDP11.UNIBUS.LSIZE--HSIZE or 177760--177762) * @return {number} */ DevicePDP11.prototype.readSIZE = function(addr) { - return addr == PDP11.UNIBUS.LSIZE? ((BusPDP11.MAX_MEMORY >> 6) - 1) : 0; + return addr == PDP11.UNIBUS.LSIZE? ((this.bus.getMemorySize(MemoryPDP11.TYPE.RAM) >> 6) - 1) : 0; }; /** diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 4c459ac95..18f9d0a96 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -46,273 +46,273 @@ function Ga(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Na(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Oa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Pa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Qa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.rc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +function yb(a){u.call(this,"Panel",a,yb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=zb;this.C={};this.g={START:[1,!0,!1,this.cd],STEP:[1,!1,!1,this.dd],ENABLE:[1,!1,!1,this.Zc],CONT:[1,!0,!1,this.Xc],DEP:[0,!0,!1,this.Yc],EXAM:[1,!0,!1,this.$c],LOAD:[1,!0,!1,this.bd],TEST:[0,!0,!1,this.ad]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ga()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.C=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +k.fd=function(a){return(a?this.Va:this.v)&65535};k.$d=function(a){this.v=a};var hc={},Db=(hc[65400]=[null,null,yb.prototype.fd,yb.prototype.$d,"CNSW"],hc);function Hb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Za[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function mc(a,b){var c=-1,d=this.controller;a=d.Za[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function nc(a,b,c){var d=!1,e=this.controller;a=e.Za[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} function qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].gc(a&this.w,a);this.la--;return a}; -k.oa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].hc(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Zb(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; -k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].lc(c,b&65535,a);this.la--}; -function yc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.qb};k.je=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; -k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.pe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.fa};k.$d=function(){this.b.fa=0};k.od=function(){return this.b.Ac}; -k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return Oc(this.b)};k.ne=function(a){Pc(this.b,a&-1809|Oc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.ld, -K.prototype.ee,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Pd, -K.prototype.Ge,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Xc(this,Tc?Yc:Zc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;dd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.hc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;dd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); +function tc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){d!=wc||a.Ob||(a.Ob+=c);c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)}; +k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a};k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)}; +k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--};k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.ke=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Td=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Ke=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Md=function(a){return this.b.V[1][a>>1&7]};k.De=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Kd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Be=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ld=function(a){return this.b.xa[1][a>>1&7]};k.Ce=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Jd=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.Ae=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.ge=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.ee=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.fe=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.de=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Sd=function(a){return this.b.V[3][a>>1&7]};k.Je=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Qd=function(a){return this.b.V[3][(a>>1&7)+8]};k.He=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Rd=function(a){return this.b.xa[3][a>>1&7]};k.Ie=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Pd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ge=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.pe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.se=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.qe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.re=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.be=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Od=function(){return 1};k.Fe=function(){};k.gd=function(){return this.b.fa}; +k.ae=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.ie=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.le=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Nd=function(a){return a?this.b.fb&65280:0};k.Ee=function(a){this.b.fb=a|255};k.xd=function(){return Pc(this.b)};k.oe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Td,K.prototype.Ke,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Md,K.prototype.De,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Kd,K.prototype.Be,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.ge,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.ee,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, +K.prototype.fe,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.de,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.ke,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.he,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.je,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Sd,K.prototype.Je,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Qd, +K.prototype.He,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Pd,K.prototype.Ge,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.pe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.se,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.qe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.re,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.be,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Od,K.prototype.Fe,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.ae,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.pd,K.prototype.ie,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.le,"PIR"],M[65532]=[null,null,K.prototype.Nd,K.prototype.Ee,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.oe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Yc(this,Uc?Zc:$c);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},ma:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&cd(a,bd,!1),(a.B=c.B)&&ad(a,bd,!1))}function ed(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function ad(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function cd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Xc(a,b){b||(b=fd);cd(a,b,void 0);ad(a,b,void 0)} -var fd=[],$c=[I.prototype.S,I.prototype.wa,I.prototype.ca,I.prototype.Na],bd=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var Zc=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.lb],Yc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; -function gd(a,b){u.call(this,"CPU",a,gd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(gd);var hd=["power","reset"];k=gd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=nd(a)&&(a.yb=a.zb=-1,kd(a),a.ga(),c=!0);c&&a.j(nd(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;pd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+qd(a))} -function rd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function qd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Wd=function(){if(this.A.Z){this.wb>=this.mb&&pd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=rd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=qd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),nd(this));vb(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.vc;this.$=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,od(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;od(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,nd(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){qd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),nd(this));b=!0}this.A.complete=a;return b}; -function sd(a){this.pb=+a.model||1170;this.Ob=a.addrReset||0;gd.call(this,a,6666667);this.decode=1120==this.pb?td.bind(this):ud.bind(this);vd(this);this.L=0;this.M=null;this.A.complete=!1}z(sd,gd);k=sd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();vd(this);jd(this);this.A.error=!1;this.parent.reset.call(this)}; -function vd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.M=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ba=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function wd(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ga()||ld(a.i))}k.sc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];od(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Cd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Dd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Ed(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Fd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Oc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Pc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Xd(this,this.wa);Xd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; -function Yd(a){var b=Zd(a),c=Zd(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Pc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function $d(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Bd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=ae(this,$d(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc($d(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,be(this,$d(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc($d(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ce(this,a,b,c)};k.Qc=function(a,b,c){return $d(this,ce(this,a,b,c),c)};k.zc=function(a){return this.w.oa(a)};k.Td=function(a){return this.w.oa($d(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; -k.Ke=function(a,b){this.w.hb($d(this,a,4),b)};function de(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ce(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function ee(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ce(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=$d(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} -function fe(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function he(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ce(a,b,c,8)}function ie(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ae(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),be(a,e,d.call(a,c,ae(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ke(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?be(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function le(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&me(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&ne(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Yd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Bd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Ad(this))}while(0>1|b<<16;Ed(this,a);return a&65535}function te(a,b){a=b&2048|b>>1|b<<8;Ed(this,a<<8);return a&255}function ue(a,b){a=b&~a;R(this,a);return a}function ve(a,b){a=b&~a;R(this,a<<8);return a}function we(a,b){a|=b;R(this,a);return a}function xe(a,b){a|=b;R(this,a<<8);return a} -function ye(a,b){a=~b|65536;Cd(this,a);return a&65535}function ze(a,b){a=~b|256;Cd(this,a<<8);return a&255}function Ae(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Be(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Ce(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function De(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Ee(a,b){a=-b;Cd(this,a,a&b&32768);return a&65535}function Fe(a,b){a=-b;Cd(this,a<<8,(a&b&128)<<8);return a&255}function Ge(a,b){a=b<<1|this.T>>16&1;Ed(this,a);return a&65535}function He(a,b){a=b<<1|this.T>>16&1;Ed(this,a<<8);return a&255}function Ie(a,b){a=(this.T&65536|b)>>1|b<<16;Ed(this,a);return a&65535}function Je(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Ed(this,a<<8);return a&255}function Ke(a,b){var c=b-a;Fd(this,c,a,b);return c&65535} -function Le(a,b){var c=b-a;Fd(this,c<<8,a<<8,b<<8);return c&255}function Me(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Ne(a,b){a^=b;R(this,a);return a&65535}function Oe(a){T(this,a,ge(this,a),oe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Pe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Qe(a){var b=je(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Re(a){U(this,a,!xd(this))}function Se(a){U(this,a,xd(this))} -function Te(a){T(this,a,ge(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,fe(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){T(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){S(this,a,fe(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Xe(a){R(this,ge(this,a)&je(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ye(a){R(this,(fe(this,a)&ie(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){U(this,a,zd(this))}function $e(a){U(this,a,!this.Ta()==!yd(this))}function af(a){U(this,a,!zd(this)&&!this.Ta()==!yd(this))}function bf(a){U(this,a,!xd(this)&&!zd(this))}function cf(a){U(this,a,zd(this)||!this.Ta()!=!yd(this))} -function df(a){U(this,a,xd(this)||zd(this))}function ef(a){U(this,a,!this.Ta()!=!yd(this))}function ff(a){U(this,a,this.Ta())}function gf(a){U(this,a,!zd(this))}function hf(a){U(this,a,!this.Ta())}function jf(){this.pa(12,1);this.b-=5}function kf(a){U(this,a,!0)}function lf(a){U(this,a,!yd(this))}function mf(a){U(this,a,yd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function nf(a){var b=ge(this,a);a=je(this,a);Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function of(a){var b=fe(this,a)<<8;a=ie(this,a)<<8;Fd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function pf(a){var b=je(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function qf(){this.pa(24,2);this.b-=25} -function rf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?sf(this.i):this.ga();this.b-=7}function tf(){this.pa(16,4);this.b-=25}var uf=[0,7,7,10,7,11,9,13];function vf(a){this.J=this.b;O(this,he(this,a));this.b=this.J-uf[this.g]}var wf=[0,14,14,17,14,18,16,20];function xf(a){this.J=this.b;var b=he(this,a);a=a>>6&7;Xd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-wf[this.g]}var yf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function zf(a){var b=ge(this,a);this.J=this.b;R(this,le(this,a,b));this.b=this.J-yf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Af(a){var b=fe(this,a);R(this,ke(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Bf=[7,13,13,17,14,18,17,21]; -function Cf(a){var b=je(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function If(a){T(this,a,ge(this,a),Ke);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Jf(a){T(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)}function Kf(){this.pa(28,5);this.b-=5}function Lf(){this.I|=4;Bd(this,-2);this.b-=3}function Mf(a){T(this,a,ge(this,a),Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=sf(b);b||this.pa(8,6)}function td(a){Nf[a>>12].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)}function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a>>6&3].call(this,a)} -function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a&15].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)}function bg(a){cg[a>>6&3].call(this,a)} -var Nf=[function(a){dg[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,W,function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],dg=[function(a){fg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,W,W,W],Pf=[function(a){Cd(this,le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0, -Ee);this.b-=this.g?11:6},function(a){T(this,a,xd(this)?1:0,oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,xd(this)?1:0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Cd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Tf=[function(a){T(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)}], -fg=[function(a){gg[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,W,Uf,Wf,Jf,Jf,Jf,Jf],gg=[rf,Lf,Ff,jf,tf,Ef,W,W,W,W,W,W,W,W,W,W],Vf=[Df,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Xf=[Df,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],eg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,W,W,W],Zf=[function(a){Cd(this, -ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],ag=[function(a){S(this,a,0,Fe);this.b-=this.g?11:6},function(a){S(this,a,xd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,xd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ie(this,a);Cd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],cg=[function(a){S(this,a,0,Je);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}];function ud(a){hg[a>>12].call(this,a)} -var hg=[function(a){ig[a>>8&15].call(this,a)},zf,nf,Xe,Te,Ve,Oe,function(a){jg[a>>8&15].call(this,a)},function(a){kg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,If,W],ig=[function(a){lg[a>>4&15].call(this,a)},kf,gf,Ze,$e,ef,af,cf,xf,xf,Of,Qf,Sf,function(a){mg[a>>6&3].call(this,a)},W,W],mg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=de(this,a,0);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J= -this.b;ee(this,a,0,b);R(this,b);this.b=this.J-Bf[this.g]},function(a){R(this,le(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],lg=[function(a){ng[a&15].call(this,a)},W,W,W,vf,vf,vf,vf,Gf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Uf,Wf,Jf,Jf,Jf,Jf],ng=[rf,Lf,Ff,jf,tf,Ef,function(){Yd(this);this.b-=13},W,W,W,W,W,W,W,W,W],jg=[Cf,Cf,pf,pf,Pe,Pe,Qe,Qe,Mf,Mf,W,W,W,W,Hf,Hf],kg=[hf,ff,bf,df,lf,mf,Re,Se,qf,Kf,Yf,$f,bg,function(a){og[a>> -6&3].call(this,a)},W,W],og=[W,function(a){a=de(this,a,65536);Xd(this,a);R(this,a);this.b-=11},function(a){var b=Zd(this);this.J=this.b;ee(this,a,65536,b);R(this,b);this.b=this.J-Bf[this.g]},W]; -function pg(a){u.call(this,"ROM",a,pg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);qg(c)})}}z(pg);pg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;qg(this)}; -pg.prototype.Ha=function(){this.ha&&(this.i&&rg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};pg.prototype.Ga=function(){return!0}; -function qg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Wc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():wd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ja))});this.ma=Mc(52,4);this.$=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Qg);H(this)}; -k.wc=function(){if(!this.J){var a=id(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ga=function(a){return a?this.save():!0};k.reset=function(){Rg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Rg(this)};function Rg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.$,1E3/Math.round(this.R/10))}};var Sg={},Qg=(Sg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Sg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Sg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Sg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Sg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Vg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Vg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Wg(a);var e=this;if((this.g=id(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.ca=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&eh(a,b,c,d,e.da,e.La, -e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));bh(a)})}function Zg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){lh(a,b,c,d)})} -function lh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=od(a)&&(a.yb=a.zb=-1,ld(a),a.ga(),c=!0);c&&a.j(od(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+rd(a))} +function sd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} +k.Xd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Ub&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=sd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; +function td(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;hd.call(this,a,6666667);this.decode=1120==this.pb?ud.bind(this):vd.bind(this);wd(this);this.L=0;this.M=null;this.A.complete=!1}z(td,hd);k=td.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();wd(this);kd(this);this.A.error=!1;this.parent.reset.call(this)}; +function wd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Ud,a.Nb=a.Le,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,qc(a.w,16))}function xd(a,b,c){a.Pb=b;O(a,b);!c&&a.i&&(a.ga()||md(a.i))}k.tc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];pd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Dd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ed(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function Zd(a){var b=$d(a),c=$d(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Qc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function ae(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Ud=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; +k.Le=function(a,b){this.w.hb(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function fe(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function he(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ie(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return de(a,b,c,8)}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function ke(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Zd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function ue(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ve(a,b){a=b&~a;R(this,a);return a}function we(a,b){a=b&~a;R(this,a<<8);return a}function xe(a,b){a|=b;R(this,a);return a}function ye(a,b){a|=b;R(this,a<<8);return a} +function ze(a,b){a=~b|65536;Dd(this,a);return a&65535}function Ae(a,b){a=~b|256;Dd(this,a<<8);return a&255}function Be(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ce(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function De(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ee(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Fe(a,b){a=-b;Dd(this,a,a&b&32768);return a&65535}function Ge(a,b){a=-b;Dd(this,a<<8,(a&b&128)<<8);return a&255}function He(a,b){a=b<<1|this.T>>16&1;Fd(this,a);return a&65535}function Ie(a,b){a=b<<1|this.T>>16&1;Fd(this,a<<8);return a&255}function Je(a,b){a=(this.T&65536|b)>>1|b<<16;Fd(this,a);return a&65535}function Ke(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Fd(this,a<<8);return a&255}function Le(a,b){var c=b-a;Gd(this,c,a,b);return c&65535} +function Me(a,b){var c=b-a;Gd(this,c<<8,a<<8,b<<8);return c&255}function Ne(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Oe(a,b){a^=b;R(this,a);return a&65535}function Pe(a){T(this,a,he(this,a),pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Qe(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Re(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Se(a){U(this,a,!yd(this))}function Te(a){U(this,a,yd(this))} +function Ue(a){T(this,a,he(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){S(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){T(this,a,he(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){S(this,a,ge(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Ye(a){R(this,he(this,a)&ke(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){R(this,(ge(this,a)&je(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function $e(a){U(this,a,Ad(this))}function af(a){U(this,a,!this.Ta()==!zd(this))}function bf(a){U(this,a,!Ad(this)&&!this.Ta()==!zd(this))}function cf(a){U(this,a,!yd(this)&&!Ad(this))}function df(a){U(this,a,Ad(this)||!this.Ta()!=!zd(this))} +function ef(a){U(this,a,yd(this)||Ad(this))}function ff(a){U(this,a,!this.Ta()!=!zd(this))}function gf(a){U(this,a,this.Ta())}function hf(a){U(this,a,!Ad(this))}function jf(a){U(this,a,!this.Ta())}function kf(){this.pa(12,1);this.b-=5}function lf(a){U(this,a,!0)}function mf(a){U(this,a,!zd(this))}function nf(a){U(this,a,zd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function of(a){var b=he(this,a);a=ke(this,a);Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function pf(a){var b=ge(this,a)<<8;a=je(this,a)<<8;Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function qf(a){var b=ke(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function rf(){this.pa(24,2);this.b-=25} +function sf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?tf(this.i):this.ga();this.b-=7}function uf(){this.pa(16,4);this.b-=25}var vf=[0,7,7,10,7,11,9,13];function wf(a){this.J=this.b;O(this,ie(this,a));this.b=this.J-vf[this.g]}var xf=[0,14,14,17,14,18,16,20];function yf(a){this.J=this.b;var b=ie(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-xf[this.g]}var zf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Af(a){var b=he(this,a);this.J=this.b;R(this,me(this,a,b));this.b=this.J-zf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Bf(a){var b=ge(this,a);R(this,le(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Cf=[7,13,13,17,14,18,17,21]; +function Df(a){var b=ke(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Jf(a){T(this,a,he(this,a),Le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Kf(a){T(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function Lf(){this.pa(28,5);this.b-=5}function Mf(){this.I|=4;Cd(this,-2);this.b-=3}function Nf(a){T(this,a,he(this,a),Oe);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=tf(b);b||this.pa(8,6)}function ud(a){Of[a>>12].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)} +function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} +var Of=[function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,W,function(a){fg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],eg=[function(a){gg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,W,W,W],Qf=[function(a){Dd(this,me(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],Sf=[function(a){T(this,a,0, +Fe);this.b-=this.g?11:6},function(a){T(this,a,yd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,yd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ke(this,a);Dd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Uf=[function(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}], +gg=[function(a){hg[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,W,Vf,Xf,Kf,Kf,Kf,Kf],hg=[sf,Mf,Gf,kf,uf,Ff,W,W,W,W,W,W,W,W,W,W],Wf=[Ef,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Yf=[Ef,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],fg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,W,W,W],$f=[function(a){Dd(this, +le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)}],bg=[function(a){S(this,a,0,Ge);this.b-=this.g?11:6},function(a){S(this,a,yd(this)?1:0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,yd(this)?1:0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Dd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],dg=[function(a){S(this,a,0,Ke);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ue);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)}];function vd(a){ig[a>>12].call(this,a)} +var ig=[function(a){jg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],jg=[function(a){mg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,function(a){ng[a>>6&3].call(this,a)},W,W],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ee(this,a,0);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J= +this.b;fe(this,a,0,b);R(this,b);this.b=this.J-Cf[this.g]},function(a){R(this,me(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Vf,Xf,Kf,Kf,Kf,Kf],og=[sf,Mf,Gf,kf,uf,Ff,function(){Zd(this);this.b-=13},W,W,W,W,W,W,W,W,W],kg=[Df,Df,qf,qf,Qe,Qe,Re,Re,Nf,Nf,W,W,W,W,If,If],lg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,function(a){pg[a>> +6&3].call(this,a)},W,W],pg=[W,function(a){a=ee(this,a,65536);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J=this.b;fe(this,a,65536,b);R(this,b);this.b=this.J-Cf[this.g]},W]; +function qg(a){u.call(this,"ROM",a,qg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);rg(c)})}}z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)}; +qg.prototype.Ha=function(){this.ha&&(this.i&&sg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};qg.prototype.Ga=function(){return!0}; +function rg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Xc)){var c;for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ja))});this.ma=Nc(52,4);this.$=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.ma)});Cb(b,this,Rg);H(this)}; +k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Sg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Sg(this)};function Sg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ue,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.te,"RBUF"],Tg[65396]=[null,null,Y.prototype.Wd,Y.prototype.Ne,"XCSR"],Tg[65398]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Wg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Wg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Xg(a);var e=this;if((this.g=jd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.ca=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&fh(a,b,c,d,e.da,e.La, +e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));ch(a)})}function $g(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, +null,!0,function(b,c,d){mh(a,b,c,d)})} +function mh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=nh(this,a++);)ph(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function ph(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&qh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&rh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=nh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&rh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=oh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";qh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){sh(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return sh(this,a[0])};function vh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}xh(a,e,b,c,!1,d)}else wh(a,e)} -function xh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,wh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,kh(new gh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} -k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.sb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));qh(this,a.fc)}; -function uh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ac(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Ac(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.ea&65535}; -k.we=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; -var yh={},th=(yh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],yh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],yh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],yh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],yh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],yh);function zh(a){u.call(this,"Debugger",a,zh);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(zh); -var Ah={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};zh.prototype.tc=function(){return-1};zh.prototype.uc=function(){}; -function Bh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function Ch(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;sh(d,sa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=jd(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}th(this);this.P=Nc(112,5);Cb(b,this,uh,2097152);vh(this,"None","",!0);this.L&&vh(this,"Local Disk","?");vh(this,"Remote Disk","??");wh(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.sc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";rh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){th(this)};k.save=function(){return(new P(this)).data()}; +k.restore=function(a){return th(this,a[0])};function wh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}yh(a,e,b,c,!1,d)}else xh(a,e)} +function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; +function vh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ce=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.xe=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.ce),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.ve=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ye=function(a){this.g=a};k.Id=function(){return this.D};k.ze=function(a){this.D=a};k.Fd=function(){return this.K};k.we=function(a){this.K=a&63}; +var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.xe,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ye,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.ze,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.we,"RLBE"],zh);function Ah(a){u.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); +var Bh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ah.prototype.uc=function(){return-1};Ah.prototype.vc=function(){}; +function Ch(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} +function Dh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Dh(a,b,c){var d;if(b){b=Eh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Hh(a,b){if(b)return Gh(a,b,a.Y[b]);var c=0;for(b in a.Y)Gh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ih(a,b){if(b)return Hh(a,b,a.Y[b]);var c=0;for(b in a.Y)Hh(a,b,a.Y[b]),c++;return 0this.b.pb?Qh:[];Rh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Sh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Oc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,qd(a),a.ua=0,a.qa()))};function Kh(a){var b;if(!me(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?Zh(a):$h(a)}}function Yh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Kh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;ai(this);a||ld(this)};k.save=function(){var a=new P(this);a.set(0,Uh(this.L));a.set(1,Uh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Vh(a[b++]),this.P=Vh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function sf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} -function Jh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||bi(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ci(this,a,a.length-1,"set"),Kh(this)));return d}; -function bi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Kh(a);break}}return f}function di(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Xh(y);break;case 8:x="@"+Xh(y);break;case 16:7>y?x="("+Xh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Xh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Xh(y)+")";break;case 40:x="@-("+Xh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Xh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Xh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Xh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Oc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ii(a){var b,c="";for(b=0;6>b;b++)c+=hi(a,b);c=c+"\n"+(hi(a,6)+hi(a,7));c+=hi(a,20)+hi(a,21);return c+=gi(a,"T")+gi(a,"N")+gi(a,"Z")+gi(a,"V")+gi(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ha:e,mc:f})}function ji(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ii(a));c&&(a.L=Z(d.u[7]),$h(a,J(a,a.L.F)))}}function ni(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=fi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function ei(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Id=[];"call"==zg&&(Kb=1E5,Id=["CALL"]);for(void 0!==yg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Bg++;Kb--}}Bg||(a.j("no "+Ag+"history available"),a.vb=void 0)}else{var Mb=Sh(a,ma);if(Mb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Hi),Bc=Fh(a,La)>>>0,65536>4||1,Ob="";Ji--&&0Ec?String.fromCharCode(Ec):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Jd+(0==Pb?" "+Eg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Xb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.oa,Md=a.hb):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Sh(a,Od);if(Fc)for(var Gc= -2;GcRd;){for(var Ma=null,Mi=256;65536>Tb.F>>>0;){Sd.F=a.oa(Tb,2);if(null==Tb.F||!Mi--)break;if(!(Sd.F&1)){for(var Ni=a,Hc=Sd,Gg=null,Ub=Hc.F,Hg=Ub,Td=1;6>=Td&&Ub;Td++){if(2< -Td){Hc.F=Ub;var Ic=fi(Ni,Hc);if(0<=Ic.indexOf("JSR")){var Ig=Ic.indexOf(" ");if(Ub+(Ic.indexOf(" ",Ig+1)-Ig-1)/2==Hg){Gg=Ic;break}}}Ub-=2}Hc.F=Hg;if(Ma=Gg)break}}if(!Ma||null==Ma)break;var Jg=null;if("ks"==Li){var Kg=Ma.match(/[0-9A-F]+$/);Kg&&(Jg=mi(a,Kg[0]))}Ma=xa(Ma,50)+" ;"+(Jg||"stack="+J(a,Tb.F));a.j(Ma);Rd++}Rd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){mi(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Ud=0;Ud\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bsi){if(ui(d,this.J)){this.C=new P(this,"1.30.3","failsafe");ui(this.C)&&(zi(this,d),a=2,Ai(this.C));this.C.set("timestamp",Ca());Bi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=yi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?ui(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Ai(d),ui(d)?(c=yi(d),e=!0):c=!1))}e&&xi(this,c?d:null)}else 2==a&&d.clear()}else xi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ci(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(zi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function zi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function pi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lthis.b.pb?Rh:[];Sh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Th(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Pc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,rd(a),a.ua=0,a.qa()))};function Lh(a){var b;if(!ne(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Lh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;bi(this);a||md(this)};k.save=function(){var a=new P(this);a.set(0,Vh(this.L));a.set(1,Vh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Wh(a[b++]),this.P=Wh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} +function Kh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ci(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(di(this,a,a.length-1,"set"),Lh(this)));return d}; +function ci(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Lh(a);break}}return f}function ei(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Yh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Pc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ji(a){var b,c="";for(b=0;6>b;b++)c+=ii(a,b);c=c+"\n"+(ii(a,6)+ii(a,7));c+=ii(a,20)+ii(a,21);return c+=hi(a,"T")+hi(a,"N")+hi(a,"Z")+hi(a,"V")+hi(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.pc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Te:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ji(a));c&&(a.L=Z(d.u[7]),ai(a,J(a,a.L.F)))}}function oi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=gi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ii),Cc=Gh(a,La)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(kb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(kb=2,Ld=65535,Md=a.oa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Gc=Th(a,Pd);if(Gc)for(var Hc= +2;HcSd;){for(var Ma=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< +Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Ma=Hg)break}}if(!Ma||null==Ma)break;var Kg=null;if("ks"==Mi){var Lg=Ma.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Ma=xa(Ma,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Ma);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Vd=0;Vd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bti){if(vi(d,this.J)){this.C=new P(this,"1.30.3","failsafe");vi(this.C)&&(Ai(this,d),a=2,Bi(this.C));this.C.set("timestamp",Ca());Ci(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?vi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Bi(d),vi(d)?(c=zi(d),e=!0):c=!1))}e&&yi(this,c?d:null)}else 2==a&&d.clear()}else yi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Di(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(Ai(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function Ai(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function qi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;l(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ti(a,b,c)}})}else c(a,null)} -function Ui(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Gi||Za(!0));l=!1}var g,h,l=!0;Gi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Ri(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Gi||Za(!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),--Gi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ri(b,a,d,!0,e,m):Si(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ui(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +k.qa=function(a){if(this.b){var b=this.b,c=b.G.speed;c&&(c.textContent=b.A.Z&&b.Y?b.Y.toFixed(2)+"Mhz":"Stopped")}if(this.f&&(b=this.f,b.D)){if(!(0(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ui(a,b,c)}})}else c(a,null)} +function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Si(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hi||Za(!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),--Hi||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index e5c23d23b..f0b25cb23 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -45,198 +45,198 @@ d.K[f++]=e[c]>>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function u(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va} function za(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Aa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Ba(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ca={init:[],show:[],exit:[]},Da=!1,Ea=!1,Fa=!0; function Ga(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ha(a){Ca.init.push(a)}function Ia(a){if(Fa)try{for(var b=0;bb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +Ga(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ia(Ca.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.kc=b;b=this.id.indexOf(".");0>b?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.sc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +function Za(a){x.call(this,"Panel",a,Za);this.b=this.i=this.f=this.w=this.s=0;this.A=this.C=this.v=!1;this.F=$a;this.m={};this.c={START:[1,!0,!1,this.rc],STEP:[1,!1,!1,this.sc],ENABLE:[1,!1,!1,this.nc],CONT:[1,!0,!1,this.lc],DEP:[0,!0,!1,this.mc],EXAM:[1,!0,!1,this.oc],LOAD:[1,!0,!1,this.qc],TEST:[0,!0,!1,this.pc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.qc=function(a){a||this.a.l.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.rc=function(){};h.mc=function(a){a||G(this.a)};h.kc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.pb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.mb(0),Va(a,!1);else try{var c=this.a.mb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.w=[];this.ac=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;if(a=e.ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||J(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.j,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} -h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Eb(a&this.j,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ia)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; -function Mb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Ec=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Fc=function(){return this.a.zb};h.Gc=function(){return this.a.Ga}; -h.yd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Mb=a&16?4194303:262143,Ub(b))};h.fd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Yd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.Zc=function(a){return this.a.H[1][a>>1&7]};h.Rd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Pd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.Yc=function(a){return this.a.Y[1][a>>1&7]};h.Qd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Wc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Od=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Ac=function(a){return this.a.H[0][a>>1&7]};h.ud=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.sd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.zc=function(a){return this.a.Y[0][a>>1&7]}; -h.td=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.xc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.rd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.ed=function(a){return this.a.H[3][a>>1&7]};h.Xd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.cd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Vd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.dd=function(a){return this.a.Y[3][a>>1&7]};h.Wd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.bd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Ud=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Lc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Dd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Oc=function(){return this.a.g[7]};h.Gd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Mc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Ed=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Nc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Fd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.vc=function(a){return this.a.Vb[a-65504>>1]}; -h.pd=function(a,b){this.a.Vb[b-65504>>1]=a};h.Rb=function(a){return 65520==a?61183:0};h.Yb=function(){};h.ad=function(){return 1};h.Td=function(){};h.uc=function(){return this.a.M};h.od=function(){this.a.M=0};h.Cc=function(){return this.a.Ub};h.wd=function(a,b){b&1||(a&=255);this.a.Ub=a};h.Hc=function(a){return a?this.a.Ab:0};h.zd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Ab=a;b.u|=2};h.$c=function(a){return a?this.a.Da&65280:0};h.Sd=function(a){this.a.Da=a|255}; -h.Kc=function(){return Vb(this.a)};h.Cd=function(a){Wb(this.a,a&-1809|Vb(this.a)&1808);this.a.u|=128};h.Xb=function(){}; -var N={},M=(N[61568]=[null,null,L.prototype.fd,L.prototype.Yd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Yc,L.prototype.Qd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Wc,L.prototype.Od,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Ac,L.prototype.ud,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.yc,L.prototype.sd,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.zc, -L.prototype.td,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.xc,L.prototype.rd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Gc,L.prototype.yd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Bc,L.prototype.vd,"LKS"],N[65402]=[null,null,L.prototype.Dc,L.prototype.xd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Ec,L.prototype.Xb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Fc,L.prototype.Xb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.cd, -L.prototype.Vd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.dd,L.prototype.Wd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.bd,L.prototype.Ud,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, -"R5SET0"],N[65478]=[null,null,L.prototype.Lc,L.prototype.Dd,"R6KERNEL"],N[65479]=[null,null,L.prototype.Oc,L.prototype.Gd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, -L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.vc,L.prototype.pd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Rb,L.prototype.Yb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Rb,L.prototype.Yb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.ad,L.prototype.Td,"SYSID",1,1170],N[65526]=[null,null,L.prototype.uc,L.prototype.od,"CPUERR",1,1170],N[65528]= -[null,null,L.prototype.Cc,L.prototype.wd,"MB",1,1170],N[65530]=[null,null,L.prototype.Hc,L.prototype.zd,"PIR"],N[65532]=[null,null,L.prototype.$c,L.prototype.Sd,"SL"],N[65534]=[null,null,L.prototype.Kc,L.prototype.Cd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),dc(this,$b?ec:fc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Sb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Eb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.Zb(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,jc,!1),(a.m=c.m)&&kc(a,jc,!1))}function kc(a,b,c){c&&a.m||(a.Db=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Eb=b[1]||a.f,a.Zb=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.xb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Sb=b[2]||a.w}function dc(a,b){b||(b=lc);ic(a,b,void 0);kc(a,b,void 0)} -var lc=[],gc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],jc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var fc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],ec=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function mc(a,b){x.call(this,"CPU",a,mc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.ub=Math.round(this.fb/1E4)/100;this.wa=this.ub*this.qa;this.l.U=!1;this.l.Bb=!1;this.l.Ua=a.autoStart;this.l.gb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Pb=this.kd.bind(this);F(this)}z(mc);var nc=["power","reset"];h=mc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=rc(a)&&(a.Qa=a.Ra=-1,qc(a),G(a),c=!0);c&&a.T(rc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.ub*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&uc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;tc(a)}function Pb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Rb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+vc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -function vc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.kd=function(){if(this.l.U){this.vb>=this.fb&&tc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Nb&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=vc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Ob&&(this.va(),this.Ob=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),rc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Pb;this.oa=ra();c=this.Nb;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,sc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.vb+=this.Ta;this.oa+=c;a(b,c)}}}; -function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{sc(a);a.l.U=!0;a.l.Bb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,rc(a));setTimeout(a.Pb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){vc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),rc(a));b=!0}a.l.complete=void 0;return b} -function wc(a){this.Wa=+a.model||1170;this.Jb=a.addrReset||0;mc.call(this,a,6666667);this.decode=1120==this.Wa?xc.bind(this):yc.bind(this);zc(this);this.ra=0;this.N=null;this.l.complete=!1}z(wc,mc);h=wc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);zc(this);pc(this);this.l.error=!1;this.parent.reset.call(this)}; -function zc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Jb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Vb=[0,0,0,0,0,0,0,0];a.Ub=0;a.u=0;a.A=a.C=0;a.c=a.b=a.qb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Ab=0;a.w=0;a.Ca=0;a.zb=0;a.Ga=0;a.Ba=0;a.ab=0;a.Mb=262143;a.N=null;a.h&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.hc,a.W=a.gd,a.ob=a.Zd,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.gc,a.W=a.Tb,a.ob=a.$b,Bb(a.h,16))}function Ac(a,b,c){a.Jb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Ib=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Mb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];sc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Dc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Ec(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Fc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Vb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.zb=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Wb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Hc(a,a.Ia);Hc(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Ic(a){var b=Jc(a),c=Jc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Wb(a,c);a.u&=-17} -function Jb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Kc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Mb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Db(b&a.j,c&255,b)}function Jc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Hc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Cc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.h.kb(a);this.ra++;a=this.Tb(Kc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Lc(this,Kc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.$b(Kc(this,a,4),b),this.ra--):this.h.lb(a,b)};h.gc=function(a,b,c){return Mc(this,a,b,c)};h.hc=function(a,b,c){return Kc(this,Mc(this,a,b,c),c)};h.Tb=function(a){return Kb(this.h,a)};h.gd=function(a){return Kb(this.h,Kc(this,a,2))};h.$b=function(a,b){Lb(this.h,a,b&65535)};h.Zd=function(a,b){Lb(this.h,Kc(this,a,4),b)}; -function Nc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Mc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Oc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Mc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Kc(a,e|c&65536,4),a.v=a.B>>14&3,Lb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Pc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Qc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]}function Rc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Mc(a,b,c,8)}function Sc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Ib(a.h,c)):a=a.g[c]&255;return a}function Tc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Kb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.qb=a.J(b,e,7),Lc(a,e,d.call(a,c,Ib(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Lb(a.h,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Uc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Lc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Vc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.mb=function(a){this.l.complete=!0;var b=a?this.l.Bb?0:1:-1;this.l.Bb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Ab&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.md,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Cc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Bc(this))}while(0>1|b<<16;Fc(this,a);return a&65535}function ad(a,b){a=b&2048|b>>1|b<<8;Fc(this,a<<8);return a&255}function bd(a,b){a=b&~a;S(this,a);return a}function cd(a,b){a=b&~a;S(this,a<<8);return a}function dd(a,b){a|=b;S(this,a);return a}function ed(a,b){a|=b;S(this,a<<8);return a}function fd(a,b){a=~b|65536;Dc(this,a);return a&65535}function gd(a,b){a=~b|256;Dc(this,a<<8);return a&255} -function hd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function id(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function jd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function kd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function ld(a,b){a=-b;Dc(this,a,a&b&32768);return a&65535}function md(a,b){a=-b;Dc(this,a<<8,(a&b&128)<<8);return a&255} -function nd(a,b){a=b<<1|this.m>>16&1;Fc(this,a);return a&65535}function od(a,b){a=b<<1|this.m>>16&1;Fc(this,a<<8);return a&255}function pd(a,b){a=(this.m&65536|b)>>1|b<<16;Fc(this,a);return a&65535}function qd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Fc(this,a<<8);return a&255}function rd(a,b){var c=b-a;Gc(this,c,a,b);return c&65535}function sd(a,b){var c=b-a;Gc(this,c<<8,a<<8,b<<8);return c&255}function td(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function ud(a,b){a^=b;S(this,a);return a&65535}function vd(a){U(this,a,Qc(this,a),Wc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function wd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function xd(a){var b=Tc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function yd(a){V(this,a,!R(this))}function zd(a){V(this,a,R(this))} -function Ad(a){U(this,a,Qc(this,a),bd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Bd(a){T(this,a,Pc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){U(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){T(this,a,Pc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Ed(a){S(this,Qc(this,a)&Tc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Fd(a){S(this,(Pc(this,a)&Sc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){V(this,a,this.i&65535?0:4)}function Hd(a){V(this,a,!this.za()==!(this.f&32768))}function Id(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Kd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Ld(a){V(this,a,R(this)||(this.i&65535?0:4))}function Md(a){V(this,a,!this.za()!=!(this.f&32768))}function Nd(a){V(this,a,this.za())}function Od(a){V(this,a,!!(this.i&65535))}function Pd(a){V(this,a,!this.za())}function Qd(){K(this,12,1);this.a-=5}function Rd(a){V(this,a,!0)}function Sd(a){V(this,a,!(this.f&32768))}function Td(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Ud(a){var b=Qc(this,a);a=Tc(this,a);Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Vd(a){var b=Pc(this,a)<<8;a=Sc(this,a)<<8;Gc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Wd(a){var b=Tc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Xd(){K(this,24,2);this.a-=25} -function Yd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function Zd(){K(this,16,4);this.a-=25}var $d=[0,7,7,10,7,11,9,13];function ae(a){this.F=this.a;P(this,Rc(this,a));this.a=this.F-$d[this.c]}var be=[0,14,14,17,14,18,16,20];function ce(a){this.F=this.a;var b=Rc(this,a);a=a>>6&7;Hc(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-be[this.c]}var de=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ee(a){var b=Qc(this,a);this.F=this.a;S(this,Vc(this,a,b));this.a=this.F-de[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function fe(a){var b=Pc(this,a);S(this,Uc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ge=[7,13,13,17,14,18,17,21]; -function he(a){var b=Tc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function ne(a){U(this,a,Qc(this,a),rd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function oe(a){U(this,a,0,td);this.a-=this.c?9:3+(7==this.b?2:0)}function pe(){K(this,28,5);this.a-=5}function qe(){this.u|=4;Cc(this,-2);this.a-=3}function re(a){U(this,a,Qc(this,a),ud);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function xc(a){se[a>>12].call(this,a)}function te(a){ue[a>>6&3].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a&15].call(this,a)}function Be(a){Ce[a&15].call(this,a)} -function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)} -var se=[function(a){Je[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,Y,function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Je=[function(a){Le[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,Y,Y,Y],ue=[function(a){Dc(this,Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,hd);this.a-=this.c?9:3+(7==this.b?2:0)}],we=[function(a){U(this,a,0, -ld);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Wc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Dc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ye=[function(a){U(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Le=[function(a){Me[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,Y,ze,Be,oe,oe,oe,oe],Me=[Yd,qe,ke,Qd,Zd,je,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ae=[ie,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ce=[ie,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ke=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,Y,Y,Y],Ee=[function(a){Dc(this, -Uc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],Ge=[function(a){T(this,a,0,md);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Sc(this,a);Dc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Ie=[function(a){T(this,a,0,qd);this.a-=this.c?9+(this.qb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9+(this.qb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}];function yc(a){Ne[a>>12].call(this,a)} -var Ne=[function(a){Oe[a>>8&15].call(this,a)},ee,Ud,Ed,Ad,Cd,vd,function(a){Pe[a>>8&15].call(this,a)},function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,ne,Y],Oe=[function(a){Re[a>>4&15].call(this,a)},Rd,Od,Gd,Hd,Md,Id,Kd,ce,ce,te,ve,xe,function(a){Se[a>>6&3].call(this,a)},Y,Y],Se=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Nc(this,a,0);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F= -this.a;Oc(this,a,0,b);S(this,b);this.a=this.F-ge[this.c]},function(a){S(this,Vc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Re=[function(a){Te[a&15].call(this,a)},Y,Y,Y,ae,ae,ae,ae,le,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},ze,Be,oe,oe,oe,oe],Te=[Yd,qe,ke,Qd,Zd,je,function(){Ic(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Pe=[he,he,Wd,Wd,wd,wd,xd,xd,re,re,Y,Y,Y,Y,me,me],Qe=[Pd,Nd,Jd,Ld,Sd,Td,yd,zd,Xd,pe,De,Fe,He,function(a){Ue[a>>6& -3].call(this,a)},Y,Y],Ue=[Y,function(a){a=Nc(this,a,65536);Hc(this,a);S(this,a);this.a-=11},function(a){var b=Jc(this);this.F=this.a;Oc(this,a,65536,b);S(this,b);this.a=this.F-ge[this.c]},Y]; -function Ve(a){x.call(this,"ROM",a,Ve);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);We(c)})}}z(Ve);Ve.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;We(this)}; -Ve.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};Ve.prototype.ja=function(){return!0}; -function We(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,cc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Ac(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Qb(e.a,e.aa))});this.da=Sb(52,4);this.P=Pb(this.a,function(){e.c|=128;e.c&64&&Qb(e.a,e.da)});cb(b,this,bf);F(this)}; -h.Lb=function(){if(!this.v){var a=oc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Lb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){cf(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return cf(this)};function cf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.yb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Rb(this.a,this.P,1E3/Math.round(this.I/10))}};var df={},bf=(df[65392]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RCSR"],df[65394]=[null,null,Z.prototype.Pc,Z.prototype.Hd,"RBUF"],df[65396]=[null,null,Z.prototype.jd,Z.prototype.ae,"XCSR"],df[65398]=[null,null,Z.prototype.hd,Z.prototype.$d,"XBUF"],df);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&gf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;gf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=hf(a);var e=this;if((this.c=oc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Sb(56,4);this.R=Pb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&rf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));of(a)})}function lf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.tb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){yf(a,b,c,d)})} -function yf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.ob+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){d!=Hb||a.gb||(a.gb+=c);c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} +h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; +function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; +h.zd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Vb(b))};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; +h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; +h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.h.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.ad=function(a){return a?this.a.Da&65280:0};h.Td=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Dd=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var N={},M=(N[61568]=[null,null,L.prototype.gd,L.prototype.Zd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.$c,L.prototype.Sd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Yc,L.prototype.Qd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Bc,L.prototype.vd,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.zc,L.prototype.td,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.Ac, +L.prototype.ud,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.yc,L.prototype.sd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Hc,L.prototype.zd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Cc,L.prototype.wd,"LKS"],N[65402]=[null,null,L.prototype.Ec,L.prototype.yd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.fd,L.prototype.Yd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.dd, +L.prototype.Wd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.cd,L.prototype.Vd,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, +"R5SET0"],N[65478]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6KERNEL"],N[65479]=[null,null,L.prototype.Pc,L.prototype.Hd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, +L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Oc,L.prototype.Gd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.wc,L.prototype.qd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.bd,L.prototype.Ud,"SYSID",1,1170],N[65526]=[null,null,L.prototype.vc,L.prototype.pd,"CPUERR",1,1170],N[65528]= +[null,null,L.prototype.Dc,L.prototype.xd,"MB",1,1170],N[65530]=[null,null,L.prototype.Ic,L.prototype.Ad,"PIR"],N[65532]=[null,null,L.prototype.ad,L.prototype.Td,"SL"],N[65534]=[null,null,L.prototype.Lc,L.prototype.Dd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; +Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&jc(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function jc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);jc(a,b,void 0);lc(a,b,void 0)} +var mc=[],hc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],kc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var gc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],fc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; +function nc(a,b){x.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.wa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.ld.bind(this);F(this)}z(nc);var oc=["power","reset"];h=nc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),G(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +function wc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} +h.ld=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} +function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}z(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; +function Ac(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.hd,a.pb=a.$d,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.h,16))}function Bc(a,b,c){a.Kb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; +h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ic(a,a.Ia);Ic(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Xb(a,c);a.u&=-17} +function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ic(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.h.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.h.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.h,a)};h.hd=function(a){return Lb(this.h,Lc(this,a,2))};h.ac=function(a,b){Mb(this.h,a,b&65535)};h.$d=function(a,b){Mb(this.h,Lc(this,a,4),b)}; +function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} +function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} +function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} +function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;S(this,a);return a}function dd(a,b){a=b&~a;S(this,a<<8);return a}function ed(a,b){a|=b;S(this,a);return a}function fd(a,b){a|=b;S(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} +function id(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function jd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function kd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ld(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function md(a,b){a=-b;Ec(this,a,a&b&32768);return a&65535}function nd(a,b){a=-b;Ec(this,a<<8,(a&b&128)<<8);return a&255} +function od(a,b){a=b<<1|this.m>>16&1;Gc(this,a);return a&65535}function pd(a,b){a=b<<1|this.m>>16&1;Gc(this,a<<8);return a&255}function qd(a,b){a=(this.m&65536|b)>>1|b<<16;Gc(this,a);return a&65535}function rd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Gc(this,a<<8);return a&255}function sd(a,b){var c=b-a;Hc(this,c,a,b);return c&65535}function td(a,b){var c=b-a;Hc(this,c<<8,a<<8,b<<8);return c&255}function ud(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function vd(a,b){a^=b;S(this,a);return a&65535}function wd(a){U(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function yd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function zd(a){V(this,a,!R(this))}function Ad(a){V(this,a,R(this))} +function Bd(a){U(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){U(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){T(this,a,Qc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Fd(a){S(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){S(this,(Qc(this,a)&Tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){V(this,a,this.i&65535?0:4)}function Id(a){V(this,a,!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){V(this,a,!R(this)&&!!(this.i&65535))} +function Ld(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){V(this,a,R(this)||(this.i&65535?0:4))}function Nd(a){V(this,a,!this.za()!=!(this.f&32768))}function Od(a){V(this,a,this.za())}function Pd(a){V(this,a,!!(this.i&65535))}function Qd(a){V(this,a,!this.za())}function Rd(){K(this,12,1);this.a-=5}function Sd(a){V(this,a,!0)}function Td(a){V(this,a,!(this.f&32768))}function Ud(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Vd(a){var b=Rc(this,a);a=Uc(this,a);Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Wd(a){var b=Qc(this,a)<<8;a=Tc(this,a)<<8;Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Xd(a){var b=Uc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Yd(){K(this,24,2);this.a-=25} +function Zd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function $d(){K(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;P(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function fe(a){var b=Rc(this,a);this.F=this.a;S(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);S(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; +function ie(a){var b=Uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){U(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function pe(a){U(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){K(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){U(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} +function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)} +var te=[function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0, +md);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Me=[function(a){Ne[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Ne=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],De=[je,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, +Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,nd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Je=[function(a){T(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Oe[a>>12].call(this,a)} +var Oe=[function(a){Pe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Qe[a>>8&15].call(this,a)},function(a){Re[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Pe=[function(a){Se[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Te[a>>6&3].call(this,a)},Y,Y],Te=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F= +this.a;Pc(this,a,0,b);S(this,b);this.a=this.F-he[this.c]},function(a){S(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Se=[function(a){Ue[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ue=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Qe=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Re=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){Ve[a>>6& +3].call(this,a)},Y,Y],Ve=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);S(this,b);this.a=this.F-he[this.c]},Y]; +function We(a){x.call(this,"ROM",a,We);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Xe(c)})}}z(We);We.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Xe(this)}; +We.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};We.prototype.ja=function(){return!0}; +function Xe(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,dc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,cf);F(this)}; +h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){df(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return df(this)};function df(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ef={},cf=(ef[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],ef[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],ef[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],ef[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],ef);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&hf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;hf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=jf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&sf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));pf(a)})}function mf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){zf(a,b,c,d)})} +function zf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function Bf(a,b){var c=a.Z*a.S,d=b/c|0;return dg)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Af(this,a++);)Cf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Cf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Df(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Ef(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Af(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ef(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Ff(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Bf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Df(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Ff(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Ff(this,a[0])};function If(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Kf(a,e,b,c,!1,d)}else Jf(a,e)} -function Kf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Jf(a,b,!0),k.sb?a.G("RL11 busy"):(k.sb=!0,e&&(k.rb=!0,a.s++),k.ib=!!f,xf(new tf(a,k,"preload"),c,d,f,a.dc)&&g++));return g} -h.dc=function(a,b,c,d,e){var f;a.sb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.rb||e),this.j&&uc(this.j)):a.ib=!1;a.rb&&(a.rb=!1,--this.s||F(this));Df(this,a.wb)}; -function Hf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.wc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Lb(this.h,f,t|w<<8);if(Ob(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.qd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Kb(this.h,f);if(Ob(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Tc=function(){return this.L&65535}; -h.Ld=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.wc;case 10:b||(b=this.qd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.ec.bind(this)))}a&&(this.L|=129,this.L&64&&Qb(this.a,this.F))}};h.Rc=function(){return this.v};h.Jd=function(a){this.v=a&65534};h.Uc=function(){return this.c};h.Md=function(a){this.c=a};h.Vc=function(){return this.m};h.Nd=function(a){this.m=a};h.Sc=function(){return this.w};h.Kd=function(a){this.w=a&63}; -var Lf={},Gf=(Lf[63744]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLCS"],Lf[63746]=[null,null,O.prototype.Rc,O.prototype.Jd,"RLBA"],Lf[65284]=[null,null,O.prototype.Uc,O.prototype.Md,"RLDA"],Lf[65286]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLMP"],Lf[65288]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBE"],Lf); -function Mf(a,b,c){x.call(this,"Computer",a,Mf);this.l.O=!1;Nf(this,b);this.A=oc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Of;this.v=null;this.m=this.I=!1;this.P=oc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Pf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bOf){if(Qf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Qf(this.i)&&(Vf(this,d),a=2,Wf(this.i));this.i.set("timestamp",sa());Xf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Uf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Qf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Wf(d),Qf(d)?(c=Uf(d),e=!0):c=!1))}e&&Tf(this,c?d:null)}else 2==a&&d.clear()}else Tf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Yf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Vf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Vf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function ag(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Ef(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Gf(this)};h.save=function(){return(new Q(this)).data()}; +h.restore=function(a){return Gf(this,a[0])};function Jf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Lf(a,e,b,c,!1,d)}else Kf(a,e)} +function Lf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Kf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,yf(new uf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Ef(this,a.xb)}; +function If(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; +h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.Md=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; +var Mf={},Hf=(Mf[63744]=[null,null,O.prototype.Uc,O.prototype.Md,"RLCS"],Mf[63746]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBA"],Mf[65284]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLDA"],Mf[65286]=[null,null,O.prototype.Wc,O.prototype.Od,"RLMP"],Mf[65288]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLBE"],Mf); +function Nf(a,b,c){x.call(this,"Computer",a,Nf);this.l.O=!1;Of(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Pf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Qf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bPf){if(Rf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Rf(this.i)&&(Wf(this,d),a=2,Xf(this.i));this.i.set("timestamp",sa());Yf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Vf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Rf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Xf(d),Rf(d)?(c=Vf(d),e=!0):c=!1))}e&&Uf(this,c?d:null)}else 2==a&&d.clear()}else Uf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Zf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Wf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Wf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);hg(a,b,c)}})}else c(a,null)} -function ig(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--eg||Ja(!0));l=!1}var g,k,l=!0;eg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?fg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--eg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--eg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?fg(b,a,d,!0,e,n):gg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return ig(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map +h.va=function(a){if(this.a){var b=this.a,c=b.o.speed;c&&(c.textContent=b.l.U&&b.da?b.da.toFixed(2)+"Mhz":"Stopped")}if(this.f&&(b=this.f,b.s)){if(!(0(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);ig(a,b,c)}})}else c(a,null)} +function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?gg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--fg||Ja(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gg(b,a,d,!0,e,n):hg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return jg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map From c67176eab0018720c4a620972fd03968495259cc Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 12:01:56 -0700 Subject: [PATCH 24/30] Added the ability to install external ROMs (eg, M9312 ROM images) into the IOPAGE --- ...{BOOTSTRAP-16KB.lst => BOOTSTRAP-16KB.txt} | 0 apps/pdp11/boot/bootstrap/README.md | 4 +- .../monitor/{PDPJSMON.lst => PDPJSMON.txt} | 0 apps/pdp11/boot/monitor/README.md | 2 +- apps/pdp11/boot/monitor/makefile | 8 +- apps/pdp11/diags/cpu/{XCPA.lst => XCPA.txt} | 0 apps/pdp11/diags/cpu/makefile | 8 +- devices/pc8080/rom/vt100/README.md | 6 +- .../pc8080/rom/vt100/{VT100.lst => VT100.txt} | 0 devices/pdp11/machine/1170/panel/README.md | 80 ++++ .../machine/1170/panel/debugger/README.md | 16 +- .../machine/1170/panel/debugger/machine.xml | 1 + devices/pdp11/machine/1170/panel/machine.xml | 1 + devices/pdp11/rom/M9312/23-616F1.json | 35 ++ devices/pdp11/rom/M9312/23-616F1.mac | 259 +++++++++++++ devices/pdp11/rom/M9312/23-616F1.txt | 282 ++++++++++++++ devices/pdp11/rom/M9312/M9312.json | 34 ++ devices/pdp11/rom/M9312/README.md | 41 ++ devices/pdp11/rom/README.md | 2 +- modules/filedump/lib/filedump.js | 8 +- modules/pdp11/lib/bus.js | 21 +- modules/pdp11/lib/messages.js | 4 +- modules/pdp11/lib/rom.js | 71 +++- versions/pdpjs/1.30.3/pdp11-dbg.js | 252 ++++++------- versions/pdpjs/1.30.3/pdp11.js | 354 +++++++++--------- 25 files changed, 1143 insertions(+), 346 deletions(-) rename apps/pdp11/boot/bootstrap/{BOOTSTRAP-16KB.lst => BOOTSTRAP-16KB.txt} (100%) rename apps/pdp11/boot/monitor/{PDPJSMON.lst => PDPJSMON.txt} (100%) rename apps/pdp11/diags/cpu/{XCPA.lst => XCPA.txt} (100%) rename devices/pc8080/rom/vt100/{VT100.lst => VT100.txt} (100%) create mode 100644 devices/pdp11/rom/M9312/23-616F1.json create mode 100644 devices/pdp11/rom/M9312/23-616F1.mac create mode 100644 devices/pdp11/rom/M9312/23-616F1.txt create mode 100644 devices/pdp11/rom/M9312/M9312.json create mode 100644 devices/pdp11/rom/M9312/README.md diff --git a/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst b/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.txt similarity index 100% rename from apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst rename to apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.txt diff --git a/apps/pdp11/boot/bootstrap/README.md b/apps/pdp11/boot/bootstrap/README.md index 1c951bb5b..dd00f6199 100644 --- a/apps/pdp11/boot/bootstrap/README.md +++ b/apps/pdp11/boot/bootstrap/README.md @@ -54,11 +54,11 @@ To run the above code, set the PC to 037744 and start the machine: Pre-loading DEC's Bootstrap Loader ---------------------------------- -I pasted the disassembled code (above) into a listing file, [BOOTSTRAP-16KB.lst](BOOTSTRAP-16KB.lst), +I pasted the disassembled code (above) into a listing file, [BOOTSTRAP-16KB.txt](BOOTSTRAP-16KB.txt), and then ran [FileDump](/modules/filedump) to produce a [BOOTSTRAP-16KB.json](BOOTSTRAP-16KB.json) that can be automatically pre-loaded into any machine: - filedump --file=BOOTSTRAP-16KB.lst --format=octal --output=BOOTSTRAP-16KB.json + filedump --file=BOOTSTRAP-16KB.txt --format=octal --output=BOOTSTRAP-16KB.json For example, this [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/debugger/) pre-loads the **Bootstrap Loader** using the `` component's optional *file* attribute: diff --git a/apps/pdp11/boot/monitor/PDPJSMON.lst b/apps/pdp11/boot/monitor/PDPJSMON.txt similarity index 100% rename from apps/pdp11/boot/monitor/PDPJSMON.lst rename to apps/pdp11/boot/monitor/PDPJSMON.txt diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index eb8d34ad5..363fd4d25 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -13,7 +13,7 @@ PDP-11 Boot Monitor [Paul Nankervis](mailto:paulnank@hotmail.com). It is used with all our PDP-11 test machines. [PDPJSMON.mac](PDPJSMON.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce -[PDPJSMON.lst](PDPJSMON.lst), which was then processed by [FileDump](/modules/filedump/) to produce +[PDPJSMON.txt](PDPJSMON.txt), which was then processed by [FileDump](/modules/filedump/) to produce [PDPJSMON.json](PDPJSMON.json). To see the Boot Monitor in action, try the [PDP-11/70 Boot Monitor (with Debugger)](/devices/pdp11/machine/1170/monitor/debugger/). diff --git a/apps/pdp11/boot/monitor/makefile b/apps/pdp11/boot/monitor/makefile index de120c409..5a9085304 100644 --- a/apps/pdp11/boot/monitor/makefile +++ b/apps/pdp11/boot/monitor/makefile @@ -4,8 +4,8 @@ all: PDPJSMON.json -PDPJSMON.lst: PDPJSMON.mac - macro11 PDPJSMON.mac -l PDPJSMON.lst +PDPJSMON.txt: PDPJSMON.mac + macro11 PDPJSMON.mac -l PDPJSMON.txt -PDPJSMON.json: PDPJSMON.lst - node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.lst --format=octal --output=PDPJSMON.json --overwrite +PDPJSMON.json: PDPJSMON.txt + node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.txt --format=octal --output=PDPJSMON.json --overwrite diff --git a/apps/pdp11/diags/cpu/XCPA.lst b/apps/pdp11/diags/cpu/XCPA.txt similarity index 100% rename from apps/pdp11/diags/cpu/XCPA.lst rename to apps/pdp11/diags/cpu/XCPA.txt diff --git a/apps/pdp11/diags/cpu/makefile b/apps/pdp11/diags/cpu/makefile index 407cdd6bb..005d13958 100644 --- a/apps/pdp11/diags/cpu/makefile +++ b/apps/pdp11/diags/cpu/makefile @@ -4,8 +4,8 @@ all: XCPA.json -XCPA.lst: XCPA.mac - macro11 XCPA.mac -l XCPA.lst +XCPA.txt: XCPA.mac + macro11 XCPA.mac -l XCPA.txt -XCPA.json: XCPA.lst - node ../../../../modules/filedump/bin/filedump --file=XCPA.lst --format=octal --output=XCPA.json --overwrite +XCPA.json: XCPA.txt + node ../../../../modules/filedump/bin/filedump --file=XCPA.txt --format=octal --output=XCPA.json --overwrite diff --git a/devices/pc8080/rom/vt100/README.md b/devices/pc8080/rom/vt100/README.md index 3d3e21055..e8191e935 100644 --- a/devices/pc8080/rom/vt100/README.md +++ b/devices/pc8080/rom/vt100/README.md @@ -60,12 +60,12 @@ screensaver-related mods to the ROM. Finally, I verified that reassembling [VT100.asm](VT100.asm) with [asm8080](https://github.com/begoon/asm8080) produced the original VT100.bin; after adding the correct number of `nop` instructions to the end to the source file, the binaries matched. -The other advantage of reassembling the code is that the resulting [VT100.lst](VT100.lst) makes it easy to export comments +The other advantage of reassembling the code is that the resulting [VT100.txt](VT100.txt) makes it easy to export comments and other symbolic information to [VT100.map](VT100.map), which can then be included in the [VT100.json](VT100.json) ROM dump and passed on to the PC8080 Debugger. Here are the rebuild steps: - asm8080 -lVT100.lst VT100.asm - grep -E "[0-9]+ [0-9A-D]+.*;;" VT100.lst | sed -E "s/ *[0-9]+ ([0-9A-F]+).*;(;.*)/ \1 . \2/" > VT100.map + asm8080 -lVT100.txt VT100.asm + grep -E "[0-9]+ [0-9A-D]+.*;;" VT100.txt | sed -E "s/ *[0-9]+ ([0-9A-F]+).*;(;.*)/ \1 . \2/" > VT100.map filedump --file=VT100.bin --format=bytes --output=VT100.json --comments --overwrite You can omit `--comments` from the filedump command to reduce the size of the [VT100.json](VT100.json) file. diff --git a/devices/pc8080/rom/vt100/VT100.lst b/devices/pc8080/rom/vt100/VT100.txt similarity index 100% rename from devices/pc8080/rom/vt100/VT100.lst rename to devices/pc8080/rom/vt100/VT100.txt diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md index 279007e60..0861e4ec5 100644 --- a/devices/pdp11/machine/1170/panel/README.md +++ b/devices/pdp11/machine/1170/panel/README.md @@ -10,3 +10,83 @@ machines: {% include machine.html id="test1170" %} This machine is also available with our built-in [Debugger](debugger/). + +Front Panel Basics +------------------ + +From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, p. 325: + +> ### CONSOLE OPERATION + +> The PDP-11/70 console allows direct control of the computer system. It contains a power switch for the CPU, +which is also usually used as the Master Switch for the system. The console is used for starting, stopping, resetting, +and debugging. Lights and switches provide the facilities for monitoring operation, system control, and maintenance. +Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or +single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches. + +The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Front Panel. The switches, which +PDPjs displays as green to make them stand out from the rest of the pink-and-magenta controls, are summarized below. + +### 0-21 + +These control bits 0 to 21 of the SWITCH register. The UP position represents a ONE, and the DOWN position +represents a ZERO. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the +ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS +register (where it will become the DATA displayed by the second row of LEDs). + +The SWITCH, ADDRESS, and DATA (aka DISPLAY) registers are all internal to the Front Panel hardware, and should not be +confused with CPU registers. + +### TEST + +This is a momentary switch that is normally in the DOWN position. When held in the UP position, it turns on all LEDs. +This "lamp test" was more important in the days when the lights were produced by bulbs with filaments that could burn out, +and if you didn't realize that a particular light was "burned out", you could mistake it for a zero. + +While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch: +pressing it also returns all the SWITCH register switches (0-21) to their DOWN position. + +### LOAD + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the +ADDRESS register. + +### EXAM + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it reads the memory location referenced +by the ADDRESS register and displays it in the DATA register. If pressed repeatedly, each repetition also automatically +adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being +examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2. + +Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM operations +will decrease the ADDRESS register instead of increasing it. + +### DEP + +This is a momentary switch that is normally in the DOWN position. When pressed UP, it writes the contents of the SWITCH +register to the memory location referenced by the ADDRESS register, and displays the result in the DATA register. Like the +EXAM switch, if DEP is pressed repeatedly, each repetition also automatically adds 2 to the ADDRESS register, making it easier +to deposit the same value to a series of words. + +### CONT + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it will start the CPU if it's currently +halted. If the CPU is already running, CONT has no effect. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, +then the CPU will continue for only ONE instruction and then stop again. + +### ENABLE/HALT + +This switch is a toggle that is normally in the UP (ENABLE) position. If it pressed DOWN while the CPU is running, the CPU will +stop. Once the CPU is stopped, this switch has no effect, other than determining what CONT will do when pressed. + +### STEP + +On a real PDP-11, this would select between cycle-stepping vs. instruction-stepping. Since PDPjs doesn't support cycle-stepping, +this switch has no effect (except as described above when the EXAM or DEP switches are pressed repeatedly). + +### START + +The START switch is similar to CONT, but it also performs the equivalent a RESET instruction before starting the CPU, so +unless you're starting execution at the beginning of a program, using START instead of CONT to continue execution is probably +not a good idea. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, START will still reset the machine but not +execute anything. diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 91dfa2d21..754690852 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -10,11 +10,19 @@ machines: {% include machine.html id="test1170" %} +Other interesting things to know about this machine: + +* It includes an [M9312 ROM](/devices/pdp11/rom/M9312/) at address 165000. The exact ROM is [23-616F1](/devices/pdp11/rom/M9312/23-616F1.txt). + Toggle-Ins ---------- As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. If you're +not sure how "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics). + +However, since the above machine also includes the PDPjs Debugger, you'll find that it's much easier to use the Debugger commands +described below to load and execute these "toggle-ins". ### Memory Management @@ -186,7 +194,7 @@ If you also want to see all the hardware register activity, use the Debugger's " 17772262 021311 CMP (R3),(R1) ; Top of Memory? 17772264 003402 BLE 2$ 17772266 005000 CLR R0 ; Start at Virtual Address 0 - 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --@jeffpar] + 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --JP] 17772272 005312 2$: DEC (R2) ; Disable Relocation 17772274 000000 HLT @@ -310,8 +318,8 @@ As the **Maintenance Service Guide** goes on to say: Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will slow execution to a crawl. -If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address, -not one of the physical (22-bit) addresses shown above. For example, to break on this instruction: +If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address. +For example, to break on this instruction: 17772256 062711 ADD #200,(R1) ; Step Page diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 52716d8e7..e5fbe66fa 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -5,6 +5,7 @@ + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 778713152..35304c3f4 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -5,6 +5,7 @@ + diff --git a/devices/pdp11/rom/M9312/23-616F1.json b/devices/pdp11/rom/M9312/23-616F1.json new file mode 100644 index 000000000..00304625e --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.json @@ -0,0 +1,35 @@ +{"load":0xEA00/*165000*/,"exec":0xEA00/*165000*/, +"words":[ +0x101F/*010037*/,0x01C0/*000700*/,0x105F/*010137*/,0x01C2/*000702*/,0x111F/*010437*/,0x01C4/*000704*/,0x0A1F/*005037*/,0x01C6/*000706*/, +0x55DF/*052737*/,0x8000/*100000*/,0xFFFE/*177776*/,0x35DF/*032737*/,0x4000/*040000*/,0xFFFE/*177776*/,0x0302/*001402*/,0x0A9F/*005237*/, +0x01C6/*000706*/,0x0A1F/*005037*/,0xFFFE/*177776*/,0x0101/*000401*/,0x0000/*000000*/,0x0A06/*005006*/,0x8104/*100404*/,0x8503/*102403*/, +0x8202/*101002*/,0x0501/*002401*/,0x8301/*101401*/,0x0000/*000000*/,0x0AC6/*005306*/,0x8003/*100003*/,0x0302/*001402*/,0x0401/*002001*/, +0x0701/*003401*/,0x0000/*000000*/,0x0C06/*006006*/,0x8402/*102002*/,0x8601/*103001*/,0x0201/*001001*/,0x0000/*000000*/,0x15C6/*012706*/, +0xAAAA/*125252*/,0x1180/*010600*/,0x1001/*010001*/,0x1042/*010102*/,0x1083/*010203*/,0x10C4/*010304*/,0x1105/*010405*/,0xE141/*160501*/, +0x0501/*002401*/,0x0301/*001401*/,0x0000/*000000*/,0x0C42/*006102*/,0x8601/*103001*/,0x0501/*002401*/,0x0000/*000000*/,0x6083/*060203*/, +0x0A83/*005203*/,0x0A43/*005103*/,0x60C1/*060301*/,0x8701/*103401*/,0x0701/*003401*/,0x0000/*000000*/,0x0C04/*006004*/,0x5103/*050403*/, +0x6143/*060503*/,0x0A83/*005203*/,0x8702/*103402*/,0x0AC1/*005301*/,0x0501/*002401*/,0x0000/*000000*/,0x0A40/*005100*/,0x8301/*101401*/, +0x0000/*000000*/,0x4001/*040001*/,0x6041/*060101*/,0x0601/*003001*/,0x0701/*003401*/,0x0000/*000000*/,0x00C1/*000301*/,0x2057/*020127*/, +0x5455/*052125*/,0x0204/*001004*/,0x3105/*030405*/,0x0602/*003002*/,0x0A45/*005105*/,0x0201/*001001*/,0x0000/*000000*/,0x95C0/*112700*/, +0xFF01/*177401*/,0x8001/*100001*/,0x0000/*000000*/,0x7E02/*077002*/,0x0A01/*005001*/,0x0A81/*005201*/,0x7E02/*077002*/,0x0BC0/*005700*/, +0x0202/*001002*/,0x0BC1/*005701*/,0x0301/*001401*/,0x0000/*000000*/,0x15C6/*012706*/,0x01FE/*000776*/,0x09F7/*004767*/,0x0002/*000002*/, +0x0000/*000000*/,0x25CE/*022716*/,0xEAD0/*165320*/,0x0301/*001401*/,0x0000/*000000*/,0x15CE/*012716*/,0xEAE2/*165342*/,0x0087/*000207*/, +0x0000/*000000*/,0x0A26/*005046*/,0x15E6/*012746*/,0xEAEC/*165354*/,0x0002/*000002*/,0x0000/*000000*/,0x005F/*000137*/,0xEAF2/*165362*/, +0x0000/*000000*/,0x15C5/*012705*/,0xE000/*160000*/,0x0A1F/*005037*/,0x0006/*000006*/,0x15DF/*012737*/,0xEB00/*165400*/,0x0004/*000004*/, +0x15C6/*012706*/,0x01FE/*000776*/,0x0BE5/*005745*/,0x15DF/*012737*/,0xEBCC/*165714*/,0x004C/*000114*/,0x0A1F/*005037*/,0x004E/*000116*/, +0x15C3/*012703*/,0xFFE6/*177746*/,0x15CB/*012713*/,0x000C/*000014*/,0x15C2/*012702*/,0x0200/*001000*/,0x1080/*010200*/,0x1008/*010010*/, +0x0BD0/*005720*/,0x2005/*020005*/,0x83FC/*101774*/,0x1080/*010200*/,0x1201/*011001*/,0x2001/*020001*/,0x0301/*001401*/,0x0000/*000000*/, +0x0A50/*005120*/,0x2005/*020005*/,0x83F9/*101771*/,0x1801/*014001*/,0x0A41/*005101*/,0x2001/*020001*/,0x0301/*001401*/,0x0000/*000000*/, +0x2002/*020002*/,0x02F9/*001371*/,0x0A0E/*005016*/,0x15C4/*012704*/,0xAAAA/*125252*/,0x15CB/*012713*/,0x0018/*000030*/,0x15C0/*012700*/, +0x0800/*004000*/,0x15C2/*012702*/,0x0200/*001000*/,0x0A44/*005104*/,0x1108/*010410*/,0x0A48/*005110*/,0x0A48/*005110*/,0x2204/*021004*/, +0x0301/*001401*/,0x0000/*000000*/,0x0C1F/*006037*/,0xFFEA/*177752*/,0x8702/*103402*/,0x0000/*000000*/,0x0131/*000461*/,0x8A4E/*105116*/, +0x02F2/*001362*/,0x0102/*000402*/,0x0077/*000167*/,0xFE88/*177210*/,0x0BD0/*005720*/,0x7E93/*077223*/,0x15CB/*012713*/,0x0024/*000044*/, +0x15C0/*012700*/,0x0C00/*006000*/,0x8A76/*105166*/,0x0001/*000001*/,0x02E4/*001344*/,0x15C2/*012702*/,0x0200/*001000*/,0x1080/*010200*/, +0x1008/*010010*/,0x0BD0/*005720*/,0x2005/*020005*/,0x83FC/*101774*/,0x15C1/*012701*/,0x0003/*000003*/,0x0A0E/*005016*/,0x0BDF/*005737*/, +0x01C6/*000706*/,0x0210/*001020*/,0x15CE/*012716*/,0x0018/*000030*/,0x1080/*010200*/,0x0A48/*005110*/,0x0A48/*005110*/,0x2008/*020010*/, +0x0301/*001401*/,0x0000/*000000*/,0x0BD0/*005720*/,0x0C1F/*006037*/,0xFFEA/*177752*/,0x8702/*103402*/,0x0000/*000000*/,0x0108/*000410*/, +0x2005/*020005*/,0x83F3/*101763*/,0x138B/*011613*/,0x0A0E/*005016*/,0x7E51/*077121*/,0x0104/*000404*/,0x0000/*000000*/,0x0102/*000402*/, +0x15CB/*012713*/,0x000C/*000014*/,0x17C0/*013700*/,0x01C0/*000700*/,0x17C1/*013701*/,0x01C2/*000702*/,0x17C4/*013704*/,0x01C4/*000704*/, +0x0074/*000164*/,0x0002/*000002*/,0x17C4/*013704*/,0xFF78/*177570*/,0x45C4/*042704*/,0xFE00/*177000*/,0x55C4/*052704*/,0xF600/*173000*/, +0x97C0/*113700*/,0xFF79/*177571*/,0x0C80/*006200*/,0x00A1/*000241*/,0x004C/*000114*/,0x0000/*000000*/,0x4230/*041060*/,0x2A2D/*025055*/] +} \ No newline at end of file diff --git a/devices/pdp11/rom/M9312/23-616F1.mac b/devices/pdp11/rom/M9312/23-616F1.mac new file mode 100644 index 000000000..cfe5cce2c --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.mac @@ -0,0 +1,259 @@ + .title M9312 11/60-70 Diagnostic/Console ROM + + ; This source code is an exact copy of the DEC M9312 23-616F1 console PROM. + ; + ; This console/diagnostic PROM is for 11/60-70 CPUs. + ; + ; Standard devices are 82S137, 74S573 or other compatible bipolar PROMs + ; with a 1024x4 TriState 18pin DIP architecture. + + .asect + .=165000 + +base =. + +START: mov r0,@#700 ; + mov r1,@#702 ; + mov r4,@#704 ; + clr @#706 ; + + .=base+20 +DIAG: bis #100000,@#177776 ; + bit #040000,@#177776 ; + beq L1 ; + inc @#706 ; +L1: clr @#177776 ; + br L2 ; + halt ; + +L2: clr sp ; + bmi L3 ; + bvs L3 ; + bhi L3 ; + blt L3 ; + blos L4 ; +L3: halt ; + +L4: dec sp ; + bpl L5 ; + beq L5 ; + bge L5 ; + ble L6 ; +L5: halt ; + +L6: ror sp ; + bvc L7 ; + bcc L7 ; + bne L8 ; +L7: halt ; + +L8: mov #125252,sp ; + mov sp,r0 ; + mov r0,r1 ; + mov r1,r2 ; + mov r2,r3 ; + mov r3,r4 ; + mov r4,r5 ; + sub r5,r1 ; + blt NODIAG ; + beq L9 ; + + .=base+144 +NODIAG: halt ; + +L9: rol r2 ; + bcc L10 ; + blt L11 ; +L10: halt ; + +L11: add r2,r3 ; + inc r3 ; + com r3 ; + add r3,r1 ; + bcs L12 ; + ble L13 ; +L12: halt ; + +L13: ror r4 ; + bis r4,r3 ; + add r5,r3 ; + inc r3 ; + bcs L14 ; + dec r1 ; + blt L15 ; +L14: halt ; + +L15: com r0 ; + blos L16 ; + halt ; + +L16: bic r0,r1 ; + add r1,r1 ; + bgt L17 ; + ble L18 ; +L17: halt ; + +L18: swab r1 ; + cmp r1,#052125 ; + bne L19 ; + bit r4,r5 ; + bgt L19 ; + com r5 ; + bne L20 ; +L19: halt ; + +L20: movb #177401,r0 ; + bpl L21 ; +L22: halt ; + +L21: sob r0,L22 ; + clr r1 ; +L23: inc r1 ; + sob r0,L23 ; + tst r0 ; + bne L24 ; + tst r1 ; + beq L25 ; +L24: halt ; + +L25: mov #776,sp ; + jsr pc,L26 ; +N2: halt ; + +L26: cmp #N2,(sp) ; + beq L27 ; + halt ; + +L27: mov #N3,(sp) ; + rts pc ; + halt ; + +N3: clr -(sp) ; + mov #N4,-(sp) ; + rti ; + halt ; + +N4: jmp @#N5 ; + halt ; + +N5: mov #160000,r5 ; + clr @#6 ; + mov #N6,@#4 ; +N6: mov #776,sp ; + tst -(r5) ; + mov #N12,@#114 ; + clr @#116 ; + mov #177746,r3 ; + mov #14,(r3) ; + mov #1000,r2 ; + mov r2,r0 ; +L28: mov r0,(r0) ; + tst (r0)+ ; + cmp r0,r5 ; + blos L28 ; + mov r2,r0 ; +L30: mov (r0),r1 ; + cmp r0,r1 ; + beq L29 ; + halt ; + +L29: com (r0)+ ; + cmp r0,r5 ; + blos L30 ; +L32: mov -(r0),r1 ; + com r1 ; + cmp r0,r1 ; + beq L31 ; + halt ; + +L31: cmp r0,r2 ; + bne L32 ; + clr (sp) ; + mov #125252,r4 ; + mov #30,(r3) ; + mov #4000,r0 ; +L39: mov #1000,r2 ; +L36: com r4 ; + mov r4,(r0) ; + com (r0) ; + com (r0) ; + cmp (r0),r4 ; + beq L33 ; + halt ; + +L33: ror @#177752 ; + bcs L34 ; + halt ; + br L35 ; + +L34: comb (sp) ; + bne L36 ; + br L37 ; + + .=base+564 +RESTRT: jmp START ; + +L37: tst (r0)+ ; + sob r2,L36 ; + mov #44,(r3) ; + mov #6000,r0 ; + comb 1(sp) ; + bne L39 ; + mov #1000,r2 ; + mov r2,r0 ; +L40: mov r0,(r0) ; + tst (r0)+ ; + cmp r0,r5 ; + blos L40 ; + mov #3,r1 ; + clr (sp) ; + tst @#706 ; + bne L41 ; + mov #30,(sp) ; +L45: mov r2,r0 ; +L44: com (r0) ; + com (r0) ; + cmp r0,(r0) ; + beq L42 ; + halt ; + +L42: tst (r0)+ ; + ror @#177752 ; + bcs L43 ; + halt ; + br L35 ; + +L43: cmp r0,r5 ; + blos L44 ; +L41: mov (sp),(r3) ; + clr (sp) ; + sob r1,L45 ; + br L46 ; + +N12: halt ; + br L46 ; + +L35: mov #14,(r3) ; +L46: mov @#700,r0 ; + mov @#702,r1 ; + mov @#704,r4 ; + jmp 2(r4) ; + + mov @#177570,r4 ; + bic #177000,r4 ; + bis #173000,r4 ; + movb @#177571,r0 ; + asr r0 ; + clc ; + jmp (r4) ; + halt ; + + ; ------------------------------------------------------------ + + .=base+774 +verson: .ascii "0B" ; version ID + + .=base+776 +crc16: .word <025055> ; CRC-16 will go here + + .end diff --git a/devices/pdp11/rom/M9312/23-616F1.txt b/devices/pdp11/rom/M9312/23-616F1.txt new file mode 100644 index 000000000..0c4968ad4 --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.txt @@ -0,0 +1,282 @@ + 1 .title M9312 11/60-70 Diagnostic/Console ROM + 2 + 3 ; This source code is an exact copy of the DEC M9312 23-616F1 console PROM. + 4 ; + 5 ; This console/diagnostic PROM is for 11/60-70 CPUs. + 6 ; + 7 ; Standard devices are 82S137, 74S573 or other compatible bipolar PROMs + 8 ; with a 1024x4 TriState 18pin DIP architecture. + 9 + 10 000000 .asect + 11 165000 .=165000 + 12 + 13 165000 base =. + 14 + 15 165000 010037 000700 START: mov r0,@#700 ; + 16 165004 010137 000702 mov r1,@#702 ; + 17 165010 010437 000704 mov r4,@#704 ; + 18 165014 005037 000706 clr @#706 ; + 19 + 20 165020 .=base+20 + 21 165020 052737 100000 177776 DIAG: bis #100000,@#177776 ; + 22 165026 032737 040000 177776 bit #040000,@#177776 ; + 23 165034 001402 beq L1 ; + 24 165036 005237 000706 inc @#706 ; + 25 165042 005037 177776 L1: clr @#177776 ; + 26 165046 000401 br L2 ; + 27 165050 000000 halt ; + 28 + 29 165052 005006 L2: clr sp ; + 30 165054 100404 bmi L3 ; + 31 165056 102403 bvs L3 ; + 32 165060 101002 bhi L3 ; + 33 165062 002401 blt L3 ; + 34 165064 101401 blos L4 ; + 35 165066 000000 L3: halt ; + 36 + 37 165070 005306 L4: dec sp ; + 38 165072 100003 bpl L5 ; + 39 165074 001402 beq L5 ; + 40 165076 002001 bge L5 ; + 41 165100 003401 ble L6 ; + 42 165102 000000 L5: halt ; + 43 + 44 165104 006006 L6: ror sp ; + 45 165106 102002 bvc L7 ; + 46 165110 103001 bcc L7 ; + 47 165112 001001 bne L8 ; + 48 165114 000000 L7: halt ; + 49 + 50 165116 012706 125252 L8: mov #125252,sp ; + 51 165122 010600 mov sp,r0 ; + 52 165124 010001 mov r0,r1 ; + 53 165126 010102 mov r1,r2 ; + 54 165130 010203 mov r2,r3 ; + 55 165132 010304 mov r3,r4 ; + 56 165134 010405 mov r4,r5 ; + 57 165136 160501 sub r5,r1 ; + 58 165140 002401 blt NODIAG ; + 59 165142 001401 beq L9 ; + 60 + 61 165144 .=base+144 + 62 165144 000000 NODIAG: halt ; + 63 + 64 165146 006102 L9: rol r2 ; + 65 165150 103001 bcc L10 ; + 66 165152 002401 blt L11 ; + 67 165154 000000 L10: halt ; + 68 + 69 165156 060203 L11: add r2,r3 ; + 70 165160 005203 inc r3 ; + 71 165162 005103 com r3 ; + 72 165164 060301 add r3,r1 ; + 73 165166 103401 bcs L12 ; + 74 165170 003401 ble L13 ; + 75 165172 000000 L12: halt ; + 76 + 77 165174 006004 L13: ror r4 ; + 78 165176 050403 bis r4,r3 ; + 79 165200 060503 add r5,r3 ; + 80 165202 005203 inc r3 ; + 81 165204 103402 bcs L14 ; + 82 165206 005301 dec r1 ; + 83 165210 002401 blt L15 ; + 84 165212 000000 L14: halt ; + 85 + 86 165214 005100 L15: com r0 ; + 87 165216 101401 blos L16 ; + 88 165220 000000 halt ; + 89 + 90 165222 040001 L16: bic r0,r1 ; + 91 165224 060101 add r1,r1 ; + 92 165226 003001 bgt L17 ; + 93 165230 003401 ble L18 ; + 94 165232 000000 L17: halt ; + 95 + 96 165234 000301 L18: swab r1 ; + 97 165236 020127 052125 cmp r1,#052125 ; + 98 165242 001004 bne L19 ; + 99 165244 030405 bit r4,r5 ; + 100 165246 003002 bgt L19 ; + 101 165250 005105 com r5 ; + 102 165252 001001 bne L20 ; + 103 165254 000000 L19: halt ; + 104 + 105 165256 112700 177401 L20: movb #177401,r0 ; + 106 165262 100001 bpl L21 ; + 107 165264 000000 L22: halt ; + 108 + 109 165266 077002 L21: sob r0,L22 ; + 110 165270 005001 clr r1 ; + 111 165272 005201 L23: inc r1 ; + 112 165274 077002 sob r0,L23 ; + 113 165276 005700 tst r0 ; + 114 165300 001002 bne L24 ; + 115 165302 005701 tst r1 ; + 116 165304 001401 beq L25 ; + 117 165306 000000 L24: halt ; + 118 + 119 165310 012706 000776 L25: mov #776,sp ; + 120 165314 004767 165322' jsr pc,L26 ; + 121 165320 000000 N2: halt ; + 122 + 123 165322 022716 165320 L26: cmp #N2,(sp) ; + 124 165326 001401 beq L27 ; + 125 165330 000000 halt ; + 126 + 127 165332 012716 165342 L27: mov #N3,(sp) ; + 128 165336 000207 rts pc ; + 129 165340 000000 halt ; + 130 + 131 165342 005046 N3: clr -(sp) ; + 132 165344 012746 165354 mov #N4,-(sp) ; + 133 165350 000002 rti ; + 134 165352 000000 halt ; + 135 + 136 165354 000137 165362 N4: jmp @#N5 ; + 137 165360 000000 halt ; + 138 + 139 165362 012705 160000 N5: mov #160000,r5 ; + 140 165366 005037 000006 clr @#6 ; + 141 165372 012737 165400 000004 mov #N6,@#4 ; + 142 165400 012706 000776 N6: mov #776,sp ; + 143 165404 005745 tst -(r5) ; + 144 165406 012737 165714 000114 mov #N12,@#114 ; + 145 165414 005037 000116 clr @#116 ; + 146 165420 012703 177746 mov #177746,r3 ; + 147 165424 012713 000014 mov #14,(r3) ; + 148 165430 012702 001000 mov #1000,r2 ; + 149 165434 010200 mov r2,r0 ; + 150 165436 010010 L28: mov r0,(r0) ; + 151 165440 005720 tst (r0)+ ; + 152 165442 020005 cmp r0,r5 ; + 153 165444 101774 blos L28 ; + 154 165446 010200 mov r2,r0 ; + 155 165450 011001 L30: mov (r0),r1 ; + 156 165452 020001 cmp r0,r1 ; + 157 165454 001401 beq L29 ; + 158 165456 000000 halt ; + 159 + 160 165460 005120 L29: com (r0)+ ; + 161 165462 020005 cmp r0,r5 ; + 162 165464 101771 blos L30 ; + 163 165466 014001 L32: mov -(r0),r1 ; + 164 165470 005101 com r1 ; + 165 165472 020001 cmp r0,r1 ; + 166 165474 001401 beq L31 ; + 167 165476 000000 halt ; + 168 + 169 165500 020002 L31: cmp r0,r2 ; + 170 165502 001371 bne L32 ; + 171 165504 005016 clr (sp) ; + 172 165506 012704 125252 mov #125252,r4 ; + 173 165512 012713 000030 mov #30,(r3) ; + 174 165516 012700 004000 mov #4000,r0 ; + 175 165522 012702 001000 L39: mov #1000,r2 ; + 176 165526 005104 L36: com r4 ; + 177 165530 010410 mov r4,(r0) ; + 178 165532 005110 com (r0) ; + 179 165534 005110 com (r0) ; + 180 165536 021004 cmp (r0),r4 ; + 181 165540 001401 beq L33 ; + 182 165542 000000 halt ; + 183 + 184 165544 006037 177752 L33: ror @#177752 ; + 185 165550 103402 bcs L34 ; + 186 165552 000000 halt ; + 187 165554 000461 br L35 ; + 188 + 189 165556 105116 L34: comb (sp) ; + 190 165560 001362 bne L36 ; + 191 165562 000402 br L37 ; + 192 + 193 165564 .=base+564 + 194 165564 000167 165000' RESTRT: jmp START ; + 195 + 196 165570 005720 L37: tst (r0)+ ; + 197 165572 077223 sob r2,L36 ; + 198 165574 012713 000044 mov #44,(r3) ; + 199 165600 012700 006000 mov #6000,r0 ; + 200 165604 105166 000001 comb 1(sp) ; + 201 165610 001344 bne L39 ; + 202 165612 012702 001000 mov #1000,r2 ; + 203 165616 010200 mov r2,r0 ; + 204 165620 010010 L40: mov r0,(r0) ; + 205 165622 005720 tst (r0)+ ; + 206 165624 020005 cmp r0,r5 ; + 207 165626 101774 blos L40 ; + 208 165630 012701 000003 mov #3,r1 ; + 209 165634 005016 clr (sp) ; + 210 165636 005737 000706 tst @#706 ; + 211 165642 001020 bne L41 ; + 212 165644 012716 000030 mov #30,(sp) ; + 213 165650 010200 L45: mov r2,r0 ; + 214 165652 005110 L44: com (r0) ; + 215 165654 005110 com (r0) ; + 216 165656 020010 cmp r0,(r0) ; + 217 165660 001401 beq L42 ; + 218 165662 000000 halt ; + 219 + 220 165664 005720 L42: tst (r0)+ ; + 221 165666 006037 177752 ror @#177752 ; + 222 165672 103402 bcs L43 ; + 223 165674 000000 halt ; + 224 165676 000410 br L35 ; + 225 + 226 165700 020005 L43: cmp r0,r5 ; + 227 165702 101763 blos L44 ; + 228 165704 011613 L41: mov (sp),(r3) ; + 229 165706 005016 clr (sp) ; + 230 165710 077121 sob r1,L45 ; + 231 165712 000404 br L46 ; + 232 + 233 165714 000000 N12: halt ; + 234 165716 000402 br L46 ; + 235 + 236 165720 012713 000014 L35: mov #14,(r3) ; + 237 165724 013700 000700 L46: mov @#700,r0 ; + 238 165730 013701 000702 mov @#702,r1 ; + 239 165734 013704 000704 mov @#704,r4 ; + 240 165740 000164 000002 jmp 2(r4) ; + 241 + 242 165744 013704 177570 mov @#177570,r4 ; + 243 165750 042704 177000 bic #177000,r4 ; + 244 165754 052704 173000 bis #173000,r4 ; + 245 165760 113700 177571 movb @#177571,r0 ; + 246 165764 006200 asr r0 ; + 247 165766 000241 clc ; + 248 165770 000114 jmp (r4) ; + 249 165772 000000 halt ; + 250 + 251 ; ------------------------------------------------------------ + 252 + 253 165774 .=base+774 + 254 165774 060 102 verson: .ascii "0B" ; version ID + 255 + 256 165776 .=base+776 + 257 165776 025055 crc16: .word <025055> ; CRC-16 will go here + 258 + 259 .end + 259 + + +Symbol table + +. =****** L17 =165232 L28 =165436 L4 =165070 L9 =165146 +BASE =165000 L18 =165234 L29 =165460 L40 =165620 N12 =165714 +CRC16 =165776 L19 =165254 L3 =165066 L41 =165704 N2 =165320 +DIAG =165020 L2 =165052 L30 =165450 L42 =165664 N3 =165342 +L1 =165042 L20 =165256 L31 =165500 L43 =165700 N4 =165354 +L10 =165154 L21 =165266 L32 =165466 L44 =165652 N5 =165362 +L11 =165156 L22 =165264 L33 =165544 L45 =165650 N6 =165400 +L12 =165172 L23 =165272 L34 =165556 L46 =165724 NODIAG=165144 +L13 =165174 L24 =165306 L35 =165720 L5 =165102 RESTRT=165564 +L14 =165212 L25 =165310 L36 =165526 L6 =165104 START =165000 +L15 =165214 L26 =165322 L37 =165570 L7 =165114 VERSON=165774 +L16 =165222 L27 =165332 L39 =165522 L8 =165116 + + +Program sections: + +. ABS. 166000 000 (RW,I,GBL,ABS,OVR,NOSAV) + 000000 001 (RW,I,LCL,REL,CON,NOSAV) diff --git a/devices/pdp11/rom/M9312/M9312.json b/devices/pdp11/rom/M9312/M9312.json new file mode 100644 index 000000000..e5d526038 --- /dev/null +++ b/devices/pdp11/rom/M9312/M9312.json @@ -0,0 +1,34 @@ +{"words":[ +0x101F /*0010037*/,0x01C0 /*0000700*/,0x105F /*0010137*/,0x01C2 /*0000702*/,0x111F /*0010437*/,0x01C4 /*0000704*/,0x0A1F /*0005037*/,0x01C6 /*0000706*/, +0x55DF /*0052737*/,0x8000 /*0100000*/,0xFFFE /*0177776*/,0x35DF /*0032737*/,0x4000 /*0040000*/,0xFFFE /*0177776*/,0x0302 /*0001402*/,0x0A9F /*0005237*/, +0x01C6 /*0000706*/,0x0A1F /*0005037*/,0xFFFE /*0177776*/,0x0101 /*0000401*/,0x0000 /*0000000*/,0x0A06 /*0005006*/,0x8104 /*0100404*/,0x8503 /*0102403*/, +0x8202 /*0101002*/,0x0501 /*0002401*/,0x8301 /*0101401*/,0x0000 /*0000000*/,0x0AC6 /*0005306*/,0x8003 /*0100003*/,0x0302 /*0001402*/,0x0401 /*0002001*/, +0x0701 /*0003401*/,0x0000 /*0000000*/,0x0C06 /*0006006*/,0x8402 /*0102002*/,0x8601 /*0103001*/,0x0201 /*0001001*/,0x0000 /*0000000*/,0x15C6 /*0012706*/, +0xAAAA /*0125252*/,0x1180 /*0010600*/,0x1001 /*0010001*/,0x1042 /*0010102*/,0x1083 /*0010203*/,0x10C4 /*0010304*/,0x1105 /*0010405*/,0xE141 /*0160501*/, +0x0501 /*0002401*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x0C42 /*0006102*/,0x8601 /*0103001*/,0x0501 /*0002401*/,0x0000 /*0000000*/,0x6083 /*0060203*/, +0x0A83 /*0005203*/,0x0A43 /*0005103*/,0x60C1 /*0060301*/,0x8701 /*0103401*/,0x0701 /*0003401*/,0x0000 /*0000000*/,0x0C04 /*0006004*/,0x5103 /*0050403*/, +0x6143 /*0060503*/,0x0A83 /*0005203*/,0x8702 /*0103402*/,0x0AC1 /*0005301*/,0x0501 /*0002401*/,0x0000 /*0000000*/,0x0A40 /*0005100*/,0x8301 /*0101401*/, +0x0000 /*0000000*/,0x4001 /*0040001*/,0x6041 /*0060101*/,0x0601 /*0003001*/,0x0701 /*0003401*/,0x0000 /*0000000*/,0x00C1 /*0000301*/,0x2057 /*0020127*/, +0x5455 /*0052125*/,0x0204 /*0001004*/,0x3105 /*0030405*/,0x0602 /*0003002*/,0x0A45 /*0005105*/,0x0201 /*0001001*/,0x0000 /*0000000*/,0x95C0 /*0112700*/, +0xFF01 /*0177401*/,0x8001 /*0100001*/,0x0000 /*0000000*/,0x7E02 /*0077002*/,0x0A01 /*0005001*/,0x0A81 /*0005201*/,0x7E02 /*0077002*/,0x0BC0 /*0005700*/, +0x0202 /*0001002*/,0x0BC1 /*0005701*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x15C6 /*0012706*/,0x01FE /*0000776*/,0x09F7 /*0004767*/,0x0002 /*0000002*/, +0x0000 /*0000000*/,0x25CE /*0022716*/,0x00D0 /*0000320*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x15CE /*0012716*/,0x00E2 /*0000342*/,0x0087 /*0000207*/, +0x0000 /*0000000*/,0x0A26 /*0005046*/,0x15E6 /*0012746*/,0x00EC /*0000354*/,0x0002 /*0000002*/,0x0000 /*0000000*/,0x005F /*0000137*/,0x00F2 /*0000362*/, +0x0080 /*0000200*/,0x15C5 /*0012705*/,0xE000 /*0160000*/,0x0A1F /*0005037*/,0x0006 /*0000006*/,0x15DF /*0012737*/,0x0100 /*0000400*/,0x0004 /*0000004*/, +0x15C6 /*0012706*/,0x01FE /*0000776*/,0x0BE5 /*0005745*/,0x15DF /*0012737*/,0x01CC /*0000714*/,0x004C /*0000114*/,0x0A1F /*0005037*/,0x004E /*0000116*/, +0x15C3 /*0012703*/,0xFFE6 /*0177746*/,0x15CB /*0012713*/,0x000C /*0000014*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x1080 /*0010200*/,0x1008 /*0010010*/, +0x0BD0 /*0005720*/,0x2005 /*0020005*/,0x83FC /*0101774*/,0x1080 /*0010200*/,0x1201 /*0011001*/,0x2001 /*0020001*/,0x0301 /*0001401*/,0x0000 /*0000000*/, +0x0A50 /*0005120*/,0x2005 /*0020005*/,0x83F9 /*0101771*/,0x1801 /*0014001*/,0x0A41 /*0005101*/,0x2001 /*0020001*/,0x0301 /*0001401*/,0x0000 /*0000000*/, +0x2002 /*0020002*/,0x02F9 /*0001371*/,0x0A0E /*0005016*/,0x15C4 /*0012704*/,0xAAAA /*0125252*/,0x15CB /*0012713*/,0x0018 /*0000030*/,0x15C0 /*0012700*/, +0x0800 /*0004000*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x0A44 /*0005104*/,0x1108 /*0010410*/,0x0A48 /*0005110*/,0x0A48 /*0005110*/,0x2204 /*0021004*/, +0x0301 /*0001401*/,0x0000 /*0000000*/,0x0C1F /*0006037*/,0xFFEA /*0177752*/,0x8702 /*0103402*/,0x0000 /*0000000*/,0x0131 /*0000461*/,0x8A4E /*0105116*/, +0x02F2 /*0001362*/,0x0102 /*0000402*/,0x0077 /*0000167*/,0xFE88 /*0177210*/,0x0BD0 /*0005720*/,0x7E93 /*0077223*/,0x15CB /*0012713*/,0x0024 /*0000044*/, +0x15C0 /*0012700*/,0x0C00 /*0006000*/,0x8A76 /*0105166*/,0x0001 /*0000001*/,0x02E4 /*0001344*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x1080 /*0010200*/, +0x1008 /*0010010*/,0x0BD0 /*0005720*/,0x2005 /*0020005*/,0x83FC /*0101774*/,0x15C1 /*0012701*/,0x0003 /*0000003*/,0x0A0E /*0005016*/,0x0BDF /*0005737*/, +0x01C6 /*0000706*/,0x0210 /*0001020*/,0x15CE /*0012716*/,0x0018 /*0000030*/,0x1080 /*0010200*/,0x0A48 /*0005110*/,0x0A48 /*0005110*/,0x2008 /*0020010*/, +0x0301 /*0001401*/,0x0000 /*0000000*/,0x0BD0 /*0005720*/,0x0C1F /*0006037*/,0xFFEA /*0177752*/,0x8702 /*0103402*/,0x0000 /*0000000*/,0x0108 /*0000410*/, +0x2005 /*0020005*/,0x83F3 /*0101763*/,0x138B /*0011613*/,0x0A0E /*0005016*/,0x7E51 /*0077121*/,0x0104 /*0000404*/,0x0000 /*0000000*/,0x0102 /*0000402*/, +0x15CB /*0012713*/,0x000C /*0000014*/,0x17C0 /*0013700*/,0x01C0 /*0000700*/,0x17C1 /*0013701*/,0x01C2 /*0000702*/,0x17C4 /*0013704*/,0x01C4 /*0000704*/, +0x0074 /*0000164*/,0x0002 /*0000002*/,0x17C4 /*0013704*/,0xFF78 /*0177570*/,0x45C4 /*0042704*/,0xFE00 /*0177000*/,0x55C4 /*0052704*/,0xF600 /*0173000*/, +0x97C0 /*0113700*/,0xFF79 /*0177571*/,0x0C80 /*0006200*/,0x00A1 /*0000241*/,0x004C /*0000114*/,0x0000 /*0000000*/,0x4230 /*0041060*/,0x2A2D /*0025055*/] +} diff --git a/devices/pdp11/rom/M9312/README.md b/devices/pdp11/rom/M9312/README.md new file mode 100644 index 000000000..3fdd85ec4 --- /dev/null +++ b/devices/pdp11/rom/M9312/README.md @@ -0,0 +1,41 @@ +--- +layout: page +title: PDP-11 M9312 ROM Images +permalink: /devices/pdp11/rom/M9312/ +--- + +PDP-11 M9312 ROM Images +----------------------- + +An assortment of M9312 ROM images, source listings, etc, are available from Don North's [website](http://www.ak6dn.com/PDP-11/M9312/), +some of which we have reproduced here. + +Initially, all we had was this [256-word ROM](M9312.json) obtained from Paul Nankervis' [website](http://skn.noip.me/pdp11/iopage.js). +Cross-referencing that ROM with Don North's [M9312 PROM Files](http://www.ak6dn.com/PDP-11/M9312/) revealed that it came from +DEC P/N [23-616F1](23-616F1.txt): "11/60,70 Diagnostic/Console", albeit with some unexpected changes: + + 165322 022716 165320 L26: cmp #N2,(sp) ; 165320 changed to 000320 + ... + 165332 012716 165342 L27: mov #N3,(sp) ; 165342 changed to 000342 + ... + 165344 012746 165354 mov #N4,-(sp) ; 165354 changed to 000354 + ... + 165354 000137 165362 N4: jmp @#N5 ; 165362 changed to 000362 + 165360 000000 halt ; 000000 changed to 000200 + ... + 165372 012737 165400 000004 mov #N6,@#4 ; 165400 changed to 000400 + ... + 165406 012737 165714 000114 mov #N12,@#114 ; 165714 changed to 000714 + +The unmodified [23-616F1](23-616F1.json) ROM can be seen at address 165000 when configured in a +[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) like so: + + + +As this [PDP-11 website](http://www.pdp-11.nl/pdp11-34a/cpu/options/bootstrap-info.html) explains: + +> The M9312 Bootstrap/terminator module contains a complete set of UNIBUS termination resistors and 512 words of ROM that can +be used for diagnostic routines, the console emulation routine and bootstrap programs. The module has 12 jumpers, W1 thu W12, +and five sockets to put ROMs in. One socket is used for a diagnostic ROM for the PDP-11/60 or PDP-11/70, or for a ROM that +contains the console emulation routine and diagnostics for all other PDP-11s. The other four sockets accept ROMs that contain +bootstrap programs. diff --git a/devices/pdp11/rom/README.md b/devices/pdp11/rom/README.md index d43e62260..9269fb592 100644 --- a/devices/pdp11/rom/README.md +++ b/devices/pdp11/rom/README.md @@ -7,4 +7,4 @@ permalink: /devices/pdp11/rom/ PDP-11 ROM Images ----------------- -Any ROM images added to the project will be stored here. +* [M9312](M9312/) diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index eae364503..1749455a7 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -252,7 +252,7 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) var encoding = null; var sExt = str.getExtension(sFile); - if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst") { + if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst" || sExt == "txt") { encoding = "utf8"; } var options = {encoding: encoding}; @@ -343,7 +343,7 @@ FileDump.prototype.setData = function(buf, iStart, nSkip, sExt) var b, i, j, s; if (typeof buf == "string") { var ab = []; - if (sExt == "lst") { + if (sExt == "lst" || sExt == "txt") { ab = this.parseListing(buf); } else if (buf.indexOf('{') >= 0) { @@ -488,7 +488,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth * correct load (and exec) addresses. For now, we're simply inferring that the first address parsed * in parseListing() is both the load and exec address. */ - var sAddr = str.toHexWord(this.addrLoad) + (nBase == 8? " /*" + str.toOct(this.addrLoad, 6) + "*/" : ""); + var sAddr = str.toHexWord(this.addrLoad) + (nBase == 8? "/*" + str.toOct(this.addrLoad, 6) + "*/" : ""); sDump += this.dumpLine(2, '"load":' + sAddr + ',"exec":' + sAddr + ','); } sDump += this.dumpLine(2, (sKey? '"' + sKey + '":' : "") + this.sJSONWhitespace + chOpen); @@ -520,7 +520,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth if (cbItem > 2) { sLine += v; } else { - sLine += str.toHexWord(v) + (nBase == 8? " /*" + str.toOct(v & 0xffff, 6) + "*/" : ""); + sLine += str.toHexWord(v) + (nBase == 8? "/*" + str.toOct(v & 0xffff, 6) + "*/" : ""); } } else { diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index a72eb5dca..fdc2e32d9 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -665,7 +665,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) if (type == MemoryPDP11.TYPE.RAM && !this.cbRAM) { this.cbRAM += size; } - this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); + this.status((size >> 10) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); return true; } @@ -1270,24 +1270,26 @@ BusPDP11.prototype.getMemorySize = function(type) * @param {function(number,number)|null|undefined} fnWriteByte * @param {function(number)|null|undefined} fnReadWord * @param {function(number,number)|null|undefined} fnWriteWord - * @param {string} [sName] * @param {number} [msgCategory] + * @param {string} [sName] + * @return {boolean} (true if entire range successfully registered, false if any conflicts) */ -BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName, msgCategory) +BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, msgCategory, sName) { for (var addr = start; addr <= end; addr += 2) { var off = addr & BusPDP11.IOPAGE_MASK; if (this.aIOHandlers[off] !== undefined) { Component.warning("I/O address already registered: " + str.toHexLong(addr)); - continue; + return false; } this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", msgCategory, false]; if (MAXDEBUG) this.log("addIOHandlers(" + str.toHexLong(addr) + ")"); } + return true; }; /** - * addIOTable(component, table, msgCategory) + * addIOTable(component, table, msgCategory, sName) * * Add I/O notification handlers from the specified table (a batch version of addIOHandlers). * @@ -1295,8 +1297,10 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, * @param {Component} component * @param {Object} table * @param {number} [msgCategory] (default is BUS) + * @param {string} [sName] + * @return {boolean} (true if entire range successfully registered, false if any conflicts) */ -BusPDP11.prototype.addIOTable = function(component, table, msgCategory) +BusPDP11.prototype.addIOTable = function(component, table, msgCategory, sName) { for (var port in table) { var addr = +port; @@ -1338,9 +1342,12 @@ BusPDP11.prototype.addIOTable = function(component, table, msgCategory) var sReg = afn[4]; for (var iReg = 0; iReg < nRegs; iReg++, addr += 2) { if (sReg && nRegs > 1) sReg = afn[4] + iReg; - this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sReg, msgCategory || MessagesPDP11.BUS); + if (!this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, msgCategory || MessagesPDP11.BUS, sReg || sName)) { + return false; + } } } + return true; }; /** diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index cde75534d..3982a6985 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -38,7 +38,8 @@ var MessagesPDP11 = { FAULT: 0x00000020, BUS: 0x00000040, MEMORY: 0x00000080, - DEVICE: 0x00000100, + ROM: 0x00000100, + DEVICE: 0x00000200, KEYBOARD: 0x00010000, KEYS: 0x00020000, DISK: 0x00200000, @@ -71,6 +72,7 @@ MessagesPDP11.CATEGORIES = { "fault": MessagesPDP11.FAULT, "bus": MessagesPDP11.BUS, "memory": MessagesPDP11.MEMORY, + "rom": MessagesPDP11.ROM, "device": MessagesPDP11.DEVICE, "keyboard": MessagesPDP11.KEYBOARD, // "kbd" is also allowed as shorthand for "keyboard"; see doMessages() "key": MessagesPDP11.KEYS, // using "key" instead of "keys", since the latter is a method on JavasScript objects diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index 1d9204e18..49ee4eb12 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -33,12 +33,14 @@ "use strict"; if (NODE) { - var str = require("../../shared/lib/strlib"); - var web = require("../../shared/lib/weblib"); - var DumpAPI = require("../../shared/lib/dumpapi"); - var Component = require("../../shared/lib/component"); - var PDP11 = require("./defines"); - var MemoryPDP11 = require("./memory"); + var str = require("../../shared/lib/strlib"); + var web = require("../../shared/lib/weblib"); + var DumpAPI = require("../../shared/lib/dumpapi"); + var Component = require("../../shared/lib/component"); + var PDP11 = require("./defines"); + var BusPDP11 = require("./bus"); + var MemoryPDP11 = require("./memory"); + var MessagesPDP11 = require("./messages"); } /** @@ -51,11 +53,11 @@ if (NODE) { * alias: physical alias address (null if none) * file: name of ROM data file * - * NOTE: The ROM data will not be copied into place until the Bus is ready (see initBus()) AND the - * ROM data file has finished loading (see doneLoad()). + * NOTE: The ROM data will not be copied into place until the Bus is ready (see initBus()) AND + * the ROM data file has finished loading (see doneLoad()). * - * Also, while the size parameter may seem redundant, I consider it useful to confirm that the ROM you received - * is the ROM you expected. + * Also, while the size parameter may seem redundant, I consider it useful to confirm that the ROM + * you received is the ROM you expected. * * @constructor * @extends Component @@ -70,6 +72,7 @@ function ROMPDP11(parmsROM) this.addrROM = parmsROM['addr']; this.sizeROM = parmsROM['size']; + this.fRetainROM = false; /* * The new 'alias' property can now be EITHER a single physical address (like 'addr') OR an array of @@ -260,7 +263,9 @@ ROMPDP11.prototype.initROM = function() * whether they're ROM or RAM. However, the only way to modify a machine's ROM is with the Debugger, * and Debugger users should know better. */ - delete this.abInit; + if (!this.fRetainROM) { + delete this.abInit; + } } } this.setReady(); @@ -276,7 +281,24 @@ ROMPDP11.prototype.initROM = function() */ ROMPDP11.prototype.addROM = function(addr) { - if (this.bus.addMemory(addr, this.sizeROM, MemoryPDP11.TYPE.ROM)) { + this.status(this.sizeROM + "-byte ROM at " + str.toOct(addr)); + + if (addr >= BusPDP11.IOPAGE_16BIT && addr < BusPDP11.IOPAGE_16BIT + BusPDP11.IOPAGE_LENGTH) { + /* + * This code has been added as a work-around to effectively allow us to install small ROMs into portions + * of the IOPAGE address space, by installing I/O handlers for the entire range that return the corresponding + * bytes of the current ROM image on reads, and ignore any writes (which I'm only assuming is how a typical + * ROM "device" deals with writes; if we remove the write handler, then writes will cause a fault). + */ + var IOTable = { + [addr]: [ROMPDP11.prototype.readROMByte, ROMPDP11.prototype.writeROMByte, null, null, null, this.sizeROM >> 1] + }; + if (this.bus.addIOTable(this, IOTable, MessagesPDP11.ROM, this.idComponent)) { + this.fRetainROM = true; + return true; + } + } + else if (this.bus.addMemory(addr, this.sizeROM, MemoryPDP11.TYPE.ROM)) { if (DEBUG) this.log("addROM(): copying ROM to " + str.toHexLong(addr) + " (" + str.toHexLong(this.abInit.length) + " bytes)"); var i; for (i = 0; i < this.abInit.length; i++) { @@ -284,6 +306,7 @@ ROMPDP11.prototype.addROM = function(addr) } return true; } + /* * We don't need to report an error here, because addMemory() already takes care of that. */ @@ -309,6 +332,30 @@ ROMPDP11.prototype.cloneROM = function(addr) this.bus.setMemoryBlocks(addr, this.sizeROM, aBlocks); }; +/** + * readROMByte(addr) + * + * @this {ROMPDP11} + * @param {number} addr + * @return {number} + */ +ROMPDP11.prototype.readROMByte = function(addr) +{ + var i = (addr - this.addrROM); + return this.abInit[i]; +}; + +/** + * writeROMByte(data, addr) + * + * @this {ROMPDP11} + * @param {number} data + * @param {number} addr + */ +ROMPDP11.prototype.writeROMByte = function(data, addr) +{ +}; + /** * ROMPDP11.init() * diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 18f9d0a96..2a6a5ccec 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -31,7 +31,7 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} @@ -42,96 +42,96 @@ function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=res typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} function Fa(a,b){var c,d={da:null,ha:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;u.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function fb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=t);a.prototype=fb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},u=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,fault:32,bus:64,memory:128,rom:256,device:512,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function yb(a){t.call(this,"Panel",a,yb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=zb;this.C={};this.g={START:[1,!0,!1,this.cd],STEP:[1,!1,!1,this.dd],ENABLE:[1,!1,!1,this.Zc],CONT:[1,!0,!1,this.Xc],DEP:[0,!0,!1,this.Yc],EXAM:[1,!0,!1,this.$c],LOAD:[1,!0,!1,this.bd],TEST:[0,!0,!1,this.ad]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.cd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()};k.Xc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Za[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function mc(a,b){var c=-1,d=this.controller;a=d.Za[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function nc(a,b,c){var d=!1,e=this.controller;a=e.Za[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +k.fd=function(a){return(a?this.Va:this.v)&65535};k.ae=function(a){this.v=a};var hc={},Db=(hc[65400]=[null,null,yb.prototype.fd,yb.prototype.ae,"CNSW"],hc);function Hb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.$a[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function mc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function nc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} function qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){d!=wc||a.Ob||(a.Ob+=c);c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)}; -k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a};k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)}; -k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--};k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; -function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.ke=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Td=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; -k.Ke=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Md=function(a){return this.b.V[1][a>>1&7]};k.De=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Kd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Be=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ld=function(a){return this.b.xa[1][a>>1&7]};k.Ce=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Jd=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.Ae=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.ge=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.ee=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.fe=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.de=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Sd=function(a){return this.b.V[3][a>>1&7]};k.Je=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Qd=function(a){return this.b.V[3][(a>>1&7)+8]};k.He=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Rd=function(a){return this.b.xa[3][a>>1&7]};k.Ie=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Pd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ge=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.pe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.se=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.qe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.re=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.be=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Od=function(){return 1};k.Fe=function(){};k.gd=function(){return this.b.fa}; -k.ae=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.ie=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.le=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Nd=function(a){return a?this.b.fb&65280:0};k.Ee=function(a){this.b.fb=a|255};k.xd=function(){return Pc(this.b)};k.oe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Td,K.prototype.Ke,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Md,K.prototype.De,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Kd,K.prototype.Be,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.ge,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.ee,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, -K.prototype.fe,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.de,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.ke,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.he,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.je,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Sd,K.prototype.Je,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Qd, -K.prototype.He,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Pd,K.prototype.Ge,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.pe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.se,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.qe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.re,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.be,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Od,K.prototype.Fe,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.ae,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.pd,K.prototype.ie,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.le,"PIR"],M[65532]=[null,null,K.prototype.Nd,K.prototype.Ee,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.oe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +function tc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d!=wc||a.Ob||(a.Ob+=c),a.status((c>>10)+"Kb "+xc[d]+" at "+ra(b)),!0):vc(2,b,c)} +function sc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)};k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; +k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--}; +k.ib=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Me=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; +k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.gb&65280:0};k.Ge=function(a){this.b.gb=a|255};k.xd=function(){return Pc(this.b)};k.pe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, +K.prototype.ge,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Rd, +K.prototype.Je,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],M[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Yc(this,Uc?Zc:$c);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},ma:function(a, +1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ma:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&dd(a,cd,!1),(a.B=c.B)&&bd(a,cd,!1))}function fd(a,b){b?--a.B||(a.$b=a.f?a.v:a.ac,a.Nb=a.f?a.H:a.mc):--a.g||(a.Xb=a.hc,a.sa=a.ic)}function bd(a,b,c){c&&a.B||(a.$b=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ac=b[1]||a.v,a.mc=b[3]||a.H}function dd(a,b,c){c&&a.g||(a.Xb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function Yc(a,b){b||(b=gd);dd(a,b,void 0);bd(a,b,void 0)} -var gd=[],ad=[I.prototype.S,I.prototype.wa,I.prototype.ca,I.prototype.Na],cd=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var $c=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.lb],Zc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; -function hd(a,b){u.call(this,"CPU",a,hd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.cb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Xd.bind(this);H(this)}z(hd);var id=["power","reset"];k=hd.prototype; +var gd=[],ad=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],cd=[I.prototype.P,I.prototype.Ya,I.prototype.Y,I.prototype.Aa];if(wb)var $c=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],Zc=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.Ja]; +function hd(a,b){t.call(this,"CPU",a,hd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.eb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.eb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(hd);var id=["power","reset"];k=hd.prototype; k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=od(a)&&(a.yb=a.zb=-1,ld(a),a.ga(),c=!0);c&&a.j(od(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.vb*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+rd(a))} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.eb=b;b=a.vb*a.eb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.eb/1E3*c|0,a.K[b][0]=c+rd(a))} function sd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Xd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Ub&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=sd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; +k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Za=Ba();if(this.$){var a=this.Za-this.$;a>this.Ub&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=sd(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.jb=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; function td(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;hd.call(this,a,6666667);this.decode=1120==this.pb?ud.bind(this):vd.bind(this);wd(this);this.L=0;this.M=null;this.A.complete=!1}z(td,hd);k=td.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();wd(this);kd(this);this.A.error=!1;this.parent.reset.call(this)}; function wd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Ud,a.Nb=a.Le,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,qc(a.w,16))}function xd(a,b,c){a.Pb=b;O(a,b);!c&&a.i&&(a.ga()||md(a.i))}k.tc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];pd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Dd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ed(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; function Zd(a){var b=$d(a),c=$d(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Qc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} function ae(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Ud=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; -k.Le=function(a,b){this.w.hb(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function fe(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; +k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Vd=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; +k.Ne=function(a,b){this.w.ib(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function fe(a,b,c,d){a.C&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.ib(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function he(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ie(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return de(a,b,c,8)}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function ke(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Zd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.kb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, 26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function ue(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ve(a,b){a=b&~a;R(this,a);return a}function we(a,b){a=b&~a;R(this,a<<8);return a}function xe(a,b){a|=b;R(this,a);return a}function ye(a,b){a|=b;R(this,a<<8);return a} function ze(a,b){a=~b|65536;Dd(this,a);return a&65535}function Ae(a,b){a=~b|256;Dd(this,a<<8);return a&255}function Be(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ce(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function De(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ee(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} @@ -158,51 +158,51 @@ this.f?2:0)}],dg=[function(a){S(this,a,0,Ke);this.b-=this.g?9+(this.tb&1):3+(7== var ig=[function(a){jg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],jg=[function(a){mg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,function(a){ng[a>>6&3].call(this,a)},W,W],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ee(this,a,0);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J= this.b;fe(this,a,0,b);R(this,b);this.b=this.J-Cf[this.g]},function(a){R(this,me(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Vf,Xf,Kf,Kf,Kf,Kf],og=[sf,Mf,Gf,kf,uf,Ff,function(){Zd(this);this.b-=13},W,W,W,W,W,W,W,W,W],kg=[Df,Df,qf,qf,Qe,Qe,Re,Re,Nf,Nf,W,W,W,W,If,If],lg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,function(a){pg[a>> 6&3].call(this,a)},W,W],pg=[W,function(a){a=ee(this,a,65536);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J=this.b;fe(this,a,65536,b);R(this,b);this.b=this.J-Cf[this.g]},W]; -function qg(a){u.call(this,"ROM",a,qg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);rg(c)})}}z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)}; -qg.prototype.Ha=function(){this.ha&&(this.i&&sg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};qg.prototype.Ga=function(){return!0}; -function rg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Xc)){var c;for(c=0;c>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(tc(a.w,b,a.f,Xc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ja))});this.ma=Nc(52,4);this.$=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.ma)});Cb(b,this,Rg);H(this)}; -k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.Ya)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ga=function(a){return a?this.save():!0};k.reset=function(){Sg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Sg(this)};function Sg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ue,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.te,"RBUF"],Tg[65396]=[null,null,Y.prototype.Wd,Y.prototype.Ne,"XCSR"],Tg[65398]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ve,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.ue,"RBUF"],Tg[65396]=[null,null,Y.prototype.Xd,Y.prototype.Pe,"XCSR"],Tg[65398]=[null,null,Y.prototype.Wd,Y.prototype.Oe,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&Wg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Wg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Xg(a);var e=this;if((this.g=jd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.ca=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&fh(a,b,c,d,e.da,e.La, -e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));ch(a)})}function $g(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, +function lh(a,b,c,d,e){var f=c;if(a.w)return!0;a.Xa=b;a.hb=c;a.Ec=sa(c);a.w=e;a.C=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=la[d];if(e){a.va=e[0];a.za=e[1];a.ra=e[2];a.Ma=e[3]||512;c=a.Ma>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){mh(a,b,c,d)})} function mh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=oh(this,a++);)qh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +function qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){t.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&rh(d,a)},!0;case "loadDrive":return this.G[b]= c,c.onclick=function(){var a=d.G.listDisks;a&&sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=oh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";rh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){th(this)};k.save=function(){return(new P(this)).data()}; k.restore=function(a){return th(this,a[0])};function wh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}yh(a,e,b,c,!1,d)}else xh(a,e)} -function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; +function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; function vh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ce=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; -k.xe=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.ce),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.ve=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ye=function(a){this.g=a};k.Id=function(){return this.D};k.ze=function(a){this.D=a};k.Fd=function(){return this.K};k.we=function(a){this.K=a&63}; -var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.xe,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ye,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.ze,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.we,"RLBE"],zh);function Ah(a){u.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); +k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.ib(f,v|r<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.ye=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; +var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.ye,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.we,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ze,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.Ae,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.xe,"RLBE"],zh);function Ah(a){t.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); var Bh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ah.prototype.uc=function(){return-1};Ah.prototype.vc=function(){}; function Ch(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function Dh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Eh(a,b,c){var d;if(b){b=Fh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ih(a,b){if(b)return Hh(a,b,a.Y[b]);var c=0;for(b in a.Y)Hh(a,b,a.Y[b]),c++;return 0this.b.pb?Rh:[];Sh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Th(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Pc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,rd(a),a.ua=0,a.qa()))};function Lh(a){var b;if(!ne(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.jb=function(a,b){if(!Zh(this,b))return!1;this.b.jb(a);return!0};k.kb=function(a,b,c){if(!Zh(this))return!1;this.K=0;a||ne(this)&&oe(this,this.b.u[7],0);try{a=sd(this.b,a);var d=this.b.kb(a);0>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Lh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;bi(this);a||md(this)};k.save=function(){var a=new P(this);a.set(0,Vh(this.L));a.set(1,Vh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Wh(a[b++]),this.P=Wh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} +function oe(a,b,c){var d=-1;c||(d=a.b.bb(b),0==d&&(b=Cd(a.b,2)));if(0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} function Kh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ci(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(di(this,a,a.length-1,"set"),Lh(this)));return d}; function ci(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Lh(a);break}}return f}function ei(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +function ed(a,b,c,d,e){var f=!1;if(!a.tb++)for(var g=1;!f&&g>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(r,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.oa(r,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); 0b?(c=Yh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Pc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ji(a){var b,c="";for(b=0;6>b;b++)c+=ii(a,b);c=c+"\n"+(ii(a,6)+ii(a,7));c+=ii(a,20)+ii(a,21);return c+=hi(a,"T")+hi(a,"N")+hi(a,"Z")+hi(a,"V")+hi(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.pc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Te:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&e>>0,g],v=Aa(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ji(a));c&&(a.L=Z(d.u[7]),ai(a,J(a,a.L.F)))}}function oi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=gi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ii),Cc=Gh(a,La)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(kb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(kb=2,Ld=65535,Md=a.oa,Nd=a.hb):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Gc=Th(a,Pd);if(Gc)for(var Hc= -2;HcSd;){for(var Ma=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< -Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Ma=Hg)break}}if(!Ma||null==Ma)break;var Kg=null;if("ks"==Mi){var Lg=Ma.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Ma=xa(Ma,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Ma);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);ga-=aa;0>ga&&(null==na[na.length-1].F?(aa=ga+aa,ga=0):ga+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(ga=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||Ii),Cc=Gh(a,Ma)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var lb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(lb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(lb=2,Ld=65535,Md=a.oa,Nd=a.ib):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Gc=Th(a,Pd);if(Gc)for(var Hc= +2;HcSd;){for(var Na=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< +Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Na=Hg)break}}if(!Na||null==Na)break;var Kg=null;if("ks"==Mi){var Lg=Na.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Na=xa(Na,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Na);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Vd=0;Vd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ui(a,b,c)}})}else c(a,null)} -function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=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));n.appendChild(v)}c|| (c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Si(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hi||Za(!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),--Hi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index f0b25cb23..cca6978dd 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -41,202 +41,202 @@ function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFul function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={K:null,X:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +d.K[f++]=e[c]>>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(t(d.K[0]),d=null):(t("Empty resource: "+a),d=null)}catch(k){t("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;x.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function z(a,b){b||(b=x);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +function Za(a){v.call(this,"Panel",a,Za);this.b=this.i=this.f=this.w=this.s=0;this.A=this.C=this.v=!1;this.F=$a;this.m={};this.c={START:[1,!0,!1,this.rc],STEP:[1,!1,!1,this.sc],ENABLE:[1,!1,!1,this.nc],CONT:[1,!0,!1,this.lc],DEP:[0,!0,!1,this.mc],EXAM:[1,!0,!1,this.oc],LOAD:[1,!0,!1,this.qc],TEST:[0,!0,!1,this.pc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}y(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; -function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.rc=function(a){a||this.a.l.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.sc=function(){};h.nc=function(a){a||G(this.a)};h.lc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.qb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.nb(0),Va(a,!1);else try{var c=this.a.nb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.g.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new H(this);zb(a,this.D);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||I(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.ob+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){d!=Hb||a.gb||(a.gb+=c);c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} -h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; -function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; -h.zd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Vb(b))};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; -h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.h.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; -h.ad=function(a){return a?this.a.Da&65280:0};h.Td=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Dd=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; -var N={},M=(N[61568]=[null,null,L.prototype.gd,L.prototype.Zd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.$c,L.prototype.Sd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Yc,L.prototype.Qd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Bc,L.prototype.vd,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.zc,L.prototype.td,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.Ac, -L.prototype.ud,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.yc,L.prototype.sd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Hc,L.prototype.zd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Cc,L.prototype.wd,"LKS"],N[65402]=[null,null,L.prototype.Ec,L.prototype.yd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.fd,L.prototype.Yd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.dd, -L.prototype.Wd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.cd,L.prototype.Vd,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, -"R5SET0"],N[65478]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6KERNEL"],N[65479]=[null,null,L.prototype.Pc,L.prototype.Hd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, -L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Oc,L.prototype.Gd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.wc,L.prototype.qd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.bd,L.prototype.Ud,"SYSID",1,1170],N[65526]=[null,null,L.prototype.vc,L.prototype.pd,"CPUERR",1,1170],N[65528]= -[null,null,L.prototype.Dc,L.prototype.xd,"MB",1,1170],N[65530]=[null,null,L.prototype.Ic,L.prototype.Ad,"PIR"],N[65532]=[null,null,L.prototype.ad,L.prototype.Td,"SL"],N[65534]=[null,null,L.prototype.Lc,L.prototype.Dd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> +function Eb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.ob+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new H(a,f,p,a.b,d,e);zb(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d!=Hb||a.gb||(a.gb+=c),a.status((c>>10)+"Kb "+Ib[d]+" at "+ka(b)),!0):Gb(2,b,c)} +function Db(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; +h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.g[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; +function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var E=k[4],V=0;V>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; +h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Ub(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.$c=function(a){return this.a.Y[1][a>>1&7]};h.Td=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Yc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Rd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.wd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; +h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Ma=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.h[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.h[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.h[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.h[6]=a};h.Pc=function(){return this.a.h[7]};h.Id=function(a){this.a.h[7]=a}; +h.Na=function(a){a&=7;return this.a.B&2048?this.a.h[a]:this.a.Ha[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.h[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.g.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.bd=function(a){return a?this.a.Da&65280:0};h.Vd=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Ed=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var M={},L=(M[61568]=[null,null,K.prototype.hd,K.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.ad,K.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Zc,K.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.$c,K.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Yc,K.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.Ac, +K.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.xd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.gd,K.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.ed, +K.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.fd,K.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.dd,K.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Ma,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.Ma,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.Ma,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.Ma,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.Ma,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.Ma,K.prototype.Oa, +"R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Id,"R7KERNEL"],M[65480]=[null,null,K.prototype.Na,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Na,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Na,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Na,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Na,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Na, +K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.rd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.cd,K.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.qd,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.Dc,K.prototype.yd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Bd,"PIR"],M[65532]=[null,null,K.prototype.bd,K.prototype.Vd,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Ed,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Ha(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&jc(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function jc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);jc(a,b,void 0);lc(a,b,void 0)} -var mc=[],hc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],kc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var gc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],fc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function nc(a,b){x.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.wa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.ld.bind(this);F(this)}z(nc);var oc=["power","reset"];h=nc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),G(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ya)for(a=Array(this.size>>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.g, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);ic(a,b,void 0);lc(a,b,void 0)} +var mc=[],hc=[H.prototype.N,H.prototype.qa,H.prototype.na,H.prototype.xa],kc=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Ya)var gc=[H.prototype.C,H.prototype.da,H.prototype.P,H.prototype.ra],fc=[H.prototype.J,H.prototype.pa,H.prototype.aa,H.prototype.wa]; +function nc(a,b){v.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);D(this)}y(nc);var oc=["power","reset"];h=nc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),F(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=z(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} function wc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.ld=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; -function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} -function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}z(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; -function Ac(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.hd,a.pb=a.$d,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.h,16))}function Bc(a,b,c){a.Kb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ra){var d=!1;0>a.Ia?a.Ia=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ic(a,a.Ia);Ic(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Xb(a,c);a.u&=-17} +h.md=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){F(this); +this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function F(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} +function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}y(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&F(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; +function Ac(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.h=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.pb=a.be,Bb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.g,16))}function Bc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(F(a)||a.D.c())}h.Jb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.g));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.h[6],a.h[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function J(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.h[6]=4);Ic(a,a.Ja);Ic(a,a.h[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Xb(a,c);a.u&=-17} function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ic(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.h.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.h.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.h,a)};h.hd=function(a){return Lb(this.h,Lc(this,a,2))};h.ac=function(a,b){Mb(this.h,a,b&65535)};h.$d=function(a,b){Mb(this.h,Lc(this,a,4),b)}; -function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;S(this,a);return a}function dd(a,b){a=b&~a;S(this,a<<8);return a}function ed(a,b){a|=b;S(this,a);return a}function fd(a,b){a|=b;S(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} +function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Ic(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.h[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.h[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.h[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.g.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.g,a)};h.jd=function(a){return Lb(this.g,Lc(this,a,2))};h.ac=function(a,b){Mb(this.g,a,b&65535)};h.be=function(a,b){Mb(this.g,Lc(this,a,4),b)}; +function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.ma[a.B>>12&3]=d} +function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.g,a.J(b,c,2)):a.h[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.g,a.J(b,c,2)):a.h[c]} +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.g,e,d.call(a,c,Lb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.h[e]=c?d&1?c<<24>>24&65535:a.h[e]&-256|c&255:a.h[e]&-256;return c} +function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;R(this,a);return a}function dd(a,b){a=b&~a;R(this,a<<8);return a}function ed(a,b){a|=b;R(this,a);return a}function fd(a,b){a|=b;R(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} function id(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function jd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function kd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ld(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function md(a,b){a=-b;Ec(this,a,a&b&32768);return a&65535}function nd(a,b){a=-b;Ec(this,a<<8,(a&b&128)<<8);return a&255} function od(a,b){a=b<<1|this.m>>16&1;Gc(this,a);return a&65535}function pd(a,b){a=b<<1|this.m>>16&1;Gc(this,a<<8);return a&255}function qd(a,b){a=(this.m&65536|b)>>1|b<<16;Gc(this,a);return a&65535}function rd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Gc(this,a<<8);return a&255}function sd(a,b){var c=b-a;Hc(this,c,a,b);return c&65535}function td(a,b){var c=b-a;Hc(this,c<<8,a<<8,b<<8);return c&255}function ud(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function vd(a,b){a^=b;S(this,a);return a&65535}function wd(a){U(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function yd(a){var b=Uc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function zd(a){V(this,a,!R(this))}function Ad(a){V(this,a,R(this))} -function Bd(a){U(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){U(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){T(this,a,Qc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Fd(a){S(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){S(this,(Qc(this,a)&Tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){V(this,a,this.i&65535?0:4)}function Id(a){V(this,a,!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Ld(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){V(this,a,R(this)||(this.i&65535?0:4))}function Nd(a){V(this,a,!this.za()!=!(this.f&32768))}function Od(a){V(this,a,this.za())}function Pd(a){V(this,a,!!(this.i&65535))}function Qd(a){V(this,a,!this.za())}function Rd(){K(this,12,1);this.a-=5}function Sd(a){V(this,a,!0)}function Td(a){V(this,a,!(this.f&32768))}function Ud(a){V(this,a,this.f&32768?2:0)} +function vd(a,b){a^=b;R(this,a);return a&65535}function wd(a){T(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(this,a);a=a>>6&7;var c=this.h[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.h[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function yd(a){var b=Uc(this,a);a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.h[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function zd(a){U(this,a,!Q(this))}function Ad(a){U(this,a,Q(this))} +function Bd(a){T(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){S(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){T(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){S(this,a,Qc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Fd(a){R(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){R(this,(Qc(this,a)&Tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){U(this,a,this.i&65535?0:4)}function Id(a){U(this,a,!this.za()==!(this.f&32768))}function Jd(a){U(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){U(this,a,!Q(this)&&!!(this.i&65535))} +function Ld(a){U(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){U(this,a,Q(this)||(this.i&65535?0:4))}function Nd(a){U(this,a,!this.za()!=!(this.f&32768))}function Od(a){U(this,a,this.za())}function Pd(a){U(this,a,!!(this.i&65535))}function Qd(a){U(this,a,!this.za())}function Rd(){J(this,12,1);this.a-=5}function Sd(a){U(this,a,!0)}function Td(a){U(this,a,!(this.f&32768))}function Ud(a){U(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Vd(a){var b=Rc(this,a);a=Uc(this,a);Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Wd(a){var b=Qc(this,a)<<8;a=Tc(this,a)<<8;Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Xd(a){var b=Uc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Yd(){K(this,24,2);this.a-=25} -function Zd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function $d(){K(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;P(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function fe(a){var b=Rc(this,a);this.F=this.a;S(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);S(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; -function ie(a){var b=Uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){U(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function pe(a){U(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){K(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){U(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} +function Xd(a){var b=Uc(this,a);if(b){a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.h[a]=d&65535,this.h[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.h[a]&&(this.h[a]=this.h[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Yd(){J(this,24,2);this.a-=25} +function Zd(){this.B&49152?(this.M|=128,J(this,4,3)):this.D?this.D.b():F(this);this.a-=7}function $d(){J(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;O(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.h[a]);this.h[a]=this.h[7];O(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function fe(a){var b=Rc(this,a);this.F=this.a;R(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);R(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; +function ie(a){var b=Uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.h[a];c&32768&&(c|=-65536);b=~~(b*c);this.h[a]=b>>16&65535;this.h[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.h[b]=this.h[b]-1&65535)O(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){T(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function pe(a){T(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){J(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){T(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)} -var te=[function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0, -md);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Me=[function(a){Ne[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Ne=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],De=[je,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, -Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){T(this,a,0,nd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Je=[function(a){T(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Oe[a>>12].call(this,a)} -var Oe=[function(a){Pe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Qe[a>>8&15].call(this,a)},function(a){Re[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Pe=[function(a){Se[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Te[a>>6&3].call(this,a)},Y,Y],Te=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F= -this.a;Pc(this,a,0,b);S(this,b);this.a=this.F-he[this.c]},function(a){S(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Se=[function(a){Ue[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ue=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Qe=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Re=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){Ve[a>>6& -3].call(this,a)},Y,Y],Ve=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);S(this,b);this.a=this.F-he[this.c]},Y]; -function We(a){x.call(this,"ROM",a,We);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Xe(c)})}}z(We);We.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Xe(this)}; -We.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};We.prototype.ja=function(){return!0}; -function Xe(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,dc)){var c;for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,cf);F(this)}; -h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){df(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return df(this)};function df(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ef={},cf=(ef[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],ef[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],ef[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],ef[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],ef);Ha(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&hf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;hf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=jf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&sf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));pf(a)})}function mf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){zf(a,b,c,d)})} -function zf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){T(this,a,0, +md);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Me=[function(a){Oe[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Oe=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],De=[je,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, +Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){S(this,a,0,nd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Je=[function(a){S(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Pe[a>>12].call(this,a)} +var Pe=[function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Qe=[function(a){Te[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Ue[a>>6&3].call(this,a)},Y,Y],Ue=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F= +this.a;Pc(this,a,0,b);R(this,b);this.a=this.F-he[this.c]},function(a){R(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Te=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ve=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Re=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Se=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){We[a>>6& +3].call(this,a)},Y,Y],We=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);R(this,b);this.a=this.F-he[this.c]},Y]; +function Xe(a){v.call(this,"ROM",a,Xe);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.j=a.file;this.s=q(this.j);if(this.j){a=this.j;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.j=null);Ye(c)})}}y(Xe);h=Xe.prototype; +h.ha=function(a,b,c,d){this.g=b;this.a=c;this.D=d;Ye(this)};h.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ja=function(){return!0}; +function Ye(a){if(!Wa(a)){if(a.j){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Xa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[Xe.prototype.Xc,Xe.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Eb(a.g,b,a.b,dc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[u++]&255);else p&1?F(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,df);D(this)}; +h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.wa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){ef(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return ef(this)};function ef(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ff={},df=(ff[65392]=[null,null,Z.prototype.Rc,Z.prototype.Kd,"RCSR"],ff[65394]=[null,null,Z.prototype.Qc,Z.prototype.Jd,"RBUF"],ff[65396]=[null,null,Z.prototype.ld,Z.prototype.de,"XCSR"],ff[65398]=[null,null,Z.prototype.kd,Z.prototype.ce,"XBUF"],ff);Ha(function(){for(var a=C(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&jf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;jf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;this.J=kf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&tf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||D(a));qf(a)})}function nf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){Af(a,b,c,d)})} +function Af(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)t(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,V=w.length;V>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function Cf(a,b){var c=a.Z*a.S,d=b/c|0;return dg)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Bf(this,a++);)Df(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Df(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){u("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ef(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Ff(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Bf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Ef(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Gf(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Gf(this,a[0])};function Jf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Lf(a,e,b,c,!1,d)}else Kf(a,e)} -function Lf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Kf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,yf(new uf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Ef(this,a.xb)}; -function If(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ff(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Gf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Cf(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Ff(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Hf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return Hf(this,a[0])};function Kf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Mf(a,e,b,c,!1,d)}else Lf(a,e)} +function Mf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Lf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,zf(new vf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||D(this));Ff(this,a.xb)}; +function Jf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; -h.Md=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; -var Mf={},Hf=(Mf[63744]=[null,null,O.prototype.Uc,O.prototype.Md,"RLCS"],Mf[63746]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBA"],Mf[65284]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLDA"],Mf[65286]=[null,null,O.prototype.Wc,O.prototype.Od,"RLMP"],Mf[65288]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLBE"],Mf); -function Nf(a,b,c){x.call(this,"Computer",a,Nf);this.l.O=!1;Of(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Pf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Qf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bPf){if(Rf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Rf(this.i)&&(Wf(this,d),a=2,Xf(this.i));this.i.set("timestamp",sa());Yf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Vf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Rf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Xf(d),Rf(d)?(c=Vf(d),e=!0):c=!1))}e&&Uf(this,c?d:null)}else 2==a&&d.clear()}else Uf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Zf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Wf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Wf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;a(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.g,f,u|w<<8);if(Pb(this.g)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.sd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var u=Lb(this.g,f);if(Pb(this.g)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.Nd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; +var Nf={},If=(Nf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Nf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Nf[65284]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Nf[65286]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Nf[65288]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Nf); +function Of(a,b,c){v.call(this,"Computer",a,Of);this.l.O=!1;Pf(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Qf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Rf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.g=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=z(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bQf){if(Sf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Sf(this.i)&&(Xf(this,d),a=2,Yf(this.i));this.i.set("timestamp",sa());Zf(this.i);var e=this.b&&!this.m;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Wf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Sf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Yf(d),Sf(d)?(c=Wf(d),e=!0):c=!1))}e&&Vf(this,c?d:null)}else 2==a&&d.clear()}else Vf(this);delete this.v;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&($f(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Xf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Xf(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=z(a.id),l=0;l(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);ig(a,b,c)}})}else c(a,null)} -function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&C(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| (c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?gg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--fg||Ja(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gg(b,a,d,!0,e,n):hg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return jg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map From d470f17cdf905a7f422234523885bac41bf3b0bf Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 12:06:36 -0700 Subject: [PATCH 25/30] README updates --- devices/pdp11/README.md | 3 ++- devices/pdp11/rom/M9312/README.md | 27 +++++++++++++++------------ devices/pdp11/rom/README.md | 6 +++--- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/devices/pdp11/README.md b/devices/pdp11/README.md index aa4f27eae..f02fc4eb3 100644 --- a/devices/pdp11/README.md +++ b/devices/pdp11/README.md @@ -7,11 +7,12 @@ permalink: /devices/pdp11/ PDP-11 Device Configurations ---------------------------- -[PDP-11 Machines](/devices/pdp11/machine/) rely on a variety of machine configuration files, including: +[PDP-11 Machines](/devices/pdp11/machine/) rely on a variety of machine configuration files and resources, including: * [Control Panels](panel/) * [Serial Interface for Display Terminals (DL11)](dl11/) * [High-Speed Paper Tape Reader/Punch (PC11)](pc11/) +* [ROM Images](rom/) Sample machines include a [PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) and [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/). diff --git a/devices/pdp11/rom/M9312/README.md b/devices/pdp11/rom/M9312/README.md index 3fdd85ec4..4b2c0db90 100644 --- a/devices/pdp11/rom/M9312/README.md +++ b/devices/pdp11/rom/M9312/README.md @@ -1,11 +1,22 @@ --- layout: page -title: PDP-11 M9312 ROM Images +title: PDP-11 M9312 ROMs permalink: /devices/pdp11/rom/M9312/ --- -PDP-11 M9312 ROM Images ------------------------ +PDP-11 M9312 +------------ + +As this [PDP-11 website](http://www.pdp-11.nl/pdp11-34a/cpu/options/bootstrap-info.html) explains: + +> The M9312 Bootstrap/terminator module contains a complete set of UNIBUS termination resistors and 512 words of ROM that can +be used for diagnostic routines, the console emulation routine and bootstrap programs. The module has 12 jumpers, W1 thu W12, +and five sockets to put ROMs in. One socket is used for a diagnostic ROM for the PDP-11/60 or PDP-11/70, or for a ROM that +contains the console emulation routine and diagnostics for all other PDP-11s. The other four sockets accept ROMs that contain +bootstrap programs. + +PDP-11 M9312 ROMs +----------------- An assortment of M9312 ROM images, source listings, etc, are available from Don North's [website](http://www.ak6dn.com/PDP-11/M9312/), some of which we have reproduced here. @@ -28,14 +39,6 @@ DEC P/N [23-616F1](23-616F1.txt): "11/60,70 Diagnostic/Console", albeit with som 165406 012737 165714 000114 mov #N12,@#114 ; 165714 changed to 000714 The unmodified [23-616F1](23-616F1.json) ROM can be seen at address 165000 when configured in a -[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) like so: +[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) as: - -As this [PDP-11 website](http://www.pdp-11.nl/pdp11-34a/cpu/options/bootstrap-info.html) explains: - -> The M9312 Bootstrap/terminator module contains a complete set of UNIBUS termination resistors and 512 words of ROM that can -be used for diagnostic routines, the console emulation routine and bootstrap programs. The module has 12 jumpers, W1 thu W12, -and five sockets to put ROMs in. One socket is used for a diagnostic ROM for the PDP-11/60 or PDP-11/70, or for a ROM that -contains the console emulation routine and diagnostics for all other PDP-11s. The other four sockets accept ROMs that contain -bootstrap programs. diff --git a/devices/pdp11/rom/README.md b/devices/pdp11/rom/README.md index 9269fb592..bec9437ec 100644 --- a/devices/pdp11/rom/README.md +++ b/devices/pdp11/rom/README.md @@ -1,10 +1,10 @@ --- layout: page -title: PDP-11 ROM Images +title: PDP-11 ROMs permalink: /devices/pdp11/rom/ --- -PDP-11 ROM Images ------------------ +PDP-11 ROMs +----------- * [M9312](M9312/) From 71546f1ed5a43d7266c880433cec7f07de293423 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 12:45:54 -0700 Subject: [PATCH 26/30] Fixed incorrect RL11 addresses --- .../pdp11/boot/monitor/{PDPJSMON.json => BOOTMON.json} | 0 apps/pdp11/boot/monitor/{PDPJSMON.mac => BOOTMON.mac} | 0 apps/pdp11/boot/monitor/{PDPJSMON.txt => BOOTMON.txt} | 0 apps/pdp11/boot/monitor/README.md | 10 +++++----- apps/pdp11/boot/monitor/makefile | 10 +++++----- devices/pdp11/machine/1120/monitor/README.md | 2 +- devices/pdp11/machine/1120/monitor/debugger/README.md | 2 +- .../pdp11/machine/1120/monitor/debugger/machine.xml | 2 +- devices/pdp11/machine/1120/monitor/machine.xml | 2 +- .../pdp11/machine/1170/monitor/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/monitor/machine.xml | 2 +- devices/pdp11/machine/1170/panel/debugger/machine.xml | 4 ++-- devices/pdp11/machine/1170/panel/machine.xml | 2 +- devices/pdp11/machine/1170/vt100/debugger/machine.xml | 2 +- devices/pdp11/machine/1170/vt100/machine.xml | 2 +- modules/pdp11/lib/defines.js | 6 +++--- 16 files changed, 24 insertions(+), 24 deletions(-) rename apps/pdp11/boot/monitor/{PDPJSMON.json => BOOTMON.json} (100%) rename apps/pdp11/boot/monitor/{PDPJSMON.mac => BOOTMON.mac} (100%) rename apps/pdp11/boot/monitor/{PDPJSMON.txt => BOOTMON.txt} (100%) diff --git a/apps/pdp11/boot/monitor/PDPJSMON.json b/apps/pdp11/boot/monitor/BOOTMON.json similarity index 100% rename from apps/pdp11/boot/monitor/PDPJSMON.json rename to apps/pdp11/boot/monitor/BOOTMON.json diff --git a/apps/pdp11/boot/monitor/PDPJSMON.mac b/apps/pdp11/boot/monitor/BOOTMON.mac similarity index 100% rename from apps/pdp11/boot/monitor/PDPJSMON.mac rename to apps/pdp11/boot/monitor/BOOTMON.mac diff --git a/apps/pdp11/boot/monitor/PDPJSMON.txt b/apps/pdp11/boot/monitor/BOOTMON.txt similarity index 100% rename from apps/pdp11/boot/monitor/PDPJSMON.txt rename to apps/pdp11/boot/monitor/BOOTMON.txt diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index 363fd4d25..3a7ab062e 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -9,16 +9,16 @@ redirect_from: PDP-11 Boot Monitor ------------------- -[PDPJSMON.mac](PDPJSMON.mac) is a custom boot monitor/loader based on [boot.mac](http://skn.noip.me/pdp11/boot.mac) written by +[BOOTMON.mac](BOOTMON.mac) is a custom boot monitor/loader based on [boot.mac](http://skn.noip.me/pdp11/boot.mac) written by [Paul Nankervis](mailto:paulnank@hotmail.com). It is used with all our PDP-11 test machines. -[PDPJSMON.mac](PDPJSMON.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce -[PDPJSMON.txt](PDPJSMON.txt), which was then processed by [FileDump](/modules/filedump/) to produce -[PDPJSMON.json](PDPJSMON.json). +[BOOTMON.mac](BOOTMON.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce +[BOOTMON.txt](BOOTMON.txt), which was then processed by [FileDump](/modules/filedump/) to produce +[BOOTMON.json](BOOTMON.json). To see the Boot Monitor in action, try the [PDP-11/70 Boot Monitor (with Debugger)](/devices/pdp11/machine/1170/monitor/debugger/). -The **PDPJSMON.mac** source code is shown below. +The **BOOTMON.mac** source code is shown below. ; BOOT MONITOR ; diff --git a/apps/pdp11/boot/monitor/makefile b/apps/pdp11/boot/monitor/makefile index 5a9085304..0465f447f 100644 --- a/apps/pdp11/boot/monitor/makefile +++ b/apps/pdp11/boot/monitor/makefile @@ -2,10 +2,10 @@ # Don't have macro11? Make yourself a copy from https://github.com/shattered/macro11 # -all: PDPJSMON.json +all: BOOTMON.json -PDPJSMON.txt: PDPJSMON.mac - macro11 PDPJSMON.mac -l PDPJSMON.txt +BOOTMON.txt: BOOTMON.mac + macro11 BOOTMON.mac -l BOOTMON.txt -PDPJSMON.json: PDPJSMON.txt - node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.txt --format=octal --output=PDPJSMON.json --overwrite +BOOTMON.json: BOOTMON.txt + node ../../../../modules/filedump/bin/filedump --file=BOOTMON.txt --format=octal --output=BOOTMON.json --overwrite diff --git a/devices/pdp11/machine/1120/monitor/README.md b/devices/pdp11/machine/1120/monitor/README.md index 8c9ef5c2b..78a875dde 100644 --- a/devices/pdp11/machine/1120/monitor/README.md +++ b/devices/pdp11/machine/1120/monitor/README.md @@ -12,7 +12,7 @@ PDP-11/20 Boot Monitor The machine below pre-loads the [PDP-11 Boot Monitor](/apps/pdp11/boot/monitor/) into RAM: - + {% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/monitor/debugger/README.md b/devices/pdp11/machine/1120/monitor/debugger/README.md index 8dafedd2f..604c38242 100644 --- a/devices/pdp11/machine/1120/monitor/debugger/README.md +++ b/devices/pdp11/machine/1120/monitor/debugger/README.md @@ -13,6 +13,6 @@ PDP-11/20 Boot Monitor (with Debugger) The machine below pre-loads the [PDP-11 Boot Monitor](/apps/pdp11/boot/monitor/) into RAM: - + {% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/monitor/debugger/machine.xml b/devices/pdp11/machine/1120/monitor/debugger/machine.xml index 1e46df5a9..68361531b 100644 --- a/devices/pdp11/machine/1120/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1120/monitor/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/20 Boot Monitor with 56Kb and Debugger - + diff --git a/devices/pdp11/machine/1120/monitor/machine.xml b/devices/pdp11/machine/1120/monitor/machine.xml index 878ba43ba..4c78fb97b 100644 --- a/devices/pdp11/machine/1120/monitor/machine.xml +++ b/devices/pdp11/machine/1120/monitor/machine.xml @@ -4,7 +4,7 @@ PDP-11/20 Boot Monitor with 56Kb - + diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index b76e6522a..1048b5e45 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 Boot Monitor with Debugger - + diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index 899d360cc..4555932a2 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 Boot Monitor - + diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index e5fbe66fa..038d3e746 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -4,12 +4,12 @@ PDP-11/70 with Front Panel and Debugger - + - +
    diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 35304c3f4..a53724d35 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index 7ae1f88e8..1fa4fe659 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index 2ac6456a4..7c5d4f169 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -4,7 +4,7 @@ PDP-11/70 with Front Panel - + diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index acd6440cf..49bb2f2b9 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -434,9 +434,9 @@ var PDP11 = { RLCS: 0o174400, // RL11 Control Status Register RLBA: 0o174402, // RL11 Bus Address Register - RLDA: 0o177404, // RL11 Disk Address Register - RLMP: 0o177406, // RL11 Multi-Purpose Register - RLBE: 0o177410, // RL11 Bus (Address) Extension Register (RLV12 controller only) + RLDA: 0o174404, // RL11 Disk Address Register + RLMP: 0o174406, // RL11 Multi-Purpose Register + RLBE: 0o174410, // RL11 Bus (Address) Extension Register (RLV12 controller only) LKS: 0o177546, // KW11-L Clock Status From 08d48b9257e6e88f6c48456ea0605af650976f81 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 14:27:27 -0700 Subject: [PATCH 27/30] Removed hard-coded addresses from BOOTMAN.mac --- apps/pdp11/boot/monitor/BOOTMON.json | 176 +++++++++--------- apps/pdp11/boot/monitor/BOOTMON.mac | 38 ++-- apps/pdp11/boot/monitor/BOOTMON.txt | 38 ++-- devices/pdp11/panel/1170/debugger/front.xml | 18 +- .../pdp11/panel/test/debugger/terminal.xml | 18 +- devices/pdp11/panel/test/terminal.xml | 18 +- 6 files changed, 153 insertions(+), 153 deletions(-) diff --git a/apps/pdp11/boot/monitor/BOOTMON.json b/apps/pdp11/boot/monitor/BOOTMON.json index cf008c34c..b1321ca02 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.json +++ b/apps/pdp11/boot/monitor/BOOTMON.json @@ -1,90 +1,90 @@ -{"load":0xC000 /*140000*/,"exec":0xC000 /*140000*/, +{"load":0xC000/*140000*/,"exec":0xC000/*140000*/, "words":[ -0x0005 /*000005*/,0x0A1F /*005037*/,0xFFFE /*177776*/,0x15C6 /*012706*/,0xC000 /*140000*/,0x0A1F /*005037*/,0xFF74 /*177564*/,0x15C0 /*012700*/, -0xC255 /*141125*/,0x09F7 /*004767*/,0x0056 /*000126*/,0x15DF /*012737*/,0xC058 /*140130*/,0x0040 /*000100*/,0x15DF /*012737*/,0x00E0 /*000340*/, -0x0042 /*000102*/,0x55DF /*052737*/,0x0040 /*000100*/,0xFF66 /*177546*/,0x15C0 /*012700*/,0xC26D /*141155*/,0x09F7 /*004767*/,0x003C /*000074*/, -0xE5C6 /*162706*/,0x00AE /*000256*/,0x1180 /*010600*/,0x09F7 /*004767*/,0x006E /*000156*/,0x0A00 /*005000*/,0x101F /*010037*/,0xFF78 /*177570*/, -0x0001 /*000001*/,0x0A80 /*005200*/,0x0BF7 /*005767*/,0x000C /*000014*/,0x03F9 /*001771*/,0x15E6 /*012746*/,0x5800 /*054000*/,0x1DE6 /*016746*/, -0x0002 /*000002*/,0x0002 /*000002*/,0x0000 /*000000*/,0x0000 /*000000*/,0x0AB7 /*005267*/,0xFFFA /*177772*/,0x0002 /*000002*/,0x8BDF /*105737*/, -0xFF74 /*177564*/,0x80FD /*100375*/,0x901F /*110037*/,0xFF76 /*177566*/,0x0087 /*000207*/,0x0000 /*000000*/,0xB5DF /*132737*/,0x0040 /*000100*/, -0xFF74 /*177564*/,0x02FC /*001374*/,0x1037 /*010067*/,0xFFF2 /*177762*/,0x15DF /*012737*/,0xC08C /*140214*/,0x0034 /*000064*/,0x15DF /*012737*/, -0x0080 /*000200*/,0x0036 /*000066*/,0xD5DF /*152737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x0087 /*000207*/,0x8BFF /*105777*/,0xFFDA /*177732*/, -0x0306 /*001406*/,0x9FDF /*117737*/,0xFFD4 /*177724*/,0xFF76 /*177566*/,0x0AB7 /*005267*/,0xFFCE /*177716*/,0x0002 /*000002*/,0x8A1F /*105037*/, -0xFF74 /*177564*/,0x0002 /*000002*/,0x0000 /*000000*/,0x0000 /*000000*/,0x1037 /*010067*/,0xFFF8 /*177770*/,0x0A37 /*005067*/,0xFFF6 /*177766*/, -0x15DF /*012737*/,0xC0C4 /*140304*/,0x0030 /*000060*/,0x15DF /*012737*/,0x0080 /*000200*/,0x0032 /*000062*/,0xD5DF /*152737*/,0x0040 /*000100*/, -0xFF70 /*177560*/,0x0087 /*000207*/,0x1026 /*010046*/,0x97C0 /*113700*/,0xFF72 /*177562*/,0xA017 /*120027*/,0x000D /*000015*/,0x032D /*001455*/, -0xA017 /*120027*/,0x007F /*000177*/,0x0303 /*001403*/,0xA017 /*120027*/,0x0008 /*000010*/,0x020A /*001012*/,0x0BF7 /*005767*/,0xFFC6 /*177706*/, -0x0306 /*001406*/,0x0AF7 /*005367*/,0xFFC0 /*177700*/,0x15C0 /*012700*/,0xC223 /*141043*/,0x09F7 /*004767*/,0xFF7E /*177576*/,0x012B /*000453*/, -0xA017 /*120027*/,0x0020 /*000040*/,0x0528 /*002450*/,0xA017 /*120027*/,0x007F /*000177*/,0x0425 /*002045*/,0x09F7 /*004767*/,0xFF5E /*177536*/, -0xA017 /*120027*/,0x007A /*000172*/,0x0605 /*003005*/,0xA017 /*120027*/,0x0061 /*000141*/,0x0502 /*002402*/,0xC5C0 /*142700*/,0x0020 /*000040*/, -0x2DD7 /*026727*/,0xFF92 /*177622*/,0x00AC /*000254*/,0x0417 /*002027*/,0x9026 /*110046*/,0x1DC0 /*016700*/,0xFF86 /*177606*/,0x6DC0 /*066700*/, -0xFF84 /*177604*/,0x9588 /*112610*/,0x0AB7 /*005267*/,0xFF7E /*177576*/,0x010E /*000416*/,0x1DC0 /*016700*/,0xFF76 /*177566*/,0x6DC0 /*066700*/, -0xFF74 /*177564*/,0x8A08 /*105010*/,0x15DF /*012737*/,0xC14A /*140512*/,0x00A0 /*000240*/,0x15DF /*012737*/,0x0040 /*000100*/,0x00A2 /*000242*/, -0x15DF /*012737*/,0x0400 /*002000*/,0xFFFA /*177772*/,0x1580 /*012600*/,0x0002 /*000002*/,0x0A1F /*005037*/,0xFFFA /*177772*/,0x1026 /*010046*/, -0x1066 /*010146*/,0x10A6 /*010246*/,0x10E6 /*010346*/,0x1126 /*010446*/,0x15C0 /*012700*/,0xC220 /*141040*/,0x09F7 /*004767*/,0xFF0C /*177414*/, -0xB5DF /*132737*/,0x0040 /*000100*/,0xFF74 /*177564*/,0x02FC /*001374*/,0x0A04 /*005004*/,0x15C3 /*012703*/,0xC227 /*141047*/,0x94C0 /*112300*/, -0x0319 /*001431*/,0x1DC2 /*016702*/,0xFF2E /*177456*/,0x9481 /*112201*/,0x0319 /*001431*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/, -0xA001 /*120001*/,0x0208 /*001010*/,0x94C0 /*112300*/,0x030A /*001412*/,0x9481 /*112201*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0020 /*000040*/, -0x02F7 /*001367*/,0x0104 /*000404*/,0x94C0 /*112300*/,0x02FE /*001376*/,0x0A84 /*005204*/,0x01E9 /*000751*/,0x0CC4 /*006304*/,0x09FC /*004774*/, -0xC1C4 /*140704*/,0x0104 /*000404*/,0x15C0 /*012700*/,0xC243 /*141103*/,0x09F7 /*004767*/,0xFEC0 /*177300*/,0x0A37 /*005067*/,0xFEF6 /*177366*/, -0x15C0 /*012700*/,0xC26D /*141155*/,0x09F7 /*004767*/,0xFEB4 /*177264*/,0x1584 /*012604*/,0x1583 /*012603*/,0x1582 /*012602*/,0x1581 /*012601*/, -0x1580 /*012600*/,0x0002 /*000002*/,0xC42C /*142054*/,0xC2A8 /*141250*/,0xC2B4 /*141264*/,0xC2F8 /*141370*/,0xC29E /*141236*/,0x4F43 /*047503*/, -0x4D4D /*046515*/,0x4E41 /*047101*/,0x5344 /*051504*/,0x4120 /*040440*/,0x4552 /*042522*/,0x4220 /*041040*/,0x4F4F /*047517*/,0x2C54 /*026124*/, -0x4820 /*044040*/,0x4C41 /*046101*/,0x2C54 /*026124*/,0x4C20 /*046040*/,0x4749 /*043511*/,0x5448 /*052110*/,0x2C53 /*026123*/,0x5420 /*052040*/, -0x5345 /*051505*/,0x2054 /*020124*/,0x4E41 /*047101*/,0x2044 /*020104*/,0x4548 /*042510*/,0x504C /*050114*/,0x0A0D /*005015*/,0x4F42 /*047502*/, -0x544F /*052117*/,0x4420 /*042040*/,0x5645 /*053105*/,0x4349 /*041511*/,0x5345 /*051505*/,0x4120 /*040440*/,0x4552 /*042522*/,0x5220 /*051040*/, -0x3F4B /*037513*/,0x5220 /*051040*/,0x3F4C /*037514*/,0x4F20 /*047440*/,0x2052 /*020122*/,0x5052 /*050122*/,0x0D3F /*006477*/,0x000A /*000012*/, -0x0A0D /*005015*/,0x0800 /*004000*/,0x0820 /*004040*/,0x4200 /*041000*/,0x4F4F /*047517*/,0x0054 /*000124*/,0x4148 /*040510*/,0x544C /*052114*/, -0x5400 /*052000*/,0x5345 /*051505*/,0x0054 /*000124*/,0x494C /*044514*/,0x4847 /*044107*/,0x5354 /*051524*/,0x4800 /*044000*/,0x4C45 /*046105*/, -0x0050 /*000120*/,0x5500 /*052400*/,0x4B4E /*045516*/,0x4F4E /*047516*/,0x4E57 /*047127*/,0x4320 /*041440*/,0x4D4F /*046517*/,0x414D /*040515*/, -0x444E /*042116*/,0x0D0A /*006412*/,0x5000 /*050000*/,0x5044 /*050104*/,0x312D /*030455*/,0x2031 /*020061*/,0x4F4D /*047515*/,0x494E /*044516*/, -0x4F54 /*047524*/,0x2052 /*020122*/,0x3156 /*030526*/,0x302E /*030056*/,0x0D0A /*006412*/,0x0D0A /*006412*/,0x4200 /*041000*/,0x4F4F /*047517*/, -0x3E54 /*037124*/,0x0020 /*000040*/,0x4E55 /*047125*/,0x4E4B /*047113*/,0x574F /*053517*/,0x204E /*020116*/,0x4F42 /*047502*/,0x544F /*052117*/, -0x4420 /*042040*/,0x5645 /*053105*/,0x4349 /*041511*/,0x0A45 /*005105*/,0x000D /*000015*/,0x2020 /*020040*/,0x2020 /*020040*/,0x2020 /*020040*/, -0x4C43 /*046103*/,0x434F /*041517*/,0x204B /*020113*/,0x4954 /*044524*/,0x4B43 /*045503*/,0x0A53 /*005123*/,0x000D /*000015*/,0x15C0 /*012700*/, -0xC1CE /*140716*/,0x09F7 /*004767*/,0xFDC6 /*176706*/,0x0087 /*000207*/,0x0000 /*000000*/,0x15C0 /*012700*/,0xC220 /*141040*/,0x09F7 /*004767*/, -0xFDBA /*176672*/,0x0087 /*000207*/,0x0A37 /*005067*/,0xFD9E /*176636*/,0x15C5 /*012705*/,0x1A00 /*015000*/,0x115F /*010537*/,0xFF78 /*177570*/, -0x1144 /*010504*/,0x0C84 /*006204*/,0x0A00 /*005000*/,0x1141 /*010501*/,0x7204 /*071004*/,0x1002 /*010002*/,0x7084 /*070204*/,0x60C1 /*060301*/, -0x2045 /*020105*/,0x0301 /*001401*/,0x0000 /*000000*/,0x7F0A /*077412*/,0x7F4F /*077517*/,0x15C0 /*012700*/,0xC28F /*141217*/,0x1DC3 /*016703*/, -0xFD74 /*176564*/,0x0A02 /*005002*/,0x7297 /*071227*/,0x0008 /*000010*/,0x65C3 /*062703*/,0x0030 /*000060*/,0x90E0 /*110340*/,0x1083 /*010203*/, -0x02F8 /*001370*/,0x09F7 /*004767*/,0xFD76 /*176566*/,0x0087 /*000207*/,0x15C3 /*012703*/,0x7F06 /*077406*/,0x0A02 /*005002*/,0x0A01 /*005001*/, -0x15C0 /*012700*/,0x0008 /*000010*/,0x10F1 /*010361*/,0xF4C0 /*172300*/,0x10B1 /*010261*/,0xF4E0 /*172340*/,0x10F1 /*010361*/,0xF4D0 /*172320*/, -0x10B1 /*010261*/,0xF4F0 /*172360*/,0x10F1 /*010361*/,0xF480 /*172200*/,0x10B1 /*010261*/,0xF4A0 /*172240*/,0x10F1 /*010361*/,0xF490 /*172220*/, -0x10B1 /*010261*/,0xF4B0 /*172260*/,0x10F1 /*010361*/,0xFF80 /*177600*/,0x10B1 /*010261*/,0xFFA0 /*177640*/,0x10F1 /*010361*/,0xFF90 /*177620*/, -0x10F1 /*010361*/,0xFFB0 /*177660*/,0x65C2 /*062702*/,0x0080 /*000200*/,0x65C1 /*062701*/,0x0002 /*000002*/,0x7E1D /*077035*/,0x55DF /*052737*/, -0xFC00 /*176000*/,0xF4FE /*172376*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xF4BE /*172276*/,0x55DF /*052737*/,0xFC00 /*176000*/,0xFFBE /*177676*/, -0x15DF /*012737*/,0x003F /*000077*/,0xF54E /*172516*/,0x15DF /*012737*/,0x0001 /*000001*/,0xFF7A /*177572*/,0x15DF /*012737*/,0x03C0 /*001700*/, -0xF4A4 /*172244*/,0x15DF /*012737*/,0x03C0 /*001700*/,0xF4B4 /*172264*/,0x15DF /*012737*/,0x1000 /*010000*/,0xFFFE /*177776*/,0x15C3 /*012703*/, -0x4080 /*040200*/,0x15C2 /*012702*/,0xC388 /*141610*/,0x14A6 /*012246*/,0x0D93 /*006623*/,0x2097 /*020227*/,0xC42C /*142054*/,0x87FB /*103773*/, -0x15F7 /*012767*/,0x4080 /*040200*/,0xFCCE /*176316*/,0x0087 /*000207*/,0x15C0 /*012700*/,0x001F /*000037*/,0x15C1 /*012701*/,0xF800 /*174000*/, -0x35DF /*032737*/,0x0001 /*000001*/,0xFF78 /*177570*/,0x030C /*001414*/,0x15C0 /*012700*/,0x0F0F /*007417*/,0x1001 /*010001*/,0x0A41 /*005101*/, -0x35DF /*032737*/,0x0002 /*000002*/,0xFF78 /*177570*/,0x0304 /*001404*/,0x15C0 /*012700*/,0x3C73 /*036163*/,0x15C1 /*012701*/,0x3E00 /*037000*/, -0x1042 /*010102*/,0xE5C2 /*162702*/,0x0002 /*000002*/,0x45C2 /*042702*/,0x0001 /*000001*/,0x1083 /*010203*/,0x45C3 /*042703*/,0xFFC1 /*177701*/, -0x15F3 /*012763*/,0x0001 /*000001*/,0x4000 /*040000*/,0x65C3 /*062703*/,0x0002 /*000002*/,0x15F3 /*012763*/,0x004B /*000113*/,0x4000 /*040000*/, -0x1084 /*010204*/,0x7517 /*072427*/,0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/, -0x1084 /*010204*/,0x7517 /*072427*/,0xFFF4 /*177764*/,0x45C4 /*042704*/,0xFFF1 /*177761*/,0x1174 /*010564*/,0xF4A0 /*172240*/,0x1043 /*010103*/, -0x74D7 /*072327*/,0xFFF4 /*177764*/,0x45C3 /*042703*/,0xFFF1 /*177761*/,0x20C4 /*020304*/,0x030A /*001412*/,0x1044 /*010104*/,0x7517 /*072427*/, -0xFFFA /*177772*/,0x45C4 /*042704*/,0xFF80 /*177600*/,0x15C5 /*012705*/,0x03C0 /*001700*/,0xE105 /*160405*/,0x1173 /*010563*/,0xF4A0 /*172240*/, -0x15C4 /*012704*/,0x0003 /*000003*/,0x67C4 /*063704*/,0xFF78 /*177570*/,0x15C3 /*012703*/,0x0002 /*000002*/,0x61C3 /*060703*/,0x004A /*000112*/, -0x7F02 /*077402*/,0x1002 /*010002*/,0x0C02 /*006002*/,0x0C41 /*006101*/,0x0C00 /*006000*/,0x01C2 /*000702*/,0x0A03 /*005003*/,0x9481 /*112201*/, -0x0365 /*001545*/,0xA057 /*120127*/,0x0020 /*000040*/,0x03FB /*001773*/,0xA057 /*120127*/,0x0052 /*000122*/,0x0305 /*001405*/,0x15C0 /*012700*/, -0xC274 /*141164*/,0x09F7 /*004767*/,0xFC26 /*176046*/,0x0087 /*000207*/,0x9481 /*112201*/,0x9480 /*112200*/,0x030E /*001416*/,0xA017 /*120027*/, -0x0020 /*000040*/,0x030B /*001413*/,0xA017 /*120027*/,0x0037 /*000067*/,0x0619 /*003031*/,0xE5C0 /*162700*/,0x0030 /*000060*/,0x0516 /*002426*/, -0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x5003 /*050003*/,0x01F0 /*000760*/,0x0A02 /*005002*/,0x15D2 /*012722*/,0x005F /*000137*/, -0x15D2 /*012722*/,0xC000 /*140000*/,0x15D2 /*012722*/,0xC000 /*140000*/,0x0A12 /*005022*/,0xA057 /*120127*/,0x004B /*000113*/,0x033E /*001476*/, -0xA057 /*120127*/,0x004C /*000114*/,0x0308 /*001410*/,0xA057 /*120127*/,0x0050 /*000120*/,0x034F /*001517*/,0x15C0 /*012700*/,0xC243 /*141103*/, -0x09F7 /*004767*/,0xFBD8 /*175730*/,0x0087 /*000207*/,0x0005 /*000005*/,0x00C3 /*000303*/,0x15C1 /*012701*/,0xF900 /*174400*/,0x15F1 /*012761*/, -0x000B /*000013*/,0x0004 /*000004*/,0x55C3 /*052703*/,0x0004 /*000004*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A03 /*105003*/, -0x55C3 /*052703*/,0x0008 /*000010*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x1C42 /*016102*/,0x0006 /*000006*/,0x45C2 /*042702*/, -0x003F /*000077*/,0x0A82 /*005202*/,0x10B1 /*010261*/,0x0004 /*000004*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x0006 /*000006*/,0x10C9 /*010311*/, -0x8BC9 /*105711*/,0x80FE /*100376*/,0x0A31 /*005061*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x15F1 /*012761*/,0xFE00 /*177000*/, -0x0006 /*000006*/,0x8A03 /*105003*/,0x55C3 /*052703*/,0x000C /*000014*/,0x10C9 /*010311*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x45C9 /*042711*/, -0x00FF /*000377*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/,0x0A05 /*005005*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x00C3 /*000303*/, -0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x0CC3 /*006303*/,0x15C1 /*012701*/,0xFF0A /*177412*/,0x10C9 /*010311*/, -0x0A21 /*005041*/,0x15E1 /*012741*/,0xFE00 /*177000*/,0x15E1 /*012741*/,0x0005 /*000005*/,0x0A02 /*005002*/,0x0A03 /*005003*/,0x0A04 /*005004*/, -0x0A05 /*005005*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/,0x0A07 /*005007*/,0x0005 /*000005*/,0x15C1 /*012701*/,0xFDC0 /*176700*/, -0x15F1 /*012761*/,0x0020 /*000040*/,0x0008 /*000010*/,0x10F1 /*010361*/,0x0008 /*000010*/,0x15C9 /*012711*/,0x0011 /*000021*/,0x15F1 /*012761*/, -0x1000 /*010000*/,0x001A /*000032*/,0x15F1 /*012761*/,0xFE00 /*177000*/,0x0002 /*000002*/,0x0A31 /*005061*/,0x0004 /*000004*/,0x0A31 /*005061*/, -0x0006 /*000006*/,0x0A31 /*005061*/,0x001C /*000034*/,0x15C9 /*012711*/,0x0039 /*000071*/,0x8BC9 /*105711*/,0x80FE /*100376*/,0x8A09 /*105011*/, -0x10C0 /*010300*/,0x0A07 /*005007*/] +0x0005/*000005*/,0x0A1F/*005037*/,0xFFFE/*177776*/,0x15C6/*012706*/,0xC000/*140000*/,0x0A1F/*005037*/,0xFF74/*177564*/,0x15C0/*012700*/, +0xC255/*141125*/,0x09F7/*004767*/,0x0056/*000126*/,0x15DF/*012737*/,0xC058/*140130*/,0x0040/*000100*/,0x15DF/*012737*/,0x00E0/*000340*/, +0x0042/*000102*/,0x55DF/*052737*/,0x0040/*000100*/,0xFF66/*177546*/,0x15C0/*012700*/,0xC26D/*141155*/,0x09F7/*004767*/,0x003C/*000074*/, +0xE5C6/*162706*/,0x00AE/*000256*/,0x1180/*010600*/,0x09F7/*004767*/,0x006E/*000156*/,0x0A00/*005000*/,0x101F/*010037*/,0xFF78/*177570*/, +0x0001/*000001*/,0x0A80/*005200*/,0x0BF7/*005767*/,0x000C/*000014*/,0x03F9/*001771*/,0x15E6/*012746*/,0x5800/*054000*/,0x1DE6/*016746*/, +0x0002/*000002*/,0x0002/*000002*/,0x0000/*000000*/,0x0000/*000000*/,0x0AB7/*005267*/,0xFFFA/*177772*/,0x0002/*000002*/,0x8BDF/*105737*/, +0xFF74/*177564*/,0x80FD/*100375*/,0x901F/*110037*/,0xFF76/*177566*/,0x0087/*000207*/,0x0000/*000000*/,0xB5DF/*132737*/,0x0040/*000100*/, +0xFF74/*177564*/,0x02FC/*001374*/,0x1037/*010067*/,0xFFF2/*177762*/,0x15DF/*012737*/,0xC08C/*140214*/,0x0034/*000064*/,0x15DF/*012737*/, +0x0080/*000200*/,0x0036/*000066*/,0xD5DF/*152737*/,0x0040/*000100*/,0xFF74/*177564*/,0x0087/*000207*/,0x8BFF/*105777*/,0xFFDA/*177732*/, +0x0306/*001406*/,0x9FDF/*117737*/,0xFFD4/*177724*/,0xFF76/*177566*/,0x0AB7/*005267*/,0xFFCE/*177716*/,0x0002/*000002*/,0x8A1F/*105037*/, +0xFF74/*177564*/,0x0002/*000002*/,0x0000/*000000*/,0x0000/*000000*/,0x1037/*010067*/,0xFFF8/*177770*/,0x0A37/*005067*/,0xFFF6/*177766*/, +0x15DF/*012737*/,0xC0C4/*140304*/,0x0030/*000060*/,0x15DF/*012737*/,0x0080/*000200*/,0x0032/*000062*/,0xD5DF/*152737*/,0x0040/*000100*/, +0xFF70/*177560*/,0x0087/*000207*/,0x1026/*010046*/,0x97C0/*113700*/,0xFF72/*177562*/,0xA017/*120027*/,0x000D/*000015*/,0x032D/*001455*/, +0xA017/*120027*/,0x007F/*000177*/,0x0303/*001403*/,0xA017/*120027*/,0x0008/*000010*/,0x020A/*001012*/,0x0BF7/*005767*/,0xFFC6/*177706*/, +0x0306/*001406*/,0x0AF7/*005367*/,0xFFC0/*177700*/,0x15C0/*012700*/,0xC223/*141043*/,0x09F7/*004767*/,0xFF7E/*177576*/,0x012B/*000453*/, +0xA017/*120027*/,0x0020/*000040*/,0x0528/*002450*/,0xA017/*120027*/,0x007F/*000177*/,0x0425/*002045*/,0x09F7/*004767*/,0xFF5E/*177536*/, +0xA017/*120027*/,0x007A/*000172*/,0x0605/*003005*/,0xA017/*120027*/,0x0061/*000141*/,0x0502/*002402*/,0xC5C0/*142700*/,0x0020/*000040*/, +0x2DD7/*026727*/,0xFF92/*177622*/,0x00AC/*000254*/,0x0417/*002027*/,0x9026/*110046*/,0x1DC0/*016700*/,0xFF86/*177606*/,0x6DC0/*066700*/, +0xFF84/*177604*/,0x9588/*112610*/,0x0AB7/*005267*/,0xFF7E/*177576*/,0x010E/*000416*/,0x1DC0/*016700*/,0xFF76/*177566*/,0x6DC0/*066700*/, +0xFF74/*177564*/,0x8A08/*105010*/,0x15DF/*012737*/,0xC14A/*140512*/,0x00A0/*000240*/,0x15DF/*012737*/,0x0040/*000100*/,0x00A2/*000242*/, +0x15DF/*012737*/,0x0400/*002000*/,0xFFFA/*177772*/,0x1580/*012600*/,0x0002/*000002*/,0x0A1F/*005037*/,0xFFFA/*177772*/,0x1026/*010046*/, +0x1066/*010146*/,0x10A6/*010246*/,0x10E6/*010346*/,0x1126/*010446*/,0x15C0/*012700*/,0xC220/*141040*/,0x09F7/*004767*/,0xFF0C/*177414*/, +0xB5DF/*132737*/,0x0040/*000100*/,0xFF74/*177564*/,0x02FC/*001374*/,0x0A04/*005004*/,0x15C3/*012703*/,0xC227/*141047*/,0x94C0/*112300*/, +0x0319/*001431*/,0x1DC2/*016702*/,0xFF2E/*177456*/,0x9481/*112201*/,0x0319/*001431*/,0xA057/*120127*/,0x0020/*000040*/,0x03FB/*001773*/, +0xA001/*120001*/,0x0208/*001010*/,0x94C0/*112300*/,0x030A/*001412*/,0x9481/*112201*/,0x0308/*001410*/,0xA057/*120127*/,0x0020/*000040*/, +0x02F7/*001367*/,0x0104/*000404*/,0x94C0/*112300*/,0x02FE/*001376*/,0x0A84/*005204*/,0x01E9/*000751*/,0x0CC4/*006304*/,0x09FC/*004774*/, +0xC1C4/*140704*/,0x0104/*000404*/,0x15C0/*012700*/,0xC243/*141103*/,0x09F7/*004767*/,0xFEC0/*177300*/,0x0A37/*005067*/,0xFEF6/*177366*/, +0x15C0/*012700*/,0xC26D/*141155*/,0x09F7/*004767*/,0xFEB4/*177264*/,0x1584/*012604*/,0x1583/*012603*/,0x1582/*012602*/,0x1581/*012601*/, +0x1580/*012600*/,0x0002/*000002*/,0xC42C/*142054*/,0xC2A8/*141250*/,0xC2B4/*141264*/,0xC2F8/*141370*/,0xC29E/*141236*/,0x4F43/*047503*/, +0x4D4D/*046515*/,0x4E41/*047101*/,0x5344/*051504*/,0x4120/*040440*/,0x4552/*042522*/,0x4220/*041040*/,0x4F4F/*047517*/,0x2C54/*026124*/, +0x4820/*044040*/,0x4C41/*046101*/,0x2C54/*026124*/,0x4C20/*046040*/,0x4749/*043511*/,0x5448/*052110*/,0x2C53/*026123*/,0x5420/*052040*/, +0x5345/*051505*/,0x2054/*020124*/,0x4E41/*047101*/,0x2044/*020104*/,0x4548/*042510*/,0x504C/*050114*/,0x0A0D/*005015*/,0x4F42/*047502*/, +0x544F/*052117*/,0x4420/*042040*/,0x5645/*053105*/,0x4349/*041511*/,0x5345/*051505*/,0x4120/*040440*/,0x4552/*042522*/,0x5220/*051040*/, +0x3F4B/*037513*/,0x5220/*051040*/,0x3F4C/*037514*/,0x4F20/*047440*/,0x2052/*020122*/,0x5052/*050122*/,0x0D3F/*006477*/,0x000A/*000012*/, +0x0A0D/*005015*/,0x0800/*004000*/,0x0820/*004040*/,0x4200/*041000*/,0x4F4F/*047517*/,0x0054/*000124*/,0x4148/*040510*/,0x544C/*052114*/, +0x5400/*052000*/,0x5345/*051505*/,0x0054/*000124*/,0x494C/*044514*/,0x4847/*044107*/,0x5354/*051524*/,0x4800/*044000*/,0x4C45/*046105*/, +0x0050/*000120*/,0x5500/*052400*/,0x4B4E/*045516*/,0x4F4E/*047516*/,0x4E57/*047127*/,0x4320/*041440*/,0x4D4F/*046517*/,0x414D/*040515*/, +0x444E/*042116*/,0x0D0A/*006412*/,0x5000/*050000*/,0x5044/*050104*/,0x312D/*030455*/,0x2031/*020061*/,0x4F4D/*047515*/,0x494E/*044516*/, +0x4F54/*047524*/,0x2052/*020122*/,0x3156/*030526*/,0x302E/*030056*/,0x0D0A/*006412*/,0x0D0A/*006412*/,0x4200/*041000*/,0x4F4F/*047517*/, +0x3E54/*037124*/,0x0020/*000040*/,0x4E55/*047125*/,0x4E4B/*047113*/,0x574F/*053517*/,0x204E/*020116*/,0x4F42/*047502*/,0x544F/*052117*/, +0x4420/*042040*/,0x5645/*053105*/,0x4349/*041511*/,0x0A45/*005105*/,0x000D/*000015*/,0x2020/*020040*/,0x2020/*020040*/,0x2020/*020040*/, +0x4C43/*046103*/,0x434F/*041517*/,0x204B/*020113*/,0x4954/*044524*/,0x4B43/*045503*/,0x0A53/*005123*/,0x000D/*000015*/,0x15C0/*012700*/, +0xC1CE/*140716*/,0x09F7/*004767*/,0xFDC6/*176706*/,0x0087/*000207*/,0x0000/*000000*/,0x15C0/*012700*/,0xC220/*141040*/,0x09F7/*004767*/, +0xFDBA/*176672*/,0x0087/*000207*/,0x0A37/*005067*/,0xFD9E/*176636*/,0x15C5/*012705*/,0x1A00/*015000*/,0x115F/*010537*/,0xFF78/*177570*/, +0x1144/*010504*/,0x0C84/*006204*/,0x0A00/*005000*/,0x1141/*010501*/,0x7204/*071004*/,0x1002/*010002*/,0x7084/*070204*/,0x60C1/*060301*/, +0x2045/*020105*/,0x0301/*001401*/,0x0000/*000000*/,0x7F0A/*077412*/,0x7F4F/*077517*/,0x15C0/*012700*/,0xC28F/*141217*/,0x1DC3/*016703*/, +0xFD74/*176564*/,0x0A02/*005002*/,0x7297/*071227*/,0x0008/*000010*/,0x65C3/*062703*/,0x0030/*000060*/,0x90E0/*110340*/,0x1083/*010203*/, +0x02F8/*001370*/,0x09F7/*004767*/,0xFD76/*176566*/,0x0087/*000207*/,0x15C3/*012703*/,0x7F06/*077406*/,0x0A02/*005002*/,0x0A01/*005001*/, +0x15C0/*012700*/,0x0008/*000010*/,0x10F1/*010361*/,0xF4C0/*172300*/,0x10B1/*010261*/,0xF4E0/*172340*/,0x10F1/*010361*/,0xF4D0/*172320*/, +0x10B1/*010261*/,0xF4F0/*172360*/,0x10F1/*010361*/,0xF480/*172200*/,0x10B1/*010261*/,0xF4A0/*172240*/,0x10F1/*010361*/,0xF490/*172220*/, +0x10B1/*010261*/,0xF4B0/*172260*/,0x10F1/*010361*/,0xFF80/*177600*/,0x10B1/*010261*/,0xFFA0/*177640*/,0x10F1/*010361*/,0xFF90/*177620*/, +0x10F1/*010361*/,0xFFB0/*177660*/,0x65C2/*062702*/,0x0080/*000200*/,0x65C1/*062701*/,0x0002/*000002*/,0x7E1D/*077035*/,0x55DF/*052737*/, +0xFC00/*176000*/,0xF4FE/*172376*/,0x55DF/*052737*/,0xFC00/*176000*/,0xF4BE/*172276*/,0x55DF/*052737*/,0xFC00/*176000*/,0xFFBE/*177676*/, +0x15DF/*012737*/,0x003F/*000077*/,0xF54E/*172516*/,0x15DF/*012737*/,0x0001/*000001*/,0xFF7A/*177572*/,0x15DF/*012737*/,0x03C0/*001700*/, +0xF4A4/*172244*/,0x15DF/*012737*/,0x03C0/*001700*/,0xF4B4/*172264*/,0x15DF/*012737*/,0x1000/*010000*/,0xFFFE/*177776*/,0x15C3/*012703*/, +0x4080/*040200*/,0x15C2/*012702*/,0xC388/*141610*/,0x14A6/*012246*/,0x0D93/*006623*/,0x2097/*020227*/,0xC42C/*142054*/,0x87FB/*103773*/, +0x15F7/*012767*/,0x4080/*040200*/,0xFCCE/*176316*/,0x0087/*000207*/,0x15C0/*012700*/,0x001F/*000037*/,0x15C1/*012701*/,0xF800/*174000*/, +0x35DF/*032737*/,0x0001/*000001*/,0xFF78/*177570*/,0x030C/*001414*/,0x15C0/*012700*/,0x0F0F/*007417*/,0x1001/*010001*/,0x0A41/*005101*/, +0x35DF/*032737*/,0x0002/*000002*/,0xFF78/*177570*/,0x0304/*001404*/,0x15C0/*012700*/,0x3C73/*036163*/,0x15C1/*012701*/,0x3E00/*037000*/, +0x1042/*010102*/,0xE5C2/*162702*/,0x0002/*000002*/,0x45C2/*042702*/,0x0001/*000001*/,0x1083/*010203*/,0x45C3/*042703*/,0xFFC1/*177701*/, +0x15F3/*012763*/,0x0001/*000001*/,0x4000/*040000*/,0x65C3/*062703*/,0x0002/*000002*/,0x15F3/*012763*/,0x004B/*000113*/,0x4000/*040000*/, +0x1084/*010204*/,0x7517/*072427*/,0xFFFA/*177772*/,0x45C4/*042704*/,0xFF80/*177600*/,0x15C5/*012705*/,0x03C0/*001700*/,0xE105/*160405*/, +0x1084/*010204*/,0x7517/*072427*/,0xFFF4/*177764*/,0x45C4/*042704*/,0xFFF1/*177761*/,0x1174/*010564*/,0xF4A0/*172240*/,0x1043/*010103*/, +0x74D7/*072327*/,0xFFF4/*177764*/,0x45C3/*042703*/,0xFFF1/*177761*/,0x20C4/*020304*/,0x030A/*001412*/,0x1044/*010104*/,0x7517/*072427*/, +0xFFFA/*177772*/,0x45C4/*042704*/,0xFF80/*177600*/,0x15C5/*012705*/,0x03C0/*001700*/,0xE105/*160405*/,0x1173/*010563*/,0xF4A0/*172240*/, +0x15C4/*012704*/,0x0003/*000003*/,0x67C4/*063704*/,0xFF78/*177570*/,0x15C3/*012703*/,0x0002/*000002*/,0x61C3/*060703*/,0x004A/*000112*/, +0x7F02/*077402*/,0x1002/*010002*/,0x0C02/*006002*/,0x0C41/*006101*/,0x0C00/*006000*/,0x01C2/*000702*/,0x0A03/*005003*/,0x9481/*112201*/, +0x0365/*001545*/,0xA057/*120127*/,0x0020/*000040*/,0x03FB/*001773*/,0xA057/*120127*/,0x0052/*000122*/,0x0305/*001405*/,0x15C0/*012700*/, +0xC274/*141164*/,0x09F7/*004767*/,0xFC26/*176046*/,0x0087/*000207*/,0x9481/*112201*/,0x9480/*112200*/,0x030E/*001416*/,0xA017/*120027*/, +0x0020/*000040*/,0x030B/*001413*/,0xA017/*120027*/,0x0037/*000067*/,0x0619/*003031*/,0xE5C0/*162700*/,0x0030/*000060*/,0x0516/*002426*/, +0x0CC3/*006303*/,0x0CC3/*006303*/,0x0CC3/*006303*/,0x5003/*050003*/,0x01F0/*000760*/,0x0A02/*005002*/,0x15D2/*012722*/,0x005F/*000137*/, +0x15D2/*012722*/,0xC000/*140000*/,0x15D2/*012722*/,0xC000/*140000*/,0x0A12/*005022*/,0xA057/*120127*/,0x004B/*000113*/,0x033E/*001476*/, +0xA057/*120127*/,0x004C/*000114*/,0x0308/*001410*/,0xA057/*120127*/,0x0050/*000120*/,0x034F/*001517*/,0x15C0/*012700*/,0xC243/*141103*/, +0x09F7/*004767*/,0xFBD8/*175730*/,0x0087/*000207*/,0x0005/*000005*/,0x00C3/*000303*/,0x15C1/*012701*/,0xF900/*174400*/,0x15F1/*012761*/, +0x000B/*000013*/,0x0004/*000004*/,0x55C3/*052703*/,0x0004/*000004*/,0x10C9/*010311*/,0x8BC9/*105711*/,0x80FE/*100376*/,0x8A03/*105003*/, +0x55C3/*052703*/,0x0008/*000010*/,0x10C9/*010311*/,0x8BC9/*105711*/,0x80FE/*100376*/,0x1C42/*016102*/,0x0006/*000006*/,0x45C2/*042702*/, +0x003F/*000077*/,0x0A82/*005202*/,0x10B1/*010261*/,0x0004/*000004*/,0x8A03/*105003*/,0x55C3/*052703*/,0x0006/*000006*/,0x10C9/*010311*/, +0x8BC9/*105711*/,0x80FE/*100376*/,0x0A31/*005061*/,0x0002/*000002*/,0x0A31/*005061*/,0x0004/*000004*/,0x15F1/*012761*/,0xFE00/*177000*/, +0x0006/*000006*/,0x8A03/*105003*/,0x55C3/*052703*/,0x000C/*000014*/,0x10C9/*010311*/,0x8BC9/*105711*/,0x80FE/*100376*/,0x45C9/*042711*/, +0x00FF/*000377*/,0x0A02/*005002*/,0x0A03/*005003*/,0x0A04/*005004*/,0x0A05/*005005*/,0x0A07/*005007*/,0x0005/*000005*/,0x00C3/*000303*/, +0x0CC3/*006303*/,0x0CC3/*006303*/,0x0CC3/*006303*/,0x0CC3/*006303*/,0x0CC3/*006303*/,0x15C1/*012701*/,0xFF0A/*177412*/,0x10C9/*010311*/, +0x0A21/*005041*/,0x15E1/*012741*/,0xFE00/*177000*/,0x15E1/*012741*/,0x0005/*000005*/,0x0A02/*005002*/,0x0A03/*005003*/,0x0A04/*005004*/, +0x0A05/*005005*/,0x8BC9/*105711*/,0x80FE/*100376*/,0x8A09/*105011*/,0x0A07/*005007*/,0x0005/*000005*/,0x15C1/*012701*/,0xFDC0/*176700*/, +0x15F1/*012761*/,0x0020/*000040*/,0x0008/*000010*/,0x10F1/*010361*/,0x0008/*000010*/,0x15C9/*012711*/,0x0011/*000021*/,0x15F1/*012761*/, +0x1000/*010000*/,0x001A/*000032*/,0x15F1/*012761*/,0xFE00/*177000*/,0x0002/*000002*/,0x0A31/*005061*/,0x0004/*000004*/,0x0A31/*005061*/, +0x0006/*000006*/,0x0A31/*005061*/,0x001C/*000034*/,0x15C9/*012711*/,0x0039/*000071*/,0x8BC9/*105711*/,0x80FE/*100376*/,0x8A09/*105011*/, +0x10C0/*010300*/,0x0A07/*005007*/] } \ No newline at end of file diff --git a/apps/pdp11/boot/monitor/BOOTMON.mac b/apps/pdp11/boot/monitor/BOOTMON.mac index 4aa1e2456..fc0b55005 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.mac +++ b/apps/pdp11/boot/monitor/BOOTMON.mac @@ -13,7 +13,7 @@ KW11VEC = 100 .ASECT .=140000 -START: RESET ; 140000 +START: RESET CLR @#PSW MOV #START,SP CLR @#DL11XCSR ; CLEAR THE XCSR @@ -41,19 +41,19 @@ START: RESET ; 140000 LGHTON: .WORD 0 CLKTIC: .WORD 0 -CLKAST: ; 140124 +CLKAST: INC CLKTIC RTI ONECHR: - TSTB @#DL11XCSR ; 140132 + TSTB @#DL11XCSR BPL ONECHR MOVB R0,@#177566 RTS PC -PRTPTR: .WORD 0 ; 140146 +PRTPTR: .WORD 0 -PRINT: ; 140150 +PRINT: BITB #100,@#DL11XCSR BNE PRINT MOV R0,PRTPTR @@ -62,7 +62,7 @@ PRINT: ; 140150 BISB #100,@#DL11XCSR RTS PC -PRTAST: ; 140210 +PRTAST: TSTB @PRTPTR BEQ 2$ MOVB @PRTPTR,@#177566 @@ -75,14 +75,14 @@ BUFFER: .WORD 0 ; INPUT BUFFER POINTER LENGTH: .WORD 0 ; INPUT BUFFER LENGTH INPUT: - MOV R0,BUFFER ; 140244 + MOV R0,BUFFER CLR LENGTH MOV #INPAST,@#60 MOV #200,@#62 BISB #100,@#177560 RTS PC -INPAST: ; 140300 +INPAST: MOV R0,-(SP) MOVB @#177562,R0 CMPB R0,#15 @@ -125,7 +125,7 @@ INPAST: ; 140300 9$: MOV (SP)+,R0 RTI -CMD: ; 140506 +CMD: CLR @#177772 ; NO MORE PIR CALLS MOV R0,-(SP) MOV R1,-(SP) @@ -195,18 +195,18 @@ PERMSG: .ASCIZ ' CLOCK TICKS'<12><15> .EVEN -HELP: ; 141244 +HELP: MOV #HLPMSG,R0 JSR PC,PRINT RTS PC -HALT: ; 141260 +HALT: HALT MOV #EOL,R0 JSR PC,PRINT RTS PC -TEST: ; 141272 +TEST: CLR CLKTIC MOV #15000,R5 @@ -228,7 +228,7 @@ TEST: ; 141272 MOV #PERMSG+5,R0 MOV CLKTIC,R3 -25$: CLR R2 ; 141350 +25$: CLR R2 DIV #10,R2 ADD #'0,R3 MOVB R3,-(R0) @@ -244,7 +244,7 @@ MMR1=177574 MMR2=177576 MMR3=172516 -LIGHTS: ; 141376 +LIGHTS: MOV #77406,R3 ; DEFAULT PDR CLR R2 CLR R1 @@ -288,7 +288,7 @@ LIGHTS: ; 141376 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS ; -SUPERS: ; 141616 +SUPERS: MOV #37,R0 ; LOAD PATTERN MOV #174000,R1 BIT #1,@#177570 @@ -344,7 +344,7 @@ SUPERS: ; 141616 BR 10$ SUPERE: -BOOT: ; 142062 +BOOT: CLR R3 ; UNIT 1$: MOVB (R2)+,R1 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 @@ -388,7 +388,7 @@ BOOT: ; 142062 RTS PC RLCS=174400 -BOOTRL: ; 142326 +BOOTRL: RESET SWAB R3 ; UNIT NUMBER MOV #RLCS,R1 ; CSR @@ -429,7 +429,7 @@ BOOTRL: ; 142326 RKDA=177412 READGO=5 BOOTRK: - RESET ; 142402 + RESET SWAB R3 ; UNIT NUMBER ASL R3 ASL R3 @@ -451,7 +451,7 @@ BOOTRK: CLR PC RPCSR=0176700 -BOOTRP: ; 142460 +BOOTRP: RESET MOV #RPCSR, R1 MOV #0000040, 10(R1) ; RESET diff --git a/apps/pdp11/boot/monitor/BOOTMON.txt b/apps/pdp11/boot/monitor/BOOTMON.txt index 4cff7f1ac..669313e92 100644 --- a/apps/pdp11/boot/monitor/BOOTMON.txt +++ b/apps/pdp11/boot/monitor/BOOTMON.txt @@ -13,7 +13,7 @@ 13 14 .ASECT 15 140000 .=140000 - 16 140000 000005 START: RESET ; 140000 + 16 140000 000005 START: RESET 17 140002 005037 177776 CLR @#PSW 18 140006 012706 140000 MOV #START,SP 19 140012 005037 177564 CLR @#DL11XCSR ; CLEAR THE XCSR @@ -41,19 +41,19 @@ 41 140124 000000 LGHTON: .WORD 0 42 140126 000000 CLKTIC: .WORD 0 43 - 44 CLKAST: ; 140124 + 44 CLKAST: 45 140130 005267 140126' INC CLKTIC 46 140134 000002 RTI 47 48 ONECHR: - 49 140136 105737 177564 TSTB @#DL11XCSR ; 140132 + 49 140136 105737 177564 TSTB @#DL11XCSR 50 140142 100375 BPL ONECHR 51 140144 110037 177566 MOVB R0,@#177566 52 140150 000207 RTS PC 53 - 54 140152 000000 PRTPTR: .WORD 0 ; 140146 + 54 140152 000000 PRTPTR: .WORD 0 55 - 56 PRINT: ; 140150 + 56 PRINT: 57 140154 132737 000100 177564 BITB #100,@#DL11XCSR 58 140162 001374 BNE PRINT 59 140164 010067 140152' MOV R0,PRTPTR @@ -62,7 +62,7 @@ 62 140204 152737 000100 177564 BISB #100,@#DL11XCSR 63 140212 000207 RTS PC 64 - 65 PRTAST: ; 140210 + 65 PRTAST: 66 140214 105777 140152' TSTB @PRTPTR 67 140220 001406 BEQ 2$ 68 140222 117737 140152' 177566 MOVB @PRTPTR,@#177566 @@ -75,14 +75,14 @@ 75 140246 000000 LENGTH: .WORD 0 ; INPUT BUFFER LENGTH 76 77 INPUT: - 78 140250 010067 140244' MOV R0,BUFFER ; 140244 + 78 140250 010067 140244' MOV R0,BUFFER 79 140254 005067 140246' CLR LENGTH 80 140260 012737 140304 000060 MOV #INPAST,@#60 81 140266 012737 000200 000062 MOV #200,@#62 82 140274 152737 000100 177560 BISB #100,@#177560 83 140302 000207 RTS PC 84 - 85 INPAST: ; 140300 + 85 INPAST: 86 140304 010046 MOV R0,-(SP) 87 140306 113700 177562 MOVB @#177562,R0 88 140312 120027 000015 CMPB R0,#15 @@ -125,7 +125,7 @@ 125 140506 012600 9$: MOV (SP)+,R0 126 140510 000002 RTI 127 - 128 CMD: ; 140506 + 128 CMD: 129 140512 005037 177772 CLR @#177772 ; NO MORE PIR CALLS 130 140516 010046 MOV R0,-(SP) 131 140520 010146 MOV R1,-(SP) @@ -257,18 +257,18 @@ 195 196 .EVEN 197 - 198 HELP: ; 141244 + 198 HELP: 199 141236 012700 140716 MOV #HLPMSG,R0 200 141242 004767 140154' JSR PC,PRINT 201 141246 000207 RTS PC 202 - 203 HALT: ; 141260 + 203 HALT: 204 141250 000000 HALT 205 141252 012700 141040 MOV #EOL,R0 206 141256 004767 140154' JSR PC,PRINT 207 141262 000207 RTS PC 208 - 209 TEST: ; 141272 + 209 TEST: 210 141264 005067 140126' CLR CLKTIC 211 212 141270 012705 015000 MOV #15000,R5 @@ -290,7 +290,7 @@ 228 141332 012700 141217 MOV #PERMSG+5,R0 229 141336 016703 140126' MOV CLKTIC,R3 230 - 231 141342 005002 25$: CLR R2 ; 141350 + 231 141342 005002 25$: CLR R2 232 141344 071227 000010 DIV #10,R2 233 141350 062703 000060 ADD #'0,R3 234 141354 110340 MOVB R3,-(R0) @@ -306,7 +306,7 @@ 244 177576 MMR2=177576 245 172516 MMR3=172516 246 - 247 LIGHTS: ; 141376 + 247 LIGHTS: 248 141370 012703 077406 MOV #77406,R3 ; DEFAULT PDR 249 141374 005002 CLR R2 250 141376 005001 CLR R1 @@ -350,7 +350,7 @@ 288 ; TO BE COPIED TO SUPER #40200 AT PHYSICAL #170000 289 ; #40000 TO #40200 FOR WAIT & JMP INSTRUCTIONS 290 ; - 291 SUPERS: ; 141616 + 291 SUPERS: 292 141610 012700 000037 MOV #37,R0 ; LOAD PATTERN 293 141614 012701 174000 MOV #174000,R1 294 141620 032737 000001 177570 BIT #1,@#177570 @@ -406,7 +406,7 @@ 344 142052 000702 BR 10$ 345 SUPERE: 346 - 347 BOOT: ; 142062 + 347 BOOT: 348 142054 005003 CLR R3 ; UNIT 349 142056 112201 1$: MOVB (R2)+,R1 350 142060 001545 BEQ BOOTRK ; DEFAULT DEVICE IS RK0 @@ -450,7 +450,7 @@ 388 142224 000207 RTS PC 389 390 174400 RLCS=174400 - 391 BOOTRL: ; 142326 + 391 BOOTRL: 392 142226 000005 RESET 393 142230 000303 SWAB R3 ; UNIT NUMBER 394 142232 012701 174400 MOV #RLCS,R1 ; CSR @@ -491,7 +491,7 @@ 429 177412 RKDA=177412 430 000005 READGO=5 431 BOOTRK: - 432 142374 000005 RESET ; 142402 + 432 142374 000005 RESET 433 142376 000303 SWAB R3 ; UNIT NUMBER 434 142400 006303 ASL R3 435 142402 006303 ASL R3 @@ -513,7 +513,7 @@ 451 142450 005007 CLR PC 452 453 176700 RPCSR=0176700 - 454 BOOTRP: ; 142460 + 454 BOOTRP: 455 142452 000005 RESET 456 142454 012701 176700 MOV #RPCSR, R1 457 142460 012761 000040 000010 MOV #0000040, 10(R1) ; RESET diff --git a/devices/pdp11/panel/1170/debugger/front.xml b/devices/pdp11/panel/1170/debugger/front.xml index 205904fa4..b90312c32 100644 --- a/devices/pdp11/panel/1170/debugger/front.xml +++ b/devices/pdp11/panel/1170/debugger/front.xml @@ -213,15 +213,15 @@
    Registers - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 0 0 diff --git a/devices/pdp11/panel/test/debugger/terminal.xml b/devices/pdp11/panel/test/debugger/terminal.xml index 0886334fe..b5e28ced3 100644 --- a/devices/pdp11/panel/test/debugger/terminal.xml +++ b/devices/pdp11/panel/test/debugger/terminal.xml @@ -11,15 +11,15 @@ Registers - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 0 0 diff --git a/devices/pdp11/panel/test/terminal.xml b/devices/pdp11/panel/test/terminal.xml index 6e4df11d6..58fb4d55c 100644 --- a/devices/pdp11/panel/test/terminal.xml +++ b/devices/pdp11/panel/test/terminal.xml @@ -6,15 +6,15 @@ Registers - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 - 0000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 0 0 From 9e00cd4dad712b743499a088fc9ca646417cf2a7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 15:12:52 -0700 Subject: [PATCH 28/30] Attempted to make switches more "touch-friendly" --- modules/pdp11/lib/panel.js | 76 ++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index fafecc456..ed21d1898 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -105,11 +105,12 @@ function PanelPDP11(parmsPanel) /* * Every switch has an array associated with it: * - * [0]: initial/current value of switch (0 if "down", 1 if "up") - * [1]: true if the switch is momentary, false if not - * [2]: true if the switch is currently pressed, false if released - * [3]: optional handler to call whenever the switch is pressed or released - * [4]: optional switch index (used with CNSW switches 'S0' through 'S21') + * [0]: initial value of switch (0 if "down", 1 if "up") + * [1]: current value of switch + * [2]: true if the switch is momentary, false if not + * [3]: true if the switch is currently pressed, false if released + * [4]: optional handler to call whenever the switch is pressed or released + * [5]: optional switch index (used with CNSW switches 'S0' through 'S21') * * initBus() will call displaySwitches() to ensure that every switch is the position represented below. * @@ -122,17 +123,17 @@ function PanelPDP11(parmsPanel) * of any momentary switch is its "inactive" value, so the opposite is its "active" value. */ this.switches = { - 'START': [1, true, false, this.processStart], - 'STEP': [1, false, false, this.processStep], - 'ENABLE': [1, false, false, this.processEnable], - 'CONT': [1, true, false, this.processContinue], - 'DEP': [0, true, false, this.processDeposit], - 'EXAM': [1, true, false, this.processExamine], - 'LOAD': [1, true, false, this.processLoadAddr], - 'TEST': [0, true, false, this.processLEDTest] + 'START': [1, 1, true, false, this.processStart], + 'STEP': [1, 1, false, false, this.processStep], + 'ENABLE': [1, 1, false, false, this.processEnable], + 'CONT': [1, 1, true, false, this.processContinue], + 'DEP': [0, 0, true, false, this.processDeposit], + 'EXAM': [1, 1, true, false, this.processExamine], + 'LOAD': [1, 1, true, false, this.processLoadAddr], + 'TEST': [0, 0, true, false, this.processLEDTest] }; for (var i = 0; i < 22; i++) { - this.switches['S'+i] = [0, false, false, this.processSwitchReg, i]; + this.switches['S'+i] = [0, 0, false, false, this.processSwitchReg, i]; } } @@ -203,7 +204,7 @@ PanelPDP11.prototype.setSW = function(value) */ PanelPDP11.prototype.getSwitch = function(name) { - return this.switches[name] && this.switches[name][0]; + return this.switches[name] && this.switches[name][1]; }; /** @@ -298,7 +299,7 @@ PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) * since only recognized switches will have handlers that perform the appropriate operations. */ if (this.switches[sBinding] === undefined) { - this.switches[sBinding] = [sValue? 1 : 0]; + this.switches[sBinding] = [sValue? 1 : 0, sValue? 1 : 0]; } this.bindings[sBinding] = control; var parent = control.parentElement || control; @@ -313,6 +314,17 @@ PanelPDP11.prototype.setBinding = function(sType, sBinding, control, sValue) panel.releaseSwitch(sBinding); }; }(this, sBinding); + parent.ontouchstart = function(panel, sBinding) { + return function onPressSwitch(event) { + panel.pressSwitch(sBinding); + event.preventDefault(); + }; + }(this, sBinding); + parent.ontouchend = function(panel, sBinding) { + return function onReleaseSwitch() { + panel.releaseSwitch(sBinding); + }; + }(this, sBinding); return true; } return this.parent.setBinding.call(this, sType, sBinding, control, sValue); @@ -435,7 +447,7 @@ PanelPDP11.prototype.displaySwitch = function(sBinding, value) PanelPDP11.prototype.displaySwitches = function() { for (var sBinding in this.switches) { - this.displaySwitch(sBinding, this.switches[sBinding][0]); + this.displaySwitch(sBinding, this.switches[sBinding][1]); } }; @@ -485,19 +497,19 @@ PanelPDP11.prototype.pressSwitch = function(sBinding) var sw = this.switches[sBinding]; /* - * Set the new switch value in sw[0] and then immediately display it + * Set the new switch value in sw[1] and then immediately display it */ - this.displaySwitch(sBinding, (sw[0] = 1 - sw[0])); + this.displaySwitch(sBinding, (sw[1] = 1 - sw[1])); /* * Mark the switch as "pressed" */ - sw[2] = true; + sw[3] = true; /* - * Call the appropriate process handler with the current switch value (sw[0]) + * Call the appropriate process handler with the current switch value (sw[1]) */ - if (sw[3]) sw[3].call(this, sw[0], sw[4]); + if (sw[4]) sw[4].call(this, sw[1], sw[5]); /* * This helps the next 'DEP' or 'EXAM' press determine if the previous press was the same, @@ -518,30 +530,30 @@ PanelPDP11.prototype.pressSwitch = function(sBinding) PanelPDP11.prototype.releaseSwitch = function(sBinding) { /* - * pressSwitch() is simple: flip the switch's current value in sw[0] and marked it "pressed" in sw[2]. + * pressSwitch() is simple: flip the switch's current value in sw[1] and marked it "pressed" in sw[3]. * * releaseSwitch() is more complicated, because we must handle both mouseUp and mouseOut events. The first time - * we receive EITHER of those events AND the switch is marked momentary (sw[1]) AND the switch is pressed (sw[2]), + * we receive EITHER of those events AND the switch is marked momentary (sw[2]) AND the switch is pressed (sw[3]), * then we must flip the switch back to its original value. * - * Otherwise, the only thing we have to do is mark the switch as "released" (ie, set sw[2] to false). + * Otherwise, the only thing we have to do is mark the switch as "released" (ie, set sw[3] to false). */ var sw = this.switches[sBinding]; - if (sw[1] && sw[2]) { + if (sw[2] && sw[3]) { /* - * Set the new switch value in sw[0] and then immediately display it + * Set the new switch value in sw[1] and then immediately display it */ - this.displaySwitch(sBinding, (sw[0] = 1 - sw[0])); + this.displaySwitch(sBinding, (sw[1] = sw[0])); /* - * Call the appropriate process handler with the current switch value (sw[0]) + * Call the appropriate process handler with the current switch value (sw[1]) */ - if (sw[3]) sw[3].call(this, sw[0], sw[4]); + if (sw[4]) sw[4].call(this, sw[1], sw[5]); } /* * Mark the switch as "released" */ - sw[2] = false; + sw[3] = false; }; /** @@ -896,7 +908,7 @@ PanelPDP11.prototype.setSwitches = function(value) if (this.hasSwitches()) { this.regSwitches = value; for (var i = 0; i < 22; i++) { - this.switches['S'+i][0] = (value & (1 << i))? 1 : 0; + this.switches['S'+i][1] = (value & (1 << i))? 1 : 0; } this.displaySwitches(); } From 818855487511e3fb479c259271eb881c288cd5dc Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 6 Nov 2016 09:48:12 -0800 Subject: [PATCH 29/30] Fixed the fallback logic for IOPAGE ranges where only byte handlers exist (ie, the readROMByte() case) --- modules/pdp11/lib/bus.js | 27 +- modules/pdp11/lib/defines.js | 4 +- modules/pdp11/lib/device.js | 14 +- modules/pdp11/lib/rom.js | 8 +- versions/pdpjs/1.30.3/pdp11-dbg.js | 527 +++++++++++++++-------------- versions/pdpjs/1.30.3/pdp11.js | 377 +++++++++++---------- 6 files changed, 489 insertions(+), 468 deletions(-) diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index fdc2e32d9..273f15c89 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -219,7 +219,7 @@ BusPDP11.IOHANDLER = { * Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works * just fine by registering WORD handlers for the appropriate ODD addresses. For BYTE accesses, it * depends. For CPU register addresses, addIOHandlers() installs special byte handlers that perform - * either a simple word read or write. Other addresses must be handled on case-by-case basis. + * either a simple word read or write. Other addresses must be handled on a case-by-case basis. * * TODO: Another small potential improvement would be for addIOHandlers() to install fallbacks for ALL * missing handlers, in both the ODD and EVEN cases, so there's never a need to check each function index @@ -265,6 +265,13 @@ BusPDP11.IOController = { if (afn) { if (afn[BusPDP11.IOHANDLER.READ_WORD]) { b = afn[BusPDP11.IOHANDLER.READ_WORD](addrMasked & ~0x1) >> 8; + } else if (afn[BusPDP11.IOHANDLER.READ_BYTE]) { + /* + * WARNING: This is an unusual fall-back, because we're trying to read an ODD byte + * access using a BYTE handler registered for EVEN bytes. But if that's all we've got, + * then presumably the handler is prepared for it (certainly, readROMByte() is). + */ + b = afn[BusPDP11.IOHANDLER.READ_BYTE](addrMasked) } } } @@ -346,6 +353,13 @@ BusPDP11.IOController = { w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0; afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addrMasked); fWrite = true; + } else if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) { + /* + * WARNING: This is an unusual fall-back, because we're trying to write an ODD byte + * access using a BYTE handler registered for EVEN bytes. But if that's all we've got, + * then presumably the handler is prepared for it (certainly, writeROMByte() is). + */ + afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addrMasked); } } } @@ -1239,7 +1253,7 @@ BusPDP11.prototype.restoreMemory = function(a) * getMemorySize(type) * * NOTE: The original pdp11.js defined MAX_MEMORY as IOBASE_UNIBUS - 16384, where IOBASE_UNIBUS - * is 4Mb less 256Kb, and then subtracted another 16Kb so that BSD 2.9 could boot. + * is 4Mb less 256Kb, and then it subtracted another 16Kb so that BSD 2.9 could boot. * * @this {BusPDP11} * @param {number} type is one of the MemoryPDP11.TYPE constants (only RAM is currently supported) @@ -1263,6 +1277,11 @@ BusPDP11.prototype.getMemorySize = function(type) * relative to the starting IOPAGE address, but they can also be absolute; we simply mask all addresses with * IOPAGE_MASK. * + * CAVEATS: If a conflict is reported, a partial set of handlers may still have been added. There is no mechanism + * for removing handlers, since this is considered an initialization function. And finally, when a range of addresses + * is used, each successive address is advanced by 2, so if you really want to add a handler for a "+1" (usually odd) + * address, then you must add it individually. + * * @this {BusPDP11} * @param {number} start address * @param {number} end address @@ -1319,8 +1338,8 @@ BusPDP11.prototype.addIOTable = function(component, table, msgCategory, sName) var nRegs = afn[5] || 1; /* - * As discussed in the IOController comments above, when handlers are being registered for the following - * addresses, we must install different fallback handlers for all BYTE accesses. + * As discussed in the IOController comments above, when handlers are being registered for these + * BYTE-granular UNIBUS addresses, we must install custom fallback handlers for all BYTE accesses. */ if (addr >= PDP11.UNIBUS.R0SET0 && addr <= PDP11.UNIBUS.R6USER) { if (!fnReadByte && fnReadWord) { diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 49bb2f2b9..2036bf6de 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -507,8 +507,10 @@ var PDP11 = { R6USER: 0o177717, /* - * This next group of registers is largely ignored; all accesses are routed to regsControl[] + * This next group of registers is largely ignored; all accesses are routed to regsControl[], + * and therefore are managed as a block of 8 "CTRL" registers. */ + CTRL: 0o177740, LAERR: 0o177740, // Low Address Error (11/70 only) HAERR: 0o177742, // High Address Error (11/70 only) MEMERR: 0o177744, // Memory System Error (11/70 only) diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index a5a8f5fcf..5b134f834 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -835,7 +835,7 @@ DevicePDP11.prototype.writeR6USER = function(data, addr) */ DevicePDP11.prototype.readCTRL = function(addr) { - var reg = (addr - PDP11.UNIBUS.LAERR) >> 1; + var reg = (addr - PDP11.UNIBUS.CTRL) >> 1; return this.cpu.regsControl[reg]; }; @@ -848,7 +848,7 @@ DevicePDP11.prototype.readCTRL = function(addr) */ DevicePDP11.prototype.writeCTRL = function(data, addr) { - var reg = (addr - PDP11.UNIBUS.LAERR) >> 1; + var reg = (addr - PDP11.UNIBUS.CTRL) >> 1; this.cpu.regsControl[reg] = data; }; @@ -1090,7 +1090,7 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.R5SET1]: /* 177715 */ [null, null, DevicePDP11.prototype.readRSET1, DevicePDP11.prototype.writeRSET1, "R5SET1", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.R6SUPER]: /* 177716 */ [null, null, DevicePDP11.prototype.readR6SUPER, DevicePDP11.prototype.writeR6SUPER, "R6SUPER", 1, PDP11.MODEL_1145], [PDP11.UNIBUS.R6USER]: /* 177717 */ [null, null, DevicePDP11.prototype.readR6USER, DevicePDP11.prototype.writeR6USER, "R6USER", 1, PDP11.MODEL_1145], - [PDP11.UNIBUS.LAERR]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", 1, PDP11.MODEL_1170], + [PDP11.UNIBUS.CTRL]: /* 177740 */ [null, null, DevicePDP11.prototype.readCTRL, DevicePDP11.prototype.writeCTRL, "CTRL", 8, PDP11.MODEL_1170], [PDP11.UNIBUS.LSIZE]: /* 177760 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "LSIZE", 1, PDP11.MODEL_1170], [PDP11.UNIBUS.HSIZE]: /* 177762 */ [null, null, DevicePDP11.prototype.readSIZE, DevicePDP11.prototype.writeSIZE, "HSIZE", 1, PDP11.MODEL_1170], [PDP11.UNIBUS.SYSID]: /* 177764 */ [null, null, DevicePDP11.prototype.readSYSID, DevicePDP11.prototype.writeSYSID, "SYSID", 1, PDP11.MODEL_1170], @@ -1101,14 +1101,6 @@ DevicePDP11.UNIBUS_IOTABLE = { [PDP11.UNIBUS.PSW]: /* 177776 */ [null, null, DevicePDP11.prototype.readPSW, DevicePDP11.prototype.writePSW, "PSW"] }; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.HAERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.MEMERR] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.CACHEC] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.MAINT] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.HITMISS]= DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UNDEF1] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; -DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.UNDEF2] = DevicePDP11.UNIBUS_IOTABLE[PDP11.UNIBUS.LAERR]; - /** * DevicePDP11.init() * diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index 49ee4eb12..1fba864f4 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -288,7 +288,7 @@ ROMPDP11.prototype.addROM = function(addr) * This code has been added as a work-around to effectively allow us to install small ROMs into portions * of the IOPAGE address space, by installing I/O handlers for the entire range that return the corresponding * bytes of the current ROM image on reads, and ignore any writes (which I'm only assuming is how a typical - * ROM "device" deals with writes; if we remove the write handler, then writes will cause a fault). + * ROM "device" deals with writes; if we remove the write handler, then writes will fault). */ var IOTable = { [addr]: [ROMPDP11.prototype.readROMByte, ROMPDP11.prototype.writeROMByte, null, null, null, this.sizeROM >> 1] @@ -348,6 +348,12 @@ ROMPDP11.prototype.readROMByte = function(addr) /** * writeROMByte(data, addr) * + * This handler exists simply to ignore any writes, so that they don't cause faults. + * + * TODO: Another possible use for this would be to allow the Debugger to alter ROM contents, + * if the Debugger were to provide an interface indicating whether or not it was responsible + * for this write. + * * @this {ROMPDP11} * @param {number} data * @param {number} addr diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 2a6a5ccec..7452ffb99 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -31,288 +31,289 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} -function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} -function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== +for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function ra(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function va(a){return a.replace(/[&<>"']/g,function(a){return ua[a]})} +function wa(a,b){return(a+" ").slice(0,b)}function xa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var ya={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; +function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={da:null,ha:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;u.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function fb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function z(a,b){b||(b=t);a.prototype=fb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},u=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;u.push(this)}var $a=void 0,ab={}; +if(window){$a||($a=window.location.search.substr(1));for(var bb,cb=/\+/g,db=/([^&=]+)=?([^&]*)/g;bb=db.exec($a);)ab[decodeURIComponent(bb[1].replace(cb," "))]=decodeURIComponent(bb[2].replace(cb," "))}function eb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=t);a.prototype=eb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},u=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; -k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; -function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.cd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.jb())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()};k.Xc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.jb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.kb(0),rb(a,!1);else try{var b=this.b.kb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function lc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.$a[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function mc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} -function nc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} -function qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d!=wc||a.Ob||(a.Ob+=c),a.status((c>>10)+"Kb "+xc[d]+" at "+ra(b)),!0):vc(2,b,c)} -function sc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)};k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; -k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--}; -k.ib=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; -function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +var vb="undefined"!==typeof ArrayBuffer,wb={cpu:1,trap:16,fault:32,bus:64,memory:128,rom:256,device:512,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function xb(a){t.call(this,"Panel",a,xb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=yb;this.C={};this.g={START:[1,1,!0,!1,this.cd],STEP:[1,1,!1,!1,this.dd],ENABLE:[1,1,!1,!1,this.Zc],CONT:[1,1,!0,!1,this.Xc],DEP:[0,0,!0,!1,this.Yc],EXAM:[1,1,!0,!1,this.$c],LOAD:[1,1,!0,!1,this.bd],TEST:[0,0,!0,!1,this.ad]};for(a=0;22>a;a++)this.g["S"+a]=[0,0,!1,!1,this.ed,a]}z(xb);var yb=7;function zb(a,b){return a.g[b]&&a.g[b][1]}k=xb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Ab(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Bb(a,b)}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Xb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Xb(a,b,a.g[b][1])}function Yb(a,b,c,d){a.G[b]&&(void 0===c&&(ub(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?qa(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +function Ab(a,b){var c=a.g[b];Xb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}function Bb(a,b){var c=a.g[b];c[2]&&c[3]&&(Xb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.cd=function(a){a||this.b.A.Z||(this.w.reset(),Zb(this.b),zb(this,"ENABLE")&&this.b.jb())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()}; +k.Xc=function(a){if(!a&&!this.b.A.Z)if(zb(this,"ENABLE"))this.b.jb();else{if((a=this.i)&&!rb(a,!0))qb(a,!0),a.kb(0),qb(a,!1);else try{var b=this.b.kb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;zb(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;ec(a,"A",a.f,22)} +function dc(a,b){a.v=b&65535;ec(a,"D",a.v,16);return a.v}function gc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function ec(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][1]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function mc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i, +b),!0,!e.la))}function nc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} +function oc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} +function rc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d!=xc||a.Ob||(a.Ob+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} +function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)};k.Vb=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; +k.oa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--}; +k.ib=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function Ac(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; k.Me=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; -k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.gb&65280:0};k.Ge=function(a){this.b.gb=a|255};k.xd=function(){return Pc(this.b)};k.pe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, -K.prototype.ge,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Rd, -K.prototype.Je,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],M[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Yc(this,Uc?Zc:$c);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; +k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.gb&65280:0};k.Ge=function(a){this.b.gb=a|255};k.xd=function(){return Rc(this.b)};k.pe=function(a){Sc(this.b,a&-1809|Rc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; +var L={},Pc=(L[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.md, +K.prototype.ge,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],L[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],L[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],L[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Rd, +K.prototype.Je,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],L[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],L[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],L[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],L[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],L[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],L[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],L[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],L[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],L[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",8,1170],L[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],L[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],L[65528]= +[null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],L[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],L[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],L);Wa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),$c(this,Wc?ad:bd);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); +1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ma:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&dd(a,cd,!1),(a.B=c.B)&&bd(a,cd,!1))}function fd(a,b){b?--a.B||(a.$b=a.f?a.v:a.ac,a.Nb=a.f?a.H:a.mc):--a.g||(a.Xb=a.hc,a.sa=a.ic)}function bd(a,b,c){c&&a.B||(a.$b=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ac=b[1]||a.v,a.mc=b[3]||a.H}function dd(a,b,c){c&&a.g||(a.Xb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function Yc(a,b){b||(b=gd);dd(a,b,void 0);bd(a,b,void 0)} -var gd=[],ad=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],cd=[I.prototype.P,I.prototype.Ya,I.prototype.Y,I.prototype.Aa];if(wb)var $c=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],Zc=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.Ja]; -function hd(a,b){t.call(this,"CPU",a,hd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.eb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.eb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(hd);var id=["power","reset"];k=hd.prototype; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=od(a)&&(a.yb=a.zb=-1,ld(a),a.ga(),c=!0);c&&a.j(od(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.eb=b;b=a.vb*a.eb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.eb/1E3*c|0,a.K[b][0]=c+rd(a))} -function sd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Za=Ba();if(this.$){var a=this.Za-this.$;a>this.Ub&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=sd(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.jb=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; -function td(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;hd.call(this,a,6666667);this.decode=1120==this.pb?ud.bind(this):vd.bind(this);wd(this);this.L=0;this.M=null;this.A.complete=!1}z(td,hd);k=td.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();wd(this);kd(this);this.A.error=!1;this.parent.reset.call(this)}; -function wd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.gb=255;a.fa=0;a.kc=0;a.C=0;a.fb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,qc(a.w,16))}function xd(a,b,c){a.Pb=b;O(a,b);!c&&a.i&&(a.ga()||md(a.i))}k.tc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.eb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];pd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Dd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ed(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; -function Zd(a){var b=$d(a),c=$d(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Qc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function ae(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; -k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Vd=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; -k.Ne=function(a,b){this.w.ib(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function fe(a,b,c,d){a.C&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.ib(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} -function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function he(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ie(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return de(a,b,c,8)}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function ke(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.kb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function ue(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ve(a,b){a=b&~a;R(this,a);return a}function we(a,b){a=b&~a;R(this,a<<8);return a}function xe(a,b){a|=b;R(this,a);return a}function ye(a,b){a|=b;R(this,a<<8);return a} -function ze(a,b){a=~b|65536;Dd(this,a);return a&65535}function Ae(a,b){a=~b|256;Dd(this,a<<8);return a&255}function Be(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ce(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function De(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ee(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Fe(a,b){a=-b;Dd(this,a,a&b&32768);return a&65535}function Ge(a,b){a=-b;Dd(this,a<<8,(a&b&128)<<8);return a&255}function He(a,b){a=b<<1|this.T>>16&1;Fd(this,a);return a&65535}function Ie(a,b){a=b<<1|this.T>>16&1;Fd(this,a<<8);return a&255}function Je(a,b){a=(this.T&65536|b)>>1|b<<16;Fd(this,a);return a&65535}function Ke(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Fd(this,a<<8);return a&255}function Le(a,b){var c=b-a;Gd(this,c,a,b);return c&65535} -function Me(a,b){var c=b-a;Gd(this,c<<8,a<<8,b<<8);return c&255}function Ne(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Oe(a,b){a^=b;R(this,a);return a&65535}function Pe(a){T(this,a,he(this,a),pe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Qe(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function Re(a){var b=ke(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Se(a){U(this,a,!yd(this))}function Te(a){U(this,a,yd(this))} -function Ue(a){T(this,a,he(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ve(a){S(this,a,ge(this,a),we);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function We(a){T(this,a,he(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){S(this,a,ge(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ye(a){R(this,he(this,a)&ke(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Ze(a){R(this,(ge(this,a)&je(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function $e(a){U(this,a,Ad(this))}function af(a){U(this,a,!this.Ta()==!zd(this))}function bf(a){U(this,a,!Ad(this)&&!this.Ta()==!zd(this))}function cf(a){U(this,a,!yd(this)&&!Ad(this))}function df(a){U(this,a,Ad(this)||!this.Ta()!=!zd(this))} -function ef(a){U(this,a,yd(this)||Ad(this))}function ff(a){U(this,a,!this.Ta()!=!zd(this))}function gf(a){U(this,a,this.Ta())}function hf(a){U(this,a,!Ad(this))}function jf(a){U(this,a,!this.Ta())}function kf(){this.pa(12,1);this.b-=5}function lf(a){U(this,a,!0)}function mf(a){U(this,a,!zd(this))}function nf(a){U(this,a,zd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} -function of(a){var b=he(this,a);a=ke(this,a);Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function pf(a){var b=ge(this,a)<<8;a=je(this,a)<<8;Gd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function qf(a){var b=ke(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function rf(){this.pa(24,2);this.b-=25} -function sf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?tf(this.i):this.ga();this.b-=7}function uf(){this.pa(16,4);this.b-=25}var vf=[0,7,7,10,7,11,9,13];function wf(a){this.J=this.b;O(this,ie(this,a));this.b=this.J-vf[this.g]}var xf=[0,14,14,17,14,18,16,20];function yf(a){this.J=this.b;var b=ie(this,a);a=a>>6&7;Yd(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-xf[this.g]}var zf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Af(a){var b=he(this,a);this.J=this.b;R(this,me(this,a,b));this.b=this.J-zf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Bf(a){var b=ge(this,a);R(this,le(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Cf=[7,13,13,17,14,18,17,21]; -function Df(a){var b=ke(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Jf(a){T(this,a,he(this,a),Le);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Kf(a){T(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)}function Lf(){this.pa(28,5);this.b-=5}function Mf(){this.I|=4;Cd(this,-2);this.b-=3}function Nf(a){T(this,a,he(this,a),Oe);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=tf(b);b||this.pa(8,6)}function ud(a){Of[a>>12].call(this,a)}function Pf(a){Qf[a>>6&3].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)} -function Vf(a){Wf[a&15].call(this,a)}function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a>>6&3].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)} -var Of=[function(a){eg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,W,function(a){fg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],eg=[function(a){gg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,W,W,W],Qf=[function(a){Dd(this,me(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,ze);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)}],Sf=[function(a){T(this,a,0, -Fe);this.b-=this.g?11:6},function(a){T(this,a,yd(this)?1:0,pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,yd(this)?1:0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ke(this,a);Dd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Uf=[function(a){T(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,re);this.b-=this.g?9:3+(7==this.f?2:0)}], -gg=[function(a){hg[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,W,Vf,Xf,Kf,Kf,Kf,Kf],hg=[sf,Mf,Gf,kf,uf,Ff,W,W,W,W,W,W,W,W,W,W],Wf=[Ef,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.aa=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Yf=[Ef,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.aa=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],fg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,W,W,W],$f=[function(a){Dd(this, -le(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ce);this.b-=this.g?9:3+(7==this.f?2:0)}],bg=[function(a){S(this,a,0,Ge);this.b-=this.g?11:6},function(a){S(this,a,yd(this)?1:0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,yd(this)?1:0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=je(this,a);Dd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],dg=[function(a){S(this,a,0,Ke);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ue);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,se);this.b-=this.g?9:3+(7==this.f?2:0)}];function vd(a){ig[a>>12].call(this,a)} -var ig=[function(a){jg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],jg=[function(a){mg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,function(a){ng[a>>6&3].call(this,a)},W,W],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ee(this,a,0);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J= -this.b;fe(this,a,0,b);R(this,b);this.b=this.J-Cf[this.g]},function(a){R(this,me(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Vf,Xf,Kf,Kf,Kf,Kf],og=[sf,Mf,Gf,kf,uf,Ff,function(){Zd(this);this.b-=13},W,W,W,W,W,W,W,W,W],kg=[Df,Df,qf,qf,Qe,Qe,Re,Re,Nf,Nf,W,W,W,W,If,If],lg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,function(a){pg[a>> -6&3].call(this,a)},W,W],pg=[W,function(a){a=ee(this,a,65536);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J=this.b;fe(this,a,65536,b);R(this,b);this.b=this.J-Cf[this.g]},W]; -function qg(a){t.call(this,"ROM",a,qg);this.ha=this.g=null;this.C=a.addr;this.f=a.size;this.D=!1;this.v=a.alias;this.B=a.file;this.H=sa(this.B);if(this.B){a=this.B;var b=ta(this.H);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);rg(c)})}}z(qg);k=qg.prototype; -k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)};k.Ha=function(){this.ha&&(this.i&&sg(this.i,this.id,this.C,this.f,this.ha),delete this.ha);return!0};k.Ga=function(){return!0}; -function rg(a){if(!tb(a)){if(a.B){if(!a.g||!a.w)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)vb(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.C;a.status(a.f+"-byte ROM at "+ra(b));if(57344<=b&&b<57344+jc){var c={};b=(c[b]=[qg.prototype.Jd,qg.prototype.Be,null,null,null,a.f>>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(tc(a.w,b,a.f,Xc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ja))});this.ma=Nc(52,4);this.$=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.ma)});Cb(b,this,Rg);H(this)}; -k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.Ya)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ga=function(a){return a?this.save():!0};k.reset=function(){Sg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Sg(this)};function Sg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ve,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.ue,"RBUF"],Tg[65396]=[null,null,Y.prototype.Xd,Y.prototype.Pe,"XCSR"],Tg[65398]=[null,null,Y.prototype.Wd,Y.prototype.Oe,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= -function(){var a=d.G.listTapes;a&&Wg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Wg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Xg(a);var e=this;if((this.g=jd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.ca=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&fh(a,b,c,d,e.da,e.La, -e.Ka));a.A.ab=!1;a.D&&(a.D--,a.D||H(a));ch(a)})}function $g(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, -null,!0,function(b,c,d){mh(a,b,c,d)})} -function mh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.length;y>2,e=Array(d),f=0;f=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=qd(a)&&(a.yb=a.zb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.eb=b;b=a.vb*a.eb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}ac(a,a.S);a.S=0;a.R=Aa();a.$=0;sd(a);return d}function Lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Nc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.eb/1E3*c|0,a.K[b][0]=c+td(a))} +function ud(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function $b(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function td(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} +k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Ub&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.jb=function(a){if(tb(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){td(this);ac(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; +function vd(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.pb?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; +function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Zb(a)}function Zb(a){a.gb=255;a.fa=0;a.kc=0;a.C=0;a.fb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Pb=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; +k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ja,this.eb]);a.set(2,Ac(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];rd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function Q(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Xd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} +function Yd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Rc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Sc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.wa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function ae(a){var b=be(a),c=be(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);N(a,b);Sc(a,c);a.I&=-17}function zc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=de(this,ce(this,a,3));this.L--;return a}; +k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Vd=function(a){return this.w.oa(ce(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; +k.Ne=function(a,b){this.w.ib(ce(this,a,4),b)};function ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=fe(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function he(a,b,c,d){a.C&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=fe(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ce(a,e|c&65536,4),a.v=a.N>>14&3,a.w.ib(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +function ie(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.kb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.pa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Dd(this))}while(0>1|b<<16;Yd(this,a);return a&65535}function we(a,b){a=b&2048|b>>1|b<<8;Yd(this,a<<8);return a&255}function xe(a,b){a=b&~a;Q(this,a);return a}function ye(a,b){a=b&~a;Q(this,a<<8);return a}function ze(a,b){a|=b;Q(this,a);return a}function Ae(a,b){a|=b;Q(this,a<<8);return a} +function Be(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ce(a,b){a=~b|256;Fd(this,a<<8);return a&255}function De(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ee(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Fe(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ge(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} +function He(a,b){a=-b;Fd(this,a,a&b&32768);return a&65535}function Ie(a,b){a=-b;Fd(this,a<<8,(a&b&128)<<8);return a&255}function Je(a,b){a=b<<1|this.T>>16&1;Yd(this,a);return a&65535}function Ke(a,b){a=b<<1|this.T>>16&1;Yd(this,a<<8);return a&255}function Le(a,b){a=(this.T&65536|b)>>1|b<<16;Yd(this,a);return a&65535}function Me(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Yd(this,a<<8);return a&255}function Ne(a,b){var c=b-a;Zd(this,c,a,b);return c&65535} +function Oe(a,b){var c=b-a;Zd(this,c<<8,a<<8,b<<8);return c&255}function Pe(a,b){this.I&128||(this.X=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Qe(a,b){a^=b;Q(this,a);return a&65535}function Re(a){S(this,a,je(this,a),re);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Se(a){var b=me(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} +function Te(a){var b=me(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ue(a){T(this,a,!Ad(this))}function Ve(a){T(this,a,Ad(this))} +function We(a){S(this,a,je(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){R(this,a,ie(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ye(a){S(this,a,je(this,a),ze);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ze(a){R(this,a,ie(this,a),Ae);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function $e(a){Q(this,je(this,a)&me(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function af(a){Q(this,(ie(this,a)&le(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function bf(a){T(this,a,Cd(this))}function cf(a){T(this,a,!this.Ta()==!Bd(this))}function df(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function ef(a){T(this,a,!Ad(this)&&!Cd(this))}function ff(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} +function gf(a){T(this,a,Ad(this)||Cd(this))}function hf(a){T(this,a,!this.Ta()!=!Bd(this))}function jf(a){T(this,a,this.Ta())}function kf(a){T(this,a,!Cd(this))}function lf(a){T(this,a,!this.Ta())}function mf(){this.pa(12,1);this.b-=5}function nf(a){T(this,a,!0)}function of(a){T(this,a,!Bd(this))}function pf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function qf(a){var b=je(this,a);a=me(this,a);Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function rf(a){var b=ie(this,a)<<8;a=le(this,a)<<8;Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} +function sf(a){var b=me(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function tf(){this.pa(24,2);this.b-=25} +function uf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?vf(this.i):this.ga();this.b-=7}function wf(){this.pa(16,4);this.b-=25}var xf=[0,7,7,10,7,11,9,13];function yf(a){this.J=this.b;N(this,ke(this,a));this.b=this.J-xf[this.g]}var zf=[0,14,14,17,14,18,16,20];function Af(a){this.J=this.b;var b=ke(this,a);a=a>>6&7;$d(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-zf[this.g]}var Bf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Cf(a){var b=je(this,a);this.J=this.b;Q(this,oe(this,a,b));this.b=this.J-Bf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Df(a){var b=ie(this,a);Q(this,ne(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Ef=[7,13,13,17,14,18,17,21]; +function Ff(a){var b=me(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Lf(a){S(this,a,je(this,a),Ne);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} +function Mf(a){S(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}function Nf(){this.pa(28,5);this.b-=5}function Of(){this.I|=4;Ed(this,-2);this.b-=3}function Pf(a){S(this,a,je(this,a),Qe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=vf(b);b||this.pa(8,6)}function wd(a){Qf[a>>12].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} +function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a&15].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)}function eg(a){fg[a>>6&3].call(this,a)} +var Qf=[function(a){gg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,V,function(a){hg[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],gg=[function(a){ig[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,V,V,V],Sf=[function(a){Fd(this,oe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)}],Uf=[function(a){S(this,a,0, +He);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=me(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){S(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)}], +ig=[function(a){jg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,V,Xf,Zf,Mf,Mf,Mf,Mf],jg=[uf,Of,If,mf,wf,Hf,V,V,V,V,V,V,V,V,V,V],Yf=[Gf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],$f=[Gf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],hg=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,V,V,V],bg=[function(a){Fd(this, +ne(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)}],dg=[function(a){R(this,a,0,Ie);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=le(this,a);Fd(this,a<<8);this.b-=this.g?4:3+(7== +this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} +var kg=[function(a){lg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],lg=[function(a){og[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ge(this,a,0);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J= +this.b;he(this,a,0,b);Q(this,b);this.b=this.J-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},V,V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,function(a){rg[a>> +6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J=this.b;he(this,a,65536,b);Q(this,b);this.b=this.J-Ef[this.g]},V]; +function sg(a){t.call(this,"ROM",a,sg);this.ha=this.g=null;this.C=a.addr;this.f=a.size;this.D=!1;this.v=a.alias;this.B=a.file;this.H=ra(this.B);if(this.B){a=this.B;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(mb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);tg(c)})}}z(sg);k=sg.prototype; +k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)};k.Ha=function(){this.ha&&(this.i&&ug(this.i,this.id,this.C,this.f,this.ha),delete this.ha);return!0};k.Ga=function(){return!0}; +function tg(a){if(!sb(a)){if(a.B){if(!a.g||!a.w)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)ub(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.C;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+kc){var c={};b=(c[b]=[sg.prototype.Jd,sg.prototype.Be,null,null,null,a.f>>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.w,b,a.f,Zc)){for(c=0;c>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Mc(e.b,e.ja))});this.ma=Oc(52,4);this.$=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(e.b,e.ma)});Cb(b,this,Tg);H(this)}; +k.xc=function(){if(!this.J){var a=ld(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Ug(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Ug(this)};function Ug(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=wa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Nc(this.b,this.$,1E3/Math.round(this.R/10))}};var Vg={},Tg=(Vg[65392]=[null,null,X.prototype.Dd,X.prototype.ve,"RCSR"],Vg[65394]=[null,null,X.prototype.Cd,X.prototype.ue,"RBUF"],Vg[65396]=[null,null,X.prototype.Xd,X.prototype.Pe,"XCSR"],Vg[65398]=[null,null,X.prototype.Wd,X.prototype.Oe,"XBUF"],Vg);Wa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function(){var a=d.G.listTapes;a&&Yg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yg(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;this.S=Zg(a);var e=this;if((this.g=ld(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Oc(56,4);this.ca=Lc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.Qa,e,f),(e=Ea(e,f))&&hh(a,b,c,d,e.da,e.La, +e.Ka));a.A.ab=!1;a.D&&(a.D--,a.D||H(a));eh(a)})}function bh(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Da(f, +null,!0,function(b,c,d){oh(a,b,c,d)})} +function oh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{mb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ +k.restore=function(a){var b=0,c="unsupported restore format";if(a&&0=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=oh(this,a++);)qh(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){t.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.ta=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&rh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=oh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=pa(c.value,10);null!=a&&th(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&uh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[pa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=qh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";rh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){th(this)};k.save=function(){return(new P(this)).data()}; -k.restore=function(a){return th(this,a[0])};function wh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}yh(a,e,b,c,!1,d)}else xh(a,e)} -function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; -function vh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";th(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){vh(this)};k.save=function(){return(new O(this)).data()}; +k.restore=function(a){return vh(this,a[0])};function yh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ah(a,e,b,c,!1,d)}else zh(a,e)} +function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; +function xh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.ib(f,v|r<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.ib(f,v|r<<8);if(Kc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.oa(f);if(Kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; k.ye=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; -var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.ye,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.we,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ze,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.Ae,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.xe,"RLBE"],zh);function Ah(a){t.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); -var Bh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ah.prototype.uc=function(){return-1};Ah.prototype.vc=function(){}; -function Ch(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} -function Dh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Mc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; +var Bh={},wh=(Bh[63744]=[null,null,M.prototype.Gd,M.prototype.ye,"RLCS"],Bh[63746]=[null,null,M.prototype.Ed,M.prototype.we,"RLBA"],Bh[63748]=[null,null,M.prototype.Hd,M.prototype.ze,"RLDA"],Bh[63750]=[null,null,M.prototype.Id,M.prototype.Ae,"RLMP"],Bh[63752]=[null,null,M.prototype.Fd,M.prototype.xe,"RLBE"],Bh);function Ch(a){t.call(this,"Debugger",a,Ch);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ch); +var Dh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ch.prototype.uc=function(){return-1};Ch.prototype.vc=function(){}; +function Eh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(xa(b.substring(c,f))),c=f+1}}return a} +function Fh(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} -function Eh(a,b,c){var d;if(b){b=Fh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ih(a,b){if(b)return Hh(a,b,a.Y[b]);var c=0;for(b in a.Y)Hh(a,b,a.Y[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Kh(a,b){if(b)return Jh(a,b,a.Y[b]);var c=0;for(b in a.Y)Jh(a,b,a.Y[b]),c++;return 0this.b.pb?Rh:[];Sh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Th(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=xc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Pc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,rd(a),a.ua=0,a.qa()))};function Lh(a){var b;if(!ne(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Lh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;bi(this);a||md(this)};k.save=function(){var a=new P(this);a.set(0,Vh(this.L));a.set(1,Vh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Wh(a[b++]),this.P=Wh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; -k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} -function Kh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ci(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(di(this,a,a.length-1,"set"),Lh(this)));return d}; -function ci(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Lh(a);break}}return f}function ei(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(r,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.oa(r,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Yh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Pc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ji(a){var b,c="";for(b=0;6>b;b++)c+=ii(a,b);c=c+"\n"+(ii(a,6)+ii(a,7));c+=ii(a,20)+ii(a,21);return c+=hi(a,"T")+hi(a,"N")+hi(a,"Z")+hi(a,"V")+hi(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=Aa(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ji(a));c&&(a.L=Z(d.u[7]),ai(a,J(a,a.L.F)))}}function oi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=gi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);ga-=aa;0>ga&&(null==na[na.length-1].F?(aa=ga+aa,ga=0):ga+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(ga=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||Ii),Cc=Gh(a,Ma)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var lb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(lb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(lb=2,Ld=65535,Md=a.oa,Nd=a.ib):Pd=null;if(null==Pd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Gc=Th(a,Pd);if(Gc)for(var Hc= -2;HcSd;){for(var Na=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< -Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Na=Hg)break}}if(!Na||null==Na)break;var Kg=null;if("ks"==Mi){var Lg=Na.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Na=xa(Na,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Na);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== -G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Vd=0;Vd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bti){if(vi(d,this.J)){this.C=new P(this,"1.30.3","failsafe");vi(this.C)&&(Ai(this,d),a=2,Bi(this.C));this.C.set("timestamp",Ca());Ci(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=zi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?vi(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),Bi(d),vi(d)?(c=zi(d),e=!0):c=!1))}e&&yi(this,c?d:null)}else 2==a&&d.clear()}else yi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Di(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(Ai(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function Ai(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function qi(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;l(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Ui(a,b,c)}})}else c(a,null)} -function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=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));n.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Si(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hi||Za(!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),--Hi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Sh=[0],Th= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Lh.prototype; +k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.f=a.f;(a=ld(a,"messages"))&&Oh(this,a);this.wb=Rh;this.Pb=1145>this.b.pb?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Rc(this.b):21==a&&this.f&&hc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,td(a),a.ua=0,a.qa()))};function Nh(a){var b;if(!pe(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?bi(a):ci(a)}}function ai(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Nh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.Z=!1;di(this);a||od(this)};k.save=function(){var a=new O(this);a.set(0,Xh(this.L));a.set(1,Xh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Yh(a[b++]),this.P=Yh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function vf(a){var b=a.b;if(b.A.Z)throw N(b,a.b.Kb),a.ga(),-1;return!1} +function Mh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; +function ei(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Nh(a);break}}return f}function gi(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=$h(y);break;case 8:x="@"+$h(y);break;case 16:7>y?x="("+$h(y)+")+":(A=w.oa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+$h(y)+")+":(A=w.oa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+$h(y)+")";break;case 40:x="@-("+$h(y)+")";break;case 48:A=w.oa(r,2);x=J(w,A,0,!0)+"("+$h(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.oa(r,2),x="@"+J(w,A)+"("+$h(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=$h(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Rc(d)):21==b&&a.f&&hc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function li(a){var b,c="";for(b=0;6>b;b++)c+=ki(a,b);c=c+"\n"+(ki(a,6)+ki(a,7));c+=ki(a,20)+ki(a,21);return c+=ji(a,"T")+ji(a,"N")+ji(a,"Z")+ji(a,"V")+ji(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function mi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(li(a));c&&(a.L=Y(d.u[7]),ci(a,J(a,a.L.F)))}}function qi(a,b){b=xa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ii(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function hi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(sb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Id=[];"call"==Bg&&(Jb=1E5,Id=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.vb=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.vb=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Jd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Yb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.oa,Md=a.ib):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Od);if(Fc)for(var Gc=2;GcRd;){for(var Ma=null,Pi=256;65536>Sb.F>>>0;){Sd.F=a.oa(Sb,2);if(null==Sb.F||!Pi--)break;if(!(Sd.F&1)){for(var Qi=a,Hc=Sd,Ig=null,Tb=Hc.F,Jg=Tb,Td=1;6>=Td&&Tb;Td++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bvi){if(xi(d,this.J)){this.C=new O(this,"1.30.3","failsafe");xi(this.C)&&(Ci(this,d),a=2,Di(this.C));this.C.set("timestamp",Ba());Ei(this.C);var e=this.g&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Bi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?xi(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Na("user",""),this.B=null)):this.j(f+": "+g),Di(d),xi(d)?(c=Bi(d),e=!0):c=!1))}e&&Ai(this,c?d:null)}else 2==a&&d.clear()}else Ai(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Fi(this,this.b,b,c,a),this.qa(),this.b.ub());this.P&&(Ci(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function Ci(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function si(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;l(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Da(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,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.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);Wi(a,b,c)}})}else c(a,null)} +function Xi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=va(a))}function f(a){e("Error: "+a);l&&(--Ji||Ya(!0));l=!1}var g,h,l=!0;Ji++;lb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=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));n.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Ui(c,null,null,!1,e,function(d,l){l?(mb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ji||Ya(!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),--Ji||Ya(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Ui(b,a,d,!0,e,m):Vi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return l}window.embedPDP11=function(a,b,c,d){Ya(!1);return Xi(a,b,c,d)};window.enableEvents=Ya;window.sendEvent=Za;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index cca6978dd..d86d0f59d 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -42,201 +42,202 @@ function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=reso typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={K:null,X:null,fa:null,ea:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(t(d.K[0]),d=null):(t("Empty resource: "+a),d=null)}catch(k){t("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;x.push(this)}var La=void 0,Ma={}; -if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function y(a,b){b||(b=v);a.prototype=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),x=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},x=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[a][b]=c)}function z(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}y(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; -h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; -function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function bb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(a,"Value for "+b+" is invalid"),F(a.a)),c=8==(a.D&&a.D.g||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -h.rc=function(a){a||this.a.l.U||(this.g.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.sc=function(){};h.nc=function(a){a||F(this.a)};h.lc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.qb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.nb(0),Va(a,!1);else try{var c=this.a.nb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.g.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new H(this);zb(a,this.D);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||I(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.ob+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new H(a,f,p,a.b,d,e);zb(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d!=Hb||a.gb||(a.gb+=c),a.status((c>>10)+"Kb "+Ib[d]+" at "+ka(b)),!0):Gb(2,b,c)} -function Db(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; -h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.g[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; -function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var E=k[4],V=0;V>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; -h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Ub(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function t(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va} +function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Aa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ba={init:[],show:[],exit:[]},Ca=!1,Da=!1,Ea=!0; +function Fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ga(a){Ba.init.push(a)}function Ha(a){if(Ea)try{for(var b=0;bb?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; +if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function z(a,b){b||(b=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,0,!1,!1,this.tc,a]}z(Ya);var Za=7;function $a(a,b){return a.c[b]&&a.c[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; +h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, +b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; +function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)jb(a,b,a.c[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.g||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +function ab(a,b){var c=a.c[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}function bb(a,b){var c=a.c[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.rc=function(a){a||this.a.l.U||(this.g.reset(),lb(this.a),$a(this,"ENABLE")&&mb(this.a))};h.sc=function(){};h.nc=function(a){a||G(this.a)}; +h.lc=function(a){if(!a&&!this.a.l.U)if($a(this,"ENABLE"))mb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.qb=!0),b=!a.l.Fa;if(b)Ua(a,!0),a.nb(0),Ua(a,!1);else try{var c=this.a.nb(1);0a;a++)this.c["S"+a][1]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.g.ia;$a(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;sb(a,"A",a.b,22)}function rb(a,b){a.i=b&65535;sb(a,"D",a.i,16);return a.i}function tb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function sb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} +function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.ya[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} +function zb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.ob+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d!=Ib||a.gb||(a.gb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.lb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; +h.Ya=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.g[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; +function Ob(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Xb(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; +h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Xb(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; h.$c=function(a){return this.a.Y[1][a>>1&7]};h.Td=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Yc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Rd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.wd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Ma=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.h[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.h[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.h[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.h[6]=a};h.Pc=function(){return this.a.h[7]};h.Id=function(a){this.a.h[7]=a}; h.Na=function(a){a&=7;return this.a.B&2048?this.a.h[a]:this.a.Ha[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.h[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.g.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; -h.bd=function(a){return a?this.a.Da&65280:0};h.Vd=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Ed=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; -var M={},L=(M[61568]=[null,null,K.prototype.hd,K.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.ad,K.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Zc,K.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.$c,K.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Yc,K.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.Ac, -K.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.xd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.gd,K.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.ed, -K.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.fd,K.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.dd,K.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Ma,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.Ma,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.Ma,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.Ma,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.Ma,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.Ma,K.prototype.Oa, -"R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Id,"R7KERNEL"],M[65480]=[null,null,K.prototype.Na,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Na,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Na,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Na,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Na,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Na, -K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.rd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.cd,K.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.qd,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.Dc,K.prototype.yd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Bd,"PIR"],M[65532]=[null,null,K.prototype.bd,K.prototype.Vd,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Ed,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; -Ha(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&I(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.g, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);ic(a,b,void 0);lc(a,b,void 0)} -var mc=[],hc=[H.prototype.N,H.prototype.qa,H.prototype.na,H.prototype.xa],kc=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Ya)var gc=[H.prototype.C,H.prototype.da,H.prototype.P,H.prototype.ra],fc=[H.prototype.J,H.prototype.pa,H.prototype.aa,H.prototype.wa]; -function nc(a,b){v.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);D(this)}y(nc);var oc=["power","reset"];h=nc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.g=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),F(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=z(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} -function wc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.md=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){F(this); -this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; -function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function F(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} -function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}y(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&F(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; -function Ac(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.h=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.pb=a.be,Bb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.g,16))}function Bc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(F(a)||a.D.c())}h.Jb=function(){return 0}; -h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.g));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.h[6],a.h[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function J(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.h[6]=4);Ic(a,a.Ja);Ic(a,a.h[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Xb(a,c);a.u&=-17} -function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Ic(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.h[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.h[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.h[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.g.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.g,a)};h.jd=function(a){return Lb(this.g,Lc(this,a,2))};h.ac=function(a,b){Mb(this.g,a,b&65535)};h.be=function(a,b){Mb(this.g,Lc(this,a,4),b)}; -function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.ma[a.B>>12&3]=d} -function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.g,a.J(b,c,2)):a.h[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.g,a.J(b,c,2)):a.h[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.g,e,d.call(a,c,Lb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.h[e]=c?d&1?c<<24>>24&65535:a.h[e]&-256|c&255:a.h[e]&-256;return c} -function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),J(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;R(this,a);return a}function dd(a,b){a=b&~a;R(this,a<<8);return a}function ed(a,b){a|=b;R(this,a);return a}function fd(a,b){a|=b;R(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} -function id(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function jd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function kd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ld(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function md(a,b){a=-b;Ec(this,a,a&b&32768);return a&65535}function nd(a,b){a=-b;Ec(this,a<<8,(a&b&128)<<8);return a&255} -function od(a,b){a=b<<1|this.m>>16&1;Gc(this,a);return a&65535}function pd(a,b){a=b<<1|this.m>>16&1;Gc(this,a<<8);return a&255}function qd(a,b){a=(this.m&65536|b)>>1|b<<16;Gc(this,a);return a&65535}function rd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Gc(this,a<<8);return a&255}function sd(a,b){var c=b-a;Hc(this,c,a,b);return c&65535}function td(a,b){var c=b-a;Hc(this,c<<8,a<<8,b<<8);return c&255}function ud(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function vd(a,b){a^=b;R(this,a);return a&65535}function wd(a){T(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(this,a);a=a>>6&7;var c=this.h[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.h[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function yd(a){var b=Uc(this,a);a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.h[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function zd(a){U(this,a,!Q(this))}function Ad(a){U(this,a,Q(this))} -function Bd(a){T(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){S(this,a,Qc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){T(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){S(this,a,Qc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Fd(a){R(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){R(this,(Qc(this,a)&Tc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){U(this,a,this.i&65535?0:4)}function Id(a){U(this,a,!this.za()==!(this.f&32768))}function Jd(a){U(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){U(this,a,!Q(this)&&!!(this.i&65535))} -function Ld(a){U(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){U(this,a,Q(this)||(this.i&65535?0:4))}function Nd(a){U(this,a,!this.za()!=!(this.f&32768))}function Od(a){U(this,a,this.za())}function Pd(a){U(this,a,!!(this.i&65535))}function Qd(a){U(this,a,!this.za())}function Rd(){J(this,12,1);this.a-=5}function Sd(a){U(this,a,!0)}function Td(a){U(this,a,!(this.f&32768))}function Ud(a){U(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Vd(a){var b=Rc(this,a);a=Uc(this,a);Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Wd(a){var b=Qc(this,a)<<8;a=Tc(this,a)<<8;Hc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Xd(a){var b=Uc(this,a);if(b){a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.h[a]=d&65535,this.h[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.h[a]&&(this.h[a]=this.h[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Yd(){J(this,24,2);this.a-=25} -function Zd(){this.B&49152?(this.M|=128,J(this,4,3)):this.D?this.D.b():F(this);this.a-=7}function $d(){J(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;O(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.h[a]);this.h[a]=this.h[7];O(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function fe(a){var b=Rc(this,a);this.F=this.a;R(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);R(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; -function ie(a){var b=Uc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.h[a];c&32768&&(c|=-65536);b=~~(b*c);this.h[a]=b>>16&65535;this.h[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.h[b]=this.h[b]-1&65535)O(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){T(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function pe(a){T(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){J(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){T(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} -function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)} -var te=[function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){T(this,a,0, -md);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Me=[function(a){Oe[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Oe=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],De=[je,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, -Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){S(this,a,0,nd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Je=[function(a){S(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Pe[a>>12].call(this,a)} -var Pe=[function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Qe=[function(a){Te[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Ue[a>>6&3].call(this,a)},Y,Y],Ue=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F= -this.a;Pc(this,a,0,b);R(this,b);this.a=this.F-he[this.c]},function(a){R(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Te=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ve=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Re=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Se=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){We[a>>6& -3].call(this,a)},Y,Y],We=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);R(this,b);this.a=this.F-he[this.c]},Y]; -function Xe(a){v.call(this,"ROM",a,Xe);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.j=a.file;this.s=q(this.j);if(this.j){a=this.j;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.j=null);Ye(c)})}}y(Xe);h=Xe.prototype; -h.ha=function(a,b,c,d){this.g=b;this.a=c;this.D=d;Ye(this)};h.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ja=function(){return!0}; -function Ye(a){if(!Wa(a)){if(a.j){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Xa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+G){var c={};b=(c[b]=[Xe.prototype.Xc,Xe.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Eb(a.g,b,a.b,dc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[u++]&255);else p&1?F(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,df);D(this)}; -h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.wa)return;b=pa(b[1]);if(this.v=Ta(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){ef(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return ef(this)};function ef(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.g.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.bd=function(a){return a?this.a.Da&65280:0};h.Vd=function(a){this.a.Da=a|255};h.Lc=function(){return Yb(this.a)};h.Ed=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var M={},Wb=(M[61568]=[null,null,L.prototype.hd,L.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.ad,L.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.Zc,L.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.$c,L.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.Yc,L.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Bc,L.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.zc,L.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Ac, +L.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.yc,L.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Hc,L.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Cc,L.prototype.xd,"LKS"],M[65402]=[null,null,L.prototype.Ec,L.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,L.prototype.gd,L.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.ed, +L.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.fd,L.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.dd,L.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET0"],M[65473]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET0"],M[65474]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET0"],M[65475]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET0"],M[65476]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET0"],M[65477]=[null,null,L.prototype.Ma,L.prototype.Oa, +"R5SET0"],M[65478]=[null,null,L.prototype.Mc,L.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,L.prototype.Pc,L.prototype.Id,"R7KERNEL"],M[65480]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,L.prototype.Na,L.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,L.prototype.Na, +L.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Nc,L.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.wc,L.prototype.rd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.cd,L.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.vc,L.prototype.qd,"CPUERR",1,1170],M[65528]= +[null,null,L.prototype.Dc,L.prototype.yd,"MB",1,1170],M[65530]=[null,null,L.prototype.Ic,L.prototype.Bd,"PIR"],M[65532]=[null,null,L.prototype.bd,L.prototype.Vd,"SL"],M[65534]=[null,null,L.prototype.Lc,L.prototype.Ed,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:jc);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.g,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.g,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.g, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} +var oc=[],kc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],mc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Xa)var jc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],hc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; +function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=uc(a)&&(a.Qa=a.Ra=-1,tc(a),G(a),c=!0);c&&a.T(uc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&xc(a.j)}ob(a,a.aa);a.aa=0;a.R=ra();a.oa=0;wc(a)}function Rb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Tb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+yc(a))}function nb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +function yc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} +h.md=function(){if(this.l.U){this.wb>=this.fb&&wc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ta+=b;this.aa+=b;pb(this,b);nb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function mb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{vc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,uc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){yc(a);ob(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),uc(a));b=!0}a.l.complete=void 0;return b} +function zc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Wa?Ac.bind(this):Bc.bind(this);Cc(this);this.ra=0;this.N=null;this.l.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Cc(this);sc(this);this.l.error=!1;this.parent.reset.call(this)}; +function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.h=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;lb(a)}function lb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Xb(a)}function Xb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.pb=a.be,Cb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Cb(a.g,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Ob(this.g));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];vc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.h[6],a.h[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Zb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.h[6]=4);Kc(a,a.Ja);Kc(a,a.h[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} +function Lb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Nc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Mc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Kc(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.h[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.h[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.h[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ra++;a=this.Ub(Nc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Oc(this,Nc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Nc(this,a,4),b),this.ra--):this.g.mb(a,b)};h.hc=function(a,b,c){return Pc(this,a,b,c)};h.ic=function(a,b,c){return Nc(this,Pc(this,a,b,c),c)};h.Ub=function(a){return Mb(this.g,a)};h.jd=function(a){return Mb(this.g,Nc(this,a,2))};h.ac=function(a,b){Nb(this.g,a,b&65535)};h.be=function(a,b){Nb(this.g,Nc(this,a,4),b)}; +function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.ma[a.B>>12&3];return c}function Rc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Pc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Nc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.ma[a.B>>12&3]=d} +function Sc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Tc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.g,a.J(b,c,2)):a.h[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)}function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.g,a.J(b,c,2)):a.h[c]} +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Oc(a,e,d.call(a,c,Kb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Nb(a.g,e,d.call(a,c,Mb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.J(b,e,5),c):a.h[e]=c?d&1?c<<24>>24&65535:a.h[e]&-256|c&255:a.h[e]&-256;return c} +function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ec(this))}while(0>1|b<<16;Ic(this,a);return a&65535}function dd(a,b){a=b&2048|b>>1|b<<8;Ic(this,a<<8);return a&255}function ed(a,b){a=b&~a;R(this,a);return a}function fd(a,b){a=b&~a;R(this,a<<8);return a}function gd(a,b){a|=b;R(this,a);return a}function hd(a,b){a|=b;R(this,a<<8);return a}function id(a,b){a=~b|65536;Gc(this,a);return a&65535}function jd(a,b){a=~b|256;Gc(this,a<<8);return a&255} +function kd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function ld(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function md(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function nd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function od(a,b){a=-b;Gc(this,a,a&b&32768);return a&65535}function pd(a,b){a=-b;Gc(this,a<<8,(a&b&128)<<8);return a&255} +function qd(a,b){a=b<<1|this.m>>16&1;Ic(this,a);return a&65535}function rd(a,b){a=b<<1|this.m>>16&1;Ic(this,a<<8);return a&255}function sd(a,b){a=(this.m&65536|b)>>1|b<<16;Ic(this,a);return a&65535}function td(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Ic(this,a<<8);return a&255}function ud(a,b){var c=b-a;Jc(this,c,a,b);return c&65535}function vd(a,b){var c=b-a;Jc(this,c<<8,a<<8,b<<8);return c&255}function wd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function xd(a,b){a^=b;R(this,a);return a&65535}function yd(a){T(this,a,Tc(this,a),Zc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function zd(a){var b=Wc(this,a);a=a>>6&7;var c=this.h[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.h[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function Ad(a){var b=Wc(this,a);a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.h[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Bd(a){V(this,a,!Q(this))}function Cd(a){V(this,a,Q(this))} +function Dd(a){T(this,a,Tc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){S(this,a,Sc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Fd(a){T(this,a,Tc(this,a),gd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Gd(a){S(this,a,Sc(this,a),hd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function Hd(a){R(this,Tc(this,a)&Wc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Id(a){R(this,(Sc(this,a)&Vc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Jd(a){V(this,a,this.i&65535?0:4)}function Kd(a){V(this,a,!this.za()==!(this.f&32768))}function Ld(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Md(a){V(this,a,!Q(this)&&!!(this.i&65535))} +function Nd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Od(a){V(this,a,Q(this)||(this.i&65535?0:4))}function Pd(a){V(this,a,!this.za()!=!(this.f&32768))}function Qd(a){V(this,a,this.za())}function Rd(a){V(this,a,!!(this.i&65535))}function Sd(a){V(this,a,!this.za())}function Td(){K(this,12,1);this.a-=5}function Ud(a){V(this,a,!0)}function Vd(a){V(this,a,!(this.f&32768))}function Wd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Xd(a){var b=Tc(this,a);a=Wc(this,a);Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Yd(a){var b=Sc(this,a)<<8;a=Vc(this,a)<<8;Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} +function Zd(a){var b=Wc(this,a);if(b){a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.h[a]=d&65535,this.h[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.h[a]&&(this.h[a]=this.h[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function $d(){K(this,24,2);this.a-=25} +function ae(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function be(){K(this,16,4);this.a-=25}var ce=[0,7,7,10,7,11,9,13];function de(a){this.F=this.a;O(this,Uc(this,a));this.a=this.F-ce[this.c]}var ee=[0,14,14,17,14,18,16,20];function fe(a){this.F=this.a;var b=Uc(this,a);a=a>>6&7;Kc(this,this.h[a]);this.h[a]=this.h[7];O(this,b);this.a=this.F-ee[this.c]}var ge=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function he(a){var b=Tc(this,a);this.F=this.a;R(this,Yc(this,a,b));this.a=this.F-ge[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; +function ke(a){var b=Wc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.h[a];c&32768&&(c|=-65536);b=~~(b*c);this.h[a]=b>>16&65535;this.h[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.h[b]=this.h[b]-1&65535)O(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function qe(a){T(this,a,Tc(this,a),ud);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function re(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)}function se(){K(this,28,5);this.a-=5}function te(){this.u|=4;Fc(this,-2);this.a-=3}function ue(a){T(this,a,Tc(this,a),xd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function Ac(a){ve[a>>12].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a&15].call(this,a)}function Ee(a){Fe[a&15].call(this,a)} +function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)} +var ve=[function(a){Me[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,Y,function(a){Ne[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,Y,Y,Y],xe=[function(a){Gc(this,Yc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0, +od);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Wc(this,a);Gc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Be=[function(a){T(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)}], +Pe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,Y,Ce,Ee,re,re,re,re],Qe=[ae,te,ne,Td,be,me,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],De=[le,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Fe=[le,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ne=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,Y,Y,Y],He=[function(a){Gc(this, +Xc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)}],Je=[function(a){S(this,a,0,pd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Gc(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} +var Re=[function(a){Se[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Se=[function(a){Ve[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,function(a){We[a>>6&3].call(this,a)},Y,Y],We=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Qc(this,a,0);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F= +this.a;Rc(this,a,0,b);R(this,b);this.a=this.F-je[this.c]},function(a){R(this,Yc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Lc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,function(a){Ye[a>>6& +3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.F-je[this.c]},Y]; +function Ze(a){x.call(this,"ROM",a,Ze);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.j=a.file;this.s=q(this.j);if(this.j){a=this.j;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Ra(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.j=null);$e(c)})}}z(Ze);h=Ze.prototype; +h.ha=function(a,b,c,d){this.g=b;this.a=c;this.D=d;$e(this)};h.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ja=function(){return!0}; +function $e(a){if(!Va(a)){if(a.j){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[Ze.prototype.Xc,Ze.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Fb(a.g,b,a.b,fc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[u++]&255);else p&1?G(a.a):Dc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Sb(e.a,e.aa))});this.da=Vb(52,4);this.P=Rb(this.a,function(){e.c|=128;e.c&64&&Sb(e.a,e.da)});cb(b,this,ff);F(this)}; +h.Mb=function(){if(!this.v){var a=rc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.wa)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ja=function(a){return a?this.save():!0};h.reset=function(){gf(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return gf(this)};function gf(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ff={},df=(ff[65392]=[null,null,Z.prototype.Rc,Z.prototype.Kd,"RCSR"],ff[65394]=[null,null,Z.prototype.Qc,Z.prototype.Jd,"RBUF"],ff[65396]=[null,null,Z.prototype.ld,Z.prototype.de,"XCSR"],ff[65398]=[null,null,Z.prototype.kd,Z.prototype.ce,"XBUF"],ff);Ha(function(){for(var a=C(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&jf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;jf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;this.J=kf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&tf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||D(a));qf(a)})}function nf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){Af(a,b,c,d)})} -function Af(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)t(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,V=w.length;V>2,e=Array(d),f=0;f'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&lf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;lf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;this.J=mf(a);var e=this;if((this.c=rc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Vb(56,4);this.R=Rb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.na,e,f),(e=ta(e,f))&&vf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));sf(a)})}function pf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){Cf(a,b,c,d)})} +function Cf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Ra(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)t(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var D=n<<2,U=w.length;U>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +function Ef(a,b){var c=a.Z*a.S,d=b/c|0;return dg)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Cf(this,a++);)Ef(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Ef(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){v.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}y(N);h=N.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){t("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ff(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Gf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Cf(a,c++);)for(var l=0,n=k.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Hf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&If(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Ef(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Ff(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Hf(this)};h.save=function(){return(new P(this)).data()}; -h.restore=function(a){return Hf(this,a[0])};function Kf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Mf(a,e,b,c,!1,d)}else Lf(a,e)} -function Mf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Lf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,zf(new vf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||D(this));Ff(this,a.xb)}; -function Jf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Hf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Jf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return Jf(this,a[0])};function Mf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Of(a,e,b,c,!1,d)}else Nf(a,e)} +function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&xc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Hf(this,a.xb)}; +function Lf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.g,f,u|w<<8);if(Pb(this.g)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.sd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var u=Lb(this.g,f);if(Pb(this.g)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Nb(this.g,f,u|w<<8);if(Qb(this.g)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.sd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var u=Mb(this.g,f);if(Qb(this.g)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; h.Nd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; -var Nf={},If=(Nf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Nf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Nf[65284]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Nf[65286]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Nf[65288]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Nf); -function Of(a,b,c){v.call(this,"Computer",a,Of);this.l.O=!1;Pf(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Qf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Rf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.g=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=z(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bQf){if(Sf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Sf(this.i)&&(Xf(this,d),a=2,Yf(this.i));this.i.set("timestamp",sa());Zf(this.i);var e=this.b&&!this.m;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Wf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Sf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Yf(d),Sf(d)?(c=Wf(d),e=!0):c=!1))}e&&Vf(this,c?d:null)}else 2==a&&d.clear()}else Vf(this);delete this.v;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&($f(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Xf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Xf(a,b){if(va("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=z(a.id),l=0;l(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);ig(a,b,c)}})}else c(a,null)} -function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&C(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?gg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fg||Ja(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--fg||Ja(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gg(b,a,d,!0,e,n):hg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ja(!1);return jg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; +var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Pf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Pf[63748]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Pf[63750]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Pf[63752]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Pf); +function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.l.O=!1;Rf(this,b);this.A=rc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Sf;this.v=null;this.m=this.I=!1;this.P=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.g=new vb({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Va)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bSf){if(Uf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Uf(this.i)&&(Zf(this,d),a=2,$f(this.i));this.i.set("timestamp",sa());ag(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Yf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.T(f+": "+g),$f(d),Uf(d)?(c=Yf(d),e=!0):c=!1))}e&&Xf(this,c?d:null)}else 2==a&&d.clear()}else Xf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Zf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Zf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function dg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.3"),g=new P(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);kg(a,b,c)}})}else c(a,null)} +function lg(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--hg||Ia(!0));l=!1}var g,k,l=!0;hg++;Qa[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?ig(c,null,null,!1,e,function(d,l){l?(Ra(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--hg||Ia(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--hg||Ia(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ig(b,a,d,!0,e,n):jg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ia(!1);return lg(a,b,c,d)};window.enableEvents=Ia;window.sendEvent=Ja;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map From eb3b38a5ad86db10f2634ffcb14b24596848b325 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 7 Nov 2016 17:20:53 -0800 Subject: [PATCH 30/30] Fixed XXDP disk boot (haven't tried any tests yet, but it's still good progress) --- .../machine/1170/panel/debugger/machine.xml | 2 +- devices/pdp11/rl11/default.xml | 2 +- devices/pdp11/rom/M9312/README.md | 6 +- modules/pdp11/lib/bus.js | 2 +- modules/pdp11/lib/cpuops.js | 31 +++- modules/pdp11/lib/cpustate.js | 16 +- modules/pdp11/lib/defines.js | 8 +- modules/pdp11/lib/device.js | 5 + modules/pdp11/lib/rl11.js | 2 +- versions/pdpjs/1.30.3/pdp11-dbg.js | 142 +++++++++--------- versions/pdpjs/1.30.3/pdp11.js | 72 ++++----- 11 files changed, 163 insertions(+), 125 deletions(-) diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 038d3e746..a26cfcbb9 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -9,7 +9,7 @@ - + diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml index 6d8b4ddf8..2af18e40d 100644 --- a/devices/pdp11/rl11/default.xml +++ b/devices/pdp11/rl11/default.xml @@ -1,5 +1,5 @@ - + Disk Drive Controls diff --git a/devices/pdp11/rom/M9312/README.md b/devices/pdp11/rom/M9312/README.md index 4b2c0db90..a083eca36 100644 --- a/devices/pdp11/rom/M9312/README.md +++ b/devices/pdp11/rom/M9312/README.md @@ -23,7 +23,7 @@ some of which we have reproduced here. Initially, all we had was this [256-word ROM](M9312.json) obtained from Paul Nankervis' [website](http://skn.noip.me/pdp11/iopage.js). Cross-referencing that ROM with Don North's [M9312 PROM Files](http://www.ak6dn.com/PDP-11/M9312/) revealed that it came from -DEC P/N [23-616F1](23-616F1.txt): "11/60,70 Diagnostic/Console", albeit with some unexpected changes: +DEC P/N [23-616F1](23-616F1.txt), "11/60,70 Diagnostic/Console", albeit with a few modifications: 165322 022716 165320 L26: cmp #N2,(sp) ; 165320 changed to 000320 ... @@ -38,7 +38,7 @@ DEC P/N [23-616F1](23-616F1.txt): "11/60,70 Diagnostic/Console", albeit with som ... 165406 012737 165714 000114 mov #N12,@#114 ; 165714 changed to 000714 -The unmodified [23-616F1](23-616F1.json) ROM can be seen at address 165000 when configured in a -[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) as: +The unmodified [23-616F1](23-616F1.json) ROM is loaded at address 165000 (0xEA00) in this +[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/), using the following configuration: diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 273f15c89..dce5ea0ad 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -676,7 +676,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) } if (sizeLeft <= 0) { - if (type == MemoryPDP11.TYPE.RAM && !this.cbRAM) { + if (type == MemoryPDP11.TYPE.RAM) { this.cbRAM += size; } this.status((size >> 10) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index 53e732724..2e285e1f0 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -884,7 +884,7 @@ PDP11.opCLR = function(opCode) */ PDP11.opCLRB = function(opCode) { - this.updateAllFlags(this.writeDstByte(opCode, 0)); + this.updateAllFlags(this.writeDstByte(opCode, 0, PDP11.WRITE.BYTE)); this.nStepCycles -= (this.dstMode? (8 + 1) : (2 + 1) + (this.dstReg == 7? 2 : 0)); }; @@ -1269,6 +1269,31 @@ PDP11.opMFPI = function(opCode) this.nStepCycles -= (10 + 1); }; +/** + * opMFPT(opCode) + * + * 000007 MFPT - Move From Processor Type + * + * Loads R0 with a value indicating the processor type. + * + * R0 Hardware + * 1 PDP-11/44 + * 3 PDP-11/24 (should be 2) + * 3 PDP-11/23 + * 4 SBC-11/21 + * 5 All J11 chips including 11/73, 11/83, 11/93 + * + * @this {CPUStatePDP11} + * @param {number} opCode + */ +PDP11.opMFPT = function(opCode) +{ + /* + * TODO: Review + */ + this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED); +}; + PDP11.MOV_CYCLES = [ 2 + 1, 8 + 1, 8 + 1, 11 + 2, 9 + 1, 12 + 2, 10 + 2, 13 + 3, 3 + 1, 8 + 1, 8 + 1, 11 + 2, 9 + 1, 12 + 2, 11 + 2, 14 + 3 @@ -1301,7 +1326,7 @@ PDP11.opMOV = function(opCode) PDP11.opMOVB = function(opCode) { var data = this.readSrcByte(opCode); - this.updateNZVFlags(this.writeDstByte(opCode, data, PDP11.WRITE.SIGNEXT) << 8); + this.updateNZVFlags(this.writeDstByte(opCode, data, PDP11.WRITE.SBYTE) << 8); this.nStepCycles -= (this.dstMode? (8 + 1) + (this.srcReg && this.dstReg >= 6? 1 : 0) : (this.srcMode? (3 + 2) : (2 + 1)) + (this.dstReg == 7? 2 : 0)); }; @@ -2270,7 +2295,7 @@ PDP11.aOp000X_1145 = [ PDP11.opIOT, // 0x0004 000004 11/20+ 9.3 PDP11.opRESET, // 0x0005 000005 11/20+ 20ms PDP11.opRTT, // 0x0006 000006 11/45+ - PDP11.opUndefined, // 0x0007 + PDP11.opMFPT, // 0x0007 000007 TBD PDP11.opUndefined, // 0x0008 PDP11.opUndefined, // 0x0009 PDP11.opUndefined, // 0x000A diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 80cc6358b..7857fa07e 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -2042,20 +2042,26 @@ CPUStatePDP11.prototype.updateDstWord = function(opCode, src, fnOp) * @this {CPUStatePDP11} * @param {number} opCode * @param {number} data - * @param {number} [writeFlags] + * @param {number} writeFlags (WRITE.BYTE aka 0xff, or WRITE.SBYTE aka 0xffff) * @return {number} */ CPUStatePDP11.prototype.writeDstByte = function(opCode, data, writeFlags) { + this.assert(writeFlags); var reg = this.dstReg = opCode & PDP11.OPREG.MASK; var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT; if (!mode) { if (!data) { - this.regsGen[reg] &= ~0xff; // TODO: Profile to determine if this is a win - } else if (writeFlags & PDP11.WRITE.SIGNEXT) { - this.regsGen[reg] = ((data << 24) >> 24) & 0xffff; + /* + * Potentially worthless optimization (but it looks good on "paper"). + */ + this.regsGen[reg] &= ~writeFlags; } else { - this.regsGen[reg] = (this.regsGen[reg] & ~0xff) | (data & 0xff); + /* + * Potentially worthwhile optimization: skipping the sign-extending data shifts + * if writeFlags is WRITE.BYTE (but that requires an extra test and separate code paths). + */ + this.regsGen[reg] = (this.regsGen[reg] & ~writeFlags) | (((data << 24) >> 24) & writeFlags); } } else { this.writeByteToPhysical(this.getAddr(mode, reg, PDP11.ACCESS.WRITE_BYTE), data); diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 2036bf6de..458c936b7 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -296,11 +296,13 @@ var PDP11 = { DSPACE: 0x10000 // getVirtualByMode() sets bit 17 in any 16-bit virtual address that refers to D space (as opposed to I space) }, /* - * Internal flags passed to writeByteByMode(), etc. + * Internal flags passed to writeDstByte() + * + * The BYTE and SBYTE values have been chosen so that they can be used directly as masks. */ WRITE: { - NORMAL: 0x0, // write byte or word normally - SIGNEXT: 0x1 // sign-extend a byte to a word + BYTE: 0xff, // write byte normally + SBYTE: 0xffff // sign-extend byte to word }, CPUERR: { RED: 0x0004, // red zone stack limit diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 5b134f834..823c947e3 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -872,6 +872,11 @@ DevicePDP11.prototype.writeCTRL = function(data, addr) */ DevicePDP11.prototype.readSIZE = function(addr) { + /* + * TODO: getMemorySize() returns an aggregate total, so if there are multiple discontiguous + * chunks of RAM, this could return the wrong result; another interface, getHighestAddress(), + * might be required. + */ return addr == PDP11.UNIBUS.LSIZE? ((this.bus.getMemorySize(MemoryPDP11.TYPE.RAM) >> 6) - 1) : 0; }; diff --git a/modules/pdp11/lib/rl11.js b/modules/pdp11/lib/rl11.js index 108924e4b..0b8549ac1 100644 --- a/modules/pdp11/lib/rl11.js +++ b/modules/pdp11/lib/rl11.js @@ -939,7 +939,7 @@ RL11.prototype.processCommand = function() case PDP11.RL11.FUNC.WDATA: if (!fnReadWrite) fnReadWrite = this.writeData; iCylinder = this.dar >> PDP11.RL11.RLDA.SHIFT.RW_CA; - iHead = (this.dar & PDP11.RL11.RLDA.RW_HS)? 0 : 1; + iHead = (this.dar & PDP11.RL11.RLDA.RW_HS)? 1 : 0; iSector = this.dar & PDP11.RL11.RLDA.RW_SA; if (iCylinder >= drive.nCylinders || iSector >= drive.nSectors) { this.csr |= PDP11.RL11.ERRC.HNF | PDP11.RL11.RLCS.ERR; diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 7452ffb99..8aa881c42 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -46,15 +46,15 @@ function Fa(){return"http://"+(window?window.location.host:"www.pcjs.org")}funct function Ka(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Na(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Oa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Pa(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0b?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;u.push(this)}var $a=void 0,ab={}; +function t(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.rc=b.comment;this.Tc=b;b=this.id.indexOf(".");0>b?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;u.push(this)}var $a=void 0,ab={}; if(window){$a||($a=window.location.search.substr(1));for(var bb,cb=/\+/g,db=/([^&=]+)=?([^&]*)/g;bb=db.exec($a);)ab[decodeURIComponent(bb[1].replace(cb," "))]=decodeURIComponent(bb[2].replace(cb," "))}function eb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=t);a.prototype=eb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},u=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;zb(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;ec(a,"A",a.f,22)} function dc(a,b){a.v=b&65535;ec(a,"D",a.v,16);return a.v}function gc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function ec(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][1]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.cc=0;this.C=[];this.Jc=[lc,mc,nc,oc];a=new I(this);pc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} function mc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i, b),!0,!e.la))}function nc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.la);return c} function oc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.la))} function rc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d!=xc||a.Ob||(a.Ob+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} -function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)};k.Vb=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; -k.oa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--}; +function uc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return wc(1,f,g)}f=new I(a,f,n,a.ya,d,e);pc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d==xc&&(a.cc+=c),a.status((c>>10)+"Kb "+yc[d]+" at "+qa(b)),!0):wc(2,b,c)} +function tc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; +k.pa=function(a){3932160<=a&&(a=zc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=zc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Zb(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=zc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a);this.la--}; k.ib=function(a,b){3932160<=a&&(a=zc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=zc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; function Ac(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.ke=function(a){var b=this.b;a&=62337;if(b.C!=a){b.C=a;b.Ja=a>>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Qc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Rb=a&16?4194303:262143,Qc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; k.Me=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; +k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(xc){case xc:a=this.w.cc}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Od=function(a){return a?this.b.gb&65280:0};k.Ge=function(a){this.b.gb=a|255};k.xd=function(){return Rc(this.b)};k.pe=function(a){Sc(this.b,a&-1809|Rc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; var L={},Pc=(L[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.md, K.prototype.ge,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],L[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],L[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],L[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Rd, @@ -98,41 +98,41 @@ if(vb){var Vc=new ArrayBuffer(2);(new DataView(Vc)).setUint16(0,256,!0);Uc=256== function I(a,b,c,d,e,f){this.w=a;this.id=Xc+=2;this.b=null;this.F=b;this.Mb=c;this.size=d||0;this.type=e||Yc;this.f=e==Zc;this.controller=null;pc(this);this.Sa=this.Pc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],$c(this,f.Jc);else if(vb)this.C=new ArrayBuffer(this.size),this.D=new DataView(this.C,0,this.size),this.G=new Uint8Array(this.C,0,this.size),this.J=new Uint16Array(this.C,0,this.size>>1),this.b=new Int32Array(this.C,0,this.size>>2),$c(this,Wc?ad:bd);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +"attempt to read invalid address "+J(this.i,b),!0);this.w.Da(b,32,2);return 255},v:function(a,b,c){this.i&&F(this.i,128)&&E(this.i,"attempt to write "+J(this.i,b)+" to invalid addresses "+J(this.i,c),!0);this.w.Da(c,32,4)},L:function(a,b){return this.Wb(a++,b++)|this.Wb(a,b)<<8},H:function(a,b,c){this.Zb(a++,b&255,c++);this.Zb(a,b>>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ 1]&255)<<8},ua:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;gd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ma:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&fd(a,ed,!1),(a.B=c.B)&&dd(a,ed,!1))}function hd(a,b){b?--a.B||(a.$b=a.f?a.v:a.ac,a.Nb=a.f?a.H:a.mc):--a.g||(a.Xb=a.hc,a.sa=a.ic)}function dd(a,b,c){c&&a.B||(a.$b=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ac=b[1]||a.v,a.mc=b[3]||a.H}function fd(a,b,c){c&&a.g||(a.Xb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function $c(a,b){b||(b=id);fd(a,b,void 0);dd(a,b,void 0)} -var id=[],cd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],ed=[I.prototype.P,I.prototype.Ya,I.prototype.Y,I.prototype.Aa];if(vb)var bd=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],ad=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.Ja]; -function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.eb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.eb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; +b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;gd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(a,b,c)},M:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},na:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},wa:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function pc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&fd(a,ed,!1),(a.B=c.B)&&dd(a,ed,!1))}function hd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.mc):--a.g||(a.Wb=a.hc,a.sa=a.ic)}function dd(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.mc=b[3]||a.H}function fd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function $c(a,b){b||(b=id);fd(a,b,void 0);dd(a,b,void 0)} +var id=[],cd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],ed=[I.prototype.P,I.prototype.Ya,I.prototype.Y,I.prototype.Aa];if(vb)var bd=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],ad=[I.prototype.R,I.prototype.na,I.prototype.$,I.prototype.Ja]; +function jd(a,b){t.call(this,"CPU",a,jd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.eb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.eb;this.A.Z=!1;this.A.Yb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(jd);var kd=["power","reset"];k=jd.prototype; k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=qd(a)&&(a.yb=a.zb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;c=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=qd(a)&&(a.yb=a.zb=-1,nd(a),a.ga(),c=!0);c&&a.j(qd(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.eb=b;b=a.vb*a.eb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.sb()}ac(a,a.S);a.S=0;a.R=Aa();a.$=0;sd(a);return d}function Lc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Nc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.eb/1E3*c|0,a.K[b][0]=c+td(a))} function ud(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function $b(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function td(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Ub&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.jb=function(a){if(tb(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){td(this);ac(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; -function vd(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.pb?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; -function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Zb(a)}function Zb(a){a.gb=255;a.fa=0;a.kc=0;a.C=0;a.fb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Pb=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; +k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&sd(this,!0);this.Aa=0;this.Za=Aa();if(this.$){var a=this.Za-this.$;a>this.Tb&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=ud(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=td(this,!0);this.Aa+=b;this.S+=b;bc(this,b);$b(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Vb&&(this.qa(),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Aa(),qd(this));ub(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Aa();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,rd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.jb=function(a){if(tb(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;rd(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,qd(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){td(this);ac(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Aa(),qd(this));b=!0}this.A.complete=a;return b}; +function vd(a){this.pb=+a.model||1170;this.Ob=a.addrReset||0;jd.call(this,a,6666667);this.decode=1120==this.pb?wd.bind(this):xd.bind(this);yd(this);this.L=0;this.M=null;this.A.complete=!1}z(vd,jd);k=vd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();yd(this);md(this);this.A.error=!1;this.parent.reset.call(this)}; +function yd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Sc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Zb(a)}function Zb(a){a.gb=255;a.fa=0;a.kc=0;a.C=0;a.fb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.M=null;a.w&&Qc(a)}function Qc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Vd,a.Nb=a.Ne,rc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,rc(a.w,16))}function zd(a,b,c){a.Ob=b;N(a,b);!c&&a.i&&(a.ga()||od(a.i))}k.tc=function(){return 0}; k.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ja,this.eb]);a.set(2,Ac(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];rd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function Q(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Xd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Yd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Rc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Sc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.wa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function Yd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Zd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.ma=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Rc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Sc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);$d(this,this.wa);$d(this,this.u[7]);N(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; function ae(a){var b=be(a),c=be(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);N(a,b);Sc(a,c);a.I&=-17}function zc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Sb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=de(this,ce(this,a,3));this.L--;return a}; -k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Vd=function(a){return this.w.oa(ce(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; +function ce(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.ma(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=de(this,ce(this,a,3));this.L--;return a}; +k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ce(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ee(this,ce(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ce(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return fe(this,a,b,c)};k.Rc=function(a,b,c){return ce(this,fe(this,a,b,c),c)};k.Ac=function(a){return this.w.pa(a)};k.Vd=function(a){return this.w.pa(ce(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; k.Ne=function(a,b){this.w.ib(ce(this,a,4),b)};function ge(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=fe(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function he(a,b,c,d){a.C&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=fe(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ce(a,e|c&65536,4),a.v=a.N>>14&3,a.w.ib(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} -function ie(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.kb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.pa(d, +function ie(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function je(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]}function ke(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return fe(a,b,c,8)}function le(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?de(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ba(b,c,2)):a.u[c]} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ee(a,e,d.call(a,c,de(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ne(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ee(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function oe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c} +function T(a,b,c){c&&(N(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.kb=function(a){this.A.complete=!0;var b=this.i&&pe(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ca=this.b=a;do{if(b){if(this.i&&qe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.ma(168,28):this.I&64?this.ma(4,30):this.I&16&&this.ma(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.ma(d, 26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.N&16;this.decode(Dd(this))}while(0>1|b<<16;Yd(this,a);return a&65535}function we(a,b){a=b&2048|b>>1|b<<8;Yd(this,a<<8);return a&255}function xe(a,b){a=b&~a;Q(this,a);return a}function ye(a,b){a=b&~a;Q(this,a<<8);return a}function ze(a,b){a|=b;Q(this,a);return a}function Ae(a,b){a|=b;Q(this,a<<8);return a} function Be(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ce(a,b){a=~b|256;Fd(this,a<<8);return a&255}function De(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ee(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function Fe(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ge(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} @@ -142,35 +142,35 @@ function Se(a){var b=me(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760 function Te(a){var b=me(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Ue(a){T(this,a,!Ad(this))}function Ve(a){T(this,a,Ad(this))} function We(a){S(this,a,je(this,a),xe);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Xe(a){R(this,a,ie(this,a),ye);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ye(a){S(this,a,je(this,a),ze);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ze(a){R(this,a,ie(this,a),Ae);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} function $e(a){Q(this,je(this,a)&me(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function af(a){Q(this,(ie(this,a)&le(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function bf(a){T(this,a,Cd(this))}function cf(a){T(this,a,!this.Ta()==!Bd(this))}function df(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function ef(a){T(this,a,!Ad(this)&&!Cd(this))}function ff(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} -function gf(a){T(this,a,Ad(this)||Cd(this))}function hf(a){T(this,a,!this.Ta()!=!Bd(this))}function jf(a){T(this,a,this.Ta())}function kf(a){T(this,a,!Cd(this))}function lf(a){T(this,a,!this.Ta())}function mf(){this.pa(12,1);this.b-=5}function nf(a){T(this,a,!0)}function of(a){T(this,a,!Bd(this))}function pf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function gf(a){T(this,a,Ad(this)||Cd(this))}function hf(a){T(this,a,!this.Ta()!=!Bd(this))}function jf(a){T(this,a,this.Ta())}function kf(a){T(this,a,!Cd(this))}function lf(a){T(this,a,!this.Ta())}function mf(){this.ma(12,1);this.b-=5}function nf(a){T(this,a,!0)}function of(a){T(this,a,!Bd(this))}function pf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} function qf(a){var b=je(this,a);a=me(this,a);Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function rf(a){var b=ie(this,a)<<8;a=le(this,a)<<8;Zd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function sf(a){var b=me(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function tf(){this.pa(24,2);this.b-=25} -function uf(){this.N&49152?(this.fa|=128,this.pa(4,3)):this.i?vf(this.i):this.ga();this.b-=7}function wf(){this.pa(16,4);this.b-=25}var xf=[0,7,7,10,7,11,9,13];function yf(a){this.J=this.b;N(this,ke(this,a));this.b=this.J-xf[this.g]}var zf=[0,14,14,17,14,18,16,20];function Af(a){this.J=this.b;var b=ke(this,a);a=a>>6&7;$d(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-zf[this.g]}var Bf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Cf(a){var b=je(this,a);this.J=this.b;Q(this,oe(this,a,b));this.b=this.J-Bf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Df(a){var b=ie(this,a);Q(this,ne(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Ef=[7,13,13,17,14,18,17,21]; +function sf(a){var b=me(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.U=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.U=32768,this.T=65536,this.b-=7}function tf(){this.ma(24,2);this.b-=25} +function uf(){this.N&49152?(this.fa|=128,this.ma(4,3)):this.i?vf(this.i):this.ga();this.b-=7}function wf(){this.ma(16,4);this.b-=25}var xf=[0,7,7,10,7,11,9,13];function yf(a){this.J=this.b;N(this,ke(this,a));this.b=this.J-xf[this.g]}var zf=[0,14,14,17,14,18,16,20];function Af(a){this.J=this.b;var b=ke(this,a);a=a>>6&7;$d(this,this.u[a]);this.u[a]=this.u[7];N(this,b);this.b=this.J-zf[this.g]}var Bf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Cf(a){var b=je(this,a);this.J=this.b;Q(this,oe(this,a,b));this.b=this.J-Bf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Df(a){var b=ie(this,a);Q(this,ne(this,a,b,65535)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var Ef=[7,13,13,17,14,18,17,21]; function Ff(a){var b=me(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.aa=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)N(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Lf(a){S(this,a,je(this,a),Ne);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Mf(a){S(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}function Nf(){this.pa(28,5);this.b-=5}function Of(){this.I|=4;Ed(this,-2);this.b-=3}function Pf(a){S(this,a,je(this,a),Qe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=vf(b);b||this.pa(8,6)}function wd(a){Qf[a>>12].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} +function Mf(a){S(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}function Nf(){this.ma(28,5);this.b-=5}function Of(){this.I|=4;Ed(this,-2);this.b-=3}function Pf(a){S(this,a,je(this,a),Qe);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=vf(b);b||this.ma(8,6)}function wd(a){Qf[a>>12].call(this,a)}function Rf(a){Sf[a>>6&3].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)}function Vf(a){Wf[a>>6&3].call(this,a)} function Xf(a){Yf[a&15].call(this,a)}function Zf(a){$f[a&15].call(this,a)}function ag(a){bg[a>>6&3].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)}function eg(a){fg[a>>6&3].call(this,a)} var Qf=[function(a){gg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,V,function(a){hg[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],gg=[function(a){ig[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,V,V,V],Sf=[function(a){Fd(this,oe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,De);this.b-=this.g?9:3+(7==this.f?2:0)}],Uf=[function(a){S(this,a,0, He);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=me(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Wf=[function(a){S(this,a,0,Le);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,te);this.b-=this.g?9:3+(7==this.f?2:0)}], ig=[function(a){jg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,V,Xf,Zf,Mf,Mf,Mf,Mf],jg=[uf,Of,If,mf,wf,Hf,V,V,V,V,V,V,V,V,V,V],Yf=[Gf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.X=0;this.b-=5},U,U,U,U,U,U,U],$f=[Gf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.X=32768;this.b-=5},W,W,W,W,W,W,W],hg=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,V,V,V],bg=[function(a){Fd(this, -ne(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)}],dg=[function(a){R(this,a,0,Ie);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=le(this,a);Fd(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} +ne(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Ce);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ee);this.b-=this.g?9:3+(7==this.f?2:0)}],dg=[function(a){R(this,a,0,Ie);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,se);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=le(this,a);Fd(this,a<<8);this.b-=this.g?4:3+ +(7==this.f?2:0)}],fg=[function(a){R(this,a,0,Me);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,ue);this.b-=this.g?9:3+(7==this.f?2:0)}];function xd(a){kg[a>>12].call(this,a)} var kg=[function(a){lg[a>>8&15].call(this,a)},Cf,qf,$e,We,Ye,Re,function(a){mg[a>>8&15].call(this,a)},function(a){ng[a>>8&15].call(this,a)},Df,rf,af,Xe,Ze,Lf,V],lg=[function(a){og[a>>4&15].call(this,a)},nf,kf,bf,cf,hf,df,ff,Af,Af,Rf,Tf,Vf,function(a){pg[a>>6&3].call(this,a)},V,V],pg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);N(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ge(this,a,0);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J= -this.b;he(this,a,0,b);Q(this,b);this.b=this.J-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},V,V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag,cg,eg,function(a){rg[a>> -6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J=this.b;he(this,a,65536,b);Q(this,b);this.b=this.J-Ef[this.g]},V]; +this.b;he(this,a,0,b);Q(this,b);this.b=this.J-Ef[this.g]},function(a){Q(this,oe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],og=[function(a){qg[a&15].call(this,a)},V,V,V,yf,yf,yf,yf,Jf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Xf,Zf,Mf,Mf,Mf,Mf],qg=[uf,Of,If,mf,wf,Hf,function(){ae(this);this.b-=13},function(){this.ma(8,6)},V,V,V,V,V,V,V,V],mg=[Ff,Ff,sf,sf,Se,Se,Te,Te,Pf,Pf,V,V,V,V,Kf,Kf],ng=[lf,jf,ef,gf,of,pf,Ue,Ve,tf,Nf,ag, +cg,eg,function(a){rg[a>>6&3].call(this,a)},V,V],rg=[V,function(a){a=ge(this,a,65536);$d(this,a);Q(this,a);this.b-=11},function(a){var b=be(this);this.J=this.b;he(this,a,65536,b);Q(this,b);this.b=this.J-Ef[this.g]},V]; function sg(a){t.call(this,"ROM",a,sg);this.ha=this.g=null;this.C=a.addr;this.f=a.size;this.D=!1;this.v=a.alias;this.B=a.file;this.H=ra(this.B);if(this.B){a=this.B;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(mb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.B=null);tg(c)})}}z(sg);k=sg.prototype; k.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;tg(this)};k.Ha=function(){this.ha&&(this.i&&ug(this.i,this.id,this.C,this.f,this.ha),delete this.ha);return!0};k.Ga=function(){return!0}; function tg(a){if(!sb(a)){if(a.B){if(!a.g||!a.w)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)ub(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.C;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+kc){var c={};b=(c[b]=[sg.prototype.Jd,sg.prototype.Be,null,null,null,a.f>>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(uc(a.w,b,a.f,Zc)){for(c=0;c>>a.ka;0>>a.ka;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():zd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Mc(e.b,e.ja))});this.ma=Oc(52,4);this.$=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(e.b,e.ma)});Cb(b,this,Tg);H(this)}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;var e=this;this.ja=Oc(48,4);this.Y=Lc(this.b,function(){e.f&128||!e.C.length||(e.K=e.C.shift()&255,e.ca&&97<=e.K&&122>e.K&&(e.K-=32),e.f|=128,e.f&64&&Mc(e.b,e.ja))});this.na=Oc(52,4);this.$=Lc(this.b,function(){e.g|=128;e.g&64&&Mc(e.b,e.na)});Cb(b,this,Tg);H(this)}; k.xc=function(){if(!this.J){var a=ld(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; k.Ga=function(a){return a?this.save():!0};k.reset=function(){Ug(this)};k.save=function(){var a=new O(this);a.set(0,[]);return a.data()};k.restore=function(){return Ug(this)};function Ug(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;bb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";th(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){vh(this)};k.save=function(){return(new O(this)).data()}; k.restore=function(a){return vh(this,a[0])};function yh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ah(a,e,b,c,!1,d)}else zh(a,e)} -function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; +function Ah(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,zh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,nh(new jh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=function(a,b,c,d,e){var f;a.ec=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Pb=!1;a.dc&&(a.dc=!1,--this.H||H(this));th(this,a.gc)}; function xh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.ib(f,v|r<<8);if(Kc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.oa(f);if(Kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; -k.ye=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: +k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.pa(f);if(Kc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.ye=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: (g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Mc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; var Bh={},wh=(Bh[63744]=[null,null,M.prototype.Gd,M.prototype.ye,"RLCS"],Bh[63746]=[null,null,M.prototype.Ed,M.prototype.we,"RLBA"],Bh[63748]=[null,null,M.prototype.Hd,M.prototype.ze,"RLDA"],Bh[63750]=[null,null,M.prototype.Id,M.prototype.Ae,"RLMP"],Bh[63752]=[null,null,M.prototype.Fd,M.prototype.xe,"RLBE"],Bh);function Ch(a){t.call(this,"Debugger",a,Ch);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ch); var Dh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ch.prototype.uc=function(){return-1};Ch.prototype.vc=function(){}; @@ -238,28 +238,28 @@ Rh={61440:{4096:[62,4032,63],8192:[47,4032,63],12288:[18,4032,63],16384:[14,4032 33024:[23,4096],33280:[13,4096],33536:[21,4096],33792:[28,4096],34048:[29,4096],34304:[8,4096],34560:[9,4096],34816:[106,32768],35072:[107,32768]},65472:{64:[56,63],192:[95,63],2560:[39,63],2624:[49,63],2688:[53,63],2752:[51,63],2816:[67,63],2880:[1,63],2944:[77,63],3008:[97,63],3072:[73,63],3136:[71,63],3200:[6,63],3264:[4,63],3328:[58,24576],3392:[60,63],3456:[65,63],3520:[96,63],35328:[40,63],35392:[50,63],35456:[54,63],35520:[52,63],35584:[68,63],35648:[2,63],35712:[78,63],35776:[98,63],35840:[74, 63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Sh=[0],Th= [58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Lh.prototype; -k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.f=a.f;(a=ld(a,"messages"))&&Oh(this,a);this.wb=Rh;this.Pb=1145>this.b.pb?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ +k.Ea=function(a,b,c,d){this.w=b;this.B=a;this.b=c;this.f=a.f;(a=ld(a,"messages"))&&Oh(this,a);this.wb=Rh;this.Ob=1145>this.b.pb?Th:[];Uh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Vh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.ka;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=yc[c],n&&d.j(p(n.id,8)+" %"+ p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;dd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.vc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=Rc(this.b):21==a&&this.f&&hc(this.f)&&(b=this.f.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,td(a),a.ua=0,a.qa()))};function Nh(a){var b;if(!pe(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?bi(a):ci(a)}}function ai(a,b){var c;(c=!a.b||!sb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!tb(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Nh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.Z=!1;di(this);a||od(this)};k.save=function(){var a=new O(this);a.set(0,Xh(this.L));a.set(1,Xh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Yh(a[b++]),this.P=Yh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; -k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function vf(a){var b=a.b;if(b.A.Z)throw N(b,a.b.Kb),a.ga(),-1;return!1} function Mh(a){var b,c;a.g=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.tb=0}k.nb=function(a,b,c){var d=!0;c||ei(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(fi(this,a,a.length-1,"set"),Nh(this)));return d}; function ei(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Nh(a);break}}return f}function gi(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=$h(y);break;case 8:x="@"+$h(y);break;case 16:7>y?x="("+$h(y)+")+":(A=w.oa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+$h(y)+")+":(A=w.oa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+$h(y)+")";break;case 40:x="@-("+$h(y)+")";break;case 48:A=w.oa(r,2);x=J(w,A,0,!0)+"("+$h(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.oa(r,2),x="@"+J(w,A)+"("+$h(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=$h(y);break;case 8:x="@"+$h(y);break;case 16:7>y?x="("+$h(y)+")+":(A=w.pa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+$h(y)+")+":(A=w.pa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+$h(y)+")";break;case 40:x="@-("+$h(y)+")";break;case 48:A=w.pa(r,2);x=J(w,A,0,!0)+"("+$h(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.pa(r,2),x="@"+J(w,A)+"("+$h(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=$h(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,Rc(d)):21==b&&a.f&&hc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function li(a){var b,c="";for(b=0;6>b;b++)c+=ki(a,b);c=c+"\n"+(ki(a,6)+ki(a,7));c+=ki(a,20)+ki(a,21);return c+=ji(a,"T")+ji(a,"N")+ji(a,"Z")+ji(a,"V")+ji(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function mi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eh[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=ii(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} function hi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(sb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Id=[];"call"==Bg&&(Jb=1E5,Id=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.vb=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.vb=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Jd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Yb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.oa,Md=a.ib):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Od);if(Fc)for(var Gc=2;Gcma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Id=[];"call"==Bg&&(Jb=1E5,Id=["CALL"]);for(void 0!==Ag&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.vb=Z;Dg++;Jb--}}Dg||(a.j("no "+Cg+"history available"),a.vb=void 0)}else{var Lb=Vh(a,la);if(Lb){var Bc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ki),Bc=Ih(a,La)>>>0,65536>4||1,Nb="";Mi--&&0Ec?String.fromCharCode(Ec):"."}Nb&&(Nb+="\n");Nb+=la+" "+Jd+(0==Ob?" "+Gg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Kd,Ld,Md,Nd=g[0],Od=g[1];"eb"==Nd?(kb=1,Kd=255,Ld=a.Gb,Md=a.Xb):"e"==Nd||"ew"==Nd?(kb=2,Kd=65535,Ld=a.pa,Md=a.ib):Od=null;if(null==Od)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Fc=Vh(a,Od);if(Fc)for(var Gc=2;GcRd;){for(var Ma=null,Pi=256;65536>Sb.F>>>0;){Sd.F=a.oa(Sb,2);if(null==Sb.F||!Pi--)break;if(!(Sd.F&1)){for(var Qi=a,Hc=Sd,Ig=null,Tb=Hc.F,Jg=Tb,Td=1;6>=Td&&Tb;Td++){if(2Rd;){for(var Ma=null,Pi=256;65536>Sb.F>>>0;){Sd.F=a.pa(Sb,2);if(null==Sb.F||!Pi--)break;if(!(Sd.F&1)){for(var Qi=a,Hc=Sd,Ig=null,Tb=Hc.F,Jg=Tb,Td=1;6>=Td&&Tb;Td++){if(2>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X= function v(){return"http://"+(window?window.location.host:"www.pcjs.org")}function t(a){window&&window.alert(a)}function ua(a){var b=!1;window&&(b=window.confirm(a));return b}var va=null;function wa(){if(null==va){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}va=a}return va} function xa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function za(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Aa(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Ba={init:[],show:[],exit:[]},Ca=!1,Da=!1,Ea=!0; function Fa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ga(a){Ba.init.push(a)}function Ha(a){if(Ea)try{for(var b=0;bb?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; +Fa(Aa("Opera")||Aa("iOS")?"onunload":"onbeforeunload",function(){Ha(Ba.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Lb=b.comment;this.kc=b;b=this.id.indexOf(".");0>b?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.c["S"+a]=[0,0,!1,!1,this.tc,a]}z(Ya);var Za=7;function $a(a,b){return a.c[b]&&a.c[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.j&&this.j.$(a,b,c,d)||this.a&&this.a.$(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.m)ib(a,c,null!=b?b:a.m[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.c)jb(a,b,a.c[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.g||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} function ab(a,b){var c=a.c[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}function bb(a,b){var c=a.c[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.rc=function(a){a||this.a.l.U||(this.g.reset(),lb(this.a),$a(this,"ENABLE")&&mb(this.a))};h.sc=function(){};h.nc=function(a){a||G(this.a)}; -h.lc=function(a){if(!a&&!this.a.l.U)if($a(this,"ENABLE"))mb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.qb=!0),b=!a.l.Fa;if(b)Ua(a,!0),a.nb(0),Ua(a,!1);else try{var c=this.a.nb(1);0a;a++)this.c["S"+a][1]=0&1<a;a++)this.c["S"+a][1]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.g.ia;$a(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;sb(a,"A",a.b,22)}function rb(a,b){a.i=b&65535;sb(a,"D",a.i,16);return a.i}function tb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function sb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.g=Array(this.A);for(b=0;b>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.qb=0;this.w=[];this.bc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} function xb(a,b,c){var d=!1,e=this.controller,f=e.ya[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.ya[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} function zb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.ob+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d!=Ib||a.gb||(a.gb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} -function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.lb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; -h.Ya=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.g[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; +function Fb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.nb+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.qb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.kb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; +h.Ya=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.g[(b&a.ia)>>>a.c].ob(b&a.j,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; function Ob(a){for(var b=0,c=[],d=0;da.a.Wa)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>1&7]};h.Td=function(a,b){b=b>>1&7;this.a. h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Ma=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.h[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.h[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.h[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.h[6]=a};h.Pc=function(){return this.a.h[7]};h.Id=function(a){this.a.h[7]=a}; h.Na=function(a){a&=7;return this.a.B&2048?this.a.h[a]:this.a.Ha[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.h[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.g.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.g.qb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; h.bd=function(a){return a?this.a.Da&65280:0};h.Vd=function(a){this.a.Da=a|255};h.Lc=function(){return Yb(this.a)};h.Ed=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; var M={},Wb=(M[61568]=[null,null,L.prototype.hd,L.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.ad,L.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.Zc,L.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.$c,L.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.Yc,L.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Bc,L.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.zc,L.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Ac, L.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.yc,L.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Hc,L.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Cc,L.prototype.xd,"LKS"],M[65402]=[null,null,L.prototype.Ec,L.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,L.prototype.gd,L.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.ed, @@ -89,41 +89,41 @@ L.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.fd,L.prototype.Zd L.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Nc,L.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Oc,L.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.wc,L.prototype.rd,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.cd,L.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.vc,L.prototype.qd,"CPUERR",1,1170],M[65528]= [null,null,L.prototype.Dc,L.prototype.yd,"MB",1,1170],M[65530]=[null,null,L.prototype.Ic,L.prototype.Bd,"PIR"],M[65532]=[null,null,L.prototype.bd,L.prototype.Vd,"SL"],M[65534]=[null,null,L.prototype.Lc,L.prototype.Ed,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:jc);else{a=this.a=Array(this.size>> +function I(a,b,c,d,e,f){this.g=a;this.id=dc+=2;this.a=null;this.Ka=b;this.nb=c;this.size=d||0;this.type=e||ec;this.j=e==fc;this.controller=null;Ab(this);this.ta=this.gc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],gc(this,f.bc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:jc);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&J(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&J(this.g,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.g,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.g, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.ob=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} var oc=[],kc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],mc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Xa)var jc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],hc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; +function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.gb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; h.ha=function(a,b,c,d){this.j=a;this.g=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=uc(a)&&(a.Qa=a.Ra=-1,tc(a),G(a),c=!0);c&&a.T(uc(a)+" cycles: checksum="+m(a.cb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;c=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=uc(a)&&(a.Qa=a.Ra=-1,tc(a),G(a),c=!0);c&&a.T(uc(a)+" cycles: checksum="+m(a.cb))}} +h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&xc(a.j)}ob(a,a.aa);a.aa=0;a.R=ra();a.oa=0;wc(a)}function Rb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Tb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+yc(a))}function nb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} function yc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.md=function(){if(this.l.U){this.wb>=this.fb&&wc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ta+=b;this.aa+=b;pb(this,b);nb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; -function mb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{vc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,uc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){yc(a);ob(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),uc(a));b=!0}a.l.complete=void 0;return b} +h.md=function(){if(this.l.U){this.wb>=this.fb&&wc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.gb?1:this.hb,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.mb(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ta+=b;this.aa+=b;pb(this,b);nb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.hb;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); +this.j&&this.j.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.hb));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,vc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function mb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{vc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,uc(a));setTimeout(a.Qb,0)}}h.mb=function(){return 0};function G(a){var b=!1;if(a.l.U){yc(a);ob(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),uc(a));b=!0}a.l.complete=void 0;return b} function zc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Wa?Ac.bind(this):Bc.bind(this);Cc(this);this.ra=0;this.N=null;this.l.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Cc(this);sc(this);this.l.error=!1;this.parent.reset.call(this)}; function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.h=[0,0,0,0,0,0,0,a.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;lb(a)}function lb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Xb(a)}function Xb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.pb=a.be,Cb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Cb(a.g,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;lb(a)}function lb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Xb(a)}function Xb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.ob=a.be,Cb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.ob=a.ac,Cb(a.g,16))}function Dc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Ob(this.g));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];vc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.ma[c]=a.h[6],a.h[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Gc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Ic(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Jc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} function K(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Zb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.h[6]=4);Kc(a,a.Ja);Kc(a,a.h[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Lc(a){var b=Mc(a),c=Mc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Zb(a,c);a.u&=-17} function Lb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} function Nc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.H[a.v][d]=e;if(4194170!==f||a.v)a.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Mc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Kc(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Mc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Kc(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.h[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.h[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.h[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ra++;a=this.Ub(Nc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Oc(this,Nc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Nc(this,a,4),b),this.ra--):this.g.mb(a,b)};h.hc=function(a,b,c){return Pc(this,a,b,c)};h.ic=function(a,b,c){return Nc(this,Pc(this,a,b,c),c)};h.Ub=function(a){return Mb(this.g,a)};h.jd=function(a){return Mb(this.g,Nc(this,a,2))};h.ac=function(a,b){Nb(this.g,a,b&65535)};h.be=function(a,b){Nb(this.g,Nc(this,a,4),b)}; +8;break;case 6:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Fc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.kb=function(a){if(!this.Ba)return this.g.kb(a);this.ra++;a=this.Ub(Nc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Oc(this,Nc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.lb=function(a,b){this.Ba?(this.ra++,this.ac(Nc(this,a,4),b),this.ra--):this.g.lb(a,b)};h.hc=function(a,b,c){return Pc(this,a,b,c)};h.ic=function(a,b,c){return Nc(this,Pc(this,a,b,c),c)};h.Ub=function(a){return Mb(this.g,a)};h.jd=function(a){return Mb(this.g,Nc(this,a,2))};h.ac=function(a,b){Nb(this.g,a,b&65535)};h.be=function(a,b){Nb(this.g,Nc(this,a,4),b)}; function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.ma[a.B>>12&3];return c}function Rc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Pc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Nc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.ma[a.B>>12&3]=d} function Sc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Tc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.g,a.J(b,c,2)):a.h[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)}function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.g,a.J(b,c,2)):a.h[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Oc(a,e,d.call(a,c,Kb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Nb(a.g,e,d.call(a,c,Mb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.J(b,e,5),c):a.h[e]=c?d&1?c<<24>>24&65535:a.h[e]&-256|c&255:a.h[e]&-256;return c} -function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c}function V(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Oc(a,e,d.call(a,c,Kb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Nb(a.g,e,d.call(a,c,Mb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Oc(a,a.J(b,e,5),c):a.h[e]=c?a.h[e]&~d|c<<24>>24&d:a.h[e]&~d;return c}function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c} +function V(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.mb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Fc(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Ec(this))}while(0>1|b<<16;Ic(this,a);return a&65535}function dd(a,b){a=b&2048|b>>1|b<<8;Ic(this,a<<8);return a&255}function ed(a,b){a=b&~a;R(this,a);return a}function fd(a,b){a=b&~a;R(this,a<<8);return a}function gd(a,b){a|=b;R(this,a);return a}function hd(a,b){a|=b;R(this,a<<8);return a}function id(a,b){a=~b|65536;Gc(this,a);return a&65535}function jd(a,b){a=~b|256;Gc(this,a<<8);return a&255} function kd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function ld(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function md(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function nd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function od(a,b){a=-b;Gc(this,a,a&b&32768);return a&65535}function pd(a,b){a=-b;Gc(this,a<<8,(a&b&128)<<8);return a&255} @@ -136,7 +136,7 @@ function Nd(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}functio function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Xd(a){var b=Tc(this,a);a=Wc(this,a);Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Yd(a){var b=Sc(this,a)<<8;a=Vc(this,a)<<8;Jc(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} function Zd(a){var b=Wc(this,a);if(b){a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.h[a]=d&65535,this.h[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.h[a]&&(this.h[a]=this.h[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function $d(){K(this,24,2);this.a-=25} function ae(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function be(){K(this,16,4);this.a-=25}var ce=[0,7,7,10,7,11,9,13];function de(a){this.F=this.a;O(this,Uc(this,a));this.a=this.F-ce[this.c]}var ee=[0,14,14,17,14,18,16,20];function fe(a){this.F=this.a;var b=Uc(this,a);a=a>>6&7;Kc(this,this.h[a]);this.h[a]=this.h[7];O(this,b);this.a=this.F-ee[this.c]}var ge=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function he(a){var b=Tc(this,a);this.F=this.a;R(this,Yc(this,a,b));this.a=this.F-ge[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; +function he(a){var b=Tc(this,a);this.F=this.a;R(this,Yc(this,a,b));this.a=this.F-ge[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,65535)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; function ke(a){var b=Wc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.h[a];c&32768&&(c|=-65536);b=~~(b*c);this.h[a]=b>>16&65535;this.h[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.h[b]=this.h[b]-1&65535)O(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function qe(a){T(this,a,Tc(this,a),ud);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} function re(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)}function se(){K(this,28,5);this.a-=5}function te(){this.u|=4;Fc(this,-2);this.a-=3}function ue(a){T(this,a,Tc(this,a),xd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function Ac(a){ve[a>>12].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)}function Ce(a){De[a&15].call(this,a)}function Ee(a){Fe[a&15].call(this,a)} @@ -144,11 +144,11 @@ function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}fu var ve=[function(a){Me[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,Y,function(a){Ne[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,Y,Y,Y],xe=[function(a){Gc(this,Yc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0, od);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Wc(this,a);Gc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Be=[function(a){T(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)}], Pe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,Y,Ce,Ee,re,re,re,re],Qe=[ae,te,ne,Td,be,me,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],De=[le,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Fe=[le,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ne=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,Y,Y,Y],He=[function(a){Gc(this, -Xc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)}],Je=[function(a){S(this,a,0,pd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Gc(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} +Xc(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)}],Je=[function(a){S(this,a,0,pd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Gc(this,a<<8);this.a-=this.c?4:3+(7== +this.b?2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} var Re=[function(a){Se[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Se=[function(a){Ve[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,function(a){We[a>>6&3].call(this,a)},Y,Y],We=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Qc(this,a,0);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F= -this.a;Rc(this,a,0,b);R(this,b);this.a=this.F-je[this.c]},function(a){R(this,Yc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Lc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,function(a){Ye[a>>6& -3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.F-je[this.c]},Y]; +this.a;Rc(this,a,0,b);R(this,b);this.a=this.F-je[this.c]},function(a){R(this,Yc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Lc(this);this.a-=13},function(){K(this,8,6)},Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie, +Ke,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Kc(this,a);R(this,a);this.a-=11},function(a){var b=Mc(this);this.F=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.F-je[this.c]},Y]; function Ze(a){x.call(this,"ROM",a,Ze);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.j=a.file;this.s=q(this.j);if(this.j){a=this.j;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(Ra(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.j=null);$e(c)})}}z(Ze);h=Ze.prototype; h.ha=function(a,b,c,d){this.g=b;this.a=c;this.D=d;$e(this)};h.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ja=function(){return!0}; function $e(a){if(!Va(a)){if(a.j){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[Ze.prototype.Xc,Ze.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Fb(a.g,b,a.b,fc)){for(c=0;cb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Hf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Jf(this)};h.save=function(){return(new P(this)).data()}; h.restore=function(a){return Jf(this,a[0])};function Mf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Of(a,e,b,c,!1,d)}else Nf(a,e)} -function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&xc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Hf(this,a.xb)}; +function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.ib=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&xc(this.j)):a.ib=!1;a.sb&&(a.sb=!1,--this.s||F(this));Hf(this,a.xb)}; function Lf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; h.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Nb(this.g,f,u|w<<8);if(Qb(this.g)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; h.sd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var u=Mb(this.g,f);if(Qb(this.g)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; -h.Nd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& +h.Nd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.V||f>=c.S?this.L|=37888:(g=(this.w& 63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Pf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Pf[63748]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Pf[63750]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Pf[63752]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Pf); function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.l.O=!1;Rf(this,b);this.A=rc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Sf;this.v=null;this.m=this.I=!1;this.P=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.g=new vb({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ta("Panel",this.id))&&this.f.Va)for(b=0;b