Fixed the Debugger's arithmetic truncation function (truncate())
This commit is contained in:
parent
46ed7c77e8
commit
75b9a9c2ba
9 changed files with 84 additions and 149 deletions
|
|
@ -198,7 +198,7 @@ this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.lengt
|
|||
var Qf=12,Rf=16,Sf=192,Zf=2,Yf=32,$f=64,ce=1,Tf=2,Wf=4,Vf=128,Uf=15,Xf=240,Pf=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],Nf=[!1,0,0,133,142,39,238],If="buffer",Kf={0:Hf.prototype.Id,1:Hf.prototype.Hd},Lf={0:Hf.prototype.Wd,1:Hf.prototype.Vd,2:Hf.prototype.Ud};Ua(function(){for(var a=qb(document,"pc8080","serial"),b=0;b<a.length;b++){var c=a[b],d=ob(c),d=new Hf(d);pb(d,c)}});
|
||||
function ag(a){u.call(this,"Debugger",a);this.w=+a.base||16;this.Ja=null;this.U=["{","}"];this.fa=["[","]"];this.S=this.ba=this.D=0;this.N=!1;this.b=-1;this.g=[];this.M={}}aa(ag,u);ag.prototype.Lb=function(){return-1};ag.prototype.Mb=function(){};
|
||||
ag.prototype.Bb=function(a,b,c){if(b)if(a){0>this.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.N?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(ya(a.substring(d,f))),d=f+1}}return b};
|
||||
function bg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a|0:(b=Math.pow(2,b-1),a<-b?(a<2*-b&&(d=a%(2*b)),d+=2*b):d>=b&&(a>=2*b&&(d=a%(2*b)),d-=2*b));a!=d&&(a=d);return a}
|
||||
function bg(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
|
||||
function cg(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<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=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=bg(e,0,!0),e=0<f?e*Math.pow(2,f):Math.trunc(e/Math.pow(2,-f)));break;default:return!1}a.push(bg(e))}return!0}
|
||||
function dg(a,b,c,d,e,f){var g,h,k,p=!1,t=0,v=[],B=[],y=a.w;for(a.w=e;c<d;){h=b[c++].trim();k=c<d?b[c++]:"";if(h)t=eg(a,h,null,f,t);else if("{"==k){h=1;for(t=c;c<d;)if(c++,k=c<b.length?b[c++]:"","{"==k)h++;else if("}"==k&&!--h)break;t=dg(a,b,t,c-1,a.w,f);h=c<d?b[c++].trim():"";k=c<d?b[c++]:""}else{if(" "==k)continue;if("^B"==k){a.w=2;continue}if("^O"==k){a.w=8;continue}if("^D"==k){a.w=10;continue}if(!(t&-1073741824)){if("+"==k)continue;if("-"==k){t=t<<2|1;continue}if("~"==k||"^-"==k){t=t<<2|2;continue}if("^L"==
|
||||
|
|
|
|||
Loading…
Reference in a new issue