diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index 07557823e..2396aa0ea 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -49,8 +49,8 @@ var da={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[4 y:121,z:122,"{":123,"|":124,"}":125,"~":126,Mp:127},ea={};ea[173]=n["-"];ea[186]=n[";"];ea[187]=n["="];ea[189]=n["-"];ea[188]=n[","];ea[190]=n["."];ea[191]=n["/"];ea[192]=n["`"];ea[219]=n["["];ea[220]=n["\\"];ea[221]=n["]"];ea[222]=n["'"];var fa={};fa[n["1"]]=n["!"];fa[n["2"]]=n["@"];fa[n["3"]]=n["#"];fa[n["4"]]=n.$;fa[n["5"]]=n["%"];fa[n["6"]]=n["^"];fa[n["7"]]=n["&"];fa[n["8"]]=n["*"];fa[n["9"]]=n["("];fa[n["0"]]=n[")"];fa[186]=n[":"];fa[187]=n["+"];fa[188]=n["<"];fa[189]=n._;fa[190]=n[">"]; fa[191]=n["?"];fa[192]=n["~"];fa[219]=n["{"];fa[220]=n["|"];fa[221]=n["}"];fa[222]=n['"'];fa[173]=n._;fa[61]=n["+"];fa[59]=n[":"]; function ga(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1,f--;return d}function ia(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} -function ja(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function q(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function r(a){return q(a,2,!0)}function ka(a){return q(a,4,!0)} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f)}return c}function ha(a,b){var c,d="";b?32>=1,f--;return d}function ia(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} +function ja(a,b,c){var d="";b?11a&&-1>=3;return(c?"0o":"")+d}function q(a,b,c){var d="";b?8a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function r(a){return q(a,2,!0)}function ka(a){return q(a,4,!0)} function la(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0"']/g,function(a){return pa[a]})} function qa(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function ra(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var pa={"&":"&","<":"<",">":">",'"':""","'":"'"},sa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function ta(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]);0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function Vx(a,b){if(b)return Tx(a,b,a.da[b]);var c=0;for(b in a.da)Tx(a,b,a.da[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Sx={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function Ux(a,b){var c;c=void 0===c?0:c;switch(a.ya){case 8:a=ja(b,0a&&-1>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Sx={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; function Wx(a){Nx.call(this,a);this.oa=4;this.ha=5;this.wa=1048575;this.K=Xx(this);this.Ga=Xx(this);this.Z=Xx(this);this.D=[];this.B=this.Y=this.M=[];Yx(this);this.ta=0;Zx(this);this.za={};$x(this,a.messages);this.Ca=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ay(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ay(b,a)})}ba(Wx,Nx);l=Wx.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.Za=Ob(a,"FDC");this.Ha=Ob(a,"HDC");this.Tc=Ob(a,"FPU");this.G=Ob(a,"Mouse");(a=qd(a,"messages"))&&$x(this,a);this.ha=b.I>>2;this.wa=b.N;this.Ta=new Kd(this.H,7,"DBG");this.ma=by;80186<=this.H.ca&&(this.ma=by.slice(),this.ma[15]=cy,80286<=this.H.ca&&(this.ma[15]=dy,80386<=this.H.ca&&(this.oa=8)));rl(this,64,function(a){ey(d,d.H.sc,a[0])});rl(this,4,function(a){if(a=a[0]){var b=Rx(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=fy(d, b,gy),d.P("dumpSel("+ka(a?a.U:b)+"): %"+q(a?a.Lb:null,d.ha)),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=hy[a.type];e&&(c=e[0],b=e[1])}!c||a.jb&32768||(c+=",not present");d.P((b?"seg="+ka(a.ua&65535)+" off="+ka(a.Ka):"base="+q(a.ua,d.ha)+" limit="+iy(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ka(a.ext&-65296)+ diff --git a/docs/pcx86/examples/pcx86.js b/docs/pcx86/examples/pcx86.js index e1b3619e0..5abf3c533 100644 --- a/docs/pcx86/examples/pcx86.js +++ b/docs/pcx86/examples/pcx86.js @@ -49,7 +49,7 @@ var da={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[4 y:121,z:122,"{":123,"|":124,"}":125,"~":126,po:127},ea={};ea[173]=n["-"];ea[186]=n[";"];ea[187]=n["="];ea[189]=n["-"];ea[188]=n[","];ea[190]=n["."];ea[191]=n["/"];ea[192]=n["`"];ea[219]=n["["];ea[220]=n["\\"];ea[221]=n["]"];ea[222]=n["'"];var p={};p[n["1"]]=n["!"];p[n["2"]]=n["@"];p[n["3"]]=n["#"];p[n["4"]]=n.$;p[n["5"]]=n["%"];p[n["6"]]=n["^"];p[n["7"]]=n["&"];p[n["8"]]=n["*"];p[n["9"]]=n["("];p[n["0"]]=n[")"];p[186]=n[":"];p[187]=n["+"];p[188]=n["<"];p[189]=n._;p[190]=n[">"];p[191]=n["?"]; p[192]=n["~"];p[219]=n["{"];p[220]=n["|"];p[221]=n["}"];p[222]=n['"'];p[173]=n._;p[61]=n["+"];p[59]=n[":"]; function fa(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ha(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function ha(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0"']/g,function(a){return la[a]})}function ma(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var la={"&":"&","<":"<",">":">",'"':""","'":"'"},na={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function oa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}function pa(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;var f=a[e],g=arguments[d++],c=c&~f.qg|g<>a.shift}var ra=[31,28,31,30,31,30,31,31,30,31,30,31],sa=Date.now||function(){return+new Date}; diff --git a/modules/pdp10/lib/bus.js b/modules/pdp10/lib/bus.js index 2f2b9fedb..dfb6e876c 100644 --- a/modules/pdp10/lib/bus.js +++ b/modules/pdp10/lib/bus.js @@ -478,7 +478,7 @@ class BusPDP10 extends Component { * * @this {BusPDP10} * @param {number} addr is a physical address - * @return {number} word (16-bit) value at that address + * @return {number} word (36-bit) value at that address */ getWord(addr) { @@ -492,13 +492,13 @@ class BusPDP10 extends Component { * * @this {BusPDP10} * @param {number} addr is a physical address - * @param {number} w is the word (16-bit) value to write + * @param {number} w is the word (36-bit) value to write */ setWord(addr, w) { var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; - this.aBusBlocks[iBlock].writeWord(off, w, addr); + this.aBusBlocks[iBlock].writeWord(w, off, addr); } /** @@ -520,7 +520,7 @@ class BusPDP10 extends Component { * * @this {BusPDP10} * @param {number} addr is a physical address - * @return {number} word (16-bit) value at that address + * @return {number} word (36-bit) value at that address */ getWordDirect(addr) { @@ -540,14 +540,14 @@ class BusPDP10 extends Component { * * @this {BusPDP10} * @param {number} addr is a physical address - * @param {number} w is the word (16-bit) value to write (we truncate it to 16 bits to be safe) + * @param {number} w is the word (36-bit) value to write (we truncate it to 16 bits to be safe) */ setWordDirect(addr, w) { var off = addr & this.nBlockLimit; var block = this.getBlockDirect(addr); this.nDisableFaults++; - block.writeWordDirect(off, w & 0xffff, addr); + block.writeWordDirect(w, off, addr); this.nDisableFaults--; } diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index aad5c5e1a..3dfe1267c 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -2487,7 +2487,7 @@ class DebuggerPDP10 extends Debugger { sData += ' '; } for (var i = 0; size == 1 && i < 6; i++) { - var c = ((w % 64)|0) + 33; + var c = ((w % 64)|0) + 32; sChars += String.fromCharCode(c); w /= 64; } diff --git a/modules/pdp10/lib/memory.js b/modules/pdp10/lib/memory.js index 3c1fcbcd5..41afe49f7 100644 --- a/modules/pdp10/lib/memory.js +++ b/modules/pdp10/lib/memory.js @@ -216,7 +216,7 @@ class MemoryPDP10 { */ if (len === undefined) len = this.size; Component.assert(off >= 0 && off < this.size); - for (i = off; len-- && i < this.size; i++) this.writeWordDirect(off, pattern, this.addr + off); + for (i = off; len-- && i < this.size; i++) this.writeWordDirect(pattern, off, this.addr + off); } /** diff --git a/modules/shared/lib/strlib.js b/modules/shared/lib/strlib.js index feabdb7ec..771981dda 100644 --- a/modules/shared/lib/strlib.js +++ b/modules/shared/lib/strlib.js @@ -132,7 +132,12 @@ class Str { } var v; if (Str.isValidInt(s, base) && !isNaN(v = parseInt(s, base))) { - value = v | 0; + /* + * With the need to support larger (eg, 36-bit) integers, truncating to 32 bits is no longer helpful. + * + * value = v|0; + */ + value = v; } } return value; @@ -234,6 +239,13 @@ class Str { if (n == null || isNaN(n)) { while (cch-- > 0) s = '?' + s; } else { + /* + * Callers that produced an input by dividing by a power of two rather than shifting (in order + * to access more than 32 bits) may produce a fractional result, which ordinarily we would simply + * ignore, but if the integer portion is zero and the sign is negative, we should probably treat + * this value as a sign-extension. + */ + if (n < 0 && n > -1) n = -1; while (cch-- > 0) { var d = (n & 7) + 0x30; s = String.fromCharCode(d) + s; @@ -254,7 +266,7 @@ class Str { * * @param {number|null|undefined} n (interpreted as a 32-bit value) * @param {number} [cch] is the desired number of decimal digits (0 or undefined for default of either 5 or 10) - * @return {string} the octal representation of n + * @return {string} the decimal representation of n */ static toDec(n, cch) { @@ -276,6 +288,13 @@ class Str { if (n == null || isNaN(n)) { while (cch-- > 0) s = '?' + s; } else { + /* + * Callers that produced an input by dividing by a power of two rather than shifting (in order + * to access more than 32 bits) may produce a fractional result, which ordinarily we would simply + * ignore, but if the integer portion is zero and the sign is negative, we should probably treat + * this value as a sign-extension. + */ + if (n < 0 && n > -1) n = -1; while (cch-- > 0) { var d = (n % 10) + 0x30; s = String.fromCharCode(d) + s; @@ -327,6 +346,13 @@ class Str { if (n == null || isNaN(n)) { while (cch-- > 0) s = '?' + s; } else { + /* + * Callers that produced an input by dividing by a power of two rather than shifting (in order + * to access more than 32 bits) may produce a fractional result, which ordinarily we would simply + * ignore, but if the integer portion is zero and the sign is negative, we should probably treat + * this value as a sign-extension. + */ + if (n < 0 && n > -1) n = -1; while (cch-- > 0) { var d = n & 0xf; d += (d >= 0 && d <= 9? 0x30 : 0x41 - 10); diff --git a/versions/pc8080/1.34.0/pc8080-dbg.js b/versions/pc8080/1.34.0/pc8080-dbg.js index 1f1887909..36134948b 100644 --- a/versions/pc8080/1.34.0/pc8080-dbg.js +++ b/versions/pc8080/1.34.0/pc8080-dbg.js @@ -47,11 +47,11 @@ var fa=window?window.PCjs.Machines:{},da=window?window.PCjs.Components:[],sa=win Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b>=3;return(c?"0o":"")+d}function t(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function Ja(a){return t(a,2,!0)}function x(a){return t(a,4,!0)}function Ka(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Ra[a]})}function Sa(a,b){return(a+" ").slice(0,b)} -function Ta(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ra={"&":"&","<":"<",">":">",'"':""","'":"'"},Ua={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Va(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 Xa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;ca&&-1>=3;return(c?"0o":"")+d} +function t(a,b,c){var d="";b?8a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function Ja(a){return t(a,2,!0)}function x(a){return t(a,4,!0)}function Ka(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Ra[a]})}function Sa(a,b){return(a+" ").slice(0,b)}function Ta(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} +var Ra={"&":"&","<":"<",">":">",'"':""","'":"'"},Ua={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function Va(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 Xa(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Qa=g.load;d.Ia=g.exec;if(e=g.bytes)d.ma=e;else if(e=g.words)for(d.ma=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ma=Array(4*e.length),f=c=0;c>=1,y--;g=v+g;d>>=8}d=t(c,0,!0)+" "+c+". "+Ia(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e} -function ag(a,b){if(b)return Zf(a,b,a.S[b]);var c=0;for(b in a.S)Zf(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} +function ag(a,b){if(b)return Zf(a,b,a.S[b]);var c=0;for(b in a.S)Zf(a,b,a.S[b]),c++;return 0a&&-1>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c} var Yf={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};function bg(a){Tf.call(this,a);this.style=cg;this.F=dg();this.la=dg();this.O=dg();this.A=[];this.j=this.I=this.w=[];eg(this);this.W=0;fg(this);this.Z={};gg(this,a.messages);this.ea=a.commands;var b=this;window?void 0===window.pc8080&&(window.pc8080=function(a){return Fc(b,a)}):void 0===global.pc8080&&(global.pc8080=function(a){return Fc(b,a)})}aa(bg,Tf);l=bg.prototype; l.Ea=function(a,b,c,d){this.H=b;this.u=c;this.R=a;(a=Bc(a,"messages"))&&gg(this,a);this.ga=hg;Sd(this,64,function(a){a:{var b=d.H.b,c=a[0],e=a=0,k=b.length;if(c){a=ig(jg(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,p=0;k--;){var u=b[e];u.type==c?p++||d.i("..."):(c=u.type,p=Ib[c],u&&d.i(t(u.id)+" %"+t(e<"]; fa[191]=n["?"];fa[192]=n["~"];fa[219]=n["{"];fa[220]=n["|"];fa[221]=n["}"];fa[222]=n['"'];fa[173]=n._;fa[61]=n["+"];fa[59]=n[":"]; function ga(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1,f--;return d}function ia(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} -function ja(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d}function q(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function r(a){return q(a,2,!0)}function ka(a){return q(a,4,!0)} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f)}return c}function ha(a,b){var c,d="";b?32>=1,f--;return d}function ia(a,b,c){var d="";if(!b||4>=8;return(c?"0b":"")+d} +function ja(a,b,c){var d="";b?11a&&-1>=3;return(c?"0o":"")+d}function q(a,b,c){var d="";b?8a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function r(a){return q(a,2,!0)}function ka(a){return q(a,4,!0)} function la(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0"']/g,function(a){return pa[a]})} function qa(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function ra(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} var pa={"&":"&","<":"<",">":">",'"':""","'":"'"},sa={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"};function ta(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]);0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.P((null!=b?b+": ":"")+d);return e}function Vx(a,b){if(b)return Tx(a,b,a.da[b]);var c=0;for(b in a.da)Tx(a,b,a.da[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Sx={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function Ux(a,b){var c;c=void 0===c?0:c;switch(a.ya){case 8:a=ja(b,0a&&-1>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c}var Sx={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; function Wx(a){Nx.call(this,a);this.oa=4;this.ha=5;this.wa=1048575;this.K=Xx(this);this.Ga=Xx(this);this.Z=Xx(this);this.D=[];this.B=this.Y=this.M=[];Yx(this);this.ta=0;Zx(this);this.za={};$x(this,a.messages);this.Ca=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return ay(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return ay(b,a)})}ba(Wx,Nx);l=Wx.prototype; l.uc=function(a,b,c,d){this.ka=b;this.H=c;this.pa=a;this.Za=Ob(a,"FDC");this.Ha=Ob(a,"HDC");this.Tc=Ob(a,"FPU");this.G=Ob(a,"Mouse");(a=qd(a,"messages"))&&$x(this,a);this.ha=b.I>>2;this.wa=b.N;this.Ta=new Kd(this.H,7,"DBG");this.ma=by;80186<=this.H.ca&&(this.ma=by.slice(),this.ma[15]=cy,80286<=this.H.ca&&(this.ma[15]=dy,80386<=this.H.ca&&(this.oa=8)));rl(this,64,function(a){ey(d,d.H.sc,a[0])});rl(this,4,function(a){if(a=a[0]){var b=Rx(d,a);if(void 0===b)d.P("invalid selector: "+a);else if(a=fy(d, b,gy),d.P("dumpSel("+ka(a?a.U:b)+"): %"+q(a?a.Lb:null,d.ha)),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=hy[a.type];e&&(c=e[0],b=e[1])}!c||a.jb&32768||(c+=",not present");d.P((b?"seg="+ka(a.ua&65535)+" off="+ka(a.Ka):"base="+q(a.ua,d.ha)+" limit="+iy(a.Ka))+" type="+r(a.type>>8)+" ("+c+") ext="+ka(a.ext&-65296)+ diff --git a/versions/pdpjs/1.34.0/pdp10-dbg.js b/versions/pdpjs/1.34.0/pdp10-dbg.js index 3eaf02134..9962c391b 100644 --- a/versions/pdpjs/1.34.0/pdp10-dbg.js +++ b/versions/pdpjs/1.34.0/pdp10-dbg.js @@ -48,9 +48,10 @@ var ua=window?window.PCjs.Machines:{},v=window?window.PCjs.Components:[],Aa=wind Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b>=3;return(c?"0o":"")+d}function H(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} -function I(a){return H(a,4,!0)}function Ra(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Wa[a]})}function Xa(a,b){return(a+" ").slice(0,b)} -function fb(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Wa={"&":"&","<":"<",">":">",'"':""","'":"'"};function gb(a,b,c){var d=0,e=a.length,g=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[f]);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())} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(g=parseInt(a,b))&&(c=g)}return c}function Qa(a,b,c){var d="";b?11a&&-1>=3;return(c?"0o":"")+d} +function H(a,b,c){var d="";b?8a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function I(a){return H(a,4,!0)}function Ra(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Wa[a]})}function Xa(a,b){return(a+" ").slice(0,b)}function fb(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Wa={"&":"&","<":"<",">":">",'"':""","'":"'"}; +function gb(a,b,c){var d=0,e=a.length,g=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[f]);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 J(a,b,c,d){c=void 0===c?!1:c;var e=0,g=null,f=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,e),[g,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),f;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(g=h.responseText,200==h.status||!h.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a, g,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||(g=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,g,e),f=[g,e]);return f} function ib(a,b){var c,d={W:null,S:null,ia:null,ha:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,g,f;if("<"==b.substr(0,1))throw Error(b);f=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ia=f.load;d.ha=f.exec;if(e=f.bytes)d.W=e;else if(e=f.words)for(d.W=Array(2*e.length),g=c=0;c>8&255;else if(e=f.data)for(d.W=Array(4*e.length),g=c=0;cc;c++){v function Pb(){for(var a=D(document,C,"panel"),b=0;bd.length){for(var e=0,g=Array(4096),f=0;f>>a.j;0g&&(m=g);if(h&&h.size){if(h.type==d){if(e+g<=h.v)return h.Ha+=h.v-e,h.v=e,!0;if(e>=h.v+h.Ha){m=h.size-(e-k);m>g&&(m=g);h.Ha=e-h.v+m;e=k+16384;g-=m;f++;continue}}return jc(kc,e,g)}e=new V(a,e,m,16384,d);gc(e,a.A,h);a.g[f++]=e;e=k+16384;g-=m}return 0>=g?(a.status("Added "+(c>>10)+"Kb "+lc[d]+" at "+Qa(b)),!0):jc(mc,b,c)} -function ec(a,b){var c=a.g[(b&a.u)>>>a.j];a.w++;b=c.j(b&16383,b);a.w--;return b}function dc(a,b,c){var d=a.g[(b&a.u)>>>a.j];a.w++;d.F(b&16383,c&65535,b);a.w--}function hc(a){for(var b=0,c=[],d=0;d>>a.j];a.w++;b=c.j(b&16383,b);a.w--;return b}function dc(a,b,c){var d=a.g[(b&a.u)>>>a.j];a.w++;d.F(c,b&16383,b);a.w--}function hc(a){for(var b=0,c=[],d=0;d>>b.j].ta(a&16383,a)};l.Tb=function(a,b){var c=this.C;a=this.ea=a;c.g[(a&c.u)>>>c.j].Ia(a&16383,b,a)}; +function gd(a){var b=[];for(a=a.fa;a;)b.push(a.Ob),a=a.next;return b}l.Gb=function(a){var b=this.C;a=this.ea=a;return b.g[(a&b.u)>>>b.j].ta(a&16383,a)};l.Tb=function(a,b){var c=this.C;a=this.ea=a;c.g[(a&c.u)>>>c.j].Ia(b,a&16383,a)}; l.Ja=function(a){this.i.complete=!0;var b=this.A?hd(this.A)?1:this.i.Ra?-1:0:0,c=a?this.i.Ra?0:1:-1;this.i.Ra=!1;this.H=this.I=a;this.j=this.j&-5|(b?4:0);do{if(this.j){if(this.j&4){if(id(this.A,this.g,c)){this.R();break}++b||(this.j&=-5);c||c++}if(a=this.j&11)this.j&2?this.fa||(this.j&=-3):this.j&1&&this.j++,a=!1;if(a){if(this.j&4&&id(this.A,this.g,c)){this.R();break}if(0>c)break}}this.j&=15;a=this.g;this.ta(a);this.g=(a+1)%Gb}while(0>>a.j;0f&&f>=sa&&(f+=ra);f=Math.trunc(Math.abs(f))%ra;void 0===g&&(g=e.size);for(h=d;g--&&h>>a.j;0f&&f>=sa&&(f+=ra);f=Math.trunc(Math.abs(f))%ra;void 0===g&&(g=e.size);for(h=d;g--&&h=b.length){G(a,"invalid block at offset "+I(n),4096);break}for(var k=k+2,p=b[k++]&255|(b[k++]&255)<<8,q=b[k++]&255|(b[k++]&255)<<8,m=m+((p&255)+(p>>8)+(q&255)+(q>>8)),K=k,za=p-=6;0=b.length){G(a,"insufficient data for block at offset "+I(n),4096);break}m+= b[k++]&255;if(m&255){G(a,"invalid checksum ("+H(m,2,!0)+") for block at offset "+I(n),4096);break}if(za)for(G(a,"loading "+I(za)+" bytes at "+I(q)+"-"+I(q+za),4096);za--;)dc(a.C,q++,b[K++]);else q&1?f=!0:null==d&&(d=q),null!=d&&G(a,"starting address: "+I(d),4096);h=!0}else k++;else k+=2}if(!h&&(null==c&&(c=e),null!=c)){for(h=0;h>=1,K--;f=p+f;d>>=8}d=H(c,0,!0)+" "+c+". "+Qa(c,0,!0)+" "+("0b"+f);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.f((null!=b?b+": ":"")+d);return e} -function zd(a,b){if(b)return yd(a,b,a.Z[b]);var c=0;for(b in a.Z)yd(a,b,a.Z[b]),c++;return 0>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c} +function zd(a,b){if(b)return yd(a,b,a.Z[b]);var c=0;for(b in a.Z)yd(a,b,a.Z[b]),c++;return 0a&&-1>2:0)}0>c?c=a.replace(/^0+([0-9A-F]+)$/i,"$1"):c=a;return c} var xd={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; function Ad(a){rd.call(this,a);this.ya=!1;this.ma=!0;this.I=X();this.xa=X();this.N=X();this.H=[];this.g=this.K=this.G=[];Bd(this);this.P=this.ga=0;this.j=[];this.pa=void 0;Cd(this);this.A=this;this.na={};this.V=this.cb=0;this.U=null;this.M=[];Dd(this,a.messages);this.ra=a.commands;this.Ba=Ed;this.Ma=[];this.L=0;this.Da=this.qa=null;this.B=this.Aa=this.za=this.fa=this.oa=0;this.ea=this.aa=null;var b=this;window?void 0===window[C]&&(window[C]=function(a){return Wc(b,a)}):void 0===global[C]&&(global[C]= function(a){return Wc(b,a)})}r(Ad,rd);function Y(a){a=a&&a.v;null==a&&(a=-1);return a}function X(a,b,c){return{v:void 0===a?null:a,qb:void 0===b?!1:b,ka:!1,ba:c}}function Fd(a){return[a.v,a.qb,a.ba,a.ka,a.Qa]}function Gd(a,b){var c=X(b[0],b[1],b[2]);c.ka=b[3];b[4]&&(c.ab=sd(a,c.Qa=b[4]));return c}l=Ad.prototype; @@ -158,7 +159,7 @@ else{var ja=za.charAt(1);if("l"==ja){var oc;oc=0+we(a,a.g);oc+=we(a,a.K);(oc+=we "w"==ja?a.va(a.G,F):a.f("unknown breakpoint command: "+ja))}}}break;case "c":a.ja&&(a.ja.value="");break;case "d":a:{var Ca,Da=f[0],R=f[1],ca=f[2],hf=f[3];if("?"==R){var Ea="";for(Ca in N)a.na[Ca]&&(Ea&&(Ea+=","),Ea+=Ca);Ea+=",state,symbols";a.f("dump memory commands:");a.f("\tdw [a] [n] dump n words at address a");a.f("\tds [a] [n] dump n words at address a as JSON");a.f("\tdh [p] [n] dump n instructions from history position p");Ea.length&&a.f("dump extension commands:\n\t"+Ea)}else if("state"== R){var pc=He(a.D,!0);"console"==ca?console.log(pc):(a.ja&&(a.ja.value=""),pc&&a.f(pc))}else if("symbols"==R)for(var qc=0;qcS.length&&(a.f("note: only "+S.length+" available"),L=S.length);P-=L;0>P&&(null==S[S.length-1].v?(L=P+L,P=0):P+=S.length);var sc=[];"call"==Wd&&(Ya=1E5,sc=["CALL"]);for(void 0!==Vd&&a.f(L+" instructions earlier:");0=S.length&&(P=0);a.pa=L;Yd++;Ya--}}Yd||(a.f("no "+Xd+"history available"), -a.pa=void 0)}else{var ka=Z(a,R);if(ka){var la=0,ae="ds"==Da;if(ca){if("l"==ca.charAt(0))ca=ca.substr(1)||hf,la=wd(a,ca);else{var be=Z(a,ca);be&&(la=be.v-ka.v)}0>la&&(la=0);65536fe;fe++)de+=String.fromCharCode((Ab%64|0)+33), +a.pa=void 0)}else{var ka=Z(a,R);if(ka){var la=0,ae="ds"==Da;if(ca){if("l"==ca.charAt(0))ca=ca.substr(1)||hf,la=wd(a,ca);else{var be=Z(a,ca);be&&(la=be.v-ka.v)}0>la&&(la=0);65536fe;fe++)de+=String.fromCharCode((Ab%64|0)+32), Ab/=64}ma&&(ma+="\n");ma=ae?ma+(na+","):ma+(R+": "+na+(0>ee?" "+de:""))}ma&&a.f(ma);a.xa=ka;a.ba=kf}}}}break;case "e":if("else"==f[0])break;var ge,he,ie=f[0],vc=f[1];"e"==ie||"ew"==ie?(ge=a.wa,he=a.Xa):vc=null;if(null==vc)a.f("edit memory commands:"),a.f("\tew [a] [...] edit words at address a");else{var Bb=Z(a,vc);if(Bb)for(var Cb=2;Cbzc;){for(var oa=null,of=256;65536>ab.v>>>0;){Ac.v=a.wa(ab,2);if(null==ab.v||!of--)break;if(!(Ac.v&1)){for(var pf=a,Db=Ac,ke=null,bb=Db.v,le=bb,Bc=1;6>=Bc&&bb;Bc++){if(2>=3;return""+c}function F(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function xa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Ba[a]})}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"}; +function wa(a,b){var c="";b?11a&&-1>=3;return""+c}function F(a,b,c){var d="";b?8a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} +function xa(a){var b=a,c=a.lastIndexOf("/");0<=c&&(b=a.substr(c+1));c=b.indexOf("&");0"']/g,function(a){return Ba[a]})}function Ca(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"}; function Da(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function H(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 l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} @@ -65,13 +65,13 @@ b),a.onmouseup=a.onmouseout=function(a,b){return function(){O(a,b)}}(this,b),a.o k.save=function(){var a=new P(this);a.set(0,[this.f,this.h,this.g]);return a.data()};k.restore=function(a){if(a=a[0])Q(this,this.f=a[0]),N(this,this.h=a[1]),$a(this,a[2]);return!0};k.mb=function(){for(var a in this.a){var b=this.a[a];b[1]=b[0]}Ya(this);return!0};function ab(a,b,c){if(a=a.i[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Xa(a,b){for(var c in a.l)ab(a,c,null!=b?b:a.l[c])} function bb(a,b,c){if(a=a.i[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Ya(a){for(var b in a.a)bb(a,b,a.a[b][1])}k.Wa=function(a,b,c){if(Wa(this,b)){if(c){var d=this;setTimeout(function(){O(d,b);a&&a()},+c);return!1}O(this,b)}return!0}; k.pb=function(a,b){if("SR"==a){a=b;b=8;var c;if(a){b||(b=10);var d=a.charAt(0),e=0>>a.f].Ca(b&16383,b)}else a=this.c.ba(this.f);N(this,this.h=a)}};k.bb=function(a){a||this.c.b.u||Q(this,this.g)};k.ab=function(a){a?(this.s=!0,Xa(this,!0)):(this.s=!1,Xa(this),$a(this,0))};k.cb=function(a,b){this.g=a?this.g|1<c;c++){var d=a,e="A"+c,f=b&1<c;c++){var d=a,e="D"+c,f=b&1<b;b++)a.a["S"+b][1]=a.g&1<d.length){for(var e=0,f=Array(4096),g=0;g>>a.f;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.X)return h.sa+=h.X-e,h.X=e,!0;if(e>=h.X+h.sa){m=h.size-(e-l);m>f&&(m=f);h.sa=e-h.X+m;e=l+16384;f-=m;g++;continue}}return pb(qb,e,f)}e=new U(0,e,m,16384,d);mb(e,h);a.a[g++]=e;e=l+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+rb[d]+" at "+wa(b)),!0):pb(sb,b,c)}function kb(a,b,c){a.a[(b&a.g)>>>a.f].ua(b&16383,c&65535,b)} +function ob(a,b,c,d){for(var e=b,f=c,g=e>>>a.f;0f&&(m=f);if(h&&h.size){if(h.type==d){if(e+f<=h.X)return h.sa+=h.X-e,h.X=e,!0;if(e>=h.X+h.sa){m=h.size-(e-l);m>f&&(m=f);h.sa=e-h.X+m;e=l+16384;f-=m;g++;continue}}return pb(qb,e,f)}e=new U(0,e,m,16384,d);mb(e,h);a.a[g++]=e;e=l+16384;f-=m}return 0>=f?(a.status("Added "+(c>>10)+"Kb "+rb[d]+" at "+wa(b)),!0):pb(sb,b,c)}function kb(a,b,c){a.a[(b&a.g)>>>a.f].ua(c,b&16383,b)} function nb(a){for(var b=0,c=[],d=0;d>>b.f].ba(a&16383,a)};k.wb=function(a,b){var c=this.j;a=this.V=a;c.a[(a&c.g)>>>c.f].ta(a&16383,b,a)}; +function Nb(a){var b=[];for(a=a.W;a;)b.push(a.rb),a=a.next;return b}k.jb=function(a){var b=this.j;a=this.V=a;return b.a[(a&b.g)>>>b.f].ba(a&16383,a)};k.wb=function(a,b){var c=this.j;a=this.V=a;c.a[(a&c.g)>>>c.f].ta(b,a&16383,a)}; k.va=function(a){this.b.complete=!0;var b=a?this.b.Da?0:1:-1;this.b.Da=!1;this.v=this.A=a;this.a=this.a&-5|0;do{if(a=this.a)if(a=this.a&11)this.a&2?this.W||(this.a&=-3):this.a&1&&this.a++,a=!1;if(a){if(this.a&4&&this.o.h(this.f,b)){S(this);break}if(0>b)break}this.a&=15;a=this.f;this.ba(a);this.f=(a+1)%Sa}while(0>>=f.f;0>>a.f;0g&&g>=ja&&(g+=ia);g=Math.trunc(Math.abs(g))%ia;void 0===f&&(f=e.size);for(h=d;f--&&h>>a.f;0g&&g>=ja&&(g+=ia);g=Math.trunc(Math.abs(g))%ia;void 0===f&&(f=e.size);for(h=d;f--&&h=b.length)break;for(var l=l+2,n=b[l++]&255|(b[l++]&255)<<8,p=b[l++]&255|(b[l++]&255)<<8,m=m+((n&255)+(n>>8)+(p&255)+(p>>8)),M=l,qa=n-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(qa)for(;qa--;)kb(a.j,p++,b[M++]);else p&1?g=!0:null==d&&(d=p);h=!0}else l++;else l+=2}if(!h&&(null==c&&(c=e),null!=c)){for(h=0;h>=1,f--;return d}function E(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d} -function Ma(a,b){var c="";b?10=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function Na(a){return F(a,4,!0)} +d.match(/^[01]+$/):d.match(/^[0-9]+$/))&&!isNaN(f=parseInt(a,b))&&(c=f)}return c}function La(a,b,c){var d="";b?32>=1,f--;return d}function E(a,b,c){var d="";b?11a&&-1>=3;return(c?"0o":"")+d} +function Ma(a,b){var c="";b?10a&&-1a&&-1=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function Na(a){return F(a,4,!0)} function Oa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0"']/g,function(a){return Sa[a]})}function Xa(a,b){return(a+" ").slice(0,b)} function Ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var Sa={"&":"&","<":"<",">":">",'"':""","'":"'"},Za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; function $a(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=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())}