From 1c3c9c985641f9dc35ec2270cf3a86fae5d60dcf Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 18 Mar 2017 17:12:54 -0700 Subject: [PATCH] Added various MACRO-10 expression improvements --- .editorconfig | 2 +- apps/pdp10/tests/MACTEST.MAC.txt | 27 + .../tests/{optest-v01.json => OPTEST01.json} | 0 .../tests/{optest-v01.simh => OPTEST01.simh} | 0 apps/pdp10/tests/README.md | 6 +- .../machine/ka10/test/debugger/README.md | 1 + .../machine/ka10/test/debugger/machine.xml | 2 +- devices/pdp10/machine/ka10/test/machine.xml | 2 +- docs/pcx86/examples/pcx86-dbg.js | 46 +- modules/pdp10/lib/debugger.js | 2 +- modules/pdp10/lib/macro10.js | 261 +++++----- modules/shared/lib/debugger.js | 89 ++-- versions/pc8080/1.34.2/pc8080-dbg.js | 42 +- versions/pcx86/1.34.2/pcx86-dbg.js | 46 +- versions/pdpjs/1.34.2/pdp10-dbg.js | 484 +++++++++--------- versions/pdpjs/1.34.2/pdp11-dbg.js | 39 +- 16 files changed, 561 insertions(+), 488 deletions(-) create mode 100644 apps/pdp10/tests/MACTEST.MAC.txt rename apps/pdp10/tests/{optest-v01.json => OPTEST01.json} (100%) rename apps/pdp10/tests/{optest-v01.simh => OPTEST01.simh} (100%) diff --git a/.editorconfig b/.editorconfig index b3aafa914..ae9c1bbd2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ indent_style = space indent_size = 8 trim_trailing_whitespace = true -[*.{ASM,INC,MAC,NASM,LST,asm,inc,mac,nasm,lst,d80}] +[*.{ASM,INC,LST,MAC,NASM,asm,inc,lst,mac,nasm,d80,ASM.txt,INC.txt,LST.txt,MAC.txt,NASM.txt}] indent_style = tab indent_size = 8 trim_trailing_whitespace = true diff --git a/apps/pdp10/tests/MACTEST.MAC.txt b/apps/pdp10/tests/MACTEST.MAC.txt new file mode 100644 index 000000000..8aa0d1455 --- /dev/null +++ b/apps/pdp10/tests/MACTEST.MAC.txt @@ -0,0 +1,27 @@ + TITLE STORE TEXT CHARACTER BY CHARACTER + SUBTTL %1 5-APR-72 + + DEFINE TEXT (C)< + N==0 ;;INITIAL CONDITION + IRPC C, ;;COUNT CHARACTERS + CODE (N,C) ;;CALL MACRO TO STORE TEXT + > ;END OF TEXT MACRO + + DEFINE CODE (N,C)< + ZZ==N ;;INITIAL CONDITION + IRPC C,< + IFN ZZ&777B8,< + EXP ZZ ;;WORD FULL + ZZ==0> ;;START AGAIN WITH 0 + ZZ=ZZ+9+"C"> ;;END OF IRPC + IFN ZZ, ;;IF NOT LEFT JUSTIFIED + ZZ=ZZ+9 ;;MOVE LEFT 9 BITS + SHIFT> ;;RECURSE + > ;;END OF DEFINE + SHIFT ;;START MOVING LEFT + EXP ZZ> ;;END OF IFN ZZ + > ;END OF CODE MACRO + + TEXT (ABCDEFGHIJKL) + END diff --git a/apps/pdp10/tests/optest-v01.json b/apps/pdp10/tests/OPTEST01.json similarity index 100% rename from apps/pdp10/tests/optest-v01.json rename to apps/pdp10/tests/OPTEST01.json diff --git a/apps/pdp10/tests/optest-v01.simh b/apps/pdp10/tests/OPTEST01.simh similarity index 100% rename from apps/pdp10/tests/optest-v01.simh rename to apps/pdp10/tests/OPTEST01.simh diff --git a/apps/pdp10/tests/README.md b/apps/pdp10/tests/README.md index b11916dfd..9705ed697 100644 --- a/apps/pdp10/tests/README.md +++ b/apps/pdp10/tests/README.md @@ -14,14 +14,14 @@ DEC PDP-10 Opcode Tests The PDP-10 machine below loads the following test: -- [PDP-10 Half-Word Opcode Test](optest-v01.json) +- [PDP-10 Half-Word Opcode Test](OPTEST01.json) Details on how to run and modify the test, and perform similar tests in [SIMH](https://github.com/simh/simh), are provided below. {% include machine.html id="testka10" %} -The [PDP-10 Half-Word Opcode Test](optest-v01.json) file specifies that the following words: +The [PDP-10 Half-Word Opcode Test](OPTEST01.json) file specifies that the following words: 0o505040111111, // HRLI 1,111111 0o541040444444, // HRRI 1,444444 @@ -34,7 +34,7 @@ comments display the instructions that correspond to each word. If you want to alter or add new instructions, the PDP-10 Debugger now includes a rudimentary assembler. Using the `a` command, along with an optional start address, you can enter "assembler mode". For example, here's how the first four instructions from -the [PDP-10 Half-Word Opcode Test](optest-v01.json) could be entered by hand: +the [PDP-10 Half-Word Opcode Test](OPTEST01.json) could be entered by hand: >> a 100 begin assemble at 000100 diff --git a/devices/pdp10/machine/ka10/test/debugger/README.md b/devices/pdp10/machine/ka10/test/debugger/README.md index 4af850265..5e2794f05 100644 --- a/devices/pdp10/machine/ka10/test/debugger/README.md +++ b/devices/pdp10/machine/ka10/test/debugger/README.md @@ -6,6 +6,7 @@ machines: - id: testka10 type: pdp10 debugger: true + commands: a 100 /apps/pdp10/tests/MACTEST.MAC --- PDP-10 Test Machine with Debugger diff --git a/devices/pdp10/machine/ka10/test/debugger/machine.xml b/devices/pdp10/machine/ka10/test/debugger/machine.xml index bb1e191e3..6eb266c0b 100644 --- a/devices/pdp10/machine/ka10/test/debugger/machine.xml +++ b/devices/pdp10/machine/ka10/test/debugger/machine.xml @@ -4,7 +4,7 @@ PDP-10 (Model KA10) with Debugger - + diff --git a/devices/pdp10/machine/ka10/test/machine.xml b/devices/pdp10/machine/ka10/test/machine.xml index 1e03d53db..516450b32 100644 --- a/devices/pdp10/machine/ka10/test/machine.xml +++ b/devices/pdp10/machine/ka10/test/machine.xml @@ -4,7 +4,7 @@ PDP-10 Test Machine - + diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index b06c081a9..89415a6d7 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -427,8 +427,8 @@ r(b.od)+" IRR="+r(b.ac)+" ISR="+r(b.Ec)+" DELAY="+b.We;e.ba.P(c)}});Al(d,2048,fu l.Xb=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Wb=function(a){return a?this.save():!0}; l.reset=function(a){var b;Fl(this);this.F=Array(this.za);for(b=0;b=eh){this.D=Nl;this.L=0;this.K=Ol;this.oa=0;this.M=Pl|Ql;512<=Rl(this)&&(this.M|=Sl);+Tl(this,hl,void 0)==Ul&&(this.M|=Vl);(this.ca|0)==xl&&(this.M=this.M|Wl|Xl);this.qa= Yl|Zl;this.Y=Array(8);this.V=0;a&&(this.A=Array(Cl));$l(this,this.Ma);for(a=am;a<=bm;a++)this.A[a]=0;for(a=cm;ac?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} +function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[Hm]=0;a.A[Im]=c.getDay()+1;a.A[Jm]=c.getDate();a.A[Km]=c.getMonth()+1;b=c.getFullYear();a.A[Lm]=b%100;b/=100;a.A[Mm]=b%10|b/10<<4;a.A[Nm]=38;a.A[Rd]=Om;a.A[Pm]=0;a.A[Dl]=Qm;a.ma=a.Z=0;a.Ha=a.Aa=null} +function El(a,b){var c=a.A[b];if(bc?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} l.save=function(){var a=new Xf(this);a.set(0,[this.C]);for(var b=[],c=0;c=eh&&(a.set(5,[this.D,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.Y[7],this.Y,this.V,this.A,this.ma,this.Z]));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);Fl(this);b=a[1];for(c=0;c=c;c++)if(d&Co<=c;c++)d&Co<>=Ho;var f=d&Io,g=d&Jo;d&=Ko;if(d==Lo)Go(a,e+c);else{e+=c;var h=a.G[e];h.Qf=d;h.mode=g;h.Zg=f;h.pc=[0,0];h.qb=[0,0];h.je=[0,0];h.gd=!1;h.Me=!1;h.le=!1;h.Qe=!1;oo(a,e);b==so&&c==to&&fh(a,uo);b==so&&c==wo&&255==a.hc[0].od&& a.J==(Mo|No|Oo|Po)&&(b=a.G[0],b.Mc[0]=b.pc[0],b.Mc[1]=b.pc[1],b.jd=Ed(a.H,a.O))}}}function vo(a,b){a=a.G[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.ad?256:65536);return b}function Pd(a,b){a=a.G[b];(b=a.Mc[1]<<8|a.Mc[0])||(b=1==a.ad?256:65536);return b}function Go(a,b){Bl(a,b);var c=a.G[b];c.je[0]=c.qb[0];c.je[1]=c.qb[1];c.Me=!0;oo(a,b)}function oo(a,b){a=a.G[b];a.rd=a.Qf==Qo?1:0;a.ad=a.Qf==Ro?2:1} function Bl(a,b,c){var d=a.G[b];if(d.le&&(b!=wo||a.J&Mo)){var e=Ed(a.H,a.O),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=vo(a,b),h=Pd(a,b)-f;d.mode==qo?(0>=h&&(h=0),h||(d.gd=!0,d.le=!1,b||hh(a,uo))):d.mode==So?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo))):d.mode==Qd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo)));d.qb[0]=h&255;d.qb[1]=h>>8&255;c&&(a.jd=0)}return d} -function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[Gm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[Gm]))){a.A[Gm]=0;a.A[Im]=a.A[Im]% +function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[Im]=a.A[Im]% 7+1;var f;f=a.A[Lm];var g=Ja[a.A[Km]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Jm]>f&&(a.A[Jm]=1,12<++a.A[Km]&&(a.A[Km]=1,a.A[Lm]=(a.A[Lm]+1)%100))}a.A[Pm]|=Zo;a.A[Rd]&$o&&(a.A[Pm]|=Uo,hh(a,Vo))}a.ma=c-d%b}}l.Gm=function(a,b){var c=this.xa;this.ga&ap&&(this.J&bp?c=this.C[0][1]:this.B&&(c=cp(this.B)));w(this,a,null,b,"PPI_A",c);return c};l.jo=function(a,b,c){w(this,a,b,c,"PPI_A");this.xa=b};l.Hm=function(a,b){var c=this.J;w(this,a,null,b,"PPI_B",c);return c}; l.ko=function(a,b,c){w(this,a,b,c,"PPI_B");dp(this,b)};function dp(a,b){var c=!!(b&ep),d=!!(a.J&ep);a.J=b;a.B&&fp(a.B,!(b&bp),!!(b&Po));c!=d&&Vm(a,c)}l.Im=function(a,b){var c=0,c=(this.ca|0)==kl?this.J&No?c|this.C[1][1]&gp:c|this.C[1][1]>>4&1:this.J&hp?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.J&Mo&&Bl(this,wo).gd&&(c=this.J&ep?c|ip:c|jp);w(this,a,null,b,"PPI_C",c,32896);return c};l.lo=function(a,b,c){w(this,a,b,c,"PPI_C");this.Ca=b};l.Jm=function(a,b){var c=this.ga;w(this,a,null,b,"PPI_CTRL",c);return c}; l.mo=function(a,b,c){w(this,a,b,c,"PPI_CTRL");this.ga=b};l.Sl=function(a,b){var c=this.B?cp(this.B):0;w(this,a,null,b,"8041_KBD",c);this.aa&=~kp;return c};l.tn=function(a,b,c){w(this,a,b,c,"8041_KBD")};l.Rl=function(a,b){var c=this.J;w(this,a,null,b,"8041_CTRL",c);return c};l.sn=function(a,b,c){w(this,a,b,c,"8041_CTRL");dp(this,b)};l.Tl=function(a,b){var c=this.aa;w(this,a,null,b,"8041_STATUS",c);return c}; @@ -466,7 +466,7 @@ l.Vl=function(a,b){var c=this.J&~(zp|Ap)|(Ed(this.H)&64?Ap:0);w(this,a,null,b,"8 l.un=function(a,b,c){w(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=np;a=0;this.L>=Bp&&(a=this.L^15,this.L=Bp);switch(this.L){case Cp:yp(this,this.K);break;case Dp:pp(this,this.K|Ol);break;case Ep:pp(this,this.K&~Ol);this.B&&mp(this.B);break;case Fp:this.B&&(a=this.B,a.A=[],t(a)&&Mb(a,"scan codes flushed"));pp(this,this.K|Ol);yp(this,Gp);rp(this,Yl|Zl);break;case Hp:yp(this,Ip);break;case Jp:yp(this,this.M);break;case Kp:yp(this,this.qa);break;case Lp:yp(this,this.K&Ol?0:Mp);break;case Bp:a& 1&&kf(this.H)}};function pp(a,b){a.K=b;a.D=a.D&~Np|b&Op;a.B&&fp(a.B,!!(b&Pp),!(b&Ol))}function yp(a,b,c){0<=b&&(a.oa=b,c?a.D|=kp:(a.D&=~kp,a.D|=lp))}function rp(a,b){a.qa=b;oc(a.ka,!!(b&Zl));b&Yl||kf(a.H)}function Qp(a,b){a.ca>4)+(c&15),e=!0);if(d==Gm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; +l.Ln=function(a,b,c){var d=this.V&Wp;t(this,4352)&&w(this,a,b,c,"CMOS.DATA["+r(d)+"]",null,!0);a=b^this.A[d];if(d<=Dl){if(c=b,d>4)+(c&15),e=!0);if(d==pm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; l.Xm=function(a){if(t(this,16)&&Wk(this.ba,26,a)){var b=this.H.D>>8;Tf(this.H,a,function(a,d){return function(c){d=Ed(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ta(h)+" CL(min)="+r(g)+" DH(sec)="+r(m);else if(4==b||5==b)e=" CX(year)="+ta(a.H.I)+" DH(month)="+r(m)+" DL(day)="+r(k);g=a.ba;h=d;g.message("INT "+r(26)+": C="+(dg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Ed(this.H)))}return!0}; function Vm(a,b){if(a.la)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ea.wb);var c=Math.round(ol/vo(a,wo));if(20>c||2E4this.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.da?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(Ca(a.substring(d,f))),d=f+1}}return b}; -function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Yx(a,b,c){for(c=void 0===c?-1:c;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=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Xx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Xx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} -var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(0>e&&(b="-"+b,e=0),f=oa(b,a.L))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),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=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ @@ -804,23 +804,23 @@ Py(a,g[1],!0);if(v)if(a.aa=v,void 0===g[2])a.P("begin assemble at "+Fy(v)),a.da= a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var T=K.charAt(1);if("l"==T){var L;L=0+Vz(a,a.B);L+=Vz(a,a.Z);(L+=Vz(a,a.N))||a.P("no breakpoints")}else if("n"==T)a.xa=$x(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ua={};if("*"!=H&&(ua=Py(a,H,!0,!0),!ua))break a;H=null==ua.Ja?H:ta(ua.Ja);"c"==T?null==ua.Ja?(iy(a),a.P("all breakpoints cleared")):Ey(a, a.B,ua)||Ey(a,a.Z,ua)||Ey(a,a.N,ua)||a.P("breakpoint missing: "+Fy(ua)):"i"==T?a.P("breakpoint "+(Nc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (input)"):"o"==T?a.P("breakpoint "+(Rc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (output)"):null!=ua.Ja&&(Sy(a,ua,I),"p"==T?a.Gd(a.B,ua):"r"==T?a.Gd(a.Z,ua):"w"==T?a.Gd(a.N,ua):a.P("unknown breakpoint command: "+T))}}}break;case "c":$A(a);break;case "d":a:{var ca=g,xb,za=ca[0],cb=ca[1],Sa=ca[2],rb=ca[3];if("?"==cb){var db="";for(xb in Sb)a.Ba[xb]&& (db&&(db+=","),db+=xb);db+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");db.length&&a.P("dump extension commands:\n\t"+db)}else if("state"==cb){var rc=iB(a.pa,!0);rc?"console"==Sa?console.log(rc): -($A(a),a.P(rc)):a.P("powerOff() error")}else if("symbols"==cb)for(var ib=0;ib>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==xt&&(Pg=1E5,rm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= 1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0Am;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0} asURLs + * @property {Array.} asLines */ class Macro10 { /** @@ -138,8 +142,8 @@ class Macro10 { * the LITERAL blocks in tblMacros and process the associated statement(s) at that time. * * Macros have the name that was assigned to them, REPEAT and conditional blocks have generated names - * that match the pseudo-op (eg, "_REPEAT", "_IFE"), and LITERAL blocks have generated location-based - * names. All generated names use a leading underscore ('_') so that they don't conflict with + * that match the pseudo-op (eg, "?REPEAT", "?IFE"), and LITERAL blocks have generated location-based + * names. All generated names use a leading question mark ('?') so that they don't conflict with * normal MACRO-10 labels. */ @@ -194,7 +198,11 @@ class Macro10 { */ this.sASCII = ""; - this.sText = ""; + /** + * @type {Array.} + */ + this.asLines = []; + this.iURL = 0; this.asURLs = sURL.split(';'); @@ -209,7 +217,7 @@ class Macro10 { loadNextResource() { if (this.iURL == this.asURLs.length) { - this.done(this.parseFile()); + this.done(this.parseResources()); return; } @@ -243,8 +251,9 @@ class Macro10 { match = sText.match(/&[a-z]+;/i); if (match) macro10.warning("unrecognized HTML entity: " + match[0]); } - if (macro10.sText) macro10.sText += '\n'; - macro10.sText += sText; + + macro10.asLines = macro10.asLines.concat(sText.split(/(\r?\n)/)); + setTimeout(function() { macro10.loadNextResource(); }, 0); @@ -265,14 +274,14 @@ class Macro10 { } /** - * parseFile() + * parseResources() * * Begin the assembly process. * * @this {Macro10} * @return {number} */ - parseFile() + parseResources() { var macro10 = this; @@ -280,17 +289,22 @@ class Macro10 { * If the "preprocess" option is set, then just return the plain text we retrieved. */ if (this.sOptions.indexOf('p') >= 0) { - this.println(this.sText); + this.println(this.asLines.join()); return 0; } var a = this.dbg.resetVariables(); try { var i; - var asLines = this.sText.split(/\r?\n/); - for (i = 0; i < asLines.length; i++) { + for (i = 0; i < this.asLines.length; i += 2) { this.nLine++; - if (!this.parseLine(asLines[i] + '\r\n')) break; + /* + * Since, at this early stage, I'm not sure whether all the resources I'm interested in + * assembling have had their original CR/LF line endings preserved (eg, some files may have + * been converted to LF-only line endings), I'm going to skip over whatever line endings + * are in the array and insert my own uniform CR/LF sequences. + */ + if (!this.parseLine(this.asLines[i] + '\r\n')) break; } if (this.nMacroDef) { @@ -338,9 +352,10 @@ class Macro10 { */ parseLine(sLine) { + var i; if (this.nMacroDef) { if (this.nMacroDef == 1) { - var i = sLine.indexOf(this.chMacroOpen); + i = sLine.indexOf(this.chMacroOpen); if (i >= 0) { this.nMacroDef++; sLine = sLine.substr(i+1); @@ -358,41 +373,42 @@ class Macro10 { sLine = this.addASCII(sLine); } - var reLine = /\s*([A-Z$%._][0-9A-Z$%.]*[:=]|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; - var match = sLine.match(reLine); - if (!match || match[4] && match[4].slice(0, 1) != ';') { + var reLine = /\s*([A-Z$%.?][0-9A-Z$%.]*:|)\s*([A-Z$%.][0-9A-Z$%.]*|)\s*([^;]+|)(;?[\s\S]*)/i; + var matchLine = sLine.match(reLine); + if (!matchLine || matchLine[4] && matchLine[4].slice(0, 1) != ';') { this.error("failed to parse line: " + sLine); return false; } - var sLabel = match[1]; - var sOperator = match[2].toUpperCase(); - var sOperands = match[3].trim(); - var sComment = match[4]; - var sRemainder = match[3] + match[4]; + var sLabel = matchLine[1]; + var sOperator = matchLine[2].toUpperCase(); + var sOperands = matchLine[3].trim(); + var sComment = matchLine[4]; + var sRemainder = matchLine[3] + matchLine[4]; if (sLabel) { - var chSep = sLabel.slice(-1); sLabel = sLabel.slice(0, -1); - if (chSep == ':') { - this.addLabel(sLabel); - } else { - sOperands = sOperator + sOperands; - sOperator = chSep; + this.addSymbol(sLabel, this.nLocation, Macro10.SYMTYPE.LABEL); + } + + var matchOp; + if (sOperator && (matchOp = sOperands.match(/^([=:]+)(.*)/))) { + var nType = 0; + sLabel = sOperator; + sOperator = matchOp[1]; + sOperands = matchOp[2]; + if (sOperator == '==') { + nType |= Macro10.SYMTYPE.PRIVATE; } + else if (sOperator == '=:') { + nType |= Macro10.SYMTYPE.INTERNAL; + } + this.addSymbol(sLabel, sOperands, nType); + sOperator = sOperands = ""; } if (!sOperator && !sOperands) return true; - /* - * My initial read of the MACRO-10 specification suggested that lines may begin with EITHER - * "symbol:" (for a label) or "symbol=" (for an assignment), but apparently they can have BOTH. - */ - if (sOperands[0] == '=') { - sLabel = sOperator; - sOperands = sOperands.substr(1); - sOperator = '='; - } this.sOperator = sOperator; /* @@ -416,10 +432,6 @@ class Macro10 { if (!this.parseMacro(sOperator, sOperands)) { switch (sOperator) { - case "=": - this.addAssign(sLabel, sOperands); - break; - case Macro10.PSEUDO_OP.ASCII: case Macro10.PSEUDO_OP.ASCIZ: case Macro10.PSEUDO_OP.SIXBIT: @@ -432,6 +444,7 @@ class Macro10 { case Macro10.PSEUDO_OP.DEFINE: case Macro10.PSEUDO_OP.IFE: + case Macro10.PSEUDO_OP.IRP: case Macro10.PSEUDO_OP.REPEAT: this.addMacro(sOperator, sOperands); break; @@ -462,20 +475,12 @@ class Macro10 { if (!macro) return false; if (sOperands != null) { - /* - * Process this macro call; start by extracting macro argument values from sOperands. - */ - var sDelim = ','; - if (sOperands[0] == '(') { - sDelim += ')'; - sOperands = sOperands.substr(1); - } - var aValues = this.getValues(sOperands, sDelim); + var aValues = this.getValues(sOperands); this.parseText(macro.sText, macro.aParms, aValues); return true; } - if (name[0] != '_') return false; + if (name[0] != '?') return false; switch(name.substr(1)) { case Macro10.PSEUDO_OP.IFE: @@ -531,7 +536,13 @@ class Macro10 { if (iMatch < 0) break; iSearch = iMatch + 1; var iMatchEnd = iMatch + sParm.length; - if ((!iMatch || !this.isSymbolChar(sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(sLine[iMatchEnd]))) { + var chPre = '', chPost = ''; + if ((!iMatch || !this.isSymbolChar(chPre = sLine[iMatch - 1])) && (iMatchEnd >= sLine.length || !this.isSymbolChar(chPost = sLine[iMatchEnd]))) { + /* + * If the "concatenation character" (') appears before (or after) the symbol being replaced, remove it. + */ + if (chPre == "'") iMatch--; + if (chPost == "'") iMatchEnd++; sLine = sLine.substr(0, iMatch) + sReplace + sLine.substr(iMatchEnd); iSearch = iMatch + sReplace.length; } @@ -575,11 +586,18 @@ class Macro10 { getExpression(sOperands, sDelim = ",") { var i = 0; + var fQuotes = false; var sOperand = null; var cNesting = 0; while (i < sOperands.length) { - var ch = sOperands[i]; + var ch = sOperands[i++]; + if (ch == '"') { + fQuotes = !fQuotes; + continue; + } + if (fQuotes) continue; if (sDelim.indexOf(ch) >= 0) { + i--; break; } if (ch == '<') { @@ -590,7 +608,6 @@ class Macro10 { break; } } - i++; } if (!cNesting) { sOperand = sOperands.substr(0, i); @@ -686,6 +703,30 @@ class Macro10 { return sLiteral; } + /** + * getDefaults(aParms) + * + * Check the given array of macro parameters for default values, remove them, and return them in a parallel array. + * + * @this {Macro10} + * @param {Array.} aParms + * @return {Array.} + */ + getDefaults(aParms) + { + var aDefaults = []; + for (var i = 0; i < aParms.length; i++) { + var j = aParms[i].indexOf('<'); + if (j >= 0) { + var k = aParms[i].lastIndexOf('>'); + if (k < 0) k = aParms[i].length; + aDefaults[i] = aParms[i].substr(j, k - j); + aParms[i] = aParms[i].substr(0, j); + } + } + return aDefaults; + } + /** * getReserved(sOperands) * @@ -701,7 +742,7 @@ class Macro10 { if (match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)#/i)) { sReserved = match[0]; var sLabel = match[1]; - var name = '_' + sLabel; + var name = '?' + sLabel; if (this.tblMacros[name] !== undefined) { this.error("reserved symbol redefined: " + sReserved); } @@ -773,34 +814,6 @@ class Macro10 { return sRemain; } - /** - * addAssign(sName, sOperand) - * - * @this {Macro10} - * @param {string} sName - * @param {string} sOperand - */ - addAssign(sName, sOperand) - { - var value = this.parseExpression(sOperand); - if (value === undefined) { - this.error("parseExpression(" + sOperand + ")"); - return; - } - this.addSymbol(sName, value); - } - - /** - * addLabel(sLabel) - * - * @this {Macro10} - * @param {string} sLabel - */ - addLabel(sLabel) - { - this.addSymbol(sLabel, this.nLocation, true); - } - /** * addMacro(sOperator, sOperands) * @@ -808,7 +821,7 @@ class Macro10 { * REPEAT block instead. * * REPEAT blocks piggy-back on this code because they're essentially anonymous immediately-invoked macros; - * we use an illegal MACRO-10 symbol ('_REPEAT') to name the anonymous macro while it's being defined, and the + * we use an illegal MACRO-10 symbol ('?REPEAT') to name the anonymous macro while it's being defined, and the * macro's nOperand field will contain the repeat count. * * The piggy-backing continues with other pseudo-ops like IFE, which again contain an anonymous block of text @@ -833,24 +846,19 @@ class Macro10 { /* * This is a DEFINE (macro) block. */ - match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i); + match = sOperands.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i); if (!match) { - this.error("unrecognized " + sOperator + " definition: " + sOperands); + this.error("unrecognized " + sOperator + ": " + sOperands); return ""; } name = match[1]; /* - * TODO: This may not actually be an error, but I'd like to take a look if/when it happens. + * If this macro has defined parameters, parse them (and any defaults) now. */ - if (this.tblMacros[name] !== undefined) { - this.error("macro redefined: " + name); + if (match[2]) { + aParms = this.getValues(match[2]); + aDefaults = this.getDefaults(aParms); } - /* - * TODO: Tighten up this parsing at some point. All this is doing is extracting entire symbols - * from within the parentheses, if any; it's NOT ensuring that those symbols are comma-separated - * with no other intervening characters. - */ - aParms = match[2].match(/[A-Z$%.][0-9A-Z$%.]*/g); nOperand = Macro10.MACRO_OP.DEFINE; iMatch = 3; } @@ -860,7 +868,7 @@ class Macro10 { */ this.chMacroOpen = '['; this.chMacroClose = ']'; - name = '_' + Str.toDec(this.nLocation, 5); + name = '?' + Str.toDec(this.nLocation, 5); if (this.tblMacros[name] !== undefined) { this.error("literal symbol redefined: " + name); } @@ -881,7 +889,7 @@ class Macro10 { sOperands = sOperands.substr(sOperand.length + 1); sOperand = sOperand.trim(); match = sOperands.match(/\s*(<|)(.*)/i); - name = '_' + sOperator; + name = '?' + sOperator; /* * The expression is either a repeat count or a condition. Either way, we must be able to * resolve it now, so we don't set fPass1 (but that doesn't mean it's the second pass, either). @@ -951,23 +959,29 @@ class Macro10 { } /** - * addSymbol(name, value, fLabel, fGlobal, fPrivate) + * addSymbol(name, value, nType) * * @this {Macro10} * @param {string} name - * @param {number} value - * @param {boolean} [fLabel] (default is false, meaning the symbol is an assignment) - * @param {boolean} [fGlobal] (default is false, meaning the symbol is local to the current file) - * @param {boolean} [fPrivate] (default is false, meaning the symbol has visibility to the caller) + * @param {number|string} value + * @param {number} [nType] */ - addSymbol(name, value, fLabel = false, fGlobal = false, fPrivate = false) + addSymbol(name, value, nType = 0) { name = name.toUpperCase().substr(0, 6); - if (fLabel && this.tblSymbols[name] !== undefined) { + if ((nType & Macro10.SYMTYPE.LABEL) && this.tblSymbols[name] !== undefined) { this.error("label " + name + " redefined"); return; } - this.tblSymbols[name] = {name, value, nLine: this.nLine, fLabel, fGlobal, fPrivate}; + if (typeof value == 'string') { + var v = this.parseExpression(value); + if (v === undefined) { + this.error("parseExpression(" + value + ")"); + return; + } + value = v; + } + this.tblSymbols[name] = {name, value, nLine: this.nLine, nType}; this.dbg.setVariable(name, value); } @@ -1070,7 +1084,7 @@ class Macro10 { genWord(value, sFixup) { this.aWords[this.nLocation] = this.truncate(value); - if (sFixup != null) this.aFixups.push({nLocation: this.nLocation, sValue: sFixup}); + if (sFixup != null) this.aFixups.push({nLocation: this.nLocation, sValue: sFixup, nLine: this.nLine}); this.nLocation++; } @@ -1107,17 +1121,24 @@ class Macro10 { } } +Macro10.SYMTYPE = { + LABEL: 0x01, + PRIVATE: 0x02, + INTERNAL: 0x04 +}; + Macro10.PSEUDO_OP = { - ASCII: "ASCII", - ASCIZ: "ASCIZ", - DEFINE: "DEFINE", - IFE: "IFE", - LITERAL:"LITERAL", - PAGE: "PAGE", - REPEAT: "REPEAT", - SIXBIT: "SIXBIT", - SUBTTL: "SUBTTL", - XWD: "XWD" + ASCII: "ASCII", + ASCIZ: "ASCIZ", + DEFINE: "DEFINE", + IFE: "IFE", + IRP: "IRP", + LITERAL: "LITERAL", + PAGE: "PAGE", + REPEAT: "REPEAT", + SIXBIT: "SIXBIT", + SUBTTL: "SUBTTL", + XWD: "XWD" }; /* diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index 4c00cc127..5507c0562 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -566,7 +566,7 @@ class Debugger extends Component case '|': valNew = this.evalIOR(val1, val2); break; - case '^^': // since MACRO-10 uses '^' for base overrides, you must now use '^^' for bitwise exclusive-or (XOR) + case '^!': // since MACRO-10 uses '^' for base overrides, '^!' is used for bitwise exclusive-or (XOR) valNew = this.evalXOR(val1, val2); break; case '&&': @@ -575,16 +575,21 @@ class Debugger extends Component case '||': valNew = (val1 || val2? 1 : 0); break; - case '><': + case '_': + case '^_': valNew = val1; - val2 = 35 - (val2 & 0xff); + /* + * While we always try to avoid assuming any particular number of bits of precision, the 'B' shift + * operator (which we've converted to '^_') is unique to the MACRO-10 environment, which imposes the + * following restrictions on the shift count. + */ + if (chOp == '^_') val2 = 35 - (val2 & 0xff); if (val2) { /* - * Since binary shifting is a logical operation, and since shifting by division only works properly - * with positive numbers, we must convert a negative value to a positive value, by computing the two's - * complement. + * Since binary shifting is a logical (not arithmetic) operation, and since shifting by division only + * works properly with positive numbers, we call truncate() to produce an unsigned value. */ - if (valNew < 0) valNew += Math.pow(2, 36); + valNew = this.truncate(valNew, 0, true); if (val2 > 0) { valNew *= Math.pow(2, val2); } else { @@ -610,7 +615,7 @@ class Debugger extends Component * * 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 * - - - - - - - - - - -- -- -- -- -- - * 2 * _ { 3 + _ { 4 / 2 } _ } _ + * 2 * { 3 + { 4 / 2 } } * * This function takes care of recursively processing sub-expressions, by processing subsets of the array, * as well as handling certain base overrides (eg, temporarily switching to base-10 for binary shift suffixes). @@ -627,7 +632,7 @@ class Debugger extends Component var value; var sValue, sOp; var fError = false; - var fNegate = false; + var iNegate = 0; var aVals = [], aOps = []; var nBasePrev = this.nBase; @@ -656,16 +661,20 @@ class Debugger extends Component sOp = (iValue < iLimit? asValues[iValue++] : ""); } else { - if (sOp != '-') { - fError = true; - break; + if (sOp == '~' || sOp == '^-') { + iNegate = 1; + continue; } - fNegate = true; - continue; + if (sOp == '-') { + iNegate = -1; + continue; + } + fError = true; + break; } } else { - v = this.parseValue(sValue, null, fQuiet, fNegate); + v = this.parseValue(sValue, null, fQuiet, iNegate); } if (v === undefined) { @@ -693,8 +702,8 @@ class Debugger extends Component * The MACRO-10 binary shifting operator assumes a base-10 shift count, regardless of the current * base, so we must override the current base to ensure the count is parsed correctly. */ - this.nBase = (sOp == '><')? 10 : nBase; - fNegate = false; + this.nBase = (sOp == '^_')? 10 : nBase; + iNegate = 0; } if (!this.evalOps(aVals, aOps) || aVals.length != 1) { @@ -729,7 +738,7 @@ class Debugger extends Component * * We pop 1 "binop" from aOps and 2 values from aVals whenever a "binop" of lower priority than its * predecessor is encountered, evaluate, and push the result back onto aVals. Only selected unary - * operators are supported (eg, minus), and ternary operators like '?:' are not supported at all. + * operators are supported (eg, minus and "not"); ternary operators like '?:' are not supported at all. * * @this {Debugger} * @param {string|undefined} sExp @@ -768,13 +777,14 @@ class Debugger extends Component * what IS important is listing operators than contain shorter operators first. For example, bitwise * shift operators must be listed BEFORE the logical less-than or greater-than operators. * - * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^^', since - * MACRO-10 uses prefixes like "^D", "^O" and "^B" with numeric constants to indicate a base override, and - * I've added '!' as an alias for '|' to perform bitwise inclusive-or. + * Also, to better accommodate MACRO-10 syntax, I've replaced the single '^' for XOR with '^!' (since + * MACRO-10 uses prefixes like "^D", "^O" and "^B" with numeric constants to indicate a base override). + * Similarly, I've added '!' as an alias for '|' (bitwise inclusive-or), '^-' as an alias for '~' (unary + * complement "not" operator), and '_' as a shift operator. * * The MACRO-10 binary shifting suffix ('B') is a bit more problematic, since a capital B can also appear - * inside symbols. So I pre-scan for that operator and replace non-symbolic occurrences with an internal - * operator ('><'). + * inside symbols. So I pre-scan for that suffix and replace all non-symbolic occurrences with an internal + * shift operator ('^_'). * * Note that Str.parseInt(), which parseValue() relies on, supports both the MACRO-10 base prefix overrides * and the binary shifting suffix. But since the B suffix can also be a bracketed expression, we have to @@ -786,8 +796,8 @@ class Debugger extends Component * * WARNING: Whenever you make changes to this RegExp, make sure you update aBinOpPrecedence as needed, too. */ - var regExp = /(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/; - sExp = sExp.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/, "$1$2><"); + var regExp = /(\{|}|\|\||&&|\||\^!|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/; + sExp = sExp.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/, "$1$2^_"); var asValues = sExp.split(regExp); value = this.parseArray(asValues, 0, asValues.length, this.nBase, fQuiet); if (value !== undefined && fQuiet === false) { @@ -874,16 +884,16 @@ class Debugger extends Component } /** - * parseValue(sValue, sName, fQuiet, fNegate) + * parseValue(sValue, sName, fQuiet, iNegate) * * @this {Debugger} * @param {string|undefined} sValue * @param {string|null} [sName] is the name of the value, if any * @param {boolean} [fQuiet] - * @param {boolean} [fNegate] + * @param {number} [iNegate] (-1 to negate , 1 to complement) * @return {number|undefined} numeric value, or undefined if sValue is either undefined or invalid */ - parseValue(sValue, sName, fQuiet, fNegate) + parseValue(sValue, sName, fQuiet, iNegate = 0) { var value; if (sValue != null) { @@ -893,12 +903,19 @@ class Debugger extends Component } else { value = this.getVariable(sValue); if (value == null) { - value = Str.parseInt(fNegate? ('-' + sValue) : sValue, this.nBase); - fNegate = false; + if (iNegate < 0) { + sValue = '-' + sValue; + iNegate = 0; + } + value = Str.parseInt(sValue, this.nBase); } } if (value != null) { - if (fNegate) value = -value; + if (iNegate < 0) { + value = -value; + } else if (iNegate > 0) { + value = this.evalXOR(value, -1); + } } else { if (!fQuiet) { this.println("invalid " + (sName? sName : "value") + ": " + sValue); @@ -1056,12 +1073,17 @@ class Debugger extends Component if (DEBUGGER) { + /* + * Missing from this table are the (limited) set of unary operators we support (negate and complement), + * since this is only a BINARY operator precedence, not a general-purpose precedence table. Assume that + * all unary operators take precedence over all binary operators. + */ Debugger.aBinOpPrecedence = { '||': 0, // logical OR '&&': 1, // logical AND '!': 2, // bitwise OR '|': 2, // bitwise OR - '^^': 3, // bitwise XOR + '^!': 3, // bitwise XOR (added by MACRO-10 sometime between the 1972 and 1978 versions) '&': 4, // bitwise AND '!=': 5, // inequality '==': 5, // equality @@ -1077,7 +1099,8 @@ if (DEBUGGER) { '%': 9, // remainder '/': 9, // division '*': 9, // multiplication - '><': 10, // internal binary shift operator (MACRO-10-style; converted from a 'B' suffix) + '_': 10, // MACRO-10 shift operator + '^_': 10, // MACRO-10 internal shift operator (converted from 'B' suffix form that MACRO-10 uses) '{': 11, // open sub-expression (achGroup[0] default) '}': 11 // close sub-expression (achGroup[1] default) }; diff --git a/versions/pc8080/1.34.2/pc8080-dbg.js b/versions/pc8080/1.34.2/pc8080-dbg.js index e0e3451a6..359cf0d49 100644 --- a/versions/pc8080/1.34.2/pc8080-dbg.js +++ b/versions/pc8080/1.34.2/pc8080-dbg.js @@ -147,8 +147,8 @@ function je(a){if(!Ab(a))if(!a.j)Bb(a);else if(a.b&&a.H){a.g||(a.g=a.b.length);i f.g;0=m.ab&&a<=m.wb?d.g&(Se|Te)||(d.g|=Te,Pe(d,20,!0),Ue(d)):a>=m.yc&&a<=m.z&&d.g&Te&&(d.g&=~Te,Pe(d,20,!1),Ue(d));return!0}),c.onpaste=function(a){a:{if(d.C&&d.C.Ra&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a=a.clipboardData||window.clipboardData)){Ve(d.C,a.getData("Text"));a=!1;break a}a=!0}return a},!0;default:if(this.b.Ua&&void 0!==this.b.Ua[b])return this.P[e]=c,c.onclick= @@ -198,15 +198,15 @@ this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.lengt var Sf=12,Tf=16,Uf=192,ag=2,$f=32,bg=64,ee=1,Vf=2,Yf=4,Xf=128,Wf=15,Zf=240,Rf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Pf=[!1,0,0,133,142,39,238],Kf="buffer",Mf={0:Jf.prototype.Hd,1:Jf.prototype.Gd},Nf={0:Jf.prototype.Vd,1:Jf.prototype.Ud,2:Jf.prototype.Td};Wa(function(){for(var a=sb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.M?a="end":a=this.g[this.b+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(Ca(a.substring(d,f))),d=f+1}}return b}; -function dg(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function eg(a,b,c){for(c=void 0===c?-1:c;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=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;u=!1}eg(v, -B)&&1==v.length||(q=!0);q?!1===f&&a.i("parse error ("+(h||k)+")"):g=v.pop();a.L=y;return g}function ig(a,b,c){var d;a.oa=null;b&&("{"!=a.W[0]&&(b=b.split(a.W[0]).join("{").split(a.W[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=fg(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&jg(a,null,d));return d} +function dg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function eg(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=dg(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=fg(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&jg(a,null,d));return d} function kg(a,b){var c,d=a.W[0],e=a.W[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=ig(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?lg(a,g):"undefined")}if(a.fa.length)for(d=a.fa[0],e=a.fa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=b.replace("["+c[1]+"]","unimplemented");for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e= -a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function gg(a,b,c,d,e){var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(f=ma(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.i("invalid "+(c?c:"value")+": "+b)):d||a.i("missing "+(c||"value"));return f} +a.O-a.ba}if(null==e)break;b=b.replace(d[0],e.toString())}return b}function gg(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.Kb(b),0<=f?f=a.Lb(f):(f=a.T[b],null==f&&(0>e&&(b="-"+b,e=0),f=ma(b,a.L))),null!=f?0>e?f=-f:0>=8;d=n(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function mg(a,b){if(b)return jg(a,b,a.T[b]);var c=0;for(b in a.T)jg(a,b,a.T[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var hg={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function lg(a,b){var c;c=void 0===c?0:c;switch(a.L){case 2:b=pa(b,0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var hg={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function ng(a){cg.call(this,a);this.style=og;this.F=pg();this.ta=pg();this.S=pg();this.A=[];this.j=this.I=this.w=[];qg(this);this.X=0;rg(this);this.ka={};sg(this,a.messages);this.na=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Pc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Pc(b,a)})}aa(ng,cg);l=ng.prototype; l.Ga=function(a,b,c,d){this.H=b;this.u=c;this.R=a;(a=Lc(a,"messages"))&&sg(this,a);this.sa=tg;be(this,64,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=ug(vg(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.H.g;k=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,q=0;k--;){var u=b[e];u.type==c?q++||d.i("..."):(c=u.type,q=Ub[c],u&&d.i(n(u.id)+" %"+n(e<> "+b):(a.M&&(a.i("e u,void 0===f[2])a.i("begin assemble at "+Zg(u.J)),a.M=!0,Qc(a.u);else{var v;a.i("not supported yet");v=[];if(v.length){for(var B=0;BZa.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var te=[];"call"==Dg&&(kc=1E5,te=["CALL"]);for(void 0!==Cg&&a.i(Ba+ -" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Fg++;kc--}}Fg||(a.i("no "+Eg+"history available"),a.ya=void 0)}else{var $c=vg(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=gg(a,Ma)>>>0,65536>4||1;Ii--&&0< -cd;){var dd=0,ue=0,nc,ve="",Ig="",na=Zg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+ve+(nc?"":" "+Ig)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Jg=255,Kg=a.Ia,Lg=a.Xb;"ew"==f[0]&&(fd=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=fd<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), -a.i("\tew [a] [...] edit words at address a");else{var gd=vg(a,Ng);if(gd)for(var hd=2;hdCe;){for(var ub=null,Oi=256;65536>qc.J>>>0;){Pg.J=a.Gb(qc,2);if(null==qc.J||!Oi--)break;for(var Pi=a,jd=Pg, -Qg=null,rc=jd.J,Rg=rc,De=1;6>=De&&rc;De++){if(2Za.length&&(a.i("note: only "+Za.length+" available"),Ba=Za.length);Na-=Ba;0>Na&&(null==Za[Za.length-1].J?(Ba=Na+Ba,Na=0):Na+=Za.length);var ue=[];"call"==Dg&&(kc=1E5,ue=["CALL"]);for(void 0!==Cg&&a.i(Ba+ +" instructions earlier:");0=Za.length&&(Na=0);a.ya=Ba;Fg++;kc--}}Fg||(a.i("no "+Eg+"history available"),a.ya=void 0)}else{var $c=vg(a,na);if($c){var ad=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||fc),ad=gg(a,Ma)>>>0,65536>4||1;Ii--&&0< +cd;){var dd=0,ve=0,nc,we="",Ig="",na=Zg($c.J);for(nc=16;0ed?String.fromCharCode(ed):".";cd--}mc&&(mc+="\n");mc+=na+" "+we+(nc?"":" "+Ig)}mc&&a.i(mc);a.ta=$c}}}}break;case "e":if("else"==f[0])break;var fd=1,Jg=255,Kg=a.Ia,Lg=a.Xb;"ew"==f[0]&&(fd=2,Jg=65535,Kg=a.Gb,Lg=a.Qc);var Mg=fd<<1,Ng=f[1];if(null==Ng)a.i("edit memory commands:"),a.i("\teb [a] [...] edit bytes at address a"), +a.i("\tew [a] [...] edit words at address a");else{var gd=vg(a,Ng);if(gd)for(var hd=2;hdDe;){for(var ub=null,Oi=256;65536>qc.J>>>0;){Pg.J=a.Gb(qc,2);if(null==qc.J||!Oi--)break;for(var Pi=a,jd=Pg, +Qg=null,rc=jd.J,Rg=rc,Ee=1;6>=Ee&&rc;Ee++){if(2c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} +function $l(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.P("CMOS date invalid ("+b+"), using "+c)):b&&a.P("CMOS date: "+c);a.A[lm]=c.getSeconds();a.A[mm]=0;a.A[nm]=c.getMinutes();a.A[om]=0;a.A[pm]=c.getHours();a.A[Hm]=0;a.A[Im]=c.getDay()+1;a.A[Jm]=c.getDate();a.A[Km]=c.getMonth()+1;b=c.getFullYear();a.A[Lm]=b%100;b/=100;a.A[Mm]=b%10|b/10<<4;a.A[Nm]=38;a.A[Rd]=Om;a.A[Pm]=0;a.A[Dl]=Qm;a.ma=a.Z=0;a.Ha=a.Aa=null} +function El(a,b){var c=a.A[b];if(bc?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Rd]&Rm||(d&&128>8} l.save=function(){var a=new Xf(this);a.set(0,[this.C]);for(var b=[],c=0;c=eh&&(a.set(5,[this.D,this.L,this.K,this.oa,this.M,this.qa]),a.set(6,[this.Y[7],this.Y,this.V,this.A,this.ma,this.Z]));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);Fl(this);b=a[1];for(c=0;c=c;c++)if(d&Co<=c;c++)d&Co<>=Ho;var f=d&Io,g=d&Jo;d&=Ko;if(d==Lo)Go(a,e+c);else{e+=c;var h=a.G[e];h.Qf=d;h.mode=g;h.Zg=f;h.pc=[0,0];h.qb=[0,0];h.je=[0,0];h.gd=!1;h.Me=!1;h.le=!1;h.Qe=!1;oo(a,e);b==so&&c==to&&fh(a,uo);b==so&&c==wo&&255==a.hc[0].od&& a.J==(Mo|No|Oo|Po)&&(b=a.G[0],b.Mc[0]=b.pc[0],b.Mc[1]=b.pc[1],b.jd=Ed(a.H,a.O))}}}function vo(a,b){a=a.G[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.ad?256:65536);return b}function Pd(a,b){a=a.G[b];(b=a.Mc[1]<<8|a.Mc[0])||(b=1==a.ad?256:65536);return b}function Go(a,b){Bl(a,b);var c=a.G[b];c.je[0]=c.qb[0];c.je[1]=c.qb[1];c.Me=!0;oo(a,b)}function oo(a,b){a=a.G[b];a.rd=a.Qf==Qo?1:0;a.ad=a.Qf==Ro?2:1} function Bl(a,b,c){var d=a.G[b];if(d.le&&(b!=wo||a.J&Mo)){var e=Ed(a.H,a.O),f=(e-d.jd)/a.Ba|0;0>f&&(d.jd=e,f=0);var g=vo(a,b),h=Pd(a,b)-f;d.mode==qo?(0>=h&&(h=0),h||(d.gd=!0,d.le=!1,b||hh(a,uo))):d.mode==So?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo))):d.mode==Qd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Mc[0]=h&255,d.Mc[1]=h>>8&255,d.jd=e,!b&&d.gd&&hh(a,uo)));d.qb[0]=h&255;d.qb[1]=h>>8&255;c&&(a.jd=0)}return d} -function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[Gm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[Gm]))){a.A[Gm]=0;a.A[Im]=a.A[Im]% +function Od(a,b){for(var c=0;c=eh){b=a.H.T.sd;c=Ed(a.H,a.O);null==a.Aa&&(a.ma=Ed(a.H,a.O),a.Ha=1024,a.Aa=Math.floor(a.H.T.sd/a.Ha),Tm(a));c>=a.Z&&(a.A[Pm]|=To,a.A[Rd]&Td&&(a.A[Pm]|=Uo,hh(a,Vo)),a.Z=c+a.Aa);a.A[lm]==a.A[mm]&&a.A[nm]==a.A[om]&&a.A[pm]==a.A[Hm]&&(a.A[Pm]|=Wo,a.A[Rd]&Xo&&(a.A[Pm]|=Uo,hh(a,Vo)));var d=c-a.ma,e=Math.floor(d/b);if(e&&!(a.A[Rd]&Yo)){for(;e--;)if(60<=++a.A[lm]&&(a.A[lm]=0,60<=++a.A[nm]&&(a.A[nm]=0,24<=++a.A[pm]))){a.A[pm]=0;a.A[Im]=a.A[Im]% 7+1;var f;f=a.A[Lm];var g=Ja[a.A[Km]-1];28==g&&(f%4||!(f%100)&&f%400||g++);f=g;++a.A[Jm]>f&&(a.A[Jm]=1,12<++a.A[Km]&&(a.A[Km]=1,a.A[Lm]=(a.A[Lm]+1)%100))}a.A[Pm]|=Zo;a.A[Rd]&$o&&(a.A[Pm]|=Uo,hh(a,Vo))}a.ma=c-d%b}}l.Gm=function(a,b){var c=this.xa;this.ga&ap&&(this.J&bp?c=this.C[0][1]:this.B&&(c=cp(this.B)));w(this,a,null,b,"PPI_A",c);return c};l.jo=function(a,b,c){w(this,a,b,c,"PPI_A");this.xa=b};l.Hm=function(a,b){var c=this.J;w(this,a,null,b,"PPI_B",c);return c}; l.ko=function(a,b,c){w(this,a,b,c,"PPI_B");dp(this,b)};function dp(a,b){var c=!!(b&ep),d=!!(a.J&ep);a.J=b;a.B&&fp(a.B,!(b&bp),!!(b&Po));c!=d&&Vm(a,c)}l.Im=function(a,b){var c=0,c=(this.ca|0)==kl?this.J&No?c|this.C[1][1]&gp:c|this.C[1][1]>>4&1:this.J&hp?c|this.C[0][1]>>4:c|this.C[0][1]&15;this.J&Mo&&Bl(this,wo).gd&&(c=this.J&ep?c|ip:c|jp);w(this,a,null,b,"PPI_C",c,32896);return c};l.lo=function(a,b,c){w(this,a,b,c,"PPI_C");this.Ca=b};l.Jm=function(a,b){var c=this.ga;w(this,a,null,b,"PPI_CTRL",c);return c}; l.mo=function(a,b,c){w(this,a,b,c,"PPI_CTRL");this.ga=b};l.Sl=function(a,b){var c=this.B?cp(this.B):0;w(this,a,null,b,"8041_KBD",c);this.aa&=~kp;return c};l.tn=function(a,b,c){w(this,a,b,c,"8041_KBD")};l.Rl=function(a,b){var c=this.J;w(this,a,null,b,"8041_CTRL",c);return c};l.sn=function(a,b,c){w(this,a,b,c,"8041_CTRL");dp(this,b)};l.Tl=function(a,b){var c=this.aa;w(this,a,null,b,"8041_STATUS",c);return c}; @@ -466,7 +466,7 @@ l.Vl=function(a,b){var c=this.J&~(zp|Ap)|(Ed(this.H)&64?Ap:0);w(this,a,null,b,"8 l.un=function(a,b,c){w(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.L=b;this.D|=np;a=0;this.L>=Bp&&(a=this.L^15,this.L=Bp);switch(this.L){case Cp:yp(this,this.K);break;case Dp:pp(this,this.K|Ol);break;case Ep:pp(this,this.K&~Ol);this.B&&mp(this.B);break;case Fp:this.B&&(a=this.B,a.A=[],t(a)&&Mb(a,"scan codes flushed"));pp(this,this.K|Ol);yp(this,Gp);rp(this,Yl|Zl);break;case Hp:yp(this,Ip);break;case Jp:yp(this,this.M);break;case Kp:yp(this,this.qa);break;case Lp:yp(this,this.K&Ol?0:Mp);break;case Bp:a& 1&&kf(this.H)}};function pp(a,b){a.K=b;a.D=a.D&~Np|b&Op;a.B&&fp(a.B,!!(b&Pp),!(b&Ol))}function yp(a,b,c){0<=b&&(a.oa=b,c?a.D|=kp:(a.D&=~kp,a.D|=lp))}function rp(a,b){a.qa=b;oc(a.ka,!!(b&Zl));b&Yl||kf(a.H)}function Qp(a,b){a.ca>4)+(c&15),e=!0);if(d==Gm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; +l.Ln=function(a,b,c){var d=this.V&Wp;t(this,4352)&&w(this,a,b,c,"CMOS.DATA["+r(d)+"]",null,!0);a=b^this.A[d];if(d<=Dl){if(c=b,d>4)+(c&15),e=!0);if(d==pm||d==Hm)e&&23=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Rd&&a&Td&&b&Td&&Tm(this)};l.Nk=function(a,b,c){w(this,a,b,c,"NMI");this.da=b};l.Vn=function(a,b,c){w(this,a,b,c,"FPU.CLEAR")};l.Wn=function(a,b,c){w(this,a,b,c,"FPU.RESET");this.Tc&&$g(this.Tc)}; l.Xm=function(a){if(t(this,16)&&Wk(this.ba,26,a)){var b=this.H.D>>8;Tf(this.H,a,function(a,d){return function(c){d=Ed(a.H)-d;var e,g=a.H.L&255,h=a.H.L>>8,k=a.H.L&255,m=a.H.L>>8;if(2==b||3==b)e=" CH(hour)="+ta(h)+" CL(min)="+r(g)+" DH(sec)="+r(m);else if(4==b||5==b)e=" CX(year)="+ta(a.H.I)+" DH(month)="+r(m)+" DL(day)="+r(k);g=a.ba;h=d;g.message("INT "+r(26)+": C="+(dg(g.H)?1:0)+(e||"")+" (cycles="+h+(c?",level="+(c+1):"")+")")}}(this,Ed(this.H)))}return!0}; function Vm(a,b){if(a.la)try{void 0!==b?a.Ga=b:b=!!(a.Ga&&a.H&&a.H.ea.wb);var c=Math.round(ol/vo(a,wo));if(20>c||2E4this.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.da?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(Ca(a.substring(d,f))),d=f+1}}return b}; -function Xx(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Yx(a,b,c){for(c=void 0===c?-1:c;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=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==k?10:e;p=!1}Yx(v, -u)&&1==v.length||(m=!0);m?!1===f&&a.P("parse error ("+(h||k)+")"):g=v.pop();a.L=E;return g}function by(a,b,c){var d;a.Ha=null;b&&("{"!=a.qa[0]&&(b=b.split(a.qa[0]).join("{").split(a.qa[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} +function Xx(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Yx(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=Xx(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Zx(a,b,0,b.length,a.L,c),void 0!==d&&!1===c&&cy(a,null,d));return d} function dy(a,b){var c,d=a.qa[0],e=a.qa[1];c="("==d||"{"==d||"["==d?"\\":"";for(var f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);){var g=by(a,c[1]);if(void 0===g)return;b=b.replace(d+c[1]+e,null!=g?ey(a,g):"undefined")}if(a.Aa.length)for(d=a.Aa[0],e=a.Aa[1],c="("==d||"{"==d||"["==d?"\\":"",f="["==d?"\\":"",f=new RegExp(c+d+"([^"+f+d+f+e+"]+)"+c+e);c=b.match(f);)b=a.Pk(b,c[1]);for(;d=b.match(/\$([a-z]+)/i);){e=null;switch(d[1].toLowerCase()){case "ops":e=a.Y-a.ha}if(null== -e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(f=oa(e?"-"+b:b,a.L),e=!1)),null!=f?e&&(f=-f):d||a.P("invalid "+(c?c:"value")+": "+b)):d||a.P("missing "+(c||"value"));return f}function cy(a,b,c){var d,e=!1;void 0!==c&&(e=!0,d=8==a.L?c+". "+sa(c,0,!0):q(c,0,!0)+" "+c+". "+sa(c,0,!0)+" "+ra(c,4,!0),32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e} -function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c} -var ay={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +e)break;b=b.replace(d[0],e.toString())}return b}function $x(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.gh(b),0<=f?f=a.hh(f):(f=a.ga[b],null==f&&(0>e&&(b="-"+b,e=0),f=oa(b,a.L))),null!=f?0>e?f=-f:0c&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function fy(a,b){if(b)return cy(a,b,a.ga[b]);var c=0;for(b in a.ga)cy(a,b,a.ga[b]),c++;return 0>2:0)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}var ay={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function gy(a){Wx.call(this,a);this.ta=4;this.la=5;this.wa=1048575;this.K=hy(this);this.Ta=hy(this);this.aa=hy(this);this.D=[];this.B=this.Z=this.N=[];iy(this);this.xa=0;jy(this);this.Ba={};ky(this,a.messages);this.Ga=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ly(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ly(b,a)})}ba(gy,Wx);l=gy.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.hb=Xb(a,"FDC");this.Xa=Xb(a,"HDC");this.Tc=Xb(a,"FPU");this.G=Xb(a,"Mouse");(a=zd(a,"messages"))&&ky(this,a);this.la=b.I>>2;this.wa=b.N;this.ab=new Vd(this.H,7,"DBG");this.oa=my;80186<=this.H.ca&&(this.oa=my.slice(),this.oa[15]=ny,80286<=this.H.ca&&(this.oa[15]=oy,80386<=this.H.ca&&(this.ta=8)));Al(this,64,function(a){py(d,d.H.sc,a[0])});Al(this,4,function(a){if(a=a[0]){var b=$x(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=qy(d, b,ry),d.P("dumpSel("+ta(a?a.U:b)+"): %"+q(a?a.Lb:null,d.la)),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=sy[a.type];e&&(c=e[0],b=e[1])}!c||a.mb&32768||(c+=",not present");d.P((b?"seg="+ta(a.ua&65535)+" off="+ta(a.Ka):"base="+q(a.ua,d.la)+" limit="+ty(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ta(a.ext&-65296)+ @@ -804,23 +804,23 @@ Py(a,g[1],!0);if(v)if(a.aa=v,void 0===g[2])a.P("begin assemble at "+Fy(v)),a.da= a.P("\tbc [a]\tclear breakpoint at addr [a]"),a.P("\tbl\tlist all breakpoints"),a.P("\tbn [n]\tbreak after [n] instruction(s)");else{var T=K.charAt(1);if("l"==T){var L;L=0+Vz(a,a.B);L+=Vz(a,a.Z);(L+=Vz(a,a.N))||a.P("no breakpoints")}else if("n"==T)a.xa=$x(a,H),a.P("break after "+a.xa+" instruction(s)");else if(void 0===H)a.P("missing breakpoint address");else{var ua={};if("*"!=H&&(ua=Py(a,H,!0,!0),!ua))break a;H=null==ua.Ja?H:ta(ua.Ja);"c"==T?null==ua.Ja?(iy(a),a.P("all breakpoints cleared")):Ey(a, a.B,ua)||Ey(a,a.Z,ua)||Ey(a,a.N,ua)||a.P("breakpoint missing: "+Fy(ua)):"i"==T?a.P("breakpoint "+(Nc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (input)"):"o"==T?a.P("breakpoint "+(Rc(a.ka,ua.Ja)?"enabled":"cleared")+": port "+H+" (output)"):null!=ua.Ja&&(Sy(a,ua,I),"p"==T?a.Gd(a.B,ua):"r"==T?a.Gd(a.Z,ua):"w"==T?a.Gd(a.N,ua):a.P("unknown breakpoint command: "+T))}}}break;case "c":$A(a);break;case "d":a:{var ca=g,xb,za=ca[0],cb=ca[1],Sa=ca[2],rb=ca[3];if("?"==cb){var db="";for(xb in Sb)a.Ba[xb]&& (db&&(db+=","),db+=xb);db+=",state,symbols";a.P("dump memory commands:");a.P("\tdb [a] [#] dump # bytes at address a");a.P("\tdw [a] [#] dump # words at address a");a.P("\tdd [a] [#] dump # dwords at address a");a.P("\tdh [#] [#] dump # instructions from history");a.P("\tdi [#] dump descriptor info for IDT #");a.P("\tds [#] dump descriptor info for selector #");db.length&&a.P("dump extension commands:\n\t"+db)}else if("state"==cb){var rc=iB(a.pa,!0);rc?"console"==Sa?console.log(rc): -($A(a),a.P(rc)):a.P("powerOff() error")}else if("symbols"==cb)for(var ib=0;ib>>20;Qa.Ti=a.H.Wc+Qa.Jk;Qa.ob=of.aa[(Qa.Ti&of.C)>>>of.A];Qa.Aj=Qa.ob.Nd(Qa.Jk);Qa.Kk=(Og&4190208)>>>10;Qa.Ui=(Qa.Aj&-4096)+Qa.Kk;Qa.pb=of.aa[(Qa.Ui&of.C)>>>of.A];Qa.Bj=Qa.pb.Nd(Qa.Kk);Qa.ul=(Qa.Bj&-4096)+(Og&4095)}if(nf=Qa){a.P("linear PDE addr PDE PTE addr PTE physical");a.P("--------- ---------- -------- ---------- -------- ----------");var ve="%"+q(Og),ve=ve+(" %%"+Uy(nf.Ti,nf.Aj)),ve= ve+(" %%"+Uy(nf.Ui,nf.Bj,!0)),ve=ve+(" %%"+q(nf.ul));a.P(ve)}else a.P("unsupported operation")}}else a.P("missing address")}else{if("d"==za){if("disk"==cb){ca[0]="l";ca[1]="json";dB(a,ca);break a}for(xb in Sb)if(ca[1]==xb){var vt=a.Ba[xb];vt?(ca.shift(),ca.shift(),vt(ca)):a.P("no dump registered for "+cb);break a}cb||(za=a.lb||"db")}else a.lb=za;if("dh"==za){var wt=cb,xt=Sa,yt="",zt=0,Lc=a.ma,jd=a.O;if(jd.length){var uc=+wt||a.Ya,Pg=+xt||10;isNaN(uc)?uc=Pg:yt="more ";uc>jd.length&&(a.P("note: only "+ -jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var qm=[];"call"==xt&&(Pg=1E5,qm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= -void 0)}else if("di"==za){ca.shift();var rm=ca[0];if(rm){var Rg=$x(a,rm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+tm+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= +jd.length+" available"),uc=jd.length);Lc-=uc;0>Lc&&(null==jd[jd.length-1].U?(uc=Lc+uc,Lc=0):Lc+=jd.length);var rm=[];"call"==xt&&(Pg=1E5,rm=["CALL"]);for(void 0!==wt&&a.P(uc+" instructions earlier:");0=jd.length&&(Lc=0);a.Ya=uc;zt++;Pg--}}zt||(a.P("no "+yt+"history available"),a.Ya= +void 0)}else if("di"==za){ca.shift();var sm=ca[0];if(sm){var Rg=$x(a,sm);if(void 0===Rg||0>Rg||255>>0,65536>4||1;aC--&&0Xi?String.fromCharCode(Xi):".";Wi--}Sg&&(Sg+="\n");Sg+=cb+" "+um+(Ug?"":" "+Ft)}Sg&&a.P(Sg);a.Ta=pf}}}}}break;case "e":if("else"==g[0])break;var Yi= 1,Gt=255,Ht=a.Ia,It=a.fc;"ew"==g[0]&&(Yi=2,Gt=65535,Ht=a.Yc,It=a.il);var Jt=Yi<<1,Kt=g[1];if(null==Kt)a.P("edit memory commands:"),a.P("\teb [a] [...] edit bytes at address a"),a.P("\tew [a] [...] edit words at address a");else{var Zi=Py(a,Kt);if(Zi)for(var $i=2;$izm;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0Am;){for(var kd=null,fC=256;Sd.Ja>>>0>>0;){Xg.Ja=a.jb(Sd,!0);if(null==Sd.ya||!fC--)break;Xg.U=Mt;if(kd=gB(a,Xg))break;Xg.U=a.jb(Sd);if(kd=gB(a,Xg,!0)){Mt=a.jb(Sd,!0);0a?-b:b}});ma("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); -var na={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, -bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,ld:103,md:104,nd:105,od:106,k:107,pd:108,qd:109,n:110,rd:111,p:112,q:113,r:114,sd:115,t:116,ud:117,vd:118,wd:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; -function ta(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0a?-b:b}});na("Math.log2",function(a){return a?a:function(a){return Math.log(a)/Math.LN2}}); +var ta={mc:0,Eb:1,oc:2,pc:3,qc:4,rc:5,sc:6,tc:7,qb:8,uc:9,Fb:10,vc:11,wc:12,Gb:13,xc:14,yc:15,zc:16,Ac:17,Bc:18,Cc:19,Dc:20,Ec:21,Fc:22,Gc:23,Hc:24,Ic:25,Jc: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,pb:65,lc:66,nc:67,Kc:68,E:69,Lc:70,Mc:71,Nc:72,Oc:73,Pc:74,Qc:75,Rc:76,Sc:77,Tc:78,Uc:79,Vc:80,Q:81,Wc:82,Xc:83,Yc:84,Zc:85,$c:86,ad:87, +bd:88,cd:89,Ib:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,dd:97,ed:98,fd:99,d:100,e:101,gd:102,hd:103,jd:104,kd:105,ld:106,k:107,md:108,nd:109,n:110,pd:111,p:112,q:113,r:114,qd:115,t:116,sd:117,td:118,ud:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Hb:127}; +function ua(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0f&&(f+=Math.pow(2,36)),f=0a&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function va(a,b){var c,d="";b?32>=1,f--;return d} -function n(a,b,c){b?12"']/g,function(a){return Ba[a]})}function Ea(a,b){return(a+" ").slice(0,b)}function Fa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(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 Ia(a,b,c,d){c=void 0===c?!1:c;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 k="",m;for(m in b)b.hasOwnProperty(m)&&(k&&(k+="&"),k+=m+"="+encodeURIComponent(b[m]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}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 Ja(a,b){var c,d={Z:null,W:null,va:null,ua: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")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.va=g.load;d.ua=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ka=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.wa=null;lb.push(this)}function mb(a,b,c){nb[a]&&b&&(nb[a][b]=c)}function ob(){return Date.now()||+new Date} -function r(a){window&&window.alert(a)}function pb(a){var b=!1;window&&(b=window.confirm(a));return b}function qb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba&&-1a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));if(null==a)for(;0=f?48:55),e=String.fromCharCode(f)+e;a=Math.trunc(a/b)}return(void 0===d?"":d)+e}function wa(a,b){var c,d="";b?32>=1,f--;return d} +function m(a,b,c){b?12"']/g,function(a){return Ea[a]})}function Fa(a,b){return(a+" ").slice(0,b)}function Ga(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ea={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ha(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 Ja(a,b,c,d){c=void 0===c?!1:c;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 k="",n;for(n in b)b.hasOwnProperty(n)&&(k&&(k+="&"),k+=n+"="+encodeURIComponent(b[n]));k=k.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(k)}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 Na(a,b){var c,d={Z:null,W:null,ua:null,ta: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")&&0>b.indexOf("0o")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ua=g.load;d.ta=g.exec;if(e=g.bytes)d.Z=e;else if(e=g.words)for(d.Z=Array(2*e.length),f=c=0;c>8&255;else if(e=g.longs)for(d.Z=Array(4*e.length),f=c=0;c>8&255,d.Z[f++]=e[c]>>16&255,d.Z[f++]=e[c]>>24&255;else(e=g.data)?d.Ja=e:d.Z=g;d.Z&&(d.Z.length?1==d.Z.length&&(r(d.Z[0]),d=null):(r("Empty resource: "+a),d=null));d.W=g.symbols}catch(h){r("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ta=this.id:(this.Ua=this.id.substr(0,a),this.Ta=this.id.substr(a+1));this.A={ready:!1,Na:!1,hb:!1,X:!1,error:!1};this.Xa=null;this.A.error=!1;this.Y=c||0;this.D=this.v=this.G=this.H=this.va=null;mb.push(this)}function nb(a,b,c){ob[a]&&b&&(ob[a][b]=c)}function pb(){return Date.now()||+new Date} +function r(a){window&&window.alert(a)}function qb(a){var b=!1;window&&(b=window.confirm(a));return b}function rb(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,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, -set:this.fc};Lb(this)}la(ac,u);l=ac.prototype;l.reset=function(a){this.stop();a&&cc(this,this.w=0)}; -l.oa=function(a,b,c,d){if(this.H&&this.H.oa(a,b,c,d)||this.v&&this.v.oa(a,b,c,d)||this.D&&this.D.oa(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){dc(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){ec(a,b)}}(this,b),a.ontouchstart= -function(a,b){return function(c){dc(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){ec(a,b)}}(this,b),!0):u.prototype.oa.call(this,a,b,c,d)}};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;fc(this);gc(this)};l.xa=function(a,b){if(!b)if(this.U&&hc(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.na=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; -l.restore=function(a){if(a=a[0])ic(this,this.i=a[0]),cc(this,this.w=a[1]),jc(this,a[2]);return!0};l.cc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}gc(this);return!0};function kc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fc(a,b){for(var c in a.C)kc(a,c,null!=b?b:a.C[c])}function lc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gc(a){for(var b in a.b)lc(a,b,a.b[b][1])} -l.Ob=function(a,b,c){if(dc(this,b)){if(c){var d=this;setTimeout(function(){ec(d,b);a&&a()},+c);return!1}ec(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return jc(this,ta(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,lc(this,a,c[1]),!0):!1};l.gc=function(a){return dc(this,a)?(ec(this,a),!0):!1};function dc(a,b){var c=a.b[b];return c?(lc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=mc&&(a.P=b==nc,a.R=b==oc),!0):!1} -function ec(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(lc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[pc]&&this.b[pc][1]&&qc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; -l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[pc]&&this.b[pc][1])qc(this.v);else{if((a=this.D)&&!Mb(a,!0))Nb(a,!0),rc(a,0,null),Nb(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){m=h.size-(e-k);m>f&&(m=f);h.Pa=e-h.B+m;e=k+16384;f-=m;g++;continue}}return Hc(Ic,e,f)}e=new zc(a,e,m,16384,d);Ec(e,a.D,h);a.b[g++]=e;e=k+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Jc[d]+" at "+n(b)),!0):Hc(Kc,b,c)} -function xc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function wc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Fc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.pa,c=!0);0<=a.ja&&a.ja<=ed(a)&&(a.pa=a.ja=-1,ad(a),a.V(),c=!0);c&&a.u(ed(a)+" cycles: checksum="+q(a.Ca))}} -l.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=qb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&id(a.H)}tc(a,a.M);a.M=0;a.L=ob();a.P=0;gd(a);return d}function jd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function kd(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ld(a,b){var c=a.R-=a.T;a.T=0;b&&(a.R=0);return c} -l.dc=function(){if(this.A.N){this.Va>=this.eb&&gd(this,!0);this.ka=0;this.Ba=ob();if(this.P){var a=this.Ba-this.P;a>this.cb&&(this.L+=a,this.L>this.Ba&&(this.L=this.Ba))}try{do{var b=jd(this,this.A.Ma?1:this.Ea);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=ld(this,!0);this.ka+=b;this.M+=b;uc(this,b);sc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Ea;++this.fb>=md&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(ob(),ed(this));zb(this, -e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=ob();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Ea));var c=c-(this.P-this.Ba),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,fd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; -function qc(a,b){if(!Jb(a))if(a.A.N)a.u(a.toString()+" busy");else{fd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&id(a.H,!0),a.H.start(a.L,ed(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){ld(this);tc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(ob(),ed(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var hd=30,md=15,Yc=["power","reset"]; -function nd(a){var b=+a.model||1001;Xc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=od.bind(this);this.w=K.bind(this);this.za=null;this.ob=[];this.A.complete=!1}la(nd,Xc);l=nd.prototype; -l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Fa=this.Ga=this.b=this.K=0;this.i=this.Aa=this.Sa;this.I=this.sa=-1;this.F=this.j=0;this.gb=[0,0];this.qa=[0,0];this.ha=[0,0];this.ra=[0,0];this.ya=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.za=null;$c(this);this.A.error=!1;Xc.prototype.reset.call(this)};l.Bb=function(){return 0}; -l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Fa,this.Ga,this.i,this.sa,this.I,this.j,this.C,this.Aa,this.ya,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,pd(this));a.set(4,kd(this));return a.data()}; -l.restore=function(a){var b;b=a[0];ha();ca();ha();var c=b[Symbol.iterator];b=c?c.call(b):ia(b);this.b=b.next().value;this.K=b.next().value;this.Fa=b.next().value;this.Ga=b.next().value;this.i=b.next().value;this.sa=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.Aa=b.next().value;this.ya=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];fd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.ya=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; -l.Ra=function(a){this.A.complete=!0;var b=this.D?rd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.T=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(sd(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.za||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&sd(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Fa=this.f(this.b):0<=this.sa?(this.K=this.Ga=this.f(this.sa),this.sa=-1):(this.K= -this.Ga=this.f(this.Aa=this.i),this.i=(this.i+1)%Sb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Fa=this.f(a))&Rb;a=this.K&4194304?-1:this.Ga/Yb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} -function ud(){var a=0,b=this.f(this.b),c=b/Zb&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*Zb+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function vd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} -function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/Zb&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function xd(a,b){this.g(b,this.f(this.b))}function yd(a,b){this.g(b,this.b)}function zd(a,b){this.g(this.b,this.f(b))}function Ad(a,b){this.g(b,0)}function Bd(a,b){this.g(b,C-this.f(b))}function Cd(a,b){this.g(b,C)} -function Dd(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Ed(a,d,c)+(c-(c&y)))}function Xd(a,b){var c=this.f(b);this.g(b,Ed(a,c,0))}function Yd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+(b-(b&y)))}function Zd(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function $d(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)} -function ae(a,b){var c=this.b*z,d=this.f(b);this.g(b,Ed(a,d,c)+c)}function be(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Ed(a,c,b)+b)}function ce(a,b){var c=this.f(this.b),d=(c&y)*z,c=Ed(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function de(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,ee(a,d,c)+c)}function fe(a,b){var c=this.f(b);this.g(b,ee(a,c,this.b)+this.b)}function ge(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)} -function he(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Tb?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ie(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,ee(a,d,c)+c)}function je(a,b){var c=this.f(b);this.g(b,ee(a,c,0))}function ke(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,ee(a,c,b)+b)}function le(a,b){var c=this.f(this.b),d=c/z|0,c=ee(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){me[a&7].call(this,a,a>>3&127)} -function ne(){}function oe(){}function K(a){this.u("undefined opcode: "+n(a));qd(this,-1);this.V()}function pe(a){a>A&&(a!=B?a=Vb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;qe.call(this,a,b,c);return c} -function re(a,b,c){var d=!1,e=!1,f=b-b%B;a=a%B+b*B%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=C-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.qa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.ra;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),te(this.gb,this.qa),ue(this.ra)))break;ve(this.ha);ve(this.qa)}while(!ue(this.qa)); -a=this.gb[0];this.F=this.ra[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} -function we(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=C||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%B;b=2*b%E+Math.trunc(c/B);c=a+c%B;d=b-b%B;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} -function xe(a){a?a==B?this.j|=163840:a=Vb-a:this.j|=98304;return a}function P(a,b){var c=a-b;0>c&&(c+=E);qe.call(this,c,b,a);return c}function qe(a,b,c){a=Math.trunc(a/Ub);b=Math.trunc(b/Ub);c=Math.trunc(c/Ub);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function Q(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function R(a,b){return Q(a,(~(b/F|0)&15)*F+(~b>>>0))}function S(a,b){return(a>>0)}function T(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function U(a){return a>>0)}function W(a){return(a/z|0)+(a&y)*z}function ee(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Tb?y*z:0}return b}function Ed(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} -function te(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function se(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function ve(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ue(a){return!a[0]&&!a[1]} -var td=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},ud,function(a,b){0>this.I&&ud.call(this);vd.call(this,0,b)},vd,function(a,b){0>this.I&&ud.call(this);wd.call(this,0,b)},wd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, +function bc(a,b){u.call(this,"Panel",a,512);this.K=this.L=0;this.U=b;this.i=this.I=this.j=this.w=0;this.M=this.O=-1;this.P=this.R=this.F=!1;this.S=cc;this.C={};this.b={START:[1,1,!0,!1,this.Xb],STEP:[1,1,!1,!1,this.Yb],ENABLE:[1,1,!1,!1,this.Sb],CONT:[1,1,!0,!1,this.Qb],DEP:[0,0,!0,!1,this.Rb],EXAM:[1,1,!0,!1,this.Tb],LOAD:[1,1,!0,!1,this.Vb],TEST:[0,0,!0,!1,this.Ub]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Wb,a];this.D=this.v=this.G=this.H=null;this.exports={hold:this.Ob,toggle:this.gc,reset:this.cc, +set:this.fc};Mb(this)}ma(bc,u);l=bc.prototype;l.reset=function(a){this.stop();a&&dc(this,this.w=0)}; +l.na=function(a,b,c,d){if(this.H&&this.H.na(a,b,c,d)||this.v&&this.v.na(a,b,c,d)||this.D&&this.D.na(a,b,c,d))return!0;switch(b){case "PC":return this.J[b]=c,this.L++,!0;default:return"led"==a||"rled"==a?(this.J[b]=c,this.C[b]=d?1:0,this.L++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.J[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ec(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){fc(a,b)}}(this,b),a.ontouchstart= +function(a,b){return function(c){ec(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){fc(a,b)}}(this,b),!0):u.prototype.na.call(this,a,b,c,d)}};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;gc(this);hc(this)};l.wa=function(a,b){if(!b)if(this.U&&ic(),!a)this.reset(!0);else if(!this.restore(a))return!1;return!0};l.ma=function(a){return a?this.save():!0};l.save=function(){var a=new G(this);a.set(0,[this.i,this.w,this.j]);return a.data()}; +l.restore=function(a){if(a=a[0])jc(this,this.i=a[0]),dc(this,this.w=a[1]),kc(this,a[2]);return!0};l.cc=function(){for(var a in this.b){var b=this.b[a];b[1]=b[0]}hc(this);return!0};function lc(a,b,c){if(a=a.J[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gc(a,b){for(var c in a.C)lc(a,c,null!=b?b:a.C[c])}function mc(a,b,c){if(a=a.J[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hc(a){for(var b in a.b)mc(a,b,a.b[b][1])} +l.Ob=function(a,b,c){if(ec(this,b)){if(c){var d=this;setTimeout(function(){fc(d,b);a&&a()},+c);return!1}fc(this,b)}return!0};l.fc=function(a,b){if("SR"==a)return kc(this,ua(b,8));var c=this.b[a];return c?(c[1]=+b?1:0,mc(this,a,c[1]),!0):!1};l.gc=function(a){return ec(this,a)?(fc(this,a),!0):!1};function ec(a,b){var c=a.b[b];return c?(mc(a,b,c[1]=1-c[1]),c[3]=!0,c[4]&&c[4].call(a,c[1],c[5]),b!=nc&&(a.P=b==oc,a.R=b==pc),!0):!1} +function fc(a,b){var c=a.b[b];c&&(c[2]&&c[3]&&(mc(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5])),c[3]=!1)}l.Xb=function(a){a||this.v.A.N||(H(this.v,this.i),this.b[qc]&&this.b[qc][1]&&rc(this.v))};l.Yb=function(){};l.Sb=function(a){a||this.v.V()}; +l.Qb=function(a){if(!a&&!this.v.A.N)if(this.b[qc]&&this.b[qc][1])rc(this.v);else{if((a=this.D)&&!Nb(a,!0))Ob(a,!0),sc(a,0,null),Ob(a,!1);else try{var b=this.v.Ra(1);0c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.b["S"+b][1]=a.j&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.i;0f&&(n=f);if(h&&h.size){if(h.type==d){if(e+f<=h.B)return h.Pa+=h.B-e,h.B=e,!0;if(e>=h.B+h.Pa){n=h.size-(e-k);n>f&&(n=f);h.Pa=e-h.B+n;e=k+16384;f-=n;g++;continue}}return Ic(Jc,e,f)}e=new Ec(a,e,n,16384,d);Fc(e,a.D,h);a.b[g++]=e;e=k+16384;f-=n}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+Kc[d]+" at "+m(b)),!0):Ic(Lc,b,c)} +function yc(a,b){var c=a.b[(b&a.j)>>>a.i];a.w++;b=c.D(b&16383,b);a.w--;return b}function xc(a,b,c){var d=a.b[(b&a.j)>>>a.i];a.w++;d.w(c,b&16383,b);a.w--}function Gc(a){for(var b=0,c=[],d=0;d=a.ia&&(a.ia+=a.oa,c=!0);0<=a.ja&&a.ja<=fd(a)&&(a.oa=a.ja=-1,bd(a),a.V(),c=!0);c&&a.u(fd(a)+" cycles: checksum="+q(a.Ba))}} +l.na=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.J[b]=c,!0;case "run":return this.J[b]=c,c.onclick=function(){var a;if(a=d.H)if(a=d.H,a.A.X)a=!0;else{var b=null,c,h=rb(a.id);for(c=0;ca.ba/a.ca?b=1:d=!0;a.fa=b;b=a.bb*a.fa;if(a.ca!=b){a.ca=b;b=a.ca.toFixed(2)+"Mhz";var e=a.J.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.H&&jd(a.H)}uc(a,a.M);a.M=0;a.L=pb();a.P=0;hd(a);return d}function kd(a,b){for(var c=a.O.length-1;0<=c;c--){var d=a.O[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ld(a){for(var b=[],c=0;cd[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function md(a,b){var c=a.R-=a.S;a.S=0;b&&(a.R=0);return c} +l.dc=function(){if(this.A.N){this.Va>=this.eb&&hd(this,!0);this.ka=0;this.Aa=pb();if(this.P){var a=this.Aa-this.P;a>this.cb&&(this.L+=a,this.L>this.Aa&&(this.L=this.Aa))}try{do{var b=kd(this,this.A.Ma?1:this.Da);try{this.Ra(b)}catch(e){if("number"!=typeof e)throw e;}b=md(this,!0);this.ka+=b;this.M+=b;vc(this,b);tc(this,b);this.ga-=b;if(0>=this.ga){this.ga+=this.Da;++this.fb>=nd&&(this.H&&I(this.H,void 0),this.fb=0);break}}while(this.A.N)}catch(e){this.V();this.H&&this.H.stop(pb(),fd(this));Jb(this, +e.stack||e.message);return}if(this.A.N){a=setTimeout;b=this.yb;this.P=pb();var c=this.cb;this.ka&&(c=Math.round(c*this.ka/this.Da));var c=c-(this.P-this.Aa),d=this.P-this.L;d&&(this.ba=Math.round(this.M/(10*d))/100,864E5<=d&&(this.U=0,gd(this)));if(0>c||this.bac&&(this.L-=c),c=0;this.Va+=this.ka;this.P+=c;a(b,c)}}}; +function rc(a,b){if(!Kb(a))if(a.A.N)a.u(a.toString()+" busy");else{gd(a);a.A.N=!0;a.A.$a=!0;var c=a.J.run;c&&(c.textContent="Halt");a.H&&(b&&jd(a.H,!0),a.H.start(a.L,fd(a)));a.D||a.status("Started");setTimeout(a.yb,0)}}l.Ra=function(){return 0};l.V=function(a){var b=!1;if(this.A.N){md(this);uc(this,this.M);this.M=0;this.A.N=!1;if(b=this.J.run)b.textContent="Run";this.H&&this.H.stop(pb(),fd(this));b=!0;this.D||this.status("Stopped")}this.A.complete=a;return b};var id=30,nd=15,Zc=["power","reset"]; +function od(a){var b=+a.model||1001;Yc.call(this,a,1E6);this.wb=b;this.Sa=+a.addrReset||0;this.Kb=pd.bind(this);this.w=K.bind(this);this.ya=null;this.ob=[];this.A.complete=!1}ma(od,Yc);l=od.prototype; +l.reset=function(){this.status("Model "+this.wb);this.A.N&&this.V();this.Ea=this.Fa=this.b=this.K=0;this.i=this.za=this.Sa;this.I=this.ra=-1;this.F=this.j=0;this.gb=[0,0];this.pa=[0,0];this.ha=[0,0];this.qa=[0,0];this.xa=this.i;this.C=0;this.f=this.$b;this.g=this.kc;this.ya=null;ad(this);this.A.error=!1;Yc.prototype.reset.call(this)};l.Bb=function(){return 0}; +l.save=function(){var a=new G(this);a.set(0,[this.b,this.K,this.Ea,this.Fa,this.i,this.ra,this.I,this.j,this.C,this.za,this.xa,this.Sa]);a.set(1,[]);a.set(2,[this.U,this.fa,this.A.aa]);a.set(3,qd(this));a.set(4,ld(this));return a.data()}; +l.restore=function(a){var b;b=a[0];ia();da();ia();var c=b[Symbol.iterator];b=c?c.call(b):ja(b);this.b=b.next().value;this.K=b.next().value;this.Ea=b.next().value;this.Fa=b.next().value;this.i=b.next().value;this.ra=b.next().value;this.I=b.next().value;this.j=b.next().value;this.C=b.next().value;this.za=b.next().value;this.xa=b.next().value;this.Sa=b.next().value;b=a[2];this.U=b[0];gd(this,b[1]);this.A.aa=b[2];b=a[3];for(c=b.length-1;0<=c;c--){var d;a:{for(d=0;d>>b.i].f(a&16383,a)};l.kc=function(a,b){var c=this.G;a=this.xa=a;c.b[(a&c.j)>>>c.i].g(b,a&16383,a);return b}; +l.Ra=function(a){this.A.complete=!0;var b=this.D?sd(this.D)?1:this.A.$a?-1:0:0,c=a?this.A.$a?0:1:-1;this.A.$a=!1;this.R=this.S=a;this.C=this.C&-5|(b?4:0);do{if(this.C){if(this.C&4){if(td(this.D,this.i,c)){this.V();break}++b||(this.C&=-5);c||c++}if(a=this.C&11)this.C&2?this.ya||(this.C&=-3):this.C&1&&this.C++,a=!1;if(a){if(this.C&4&&td(this.D,this.i,c)){this.V();break}if(0>c)break}}this.C&=15;this.K&4194304?this.K=this.Ea=this.f(this.b):0<=this.ra?(this.K=this.Fa=this.f(this.ra),this.ra=-1):(this.K= +this.Fa=this.f(this.za=this.i),this.i=(this.i+1)%Tb);this.K&=8388607;this.b=this.K&262143;if(a=this.K>>18&15)this.b=this.b+(this.Ea=this.f(a))&Sb;a=this.K&4194304?-1:this.Fa/Zb|0;0<=a&&this.Kb(a)}while(0>4].call(this,a,a&15)}function M(a){this.w(a)} +function vd(){var a=0,b=this.f(this.b),c=b/$b&63,d=b>>24&63,c=c-d;0>c&&(a++,c=36-d,0>c&&(c=64-d));b=c*$b+(d<<24)+(b&16777215);a&&(b=(b+a)%E);this.g(this.b,b)}function wd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;a=32>=c+d?(a>>c&(1<>>0:Math.trunc(a/Math.pow(2,c))%Math.pow(2,d);this.g(b,a);this.I=-1}} +function xd(a,b){a=this.f(this.b);if(0>this.I)this.I=a,this.K=this.b|4194304;else{var c=this.I/$b&63,d=this.I>>24&63;b=this.f(b)%Math.pow(2,d)*Math.pow(2,c)%E;a=a-a%Math.pow(2,c+d)+b+a%Math.pow(2,c);this.g(this.b,a);this.I=-1}}function yd(a,b){this.g(b,this.f(this.b))}function zd(a,b){this.g(b,this.b)}function Ad(a,b){this.g(this.b,this.f(b))}function Bd(a,b){this.g(b,0)}function Cd(a,b){this.g(b,D-this.f(b))}function Dd(a,b){this.g(b,D)} +function Ed(a,b){var c=this.f(this.b),d=this.f(b);this.g(b,Xd(a,d,c)+(c-(c&y)))}function Yd(a,b){var c=this.f(b);this.g(b,Xd(a,c,0))}function Zd(a,b){b=this.f(b);var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+(b-(b&y)))}function $d(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d-=d&y,a){case 256:d+=y;break;case 384:d+=c>A?y:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function ae(a,b){var c=(this.f(this.b)&y)*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)} +function be(a,b){var c=this.b*z,d=this.f(b);this.g(b,Xd(a,d,c)+c)}function ce(a,b){b=(this.f(b)&y)*z;var c=this.f(this.b);this.g(this.b,Xd(a,c,b)+b)}function de(a,b){var c=this.f(this.b),d=(c&y)*z,c=Xd(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function ee(a,b){var c=this.f(this.b)&y,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ge(a,b){var c=this.f(b);this.g(b,fe(a,c,this.b)+this.b)}function he(a,b){b=this.f(b)&y;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)} +function ie(a,b){var c=this.f(this.b),d=c;if(a&=384)switch(d&=y,a){case 256:d+=y*z;break;case 384:d+=c>Ub?y*z:0}c=d;this.g(this.b,c);b&&this.g(b,c)}function je(a,b){var c=this.f(this.b)/z|0,d=this.f(b);this.g(b,fe(a,d,c)+c)}function ke(a,b){var c=this.f(b);this.g(b,fe(a,c,0))}function le(a,b){b=this.f(b)/z|0;var c=this.f(this.b);this.g(this.b,fe(a,c,b)+b)}function me(a,b){var c=this.f(this.b),d=c/z|0,c=fe(a,c,d)+d;this.g(this.b,c);b&&this.g(b,c)}function N(a){ne[a&7].call(this,a,a>>3&127)} +function oe(){}function pe(){}function K(a){this.u("undefined opcode: "+m(a));rd(this,-1);this.V()}function qe(a){a>A&&(a!=C?a=Wb-a:this.j|=163840);return a}function O(a,b){var c=(a+b)%E;re.call(this,a,b,c);return c} +function se(a,b,c){var d=!1,e=!1,f=b-b%C;a=a%C+b*C%E;b=this.F=f+Math.trunc(b/2);c>A&&(c=E-c,d=!d);b>A&&(a?(b=D-b,a=E-a):b&&(b=E-b),e=!0,d=!d);if(b>=c)return this.j|=131104,-1;f=this.gb;f[0]=0;f[1]=0;f=this.pa;f[0]=1;f[1]=0;f=this.ha;f[0]=c;f[1]=0;c=this.qa;c[0]=a;for(c[1]=b;0b[0]&&(b[0]+=E,b[1]--),ue(this.gb,this.pa),ve(this.qa)))break;we(this.ha);we(this.pa)}while(!ve(this.pa)); +a=this.gb[0];this.F=this.qa[0];d&&a&&(a=E-a);e&&this.F&&(this.F=E-this.F);return a} +function xe(a,b,c){var d=a,e=b;b=!1;var f;d>A&&(d=E-d,b=!b);e>A&&(e=E-e,b=!b);if(dA)&&(f!=D||a<=A)&&(this.j|=131072),a;c=a;b=f;a=b-b%C;b=2*b%E+Math.trunc(c/C);c=a+c%C;d=b-b%C;a!=d&&(b=a+(b-d),this.j|=131072);this.F=c;return b} +function ye(a){a?a==C?this.j|=163840:a=Wb-a:this.j|=98304;return a}function Q(a,b){var c=a-b;0>c&&(c+=E);re.call(this,c,b,a);return c}function re(a,b,c){a=Math.trunc(a/Vb);b=Math.trunc(b/Vb);c=Math.trunc(c/Vb);var d=a^(a^b)&(b^c);this.j=this.j|(d&2?65536:0)|(d&1?32768:0)|((a^c)&(b^c)&2?131072:0)}function R(a,b){return((a/F|0)&(b/F|0))*F+((a&b)>>>0)}function S(a,b){return R(a,(~(b/F|0)&15)*F+(~b>>>0))}function T(a,b){return(a>>0)}function U(a,b){return(a/F|0|b/F|0)*F+((a|b)>>>0)}function V(a){return a>>0)}function X(a){return(a/z|0)+(a&y)*z}function fe(a,b,c){switch(a&384){case 0:b-=b&y;break;case 128:b=0;break;case 256:b=y*z;break;case 384:b=c>Ub?y*z:0}return b}function Xd(a,b,c){switch(a&384){case 0:b&=y;break;case 128:b=0;break;case 256:b=y;break;case 384:b=c>A?y:0}return b} +function ue(a,b){a[0]+=b[0];a[1]+=b[1];a[0]>=E&&(a[0]%=E,a[1]++)}function te(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function we(a){a[1]%2&&(a[0]+=E);a[0]=Math.trunc(a[0]/2);a[1]=Math.trunc(a[1]/2)}function ve(a){return!a[0]&&!a[1]} +var ud=[M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},vd,function(a,b){0>this.I&&vd.call(this);wd.call(this,0,b)},wd,function(a,b){0>this.I&&vd.call(this);xd.call(this,0,b)},xd,function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)}, -function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},xd,yd,zd,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(this.b)))},function(a,b){this.g(b,xe.call(this,this.b))},function(a,b){this.g(this.b, -xe.call(this,this.f(b)))},function(a,b){a=xe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,pe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,pe.call(this,this.f(b)))},function(a,b){a=pe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,we.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b), -!0))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,we.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,we.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,we.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,we.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ -1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=re.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, -function(a,b){a=this.f(b);b=this.f(b+1&15);b=re.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=re.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?B:0,c=A):(d=d*Math.pow(2,c)%B,c=B-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; -this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& -dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=B,e+=B)}else d=d*Math.pow(2,a)%B+Math.trunc(e%B/Math.pow(2,35-a)),e=e*Math.pow(2,a)%B,c=B-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=B,e+=B)}else-36>=a?(e=-72>=a?d>A?C:0:Math.trunc(d%B/Math.pow(2,-a-35)),d<=A?d=0:(d=C,e+=B)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%B/Math.pow(2,-a))+ -d%B*Math.pow(2,35+a)%B,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=B));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ +function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},function(a){this.w(a)},yd,zd,Ad,function(a,b){b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(b,a)},function(a,b){this.g(b,this.b*z)},function(a,b){a=this.f(b);a=(a/z|0)+(a&y)*z;this.g(this.b,a)},function(a,b){a=this.f(this.b);a=(a/z|0)+(a&y)*z;this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,ye.call(this,this.f(this.b)))},function(a,b){this.g(b,ye.call(this,this.b))},function(a,b){this.g(this.b, +ye.call(this,this.f(b)))},function(a,b){a=ye.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,qe.call(this,this.f(this.b)))},function(a,b){this.g(b,this.b)},function(a,b){this.g(this.b,qe.call(this,this.f(b)))},function(a,b){a=qe.call(this,this.f(this.b));this.g(this.b,a);b&&this.g(b,a)},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b),!0))},function(a,b){this.g(b,xe.call(this,this.f(b),this.b,!0))},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b), +!0))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b),!0)))},function(a,b){this.g(b,xe.call(this,this.f(b),this.f(this.b)));this.g(b+1&15,this.F)},function(a,b){this.g(b,xe.call(this,this.f(b),this.b));this.g(b+1&15,this.F)},function(a,b){this.g(this.b,xe.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,xe.call(this,this.f(b),this.f(this.b))));this.g(b+1&15,this.F)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||(this.g(b,a),this.g(b+ +1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.b);0>a||(this.g(b,a),this.g(b+1&15,this.F))},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=se.call(this,this.f(b),0,this.f(this.b));0>a||this.g(this.b,a)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,c),this.g(b+1&15,this.F))},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.b);0>c||(this.g(b,c),this.g(b+1&15,this.F))}, +function(a,b){a=this.f(b);b=this.f(b+1&15);b=se.call(this,b,a,this.f(this.b));0>b||this.g(this.b,b)},function(a,b){a=this.f(b);var c=this.f(b+1&15),c=se.call(this,c,a,this.f(this.b));0>c||(this.g(b,this.g(this.b,c)),this.g(b+1&15,this.F))},function(a,b){var c=(this.b<<14>>14)%256;if(c){a=this.f(b);var d=a>A?-(E-a):a;0d?C:0,c=A):(d=d*Math.pow(2,c)%C,c=C-Math.pow(2,35-c)),a<=A?a+c>A&&(this.j|=131072):a-c<=A&&(this.j|=131072)):d=-35>=c?0>d?-1:0:Math.trunc(d/Math.pow(2,-c));a=0>d?d+E:d; +this.g(b,a)}},function(a,b){if(a=(this.b<<14>>14)%36){var c=this.f(b);0>a&&(a=36+a);c=c*Math.pow(2,a)%E+Math.trunc(c/Math.pow(2,36-a));this.g(b,c)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),c=0=a?0:Math.trunc(c/Math.pow(2,-a));this.g(b,c)}},function(a,b){a=0;var c=this.f(b);if(c){for(;c>14)%256){var c,d=this.f(b),e=this.f(b+1&15);if(0A&& +dA&&eA&&(this.j|=131072):e-c<=A&&(this.j|=131072);e=0;f>A&&(d+=C,e+=C)}else d=d*Math.pow(2,a)%C+Math.trunc(e%C/Math.pow(2,35-a)),e=e*Math.pow(2,a)%C,c=C-Math.pow(2,35-a),f<=A?f+c>A&&(this.j|=131072):(f-c<=A&&(this.j|=131072),d+=C,e+=C)}else-36>=a?(e=-72>=a?d>A?D:0:Math.trunc(d%C/Math.pow(2,-a-35)),d<=A?d=0:(d=D,e+=C)):(c=d>A?E-Math.pow(2,36+a):0,e=Math.trunc(e%C/Math.pow(2,-a))+ +d%C*Math.pow(2,35+a)%C,d=Math.trunc(d/Math.pow(2,-a))+c,d>A&&(e+=C));this.g(b,d);this.g(b+1&15,e)}},function(a,b){if(a=(this.b<<14>>14)%72){var c=this.f(b),d=this.f(b+1&15),e=c;0>a&&(a=72+a);36>a?(c=c*Math.pow(2,a)%E+Math.trunc(d/Math.pow(2,36-a)),d=d*Math.pow(2,a)%E+Math.trunc(e/Math.pow(2,36-a))):(c=d*Math.pow(2,a-36)%E+Math.trunc(c/Math.pow(2,72-a)),d=e*Math.pow(2,a-36)%E+Math.trunc(d/Math.pow(2,72-a)));this.g(b,c);this.g(b+1&15,d)}},function(a,b){if(a=(this.b<<14>>14)%256){var c=this.f(b),d=this.f(b+ 1&15);0=a?(d=-72>=a?0:Math.trunc(c/Math.pow(2,-a-36)),c=0):(d=Math.trunc(d/Math.pow(2,-a))+c*Math.pow(2,36+a)%E,c=Math.trunc(c/Math.pow(2,-a)));this.g(b,c);this.g(b+1&15,d)}},K,function(a,b){a=this.f(b);this.g(b,this.f(this.b));this.g(this.b,a)},function(a,b){a=!1;for(var c=this.f(b),d=c/z|0,c=c&y;!a;)this.g(c,this.f(d)),c==this.b&&(a=!0),d=d+1&y,c=c+1&y,this.A.N||(this.g(b,d* -z+c),a||qd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%C;this.g(b,a);a=B&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Fa,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.sa=this.b},K,function(a){this.w(a)},function(a,b){a= +z+c),a||rd(this,-1),a=!0)},function(a,b){a=(this.f(b)+262145)%D;this.g(b,a);a=C&&H(this,this.b)},function(a,b){b&1&&(this.j|=4096);if(b&2){var c=this.Ea,c=c/z|0;this.j=this.j&-254049|c&254048;this.j|=c&4096;c&2048?this.j&4096||(this.j|=2048):this.j&=-2049}b&4&&this.V();b&8&&this.w(a);H(this,this.b)},function(a,b){a=b<<14;this.j&a&&(this.j&=~a,H(this,this.b))},function(){this.ra=this.b},K,function(a){this.w(a)},function(a,b){a= this.f(b);a+=262145;this.g(a&y,this.f(this.b));a>=E&&(a-=E);a/z|0||(this.j|=262144);this.g(b,a)},function(a,b){a=this.f(b);var c=this.f(a&y);this.g(this.b,c);this.b==b&&(a=c);a-=262145;0>a&&(a+=E);(a/z|0)==y&&(this.j|=262144);this.g(b,a)},function(a){this.w(a)},function(){this.g(this.b,(this.j&y)*z+this.i);H(this,this.b+1)},function(a,b){this.g(b,(this.j&y)*z+this.i);H(this,this.b)},function(a){this.w(a)},function(a){this.w(a)},function(a,b){this.g(b,O.call(this,this.f(b),this.f(this.b)))},function(a, -b){this.g(b,O.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,O.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,O.call(this,this.f(b),this.f(this.b))))},function(a,b){this.g(b,P.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(b,P.call(this,this.f(b),this.b))},function(a,b){this.g(this.b,P.call(this,this.f(b),this.f(this.b)))},function(a,b){this.g(this.b,this.g(b,P.call(this,this.f(b),this.f(this.b))))},ne,function(a,b){0>S(this.f(b),this.b)&&H(this, -this.i+1)},function(a,b){S(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){S(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=S(this.f(b),this.f(this.b))&&H(this,this.i+1)}, -function(){H(this,this.i+1)},function(a,b){0<=S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){S(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))||H(this,this.b)},function(a,b){0>=U(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=U(this.f(b))&&H(this,this.b)},function(a,b){U(this.f(b))&&H(this,this.b)},function(a,b){0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); -0U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), -1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, -O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0U(a)&&H(this,this.b)},function(a, -b){a=this.g(b,P.call(this,this.f(b),1));U(a)||H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0>=U(a)&&H(this,this.b)},function(a,b){this.g(b,P.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0<=U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));U(a)&&H(this,this.b)},function(a,b){a=this.g(b,P.call(this,this.f(b),1));0U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0>=U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0<=U(a)&&H(this,this.i+1);b&&this.g(b,a)}, -function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));U(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,P.call(this,this.f(this.b),1));0T(this.f(b),this.b)&&H(this, +this.i+1)},function(a,b){T(this.f(b),this.b)||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.b)&&H(this,this.i+1)},function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){T(this.f(b),this.b)&&H(this,this.i+1)},function(a,b){0T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))||H(this,this.i+1)},function(a,b){0>=T(this.f(b),this.f(this.b))&&H(this,this.i+1)}, +function(){H(this,this.i+1)},function(a,b){0<=T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){T(this.f(b),this.f(this.b))&&H(this,this.i+1)},function(a,b){0V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))||H(this,this.b)},function(a,b){0>=V(this.f(b))&&H(this,this.b)},function(){H(this,this.b)},function(a,b){0<=V(this.f(b))&&H(this,this.b)},function(a,b){V(this.f(b))&&H(this,this.b)},function(a,b){0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){H(this,this.i+1);b&&this.g(b,this.f(this.b))},function(a,b){a=this.f(this.b);0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b);V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.f(this.b); +0V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,O.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b), +1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,O.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b, +O.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,O.call(this,this.f(this.b),1));0V(a)&&H(this,this.b)},function(a, +b){a=this.g(b,Q.call(this,this.f(b),1));V(a)||H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0>=V(a)&&H(this,this.b)},function(a,b){this.g(b,Q.call(this,this.f(b),1));H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0<=V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));V(a)&&H(this,this.b)},function(a,b){a=this.g(b,Q.call(this,this.f(b),1));0V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)||H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>=V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0<=V(a)&&H(this,this.i+1);b&&this.g(b,a)}, +function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));V(a)&&H(this,this.i+1);b&&this.g(b,a)},function(a,b){a=this.g(this.b,Q.call(this,this.f(this.b),1));0>>f.i;0>>= -f.i;0>>a.i;0g&&g>=-B&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=na.pb&&c<=na.Ib&&(b=c-(na.pb-na.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==na.Gb&&(b=na.Fb);d.Ya(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); -a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ha=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Lb(this)}; -l.Cb=function(a){if(!this.b){var b=Zc(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Fa(c[0]);if(d!=this.Ta)return;c=Fa(c[1]);if(this.b=rb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.xa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; -l.na=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[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(Fa(b.substring(c,f))),c=f+1}}return a} -function Je(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} -function Ke(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; -case "&":e=a;32>=e.ia?f&=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^^":e=a;32>=e.ia?f|=g:(f=Je(e,f,0,!0),g=Je(e,g,0,!0),f=((f/Le|0)^(g/Le|0))*Le+((f^g)>>>0));break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "><":if(g=35-(g&255))0>f&&(f+=Math.pow(2,36)),f=0<"==k?10:e; -p=!1}Ke(a,t,D)&&1==t.length||(m=!0);m?!1===f&&a.u("parse error ("+(h||k)+")"):g=t.pop();a.S=Y;return g}function Pe(a,b,c){var d;a.ka=null;b&&("{"!=a.ba[0]&&(b=b.split(a.ba[0]).join("{").split(a.ba[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Me(a,b,0,b.length,a.S,c),void 0!==d&&!1===c&&Qe(a,null,d));return d} -function Ne(a,b,c,d,e){var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(f=ta(e?"-"+b:b,a.S),e=!1)),null!=f?e&&(f=-f):d||a.u("invalid "+(c?c:"value")+": "+b)):d||a.u("missing "+(c||"value"));return f} -function Qe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;if(8==a.S)d=c+". "+n(c,0,!0);else{d=c;var f=4,g="";if(!f||4>=8;d=q(c,0,!0)+" "+c+". "+n(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Re(a){var b=a.K;a.K={};return b}function Se(a,b){if(b)return Qe(a,b,a.K[b]);var c=0;for(b in a.K)Qe(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Oe={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11},Le=Math.pow(2,32); -function Te(a){He.call(this,a);this.Ea=!1;this.Ca=18;this.ia=36;this.ba=["<",">"];this.qa=[];this.Da=X();this.L=X(0);this.pa=X(0);this.fa=X(0);this.F=[];this.b=this.M=this.I=[];Ue(this);this.T=this.ja=0;this.i=[];this.Aa=void 0;Ve(this);this.D=this;this.ya={};this.Y=this.xb=0;this.U=null;this.P=[];We(this,a.messages);this.sa=a.commands;this.O=0;this.Ja=this.Ba=null;this.C=this.Ga=this.Fa=this.ha=this.za=0;this.ra=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return dd(b, -a)}):void 0===global[w]&&(global[w]=function(a){return dd(b,a)})}la(Te,He);function Xe(a){a=a&&a.B;null==a&&(a=-1);return a}function X(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,S:c}}function Ye(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.S=d}function Ze(a){return[a.B,a.Wa,a.la,a.S,a.Za]}function $e(a,b){var c=X(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Ie(a,c.Za=b[4]));return c}l=Te.prototype; -l.Ha=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ca=b.F;(b=Zc(a,"messages"))&&We(this,b);if(a=Zc(a,"commands"))this.sa=a;af(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Xe(bf(d,c,d.pa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;k--;){var p=b[e];p.type==c?m++||d.u("..."):(c=p.type,m=Jc[c],p&&d.u(q(p.id,8)+" %"+ -q(e<a&&a>=-B&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ef(a){return n(a/Sb,6)+" "+n(a%Sb,6)} -function We(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Ie(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in $b){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.Aa==b&&(b=qd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ye(a.i[a.T],b),++a.T==a.i.length&&(a.T=0)));return!1} -function wf(a,b,c,d){var e=X(b.B),f=a.Ia(b,1),g,h,k,m=0,p=f/Wb|0,t;for(t in xf)if(g=xf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=yf;m=p&3;break;case 32256:k=zf;m=p&7;break;case 29248:k=Af,m=(p&48)>>2|(p&6)>>1}break}k=k&&k[m]||"";"S"==k&&g>Bf&&(k="B");k=Cf[g||0]+k;if(g){if(28700==h)h=f/Xb&127,m=J(a,h,-1);else for(h=f>>23&15,m=J(a,h,-1),p=0;m&&p>18&15)&&(k+="("+J(a,f, --1)+")")}else k=Ea(k,8)+ef(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ia(e,1),g+=" "+ef(k),null==e.B)break;while(e.B!=b.B)}h+=Ea(g,16)+f;c&&(h=Ea(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+ed(a.v).toString()+" cs="+q(a.v.Ca)):h+(null!=d?"="+d.toString():""));return h} -function Ef(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),m=0;mBf&&(ea="B");if(k==Cf[h]+ea){f=29248!=g?Y:(Y&3)<<1|(Y&12)<<2;f=(D|f<<6)*Wb;break}}if(0<=f)break}if(0<=f)break}}else c&& -(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ue(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.za=0;a.ja=0} -l.La=function(a,b,c){var d=!0;c||fg(this,a,b,!1,!0);if(a!=this.b){var e=Xe(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].La(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(hg(this,a,a.length-1,"set"),Ve(this)));return d};function fg(a,b,c,d,e){var f=!1;c=Xe(c);for(var g=1;g>>d.i],b==a.I));h.la||Ve(a);break}}return f} -function ig(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=n(d,2);Ye(e.Da,d);f+="="+J(e,e.Ia(e.Da),36)+" ";c+=f}if(b){b="";for(d=0;d=kf?1:d==hf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ga(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}m&&(h.a=m.replace(/''/g,'"'))}a.F.push({td:b,B:c,Pb:d,W:e,tb:f})}function lg(a,b,c){var d=[],e=Xe(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case gf:H(h, -g);Ye(a.L,h.i);break;case kf:f=65536;break;case lf:f=32768;break;case mf:f=131072;break;case nf:f=32;break;case of:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(kg(a,e));c&&(Ye(a.L,d.i),uf(a,J(a,a.L.B)))}}function sg(a,b){b=Fa(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.u(m)}h[3]&&(g=h[3],f=null);h=a.fa;m=b;h.B=m.B;h.Wa=m.Wa;h.la=m.la;h.S=m.S;a.u(wf(a,b,g,f));e-=b.B-k;c++}}} -function jg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(sf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Kb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length);var Jd= -[];"call"==Kf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Jf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.Aa=fa;Mf++;Ab--}}Mf||(a.u("no "+Lf+"history available"),a.Aa=void 0)}else{var fb=bf(a,oa,a.pa);if(fb){var Ka=0,Pf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||mh,Ka=Ne(a,Ca);else{var Qf=bf(a,Ca);Qf&& -(Ka=Qf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Pf?La+(qa+","):La+(oa+": "+qa+(0>Sf?" "+Md:""))}La&& -a.u(La);a.S=oh}}}}break;case "e":if("else"==g[0])break;var Tf,Uf,Vf=g[0],Od=g[1];"e"==Vf||"ew"==Vf?(Tf=a.Ia,Uf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=bf(a,Od,a.pa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null,th= -256;65536>Fb.B>>>0;){Td.B=a.Ia(Fb,2);if(null==Fb.B||!th--)break;if(!(Td.B&1)){for(var uh=a,Cc=Td,Xf=null,Gb=Cc.B,Yf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2dg)a.u("step commands:"), -a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var eg=X(a.v.i);a.Ia(eg);a.O?(a.La(a.b,eg,!0),qf(a)||(a.H&&id(a.H),a.O=0)):tg(a,dg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}tf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.S=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.S);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.pa= -Ib;break;case "start":a.v.Da=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&ad(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(fd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), -a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":tg(a,g[0],g[1]);break;case "u":uf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){qg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Qb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){sg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in vg)Vd+="\n"+ -Ea(Wd,9)+vg[Wd];rd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(gg){a.u("Debugger "+(gg.stack||gg.message)),d=!1}return d}function dd(a,b,c){b=Ie(a,b,c);for(var d in b)if(!jg(a,b[+d]))return!1;return!0} -var vg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Bf=20,Cf=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), -gf=0,hf=1,jf=2,kf=3,lf=4,mf=5,nf=6,of=7,ff="PC RA EA C0 C1 OV ND PD".split(" "),wg={},xf=(wg[28672]={0:101},wg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},wg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Bf,9216:53,9472:52, -9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},wg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},wg[29248]={24576:79,24640:80,25088:81,25152:82},wg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, -28692:98,28696:99,28700:100},wg),yf=["","I","M","S"],zf=" L E LE A GE N G".split(" "),Af="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Df=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],pf=1E3,sf=">> ";Ya(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&zg(a,"unrecognized HTML entity: "+c[0])}a.ea&&(a.ea+="\n");a.ea+=e;setTimeout(function(){xg(a)},0)}})}} -function yg(a){if(0<=a.R.indexOf("p"))return a.u(a.ea),0;var b=Re(a.i);try{var c,d=a.ea.split(/\r?\n/);for(c=0;c=--g)break}0>g&&a.error("missing bracket(s): "+f);0<=m&&(h=f.substr(m,k-m));for((f=h)&&(b=b.replace(f,Hg(a,Ig,f)));f=Jg(a,b);)b=b.replace(f,f.slice(0,-1));if(!Eg(a,d,b))switch(d){case "=":d=Cg(a,b);void 0===d?a.error("parseExpression("+ -b+")"):Gg(a,c,d);break;case Kg:case Lg:case Mg:Fg(a,e);break;case Ng:Og(a,0,b.replace(",",",,"));break;case Pg:case Qg:case Rg:Hg(a,d,b);break;case Sg:case Tg:break;default:c=d,d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Cg(a,b,!0):(c=Ef(a.i,c,d,a.ta,!0),0>c&&(c=Ef(a.i,"",b,a.ta,!0),0>c&&(c=void 0))),void 0!==c?Og(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} -function Eg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c){b=",";"("==c[0]&&(b+=")",c=c.substr(1));for(var e=[];c;){c=c.trim();var f=Ug(a,c,b);if(!f)break;e.push(f);c=c.substr(f.length+1)}Bg(a,d.ea,d.ub,e);return!0}if("_"!=b[0])return!1;switch(b.substr(1)){case Qg:d.mb||Bg(a,d.ea);break;case Rg:for(;0p)break;var m=p+1,t=p+h.length;p&&f[p-1].match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&f[t].match(/[0-9A-Z$%.]/i)||(f=f.substr(0,p)+k+f.substr(t),m=p+k.length)}if(!Ag(a,f))break}}pg.prototype.error=function(a){throw Error("error"+(this.ma?" at line "+wa(this.ma):"")+": "+a);}; -function zg(a,b){a.u("warning"+(a.ma?" at line "+wa(a.ma):"")+": "+b)}function Ug(a,b,c){c=void 0===c?",":c;for(var d=0,e=null,f=0;d"==g&&0>--f){a.error("missing bracket(s): "+b);break}d++}f?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.w+=b}if(null==a.j){var d=b=0,e,f,g=a.w.length;a.F==Lg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Og(a,d),b=0)}b&&Og(a,d)}return c} -function Hg(a,b,c){var d,e,f,g;a.J="<";a.H=">";e=f=[];if(b==Pg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(\([^)]*\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+" definition: "+c),"";b=d[1];a.v[b]&&a.error("macro redefined: "+b);e=d[2].match(/[A-Z$%.][0-9A-Z$%.]*/g);c=Wg;g=3}else if(b==Ig)a.J="[",a.H="]",b="_"+wa(a.ta,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)],c=Xg,a.D.push(b),g=0;else{g=Ug(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+ -1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="_"+b;c=Cg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;var h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.H&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,ea:h,ma:a.ma};a.b?a.C=b:Eg(a,b);return b}function Gg(a,b,c,d){var e,f;d=void 0===d?!1:d;e=void 0===e?!1:e;f=void 0===f?!1:f;b=b.toUpperCase().substr(0,6);d&&a.O[b]?a.error("label "+b+" redefined"):(a.O[b]={name:b,value:c,ma:a.ma,jd:d,hd:e,kd:f},a.i.K[b]=c)} -function Og(a,b,c){a.G[a.ta]=Dg(a,b);null!=c&&a.I.push({ta:a.ta,Db:c});a.ta++}function Dg(a,b,c){c=void 0===c?a.ta:c;var d=Je(a.i,b||0,36,!0);(b<-B||b>=E)&&zg(a,"truncated value "+n(b)+" at location "+n(c)+" to "+n(d));return d}pg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Kg="ASCII",Lg="ASCIZ",Pg="DEFINE",Qg="IFE",Ig="LITERAL",Sg="PAGE",Rg="REPEAT",Mg="SIXBIT",Tg="SUBTTL",Ng="XWD",Wg=-1,Xg=-2,Vg=-3; -function Yg(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;Zg(this,b);this.O=Zc(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.T=this.P=!1;this.ca=Zc(this,"url")||"";(Math.random()+.1).toString(36);this.i=$g(this);if(this.v=sb("CPU",this.id)){this.D=sb("Debugger",this.id);this.G=new yc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=qb(this.id);if((this.j=sb("Panel",this.id))&&this.j.wa)for(b= -0;b\nLicense: GPL version 3 or later ");for(b=0;bah){if(bh(d,this.L)){this.C=new G(this,"1.34.2",kh);bh(this.C)&&(lh(this,d),a=xh,yh(this.C));this.C.set(hh,Ha());zh(this.C);var e=this.b&&!this.K;if(a==ih||pb("Click OK to restore the previous "+Qb+" machine state, or CANCEL to reset the machine.")){if(c=gh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?bh(d,g):("error"==f&&"no machine state"!= -g?(this.da("Error: "+g),"unable to verify user"==g&&(Ra(Ah,""),this.i=null)):this.u(f+": "+g),yh(d),bh(d)?(c=gh(d),e=!0):c=!1))}e&&eh(this,c?d:null)}else a==xh&&d.clear()}else eh(this);delete this.L;delete this.I}e=qb(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Bh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(lh(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; -function lh(a,b){if(pb("There may be a problem with your "+Qb+" machine.\n\nTo help us diagnose it, click OK to send this "+Qb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Qb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ia("http://www.pcjs.org/api/v1/report",d,!0)}} -function ug(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",fh),h=Ha();g.set(hh,h);f.set(hh,h);f.set(Ch,"1.34.2");f.set(Dh,window?window.location.href:null);f.set(Eh,window?window.navigator.userAgent:"");a.v&&a.v.na&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.na(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=qb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.S||8,e=e||0,e=8==f?n(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ia(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,p=/( [a-z]+=)(['"])(.*?)\2/g;m=p.exec(f);)k=0>k.indexOf(m[1])?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Mh(a,b,c)}})}else c(a,null)} -function Nh(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Aa(a))}function g(a){f("Error: "+a);m&&(--Jh||hb(!0));m=!1}var h,k,m=!0;Jh++;nb[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");D.type="text/css";D.styleSheet?D.styleSheet.cssText=p:D.appendChild(document.createTextNode(p));t.appendChild(D)}d|| -(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Kh(d,null,a,null,!1,f,function(a,e){e?(mb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Jh||hb(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Jh|| -hb(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Kh(c,b,a,e,!0,f,p):Lh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(Y){g(Y.message)}return m}window.embedPDP10=function(a,b,c,d){hb(!1);return Nh("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){hb(!1);return Nh("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return sb(b,a+".machine")}; -window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!vb[a]){for(var c=!0,d=vb,e=a,f=b.length,g=[],h=[],k="",m=null,p=0;p>>f.i;0>>= +f.i;0>>a.i;0g&&g>=-C&&(g+=E);for(var g=Math.trunc(Math.abs(g))%E,h=d;f--&&h=ta.pb&&c<=ta.Ib&&(b=c-(ta.pb-ta.Eb));b&&(a.preventDefault&&a.preventDefault(),d.Ya(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ta.Gb&&(b=ta.Fb);d.Ya(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +a.preventDefault&&a.preventDefault();(a=a.clipboardData||window.clipboardData)&&d.Ya(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1};l.Ga=function(a,b,c,d){this.H=a;this.G=b;this.v=c;this.D=d;Mb(this)}; +l.Cb=function(a){if(!this.b){var b=$c(this.H,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Ga(c[0]);if(d!=this.Ta)return;c=Ga(c[1]);if(this.b=sb(c)){var e=this.b.exports;if(e){var f=e.connect;f&&f.call(this.b,this.j);if(this.C=e.receiveData){this.j=a;this.status("Connected "+this.Ua+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};l.wa=function(a,b){if(!b)if(this.Cb(this.j),!a)this.reset();else if(!this.restore(a))return!1;return!0}; +l.ma=function(a){return a?this.save():!0};l.reset=function(){};l.save=function(){var a=new G(this);a.set(0,[]);return a.data()};l.restore=function(){return!0};l.Ya=function(a){if("number"==typeof a)this.i.push(a);else if("string"==typeof a)for(var b=0,c,d=0;da.w&&a.j.length&&(a.w=0);if(0>a.w||b!=a.j[a.w])a.j.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.j[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(Ga(b.substring(c,f))),c=f+1}}return a}function Ke(a,b,c){if(32>=a.ia)return b|c;b=Y(a,b,0,!0);c=Y(a,c,0,!0);return((b/Le|0)^(c/Le|0))*Le+((b^c)>>>0)} +function Y(a,b,c,d){var e=b;c=c||a.ia;if(d)if(32==c)e=b>>>0;else if(32>c)e=b&(1<b||b>=a)e=b%a,0>e&&(e+=a)}else 32>=c?e=b|0:(a=Math.pow(2,c-1),b<-a?e=b%a:b>=2*a&&(e=b%(2*a)));b!=e&&(b=e);return b} +function Me(a,b,c,d){for(d=void 0===d?-1:d;d--&&c.length;){var e=c.pop();if(2>b.length)return!1;var f,g=b.pop();f=b.pop();switch(e){case "*":f*=g;break;case "/":if(!g)return!1;f=Math.trunc(f/g);break;case "%":if(!g)return!1;f%=g;break;case "+":f+=g;break;case "-":f-=g;break;case "<<":f<<=g;break;case ">>":f>>=g;break;case ">>>":f>>>=g;break;case "<":f=f":f=f>g?1:0;break;case ">=":f=f>=g?1:0;break;case "==":f=f==g?1:0;break;case "!=":f=f!=g?1:0;break; +case "&":e=a;32>=e.ia?f&=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=((f/Le|0)&(g/Le|0))*Le+((f&g)>>>0));break;case "!":case "|":e=a;32>=e.ia?f|=g:(f=Y(e,f,0,!0),g=Y(e,g,0,!0),f=(f/Le|0|g/Le|0)*Le+((f|g)>>>0));break;case "^!":f=Ke(a,f,g);break;case "&&":f=f&&g?1:0;break;case "||":f=f||g?1:0;break;case "_":case "^_":"^_"==e&&(g=35-(g&255));g&&(f=Y(a,f,0,!0),f=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Ne(a,b,0,b.length,a.T,c),void 0!==d&&!1===c&&Re(a,null,d));return d} +function Oe(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.kb(b),0<=f?f=a.lb(f):(f=a.K[b],null==f&&(0>e&&(b="-"+b,e=0),f=ua(b,a.T))),null!=f?0>e?f=-f:0>=8;d=q(c,0,!0)+" "+c+". "+m(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e}function Se(a){var b=a.K;a.K={};return b}function Te(a,b){if(b)return Re(a,b,a.K[b]);var c=0;for(b in a.K)Re(a,b,a.K[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Pe={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11},Le=Math.pow(2,32); +function Ue(a){Ie.call(this,a);this.Da=!1;this.Ba=18;this.ia=36;this.ba=["<",">"];this.pa=[];this.Ca=Z();this.L=Z(0);this.oa=Z(0);this.fa=Z(0);this.F=[];this.b=this.M=this.I=[];Ve(this);this.S=this.ja=0;this.i=[];this.za=void 0;We(this);this.D=this;this.xa={};this.Y=this.xb=0;this.U=null;this.P=[];Xe(this,a.messages);this.ra=a.commands;this.O=0;this.Ia=this.Aa=null;this.C=this.Fa=this.Ea=this.ha=this.ya=0;this.qa=this.ga=this.ca=null;var b=this;window?void 0===window[w]&&(window[w]=function(a){return ed(b, +a)}):void 0===global[w]&&(global[w]=function(a){return ed(b,a)})}ma(Ue,Ie);function Ye(a){a=a&&a.B;null==a&&(a=-1);return a}function Z(a,b,c){return{B:void 0===a?null:a,Wa:void 0===b?!1:b,la:!1,T:c}}function Ze(a,b,c,d){a.B=b;a.Wa=c||!1;a.la=!1;a.T=d}function $e(a){return[a.B,a.Wa,a.la,a.T,a.Za]}function af(a,b){var c=Z(b[0],b[1],b[2]);c.la=b[3];b[4]&&(c.sb=Je(a,c.Za=b[4]));return c}l=Ue.prototype; +l.Ga=function(a,b,c,d){this.G=b;this.H=a;this.v=c;this.ga=a.j;this.Ba=b.F;(b=$c(a,"messages"))&&Xe(this,b);if(a=$c(a,"commands"))this.ra=a;bf(this,function(a){a:{var b=d.G.b,c=a[0],e=a=0,k=b.length;if(c){a=Ye(cf(d,c,d.oa));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.G.i;k=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,n=0;k--;){var p=b[e];p.type==c?n++||d.u("..."):(c=p.type,n=Kc[c],p&&d.u(q(p.id,8)+" %"+ +q(e<a&&a>=-C&&(a+=E);return Math.trunc(Math.abs(a))%Math.pow(2,void 0===b?36:b)}function ff(a){return m(a/Tb,6)+" "+m(a%Tb,6)} +function Xe(a,b){a.D=a;a.Y=a.xb=536870916;a.U=null;a.P=[];b=Je(a,b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in ac){var d;a:if(d=void 0,Array.prototype.indexOf)d=b.indexOf(c,d);else{d=d||0;0>d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;d>23&&a.v.za==b&&(b=rd(a.v,1)));if(0d&&(d=a.v.f(b)),0<=d&&(Ze(a.i[a.S],b),++a.S==a.i.length&&(a.S=0)));return!1} +function xf(a,b,c,d){var e=Z(b.B),f=a.Ha(b,1),g,h,k,n=0,p=f/Xb|0,t;for(t in yf)if(g=yf[t][p&t]){h=+t;p>>=6;switch(h){case 32512:k=zf;n=p&3;break;case 32256:k=Af;n=p&7;break;case 29248:k=Bf,n=(p&48)>>2|(p&6)>>1}break}k=k&&k[n]||"";"S"==k&&g>Cf&&(k="B");k=Df[g||0]+k;if(g){if(28700==h)h=f/Yb&127,n=J(a,h,-1);else for(h=f>>23&15,n=J(a,h,-1),p=0;n&&p>18&15)&&(k+="("+J(a,f, +-1)+")")}else k=Fa(k,8)+ff(f);f=k;g="";h=J(a,e.B)+":";if(-1!==e.B&&-1!==b.B){do if(k=a.Ha(e,1),g+=" "+ff(k),null==e.B)break;while(e.B!=b.B)}h+=Fa(g,16)+f;c&&(h=Fa(h,48)+";"+(c||""),h=a.v.A.Ma?h+("cycles="+fd(a.v).toString()+" cs="+q(a.v.Ba)):h+(null!=d?"="+d.toString():""));return h} +function Ff(a,b,c,d,e){var f=-1,g,h;a.ka=null;if(b){for(var k=b.toUpperCase(),n=0;nCf&&(ea="B");if(k==Df[h]+ea){f=29248!=g?P:(P&3)<<1|(P&12)<<2;f=(B|f<<6)*Xb;break}}if(0<=f)break}if(0<=f)break}}else c&& +(f=g=0);if(0<=f&&c)for(k=c.split(","),t=0;th||127h||15h||262143h||15f&&!e&&a.u("unknown instruction: "+b+" "+c);return f}function Ve(a){var b,c;a.b=["bp"];if(a.M)for(b=1;b>>d.i],!1)}a.M=["br"];if(a.I)for(b=1;b>>d.i],!0);a.I=["bw"];a.ya=0;a.ja=0} +l.Ka=function(a,b,c){var d=!0;c||gg(this,a,b,!1,!0);if(a!=this.b){var e=Ye(b);if(-1===e)this.u("invalid address: "+J(this,b.B)),d=!1;else{var f=this.G;f.b[e>>>f.i].Ka(e&16383,a==this.I)}}d&&(a.push(b),c?b.la=!0:(ig(this,a,a.length-1,"set"),We(this)));return d};function gg(a,b,c,d,e){var f=!1;c=Ye(c);for(var g=1;g>>d.i],b==a.I));h.la||We(a);break}}return f} +function jg(a,b){for(var c=1;cd;d++){!d||d&3||(c+="\n");var e=a,f=m(d,2);Ze(e.Ca,d);f+="="+J(e,e.Ha(e.Ca),36)+" ";c+=f}if(b){b="";for(d=0;d=lf?1:d==jf?23:18)+" "),b+=e;c+="\n"+b}return c}l.zb=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],t=Ha(p,k,a.zb);0>t&&p.splice(-(t+1),0,k)}n&&(h.a=n.replace(/''/g,'"'))}a.F.push({rd:b,B:c,Pb:d,W:e,tb:f})}function mg(a,b,c){var d=[],e=Ye(b)>>>0;for(b=0;b>>0,h=f.Pb;if(e>=g&&eb){a.u("unknown register: "+f);return}var f=0,h=a.v;switch(b){case hf:H(h, +g);Ze(a.L,h.i);break;case lf:f=65536;break;case mf:f=32768;break;case nf:f=131072;break;case of:f=32;break;case pf:f=262144}f&&(h.j=g?h.j|f:h.j&~f);I(a.H);a.u("updated registers:")}}a.u(lg(a,e));c&&(Ze(a.L,d.i),vf(a,J(a,a.L.B)))}}function tg(a,b){b=Ga(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var n=h[0]+":";h[2]&&(n+=" "+h[2]);a.u(n)}h[3]&&(g=h[3],f=null);h=a.fa;n=b;h.B=n.B;h.Wa=n.Wa;h.la=n.la;h.T=n.T;a.u(xf(a,b,g,f));e-=b.B-k;c++}}} +function kg(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(tf+b):(a.R&&(a.u("ended assemble at "+J(a,a.fa.B)),a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.U=null;if(Lb(a)&&0p||"z"pa.length&&(a.u("note: only "+pa.length+" available"),fa=pa.length);ka-=fa;0>ka&&(null==pa[pa.length-1].B?(fa=ka+fa,ka=0):ka+=pa.length); +var Jd=[];"call"==Lf&&(Ab=1E5,Jd=["CALL"]);for(void 0!==Kf&&a.u(fa+" instructions earlier:");0=pa.length&&(ka=0);a.za=fa;Nf++;Ab--}}Nf||(a.u("no "+Mf+"history available"),a.za=void 0)}else{var fb=cf(a,oa,a.oa);if(fb){var Ka=0,Qf="ds"==cb;if(Ca){if("l"==Ca.charAt(0))Ca=Ca.substr(1)||ph,Ka=Oe(a,Ca);else{var Rf=cf(a,Ca); +Rf&&(Ka=Rf.B-fb.B)}0>Ka&&(Ka=0);65536Cb?".":String.fromCharCode(Cb)),Ac=Ac-7}La&&(La+="\n");La=Qf?La+(qa+","):La+(oa+": "+qa+(0>Tf?" "+Md: +""))}La&&a.u(La);a.T=rh}}}}break;case "e":if("else"==g[0])break;var Uf,Vf,Wf=g[0],Od=g[1];"e"==Wf||"ew"==Wf?(Uf=a.Ha,Vf=a.rb):Od=null;if(null==Od)a.u("edit memory commands:"),a.u("\tew [a] [...] edit words at address a");else{var Bc=cf(a,Od,a.oa);if(Bc)for(var Pd=2;PdSd;){for(var Ma=null, +wh=256;65536>Fb.B>>>0;){Td.B=a.Ha(Fb,2);if(null==Fb.B||!wh--)break;if(!(Td.B&1)){for(var xh=a,Cc=Td,Yf=null,Gb=Cc.B,Zf=Gb,Ud=1;6>=Ud&&Gb;Ud++){if(2eg)a.u("step commands:"), +a.u("\tp\tstep over instruction"),a.u("\tpr\tstep over instruction with register update");else if(a.O)a.u("step in progress");else{var fg=Z(a.v.i);a.Ha(fg);a.O?(a.Ka(a.b,fg,!0),rf(a)||(a.H&&jd(a.H),a.O=0)):ug(a,eg?"tr":"t")}break;case "r":if("reset"==b){a.H&&a.H.reset();break}uf(a,g);break;case "s":a:switch(g[1]){case "base":if(g[2]){var gb=+g[2];if(2==gb||8==gb||10==gb||16==gb)a.T=gb;else{a.u("invalid base: "+gb);break}}a.u("default base: "+a.T);break;case "cs":var Ib;void 0!==g[3]&&(Ib=+g[3]);switch(g[2]){case "int":a.v.oa= +Ib;break;case "start":a.v.Ca=Ib;break;case "stop":a.v.ja=Ib;break;default:a.u("unknown cs option");break a}void 0!==Ib&&bd(a.v);a.u("checksums "+(a.v.A.Ma?"enabled":"disabled"));break;case "sp":void 0!==g[2]&&(gd(a.v,+g[2])||a.u("warning: using 1x multiplier, previous target not reached"));a.u("target speed: "+(a.v.ca.toFixed(2)+"Mhz")+" ("+a.v.fa+"x)");break;default:if(g[1]){a.u("unknown option: "+g[1]);break}case "?":a.u("debugger options:"),a.u("\tbase #\t\tset default base to #"),a.u("\tcs int #\tset checksum cycle interval to #"), +a.u("\tcs start #\tset checksum cycle start count to #"),a.u("\tcs stop #\tset checksum cycle stop count to #"),a.u("\tsp #\t\tset speed multiplier to #")}break;case "t":ug(a,g[0],g[1]);break;case "u":vf(a,g[1],g[2],8);break;case "v":if("var"==g[0]){rg(a,b.substr(3))||(d=!1);break}if("ver"==g[0]){a.u((Rb||"PDP10")+" version 1.34.2 ("+a.v.wb+",RELEASE)");a.u(window?window.navigator.userAgent:"");break}f=!0;break;case "?":if(g[1]){tg(a,b.substr(1));break}var Vd="commands:",Wd;for(Wd in wg)Vd+="\n"+ +Fa(Wd,9)+wg[Wd];sd(a)||(Vd+="\nnote: history disabled if no exec breakpoints");a.u(Vd);break;default:f=!0}f&&(a.u("unknown command: "+b),d=!1)}}catch(hg){a.u("Debugger "+(hg.stack||hg.message)),d=!1}return d}function ed(a,b,c){b=Je(a,b,c);for(var d in b)if(!kg(a,b[+d]))return!1;return!0} +var wg={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory","g [#]":"go [to #]",h:"halt","if":"eval expression","int [#]":"request interrupt",k:"stack trace",ln:"list nearest symbol(s)",m:"messages",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",s:"set options","t [#]":"trace","u [#]":"unassemble","var":"assign variable",ver:"print version"},Cf=20,Df=".WORD HLL HLLZ HLLO HLLE HRL HRLZ HRLO HRLE HRR HRRZ HRRO HRRE HLR HLRZ HLRO HLRE MOVE MOVS MOVN MOVM EXCH BLT PUSH POP LDB DPB IBP ILDB IDPB SETZ SETO SETA SETCA SETM SETCM AND ANDCA ANDCM ANDCB IOR ORCA ORCM ORCB XOR EQV LSH LSHC ROT ROTC ADD SUB MUL IMUL DIV IDIV ASH ASHC FSC FADR FSBR FMPR FDVR DFN UFA FAD FSB FMP FDV AOBJP AOBJN CAI CAM JUMP SKIP AOJ AOS SOJ SOS TR TL TD TS XCT JFFO JFCL JSR JSP JRST JSA JRA PUSHJ POPJ BLKI DATAI BLKO DATAO CONO CONI CONSZ CONSO UUO JOV JCRY0 JCRY1 JCRY JFOV HALT JRSTF JEN".split(" "), +hf=0,jf=1,kf=2,lf=3,mf=4,nf=5,of=6,pf=7,gf="PC RA EA C0 C1 OV ND PD".split(" "),xg={},yf=(xg[28672]={0:101},xg[32704]={5632:64,5696:63,5760:58,5824:27,5888:28,5952:25,6016:29,6080:26,10240:56,10304:48,10368:46,10432:84,10496:57,10560:49,10624:47,10752:21,10816:22,10880:69,10944:70,11008:88,11072:85,11136:83,11264:91,11328:23,11392:24,11456:92,11520:86,11584:87,11648:89,11712:90},xg[32512]={6144:65,6400:59,6656:66,6912:60,7168:67,7424:61,7680:68,7936:62,8192:17,8448:18,8704:19,8960:Cf,9216:53,9472:52, +9728:55,9984:54,11776:50,12032:51,16384:30,16640:36,16896:37,17152:34,17408:38,17664:32,17920:44,18176:40,18432:39,18688:45,18944:33,19200:41,19456:35,19712:42,19968:43,20224:31,20480:1,20736:5,20992:2,21248:6,21504:3,21760:7,22016:4,22272:8,22528:9,22784:13,23040:10,23296:14,23552:11,23808:15,24064:12,24320:16},xg[32256]={12288:71,12800:72,13312:73,13824:74,14336:75,14848:76,15360:77,15872:78},xg[29248]={24576:79,24640:80,25088:81,25152:82},xg[28700]={28672:93,28676:94,28680:95,28684:96,28688:97, +28692:98,28696:99,28700:100},xg),zf=["","I","M","S"],Af=" L E LE A GE N G".split(" "),Bf="N NE NA NN Z ZE ZA ZN C CE CA CN O OE OA ON".split(" "),Ef=[{0:85,8:102,4:103,2:104,6:105,1:106},{0:88,4:107,2:108,10:109}],qf=1E3,tf=">> ";Za(function(){for(var a=x(document,w,"debugger"),b=0;b([\s\S]*?)<\/pre>/gi;c=b.exec(d);)c=c[1],0<=c.indexOf("&")&&(c=c.replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")),e+=c;(c=e.match(/&[a-z]+;/i))&&Ag(a,"unrecognized HTML entity: "+c[0])}a.w=a.w.concat(e.split(/(\r?\n)/));setTimeout(function(){yg(a)},0)}})}} +function zg(a){if(0<=a.S.indexOf("p"))return a.u(a.w.join()),0;var b=Se(a.i);try{var c;for(c=0;c=--e)break}0>e&&a.error("missing bracket(s): "+f);0<=k&&(g=f.substr(k,h-k));for((f=g)&&(b=b.replace(f,Lg(a,Mg,f)));f=Ng(a,b);)b=b.replace(f,f.slice(0,-1));if(!Fg(a, +c,b))switch(c){case Og:case Pg:case Qg:Gg(a,d);break;case Rg:Sg(a,0,b.replace(",",",,"));break;case Tg:case Ug:case Vg:case Wg:Lg(a,c,b);break;case Xg:case Yg:break;default:d=b,b=c+d,0<=b.indexOf(",,")||!c&&0>b.indexOf("@")&&0>b.indexOf("(")?c=Dg(a,b,!0):(c=Ff(a.i,c,d,a.sa,!0),0>c&&(c=Ff(a.i,"",b,a.sa,!0),0>c&&(c=void 0))),void 0!==c?Sg(a,c,a.i.ka):a.error("unrecognized expression: "+b)}return!0} +function Fg(a,b,c){var d=a.v[b];if(!d)return!1;if(null!=c)return b=Zg(a,c),Cg(a,d.La,d.ub,b),!0;if("?"!=b[0])return!1;switch(b.substr(1)){case Ug:d.mb||Cg(a,d.La);break;case Wg:for(;0p)break;var n=p+1,t=p+h.length,B="",P="";p&&(B=f[p-1]).match(/[0-9A-Z$%.]/i)||!(t>=f.length)&&(P=f[t]).match(/[0-9A-Z$%.]/i)||("'"==B&&p--,"'"==P&&t++,f=f.substr(0,p)+k+f.substr(t),n=p+k.length)}if(!Bg(a,f))break}}qg.prototype.error=function(a){throw Error("error"+(this.ea?" at line "+xa(this.ea):"")+": "+a);}; +function Ag(a,b){a.u("warning"+(a.ea?" at line "+xa(a.ea):"")+": "+b)}function $g(a,b,c){c=void 0===c?",":c;for(var d=0,e=!1,f=null,g=0;d"==h&&0>--g){a.error("missing bracket(s): "+b);break}}}g?0d?c="":(c=b.substr(d+1),b=b.substr(0,d),a.j=null);a.D+=b}if(null==a.j){var d=b=0,e,f,g=a.D.length;a.I==Pg&&g++;for(var h=0;h=k&&(k-=32),k=k+32&63);d+=k*Math.pow(2,f);f-=e;b++;0>f&&(Sg(a,d),b=0)}b&&Sg(a,d)}return c} +function Lg(a,b,c){var d,e,f,g;a.C="<";a.J=">";e=f=[];if(b==Tg){d=c.match(/([A-Z$%.][0-9A-Z$%.]*)\s*(?:\(([^)]*)\)|)\s*(<|)(.*)/i);if(!d)return a.error("unrecognized "+b+": "+c),"";b=d[1];if(d[2]){f=e=Zg(a,d[2]);c=[];for(g=0;g");0>k&&(k=f[g].length);c[g]=f[g].substr(h,k-h);f[g]=f[g].substr(0,h)}}f=c}c=bh;g=3}else if(b==Mg)a.C="[",a.J="]",b="?"+xa(a.sa,5),a.v[b]&&a.error("literal symbol redefined: "+b),d=[c[0],b+": "+c.substr(1)], +c=ch,a.G.push(b),g=0;else{g=$g(a,c);if(!g)return a.error("missing "+b+" expression: "+c),"";c=c.substr(g.length+1);g=g.trim();d=c.match(/\s*(<|)(.*)/i);b="?"+b;c=Dg(a,g)||0;g=1}b=b.toUpperCase();a.b=1;h="";d[g]&&(a.b=2,h=d[g+1],h.slice(-1)==a.J&&(a.b=0,h=h.slice(0,-1)));a.v[b]={name:b,mb:c,ub:e,Jb:f,La:h,ea:a.ea};a.b?a.F=b:Fg(a,b);return b} +function Hg(a,b,c,d){d=void 0===d?0:d;b=b.toUpperCase().substr(0,6);if(d&Ig&&a.P[b])a.error("label "+b+" redefined");else{if("string"==typeof c){var e=Dg(a,c);if(void 0===e){a.error("parseExpression("+c+")");return}c=e}a.P[b]={name:b,value:c,ea:a.ea,od:d};a.i.K[b]=c}}function Sg(a,b,c){a.H[a.sa]=Eg(a,b);null!=c&&a.K.push({sa:a.sa,Db:c,ea:a.ea});a.sa++} +function Eg(a,b,c){c=void 0===c?a.sa:c;var d=Y(a.i,b||0,36,!0);(b<-C||b>=E)&&Ag(a,"truncated value "+m(b)+" at location "+m(c)+" to "+m(d));return d}qg.prototype.u=function(a){this.i?this.i.u(a):console.log(a)};var Ig=1,Jg=2,Kg=4,Og="ASCII",Pg="ASCIZ",Tg="DEFINE",Ug="IFE",Vg="IRP",Mg="LITERAL",Xg="PAGE",Wg="REPEAT",Qg="SIXBIT",Yg="SUBTTL",Rg="XWD",bh=-1,ch=-2,ah=-3; +function dh(a,b,c){u.call(this,"Computer",a,33554432);this.A.X=!1;this.R=null;eh(this,b);this.O=$c(this,"autoPower",a,6);this.w=0;this.ba=+a.busWidth||+a.buswidth;this.L=this.F=this.M=null;this.K=this.U=!1;this.I=this.C=null;this.S=this.P=!1;this.ca=$c(this,"url")||"";(Math.random()+.1).toString(36);this.i=fh(this);if(this.v=tb("CPU",this.id)){this.D=tb("Debugger",this.id);this.G=new zc({id:this.Ua+".bus",busWidth:this.ba},this.v,this.D);var d,e=rb(this.id);if((this.j=tb("Panel",this.id))&&this.j.va)for(b= +0;b\nLicense: GPL version 3 or later ");for(b=0;bgh){if(hh(d,this.L)){this.C=new G(this,"1.34.2",Bh);hh(this.C)&&(Ch(this,d),a=Dh,Eh(this.C));this.C.set(nh,Ia());Fh(this.C);var e=this.b&&!this.K;if(a==oh||qb("Click OK to restore the previous "+Rb+" machine state, or CANCEL to reset the machine.")){if(c=mh(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?hh(d,g):("error"==f&&"no machine state"!= +g?(this.da("Error: "+g),"unable to verify user"==g&&(Sa(Gh,""),this.i=null)):this.u(f+": "+g),Eh(d),hh(d)?(c=mh(d),e=!0):c=!1))}e&&kh(this,c?d:null)}else a==Dh&&d.clear()}else kh(this);delete this.L;delete this.I}e=rb(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.A.X=!0;var d=this.J.power;d&&(d.textContent="Shutdown");this.v&&(Hh(this,this.v,b,c,a),I(this,-2),this.v.aa());this.P&&(Ch(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.w=0}; +function Ch(a,b){if(qb("There may be a problem with your "+Rb+" machine.\n\nTo help us diagnose it, click OK to send this "+Rb+" machine state to http://www.pcjs.org.")){var c=a.ca;a=a.i||"";b=b.toString();var d={};d.app=Rb;d.ver="1.34.2";d.url=c;d.user=a;d.type="bug";d.data=b;Ja("http://www.pcjs.org/api/v1/report",d,!0)}} +function vg(a,b,c){var d,e="none";if(a.w)return null;a.w--;var f=new G(a,"1.34.2"),g=new G(a,"1.34.2",lh),h=Ia();g.set(nh,h);f.set(nh,h);f.set(Ih,"1.34.2");f.set(Jh,window?window.location.href:null);f.set(Kh,window?window.navigator.userAgent:"");a.v&&a.v.ma&&(c&&(b&&(a.v.A.aa=a.v.A.N),a.v.V()),d=a.v.ma(b,c),"object"===typeof d&&f.set(a.v.id,d),c&&(a.v.A.X=!1,!1===d&&(e=null)));for(var h=rb(a.id),k=0;k=d||30<=(c.ab+=d))&&(e.textContent=c.A.N?c.ba.toFixed(2)+"Mhz":"Stopped",c.ab=0)}if(a.j&&(a=a.j,b=b||0,a.L)){c=a.v.A.N;d=!!(a.v.C&8);if(0>=b||60<=(a.K+=b)){e=a.v.i;if(a.J.PC){var f=a.D&&a.D.T||8,e=e||0,e=8==f?m(e,void 0):q(e,void 0);a.J.PC.textContent!=e&&(a.J.PC.textContent=e)}a.K=0}-1>b?a.i=a.v.i:0g.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(g=window.location.pathname+g),e?"}"==e.slice(-1)?(e=e.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(e?" parms='"+e+"'":"")+(g?' url="'+g+'"':"")));f||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1"+d+"$2"));g=null;if("<"==a.charAt(0))try{f||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(g=new window.ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(a)):g=(new window.DOMParser).parseFromString(a,"text/xml")}catch(t){g=null,a=t.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ja(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);Sh(a,b,c)}})}else c(a,null)} +function Th(a,b,c,d,e){function f(a){if(void 0===k){var b=h&&x(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=Ba(a))}function g(a){f("Error: "+a);n&&(--Ph||ib(!0));n=!1}var h,k,n=!0;Ph++;ob[b]={};try{if(h=document.getElementById(b)){var p;if("object"==typeof resources&&(p=resources.css)){var t=document.head||document.getElementsByTagName("head")[0],B=document.createElement("style");B.type="text/css";B.styleSheet?B.styleSheet.cssText=p:B.appendChild(document.createTextNode(p));t.appendChild(B)}d|| +(p=a,"pdp"==a.substr(0,3)&&(p="pdpjs"),d="/versions/"+p+"/1.34.2/components.xsl");p=function(e,k){k?Qh(d,null,a,null,!1,f,function(a,e){e?(nb(b,d,a),f("Processing "+c+"..."),window.ActiveXObject||"ActiveXObject"in window?(e=k.transformNode(e))?(h.outerHTML=e,--Ph||ib(!0)):g("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(a=new XSLTProcessor,a.importStylesheet(e),(e=a.transformToFragment(k,document))?h.parentNode?(h.parentNode.replaceChild(e,h),--Ph|| +ib(!0)):g("invalid machine element: "+b):g("transformToFragment failed")):g("unable to transform XML: unsupported browser")):g(a)}):g(e)};"<"!=c.charAt(0)?Qh(c,b,a,e,!0,f,p):Rh(c,null,b,a,e,!1,f,p)}else g("missing machine element: "+b)}catch(P){g(P.message)}return n}window.embedPDP10=function(a,b,c,d){ib(!1);return Th("pdp10",a,b,c,d)};window.embedPDP11=function(a,b,c,d){ib(!1);return Th("pdp11",a,b,c,d)};window.findMachineComponent=function(a,b){return tb(b,a+".machine")}; +window.processMachineScript=function(a,b){var c=!1;a+=".machine";if("string"==typeof b&&!wb[a]){for(var c=!0,d=wb,e=a,f=b.length,g=[],h=[],k="",n=null,p=0;p>3)?(e=a.ya(b,e,6),a.lc(e,d.call function af(a,b,c,d){var e=a.j=b&7;(b=a.u=(b&56)>>3)?(e=a.ya(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.lc(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))} h.Cc=function(a){this.A.complete=!0;var b=this.D?bf(this.D)?1:this.A.Tc?-1:0:0,c=a?this.A.Tc?0:1:-1;this.A.Tc=!1;this.lb=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(cf(this.D,this.g[7],c)){this.da();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.ob&224)>>5,f=this.R&&this.R.pb>e?this.R:null;f&&(d=f.Fb,e=f.pb);e>(this.w&224)>>5?(this.i&8&&(Fe(this,2),this.i&=-9),this.sa(d,0,-10),e=!0):e=!1;e&&(f&&He(this,f),a=!0);this.R||this.ob||(this.i&=-3)}else this.i& 1&&this.i++;if(a){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}if(this.i&112&&Ie(this)){if(this.i&4&&cf(this.D,this.g[7],c)){this.da();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.O=this.g[7];f=this.pa(a);this.g[7]=a+2&65535;this.be(f)}while(0>1|b<<16;Je(this,a);return a&65535}function Ef(a,b){a=b&128|b>>1|b<<8;Je(this,a<<8);return a&255}function Ff(a,b){a=b&~a;this.Fa(a);return a}function Gf(a,b){a=b&~a;this.Fa(a<<8);return a} +function df(a,b){var c=b+a;this.I=this.L=this.C=c;this.G=(a^c)&(b^c);return c&65535}function ef(a,b){var c=b+a,d=c<<8;this.I=this.L=this.C=d;this.G=(a<<8^d)&(b<<8^d);return c&255}function ff(a,b){a=b<<1;Je(this,a);return a&65535}function Cf(a,b){a=b<<1;Je(this,a<<8);return a&255}function Df(a,b){a=b&32768|b>>1|b<<16;Je(this,a);return a&65535}function Ef(a,b){a=b&128|b>>1|b<<8;Je(this,a<<8);return a&255}function Ff(a,b){a=b&~a;this.Fa(a);return a}function Gf(a,b){a=b&~a;this.Fa(a<<8);return a} function Hf(a,b){a|=b;this.Fa(a);return a}function If(a,b){a|=b;this.Fa(a<<8);return a}function Jf(a,b){a=~b|65536;this.qb(a);return a&65535}function Kf(a,b){a=~b|256;this.qb(a<<8);return a&255}function Lf(a,b){this.I=this.L=a=b-a;this.G=b&(b^a);return a&65535}function Mf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.G=b&(b^c);return a&255}function Nf(a,b){this.I=this.L=a=b+a;this.G=a&(b^a);return a&65535}function Of(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.G=c&(b<<8^c);return a&255} function Pf(a,b){a=-b;this.qb(a,a&b&32768);return a&65535}function Qf(a,b){a=-b;this.qb(a<<8,(a&b&128)<<8);return a&255}function Rf(a,b){a=b<<1|this.C>>16&1;Je(this,a);return a&65535}function Sf(a,b){a=b<<1|this.C>>16&1;Je(this,a<<8);return a&255}function Tf(a,b){a=(this.C&65536|b)>>1|b<<16;Je(this,a);return a&65535}function Uf(a,b){a=((this.C&65536)>>8|b)>>1|b<<8;Je(this,a<<8);return a&255}function Vf(a,b){var c=b-a;Ke(this,c,a,b);return c&65535} function Wf(a,b){var c=b-a;Ke(this,c<<8,a<<8,b<<8);return c&255}function Xf(a,b){this.I=this.L=b&65280;this.G=this.C=0;return(b<<8|b>>8)&65535}function Yf(a,b){a^=b;this.Fa(a);return a&65535}function Zf(a){P(this,a,Ve(this,a),df);this.b-=this.u?9+(this.Y&&6<=this.j?1:0):(this.U?5:3)+(7==this.j?2:0)} @@ -186,7 +186,7 @@ function Sg(a){a&1&&(this.C=65536);a&2&&(this.G=32768);a&4&&(this.L=0);a&8&&(thi function Xg(){this.ta&&(this.ta.Hd(this.g[7],!0),this.ta.setData(this.g[0],!0));this.i|=8;Fe(this,-2);this.b-=3}function Yg(a){P(this,a,this.g[(a>>6&7)+this.Ac],Yf);this.b-=this.u?9:3+(7==this.j?2:0)}function Q(a){var b;if(b=this.D)b=this.D,E(b,1)?(F(b,"undefined opcode "+K(b,a),!0,!0),b=Dg(b)):b=!1;b||this.sa(8,0,-9)}function we(a){Zg[a>>12].call(this,a)}function $g(a){ah[a>>6&3].call(this,a)}function bh(a){ch[a>>6&3].call(this,a)}function dh(a){eh[a>>6&3].call(this,a)} function fh(a){gh[a&15].call(this,a)}function hh(a){ih[a&15].call(this,a)}function jh(a){kh[a>>6&3].call(this,a)}function lh(a){mh[a>>6&3].call(this,a)}function nh(a){oh[a>>6&3].call(this,a)} var Zg=[function(a){ph[a>>8&15].call(this,a)},Kg,yg,hg,dg,fg,Zf,Q,function(a){qh[a>>8&15].call(this,a)},Lg,zg,ig,eg,gg,Ug,Q],ph=[function(a){rh[a>>4&15].call(this,a)},ug,rg,jg,kg,pg,lg,ng,Ig,Ig,$g,bh,dh,Q,Q,Q],ah=[function(a){af(this,a,0,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Jf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Nf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,1,Lf);this.b-=this.u?9:3+(7==this.j?2:0)}],ch=[function(a){P(this,a,0,Pf); -this.b-=this.u?11:6},function(a){P(this,a,Be(this)?1:0,df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Be(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Ye(this,a);this.qb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],eh=[function(a){P(this,a,0,Tf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Bf);this.b-=this.u?9:3+(7==this.j?2:0)}],rh= +this.b-=this.u?11:6},function(a){P(this,a,Be(this)?1:0,df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,Be(this)?1:0,Vf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Ye(this,a);this.qb(a);this.b-=this.u?4:3+(7==this.j?2:0)}],eh=[function(a){P(this,a,0,Tf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Rf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,Df);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){P(this,a,0,ff);this.b-=this.u?9:3+(7==this.j?2:0)}],rh= [function(a){sh[a&15].call(this,a)},Q,Q,Q,Gg,Gg,Gg,Gg,Qg,Q,fh,hh,Vg,Vg,Vg,Vg],sh=[Cg,Xg,Rg,tg,Eg,Pg,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q],gh=[Og,function(){this.C=0;this.b-=5},function(){this.G=0;this.b-=5},xg,function(){this.L=1;this.b-=5},xg,xg,xg,function(){this.I=0;this.b-=5},xg,xg,xg,xg,xg,xg,xg],ih=[Og,function(){this.C=65536;this.b-=5},function(){this.G=32768;this.b-=5},Sg,function(){this.L=0;this.b-=5},Sg,Sg,Sg,function(){this.I=32768;this.b-=5},Sg,Sg,Sg,Sg,Sg,Sg,Sg],qh=[sg,qg,mg,og,vg,wg,bg,cg,Bg,Wg,jh,lh, nh,Q,Q,Q],kh=[function(a){$e(this,a,0,255,this.qb);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,0,Kf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,1,Of);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,1,Mf);this.b-=this.u?9:3+(7==this.j?2:0)}],mh=[function(a){Ze(this,a,0,Qf);this.b-=this.u?11:6},function(a){Ze(this,a,Be(this)?1:0,ef);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,Be(this)?1:0,Wf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){a=Xe(this, a);this.qb(a<<8);this.b-=this.u?4:3+(7==this.j?2:0)}],oh=[function(a){Ze(this,a,0,Uf);this.b-=this.u?9+(this.Yc&1):3+(7==this.j?2:0)},function(a){Ze(this,a,0,Sf);this.b-=this.u?9:3+(7==this.j?2:0)},function(a){Ze(this,a,0,Ef);this.b-=this.u?9+(this.Yc&1):3+(7==this.j?2:0)},function(a){Ze(this,a,0,Cf);this.b-=this.u?9:3+(7==this.j?2:0)}];function xe(a){th[a>>12].call(this,a)} @@ -289,14 +289,15 @@ this.Sa):td(this.f,this.Sa)};h.Lg=function(a,b){if(!b)switch(this.j){case V.EMPT h.bi=function(a){switch(this.j){case V.bd:this.b&W.eb&&(this.b&=~W.eb,this.w[this.u]=a&255,E(this)&&F(this,this.type+".writeByte("+this.u+","+v(a,2,!0)+")",!0,!0),++this.u>=this.w.length&&qj(this));break;case V.tb:case V.hc:case V.Mc:if(this.b&W.eb)switch(this.b&=~W.eb,this.u++){case 0:this.G=a;break;case 1:if(this.I=a,this.j==V.tb)pj(this);else{var b=this.j==V.Mc,c=0,d=this.b&W.ud?1:0,e=this.g[d],e=e&&e.ea,f=this.I&sj.cb,g=this.G&tj.cb;this.i&=~(uj.Nd|uj.Xd|uj.cc|uj.Ga);if(e)if(this.i|=uj.Ga,E(this)&& F(this,this.type+".writeSector("+f+":0:"+g+")",!0,!0),d=e.seek(f,0,g,!0))for(b&&(d.Ef=!0),b=0,f=this.w.length;ba.u&&a.j.length&&(a.u=0);if(0>a.u||b!=a.j[a.u])a.j.splice(0,0,b),a.u=0;a.u--}else a.O?b="end":b=a.j[a.u+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(za(b.substring(c,f))),c=f+1}}return a}function zj(a){var b,c=a;b=b||32;32>=b?c=a|0:(b=Math.pow(2,b-1),a<-b?c=a%b:a>=2*b&&(c=a%(2*b)));a!=c&&(a=c);return a} -function Aj(a,b,c){for(c=void 0===c?-1:c;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=Math.trunc(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 "!":case "|":d=f|e;break;case "^^":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;case "><":d=f;if(e=35-(e&255))0>d&&(d+=Math.pow(2,36)),d=0<"==l?10:e; -n=!1}Aj(q,t)&&1==q.length||(m=!0);m?!1===f&&a.v("parse error ("+(k||l)+")"):g=q.pop();a.aa=r;return g}function Ej(a,b,c){var d;a.za=null;b&&("{"!=a.U[0]&&(b=b.split(a.U[0]).join("{").split(a.U[1]).join("}")),b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2><"),b=b.split(/(\{|}|\|\||&&|\||\^\^|><|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.aa,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} -function Cj(a,b,c,d,e){var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(f=ma(e?"-"+b:b,a.aa),e=!1)),null!=f?e&&(f=-f):d||a.v("invalid "+(c?c:"value")+": "+b)):d||a.v("missing "+(c||"value"));return f} +function yj(a,b,c,d){if(c)if(b){0>a.u&&a.j.length&&(a.u=0);if(0>a.u||b!=a.j[a.u])a.j.splice(0,0,b),a.u=0;a.u--}else a.O?b="end":b=a.j[a.u+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(za(b.substring(c,f))),c=f+1}}return a} +function zj(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?d=a%b:a>=2*b&&(d=a%(2*b)));a!=d&&(a=d);return a} +function Aj(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e,f=a.pop();e=a.pop();switch(d){case "*":e*=f;break;case "/":if(!f)return!1;e=Math.trunc(e/f);break;case "%":if(!f)return!1;e%=f;break;case "+":e+=f;break;case "-":e-=f;break;case "<<":e<<=f;break;case ">>":e>>=f;break;case ">>>":e>>>=f;break;case "<":e=e":e=e>f?1:0;break;case ">=":e=e>=f?1:0;break;case "==":e=e==f?1:0;break;case "!=":e=e!=f?1:0;break;case "&":e&= +f;break;case "!":case "|":e|=f;break;case "^!":e|=f;break;case "&&":e=e&&f?1:0;break;case "||":e=e||f?1:0;break;case "_":case "^_":"^_"==d&&(f=35-(f&255));f&&(e=zj(e,0,!0),e=0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/),d=Bj(a,b,0,b.length,a.aa,c),void 0!==d&&!1===c&&Fj(a,null,d));return d} +function Cj(a,b,c,d,e){e=void 0===e?0:e;var f;null!=b?(f=a.re(b),0<=f?f=a.Bd(f):(f=a.S[b],null==f&&(0>e&&(b="-"+b,e=0),f=ma(b,a.aa))),null!=f?0>e?f=-f:0>=8;d=v(c,0,!0)+" "+c+". "+u(c,0,!0)+" "+("0b"+g)}32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.v((null!=b?b+": ":"")+d);return e}function Gj(a,b){if(b)return Fj(a,b,a.S[b]);var c=0;for(b in a.S)Fj(a,b,a.S[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,"><":10,"{":11,"}":11}; +function K(a,b,c){c=void 0===c?0:c;switch(a.aa){case 2:a=pa(b,0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Dj={"||":0,"&&":1,"!":2,"|":2,"^!":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9,_:10,"^_":10,"{":11,"}":11}; function Hj(a){xj.call(this,a);this.Ia=!1;this.U=["(",")"];this.ka=[];this.G=X();this.Ha=X();this.N=X();this.B=[];this.b=this.L=this.C=[];Ij(this);this.P=this.ha=0;this.i=[];this.ta=void 0;Jj(this);this.D=this;this.ma={};this.ja=this.ke=0;this.R=null;this.M=[];Kj(this,a.messages);this.ya=a.commands;this.La=Lj;this.X=[];this.I=0;this.Qa=this.ua=null;this.w=this.Ka=this.Ja=this.Y=this.qa=0;this.g=this.W=null;var b=this;window?void 0===window[y]&&(window[y]=function(a){return le(b,a)}):void 0===global[y]&& (global[y]=function(a){return le(b,a)})}p(Hj,xj);function Mj(a){a=a&&a.K;null==a&&(a=-1);return a}function X(a,b,c){return{K:void 0===a?null:a,Na:void 0===b?!1:b,Wa:!1,aa:c}}h=Hj.prototype;h.Hd=function(a,b){a.K=b;a.Wa=!1;a.aa=void 0;return a};function Nj(a){return[a.K,a.Na,a.aa,a.Wa,a.Qc]}function Oj(a,b){var c=X(b[0],b[1],b[2]);c.Wa=b[3];b[4]&&(c.he=yj(a,c.Qc=b[4]));return c} h.Ca=function(a,b,c,d){this.F=b;this.J=a;this.f=c;this.g=a.i;(a=ge(a,"messages"))&&Kj(this,a);1140>this.f.ka&&(this.X=this.X.concat(Pj));1145>this.f.ka&&(this.X=this.X.concat(Qj));rd(this,16,function(a){a:{var b=d.F.b,c=a[0],e=a=0,l=b.length;if(c){a=Mj(Rj(d,c));if(-1===a){d.v("invalid address: "+c);break a}e=a>>>d.F.g;l=1}d.v("blockid physical blockaddr used size type");d.v("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.v("..."): @@ -340,20 +341,20 @@ function uk(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.v(mk+b):(a.O&&(a.v("ende Rj(a,g[1],!0);if(q)if(a.N=q,void 0===g[2])a.v("begin assemble at "+Uj(a,q)),a.O=!0,H(a.J);else{var t;a.v("not supported yet");t=[];if(t.length){for(var r=0;rUa.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ja-=Ca;0>Ja&&(null==Ua[Ua.length-1].K?(Ca=Ja+Ca,Ja=0):Ja+=Ua.length);var jf=[];"call"==Ai&&(Lc=1E5,jf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ja=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var kf=oa.Na||65535O.length?(2wb&&(wb=0);65536of?String.fromCharCode(of):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=lf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+nf))}yb&&a.v(yb);a.Ha=oa;a.aa=rl}}}}break;case "e":if("else"== -g[0])break;var bc,pf,qf,rf,sf=g[0],tf=g[1];"eb"==sf?(bc=1,pf=255,qf=a.Pd,rf=a.Qd):"e"==sf||"ew"==sf?(bc=2,pf=65535,qf=a.Ta,rf=a.Le):tf=null;if(null==tf)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Od=Rj(a,tf);if(Od)for(var Pd=2;Pdwf;){for(var Ab=null,vl=256;65536>Rc.K>>>0;){xf.K=a.Ta(Rc,2);if(null==Rc.K||!vl--)break;if(!(xf.K&1)){for(var wl=a,Qd=xf,Hi=null,Sc=Qd.K,Ii=Sc,yf=1;6>=yf&⪼yf++){if(2Ua.length&&(a.v("note: only "+Ua.length+" available"),Ca=Ua.length);Ja-=Ca;0>Ja&&(null==Ua[Ua.length-1].K?(Ca=Ja+Ca,Ja=0):Ja+=Ua.length);var kf=[];"call"==Ai&&(Lc=1E5,kf=["CALL"]);for(void 0!==zi&&a.v(Ca+" instructions earlier:");0=Ua.length&&(Ja=0);a.ta=Ca;Ci++;Lc--}}Ci||(a.v("no "+Bi+"history available"),a.ta=void 0)}else{var oa=Rj(a,Ta);if(oa)if("da"==jb){var lf=oa.Na||65535O.length?(2wb&&(wb=0);65536pf?String.fromCharCode(pf):"."),Nd=Nd>>8}yb&&(yb+="\n");yb=mf?yb+(zb+","):yb+(Ta+": "+zb+(Md?"":" "+of))}yb&&a.v(yb);a.Ha=oa;a.aa=rl}}}}break;case "e":if("else"== +g[0])break;var bc,qf,rf,sf,tf=g[0],uf=g[1];"eb"==tf?(bc=1,qf=255,rf=a.Pd,sf=a.Qd):"e"==tf||"ew"==tf?(bc=2,qf=65535,rf=a.Ta,sf=a.Le):uf=null;if(null==uf)a.v("edit memory commands:"),a.v("\teb [a] [...] edit bytes at address a"),a.v("\tew [a] [...] edit words at address a");else{var Od=Rj(a,uf);if(Od)for(var Pd=2;Pdxf;){for(var Ab=null,vl=256;65536>Rc.K>>>0;){yf.K=a.Ta(Rc,2);if(null==Rc.K||!vl--)break;if(!(yf.K&1)){for(var wl=a,Qd=yf,Hi=null,Sc=Qd.K,Ii=Sc,zf=1;6>=zf&⪼zf++){if(2