From f8bc528de31cf6807ff297ef4bdbe05b767c52fa Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Wed, 30 Nov 2016 13:04:02 -0800 Subject: [PATCH] More register refactoring (no logic changes, so hopefully nothing broken) --- modules/pdp11/lib/pc11.js | 40 +-- modules/pdp11/lib/rk11.js | 92 +++--- modules/pdp11/lib/serialport.js | 36 +-- versions/pdpjs/1.30.5/pdp11-dbg.js | 498 ++++++++++++++--------------- versions/pdpjs/1.30.5/pdp11.js | 324 +++++++++---------- 5 files changed, 495 insertions(+), 495 deletions(-) diff --git a/modules/pdp11/lib/pc11.js b/modules/pdp11/lib/pc11.js index 94d85b842..37b2cedb0 100644 --- a/modules/pdp11/lib/pc11.js +++ b/modules/pdp11/lib/pc11.js @@ -75,8 +75,8 @@ function PC11(parms) this.cAutoMount = 0; this.nBaudReceive = parms['baudReceive'] || PDP11.PC11.PRS.BAUD; - this.prs = 0; // PRS register - this.prb = 0; // PRB register + this.regPRS = 0; // PRS register + this.regPRB = 0; // PRB register this.iTapeData = 0; // buffer index this.aTapeData = []; // buffer for the PRB register this.sTapeSource = PC11.SOURCE.NONE; @@ -339,8 +339,8 @@ PC11.prototype.powerDown = function(fSave, fShutdown) */ PC11.prototype.reset = function() { - this.prs &= ~PDP11.PC11.PRS.CLEAR; - this.prb = 0; + this.regPRS &= ~PDP11.PC11.PRS.CLEAR; + this.regPRB = 0; }; /** @@ -806,8 +806,8 @@ PC11.prototype.getBaudTimeout = function(nBaud) */ PC11.prototype.advanceReader = function() { - if ((this.prs & (PDP11.PC11.PRS.RE | PDP11.PC11.PRS.ERROR)) == PDP11.PC11.PRS.RE) { - if (!(this.prs & PDP11.PC11.PRS.DONE)) { + if ((this.regPRS & (PDP11.PC11.PRS.RE | PDP11.PC11.PRS.ERROR)) == PDP11.PC11.PRS.RE) { + if (!(this.regPRS & PDP11.PC11.PRS.DONE)) { if (this.iTapeData < this.aTapeData.length) { /* * Here, as elsewhere (eg, the DL11 component), even if I trusted all incoming data @@ -815,11 +815,11 @@ PC11.prototype.advanceReader = function() * (eg, -128 to 127, instead of 0 to 255). Both risks are good reasons to always mask * the data assigned to PRB with 0xff. */ - this.prb = this.aTapeData[this.iTapeData++] & 0xff; + this.regPRB = this.aTapeData[this.iTapeData++] & 0xff; this.displayProgress(this.iTapeData / this.aTapeData.length * 100); - this.prs |= PDP11.PC11.PRS.DONE; - this.prs &= ~PDP11.PC11.PRS.BUSY; - if (this.prs & PDP11.PC11.PRS.RIE) { + this.regPRS |= PDP11.PC11.PRS.DONE; + this.regPRS &= ~PDP11.PC11.PRS.BUSY; + if (this.regPRS & PDP11.PC11.PRS.RIE) { this.cpu.setIRQ(this.irqReader); } } @@ -841,7 +841,7 @@ PC11.prototype.advanceReader = function() */ PC11.prototype.readPRS = function(addr) { - return this.prs & PDP11.PC11.PRS.RMASK; // RMASK honors the "write-only" nature of the RE bit by returning zero on reads + return this.regPRS & PDP11.PC11.PRS.RMASK; // RMASK honors the "write-only" nature of the RE bit by returning zero on reads }; /** @@ -861,15 +861,15 @@ PC11.prototype.writePRS = function(data, addr) * sets Busy, and clears the Reader Buffer (PRB). Operation of this bit is disabled if Error = 1; * attempting to set it when Error = 1 will cause an immediate interrupt if Interrupt Enable = 1. */ - if (this.prs & PDP11.PC11.PRS.ERROR) { + if (this.regPRS & PDP11.PC11.PRS.ERROR) { data &= ~PDP11.PC11.PRS.RE; - if (this.prs & PDP11.PC11.PRS.RIE) { + if (this.regPRS & PDP11.PC11.PRS.RIE) { this.cpu.setIRQ(this.irqReader); } } else { - this.prs &= ~PDP11.PC11.PRS.DONE; - this.prs |= PDP11.PC11.PRS.BUSY; - this.prb = 0; + this.regPRS &= ~PDP11.PC11.PRS.DONE; + this.regPRS |= PDP11.PC11.PRS.BUSY; + this.regPRB = 0; /* * The PC11, by virtue of its "high speed", is supposed to deliver characters at 300 CPS, so * that's the rate we'll choose as well (ie, 1000ms / 300). As an aside, the original "low speed" @@ -878,7 +878,7 @@ PC11.prototype.writePRS = function(data, addr) this.cpu.setTimer(this.timerReader, this.getBaudTimeout(this.nBaudReceive)); } } - this.prs = (this.prs & ~PDP11.PC11.PRS.WMASK) | (data & PDP11.PC11.PRS.WMASK); + this.regPRS = (this.regPRS & ~PDP11.PC11.PRS.WMASK) | (data & PDP11.PC11.PRS.WMASK); }; /** @@ -894,9 +894,9 @@ PC11.prototype.readPRB = function(addr) * I'm guessing that the DONE and BUSY bits always remain more-or-less inverses of each other. They definitely * start out that way when writePRS() sets the reader enable (RE) bit, and so that's how we treat them elsewhere, too. */ - this.prs &= ~PDP11.PC11.PRS.DONE; - this.prs |= PDP11.PC11.PRS.BUSY; - return this.prb; + this.regPRS &= ~PDP11.PC11.PRS.DONE; + this.regPRS |= PDP11.PC11.PRS.BUSY; + return this.regPRB; }; /** diff --git a/modules/pdp11/lib/rk11.js b/modules/pdp11/lib/rk11.js index d5db2c176..8f7e0f541 100644 --- a/modules/pdp11/lib/rk11.js +++ b/modules/pdp11/lib/rk11.js @@ -817,13 +817,13 @@ RK11.prototype.initController = function(data) { var i = 0; if (!data) data = []; - this.dsr = data[i++] || (PDP11.RK11.RKDS.RK05 | PDP11.RK11.RKDS.SOK | PDP11.RK11.RKDS.DRDY | PDP11.RK11.RKDS.RRDY); - this.err = data[i++] || 0; - this.csr = data[i++] || (PDP11.RK11.RKCS.CRDY); - this.wcr = data[i++] || 0; - this.bar = data[i++] || 0; - this.dar = data[i++] || 0; - this.dbr = data[i] || 0; // TODO: Determine if there's anything we should be doing to the RKDB register + this.regRKDS = data[i++] || (PDP11.RK11.RKDS.RK05 | PDP11.RK11.RKDS.SOK | PDP11.RK11.RKDS.DRDY | PDP11.RK11.RKDS.RRDY); + this.regRKER = data[i++] || 0; + this.regRKCS = data[i++] || (PDP11.RK11.RKCS.CRDY); + this.regRKWC = data[i++] || 0; + this.regRKBA = data[i++] || 0; + this.regRKDA = data[i++] || 0; + this.regRKDB = data[i] || 0; // TODO: Determine if there's anything we should be doing to the RKDB register var fSuccess = true; for (var iDrive = 0; iDrive < this.aDrives.length; iDrive++) { @@ -901,19 +901,19 @@ RK11.prototype.processCommand = function() { var fnReadWrite; var fInterrupt = true; - var iDrive = (this.dar & PDP11.RK11.RKDA.DS) >> PDP11.RK11.RKDA.SHIFT.DS; + var iDrive = (this.regRKDA & PDP11.RK11.RKDA.DS) >> PDP11.RK11.RKDA.SHIFT.DS; var drive = this.aDrives[iDrive]; var iCylinder, iHead, iSector, nWords, addr; - this.csr &= ~PDP11.RK11.RKCS.CRDY; + this.regRKCS &= ~PDP11.RK11.RKCS.CRDY; - switch(this.csr & PDP11.RK11.RKCS.FUNC) { + switch(this.regRKCS & PDP11.RK11.RKCS.FUNC) { case PDP11.RK11.FUNC.CRESET: - this.dsr = drive.status; - this.err = 0; - this.csr = PDP11.RK11.RKCS.CRDY; - this.dar = 0; + this.regRKDS = drive.status; + this.regRKER = 0; + this.regRKCS = PDP11.RK11.RKCS.CRDY; + this.regRKDA = 0; break; case PDP11.RK11.FUNC.READ: @@ -922,21 +922,21 @@ RK11.prototype.processCommand = function() case PDP11.RK11.FUNC.WRITE: if (!fnReadWrite) fnReadWrite = this.writeData; - iCylinder = (this.dar & PDP11.RK11.RKDA.CA) >> PDP11.RK11.RKDA.SHIFT.CA; - iHead = (this.dar & PDP11.RK11.RKDA.HS) >> PDP11.RK11.RKDA.SHIFT.HS; - iSector = this.dar & PDP11.RK11.RKDA.SA; + iCylinder = (this.regRKDA & PDP11.RK11.RKDA.CA) >> PDP11.RK11.RKDA.SHIFT.CA; + iHead = (this.regRKDA & PDP11.RK11.RKDA.HS) >> PDP11.RK11.RKDA.SHIFT.HS; + iSector = this.regRKDA & PDP11.RK11.RKDA.SA; if (iCylinder >= drive.nCylinders) { - this.err |= PDP11.RK11.RKER.DRE | PDP11.RK11.RKER.NXC; - this.csr |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; + this.regRKER |= PDP11.RK11.RKER.DRE | PDP11.RK11.RKER.NXC; + this.regRKCS |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; break; } if (iSector >= drive.nSectors) { - this.err |= PDP11.RK11.RKER.DRE | PDP11.RK11.RKER.NXS; - this.csr |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; + this.regRKER |= PDP11.RK11.RKER.DRE | PDP11.RK11.RKER.NXS; + this.regRKCS |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; break; } - addr = (((this.csr & PDP11.RK11.RKCS.MEX)) << (16 - PDP11.RK11.RKCS.SHIFT.MEX)) | this.bar; - nWords = (0x10000 - this.wcr) & 0xffff; + addr = (((this.regRKCS & PDP11.RK11.RKCS.MEX)) << (16 - PDP11.RK11.RKCS.SHIFT.MEX)) | this.regRKBA; + nWords = (0x10000 - this.regRKWC) & 0xffff; if (DEBUG && (this.messageEnabled(MessagesPDP11.READ) || this.messageEnabled(MessagesPDP11.WRITE))) { var pos = ((((iCylinder << 1) + iHead) * drive.nSectors) + iSector) * 256; console.log((fnReadWrite == this.readData? "readData" : "writeData") + "(pos=" + pos + ",addr=" + str.toOct(addr) + ",bytes=" + (nWords * 2) + ")"); @@ -949,14 +949,14 @@ RK11.prototype.processCommand = function() } /* - * TODO: Determine what's up with the "dar % 9".... + * TODO: Determine what's up with the "regRKDA % 9".... */ - this.dsr = drive.status | (iDrive << PDP11.RK11.RKDS.SHIFT.ID) | ((this.dar % 9) & PDP11.RK11.RKDS.SC); + this.regRKDS = drive.status | (iDrive << PDP11.RK11.RKDS.SHIFT.ID) | ((this.regRKDA % 9) & PDP11.RK11.RKDS.SC); if (fInterrupt) { - this.csr &= ~PDP11.RK11.RKCS.GO; - this.csr |= PDP11.RK11.RKCS.CRDY; - if (this.csr & PDP11.RK11.RKCS.IE) this.cpu.setIRQ(this.irq); + this.regRKCS &= ~PDP11.RK11.RKCS.GO; + this.regRKCS |= PDP11.RK11.RKCS.CRDY; + if (this.regRKCS & PDP11.RK11.RKCS.IE) this.cpu.setIRQ(this.irq); } }; @@ -974,12 +974,12 @@ RK11.prototype.processCommand = function() */ RK11.prototype.endReadWrite = function(err, iCylinder, iHead, iSector, nWords, addr) { - this.bar = addr & 0xffff; - this.csr = (this.csr & ~PDP11.RK11.RKCS.MEX) | ((addr >> (16 - PDP11.RK11.RKCS.SHIFT.MEX)) & PDP11.RK11.RKCS.MEX); - this.wcr = (0x10000 - nWords) & 0xffff; + this.regRKBA = addr & 0xffff; + this.regRKCS = (this.regRKCS & ~PDP11.RK11.RKCS.MEX) | ((addr >> (16 - PDP11.RK11.RKCS.SHIFT.MEX)) & PDP11.RK11.RKCS.MEX); + this.regRKWC = (0x10000 - nWords) & 0xffff; if (err) { - this.err |= err | PDP11.RK11.RKER.DRE; - this.csr |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; + this.regRKER |= err | PDP11.RK11.RKER.DRE; + this.regRKCS |= PDP11.RK11.RKCS.HE | PDP11.RK11.RKCS.ERR; } return true; }; @@ -1123,7 +1123,7 @@ RK11.prototype.writeData = function(drive, iCylinder, iHead, iSector, nWords, ad */ RK11.prototype.readRKDS = function(addr) { - return this.dsr; + return this.regRKDS; }; /** @@ -1149,7 +1149,7 @@ RK11.prototype.writeRKDS = function(data, addr) */ RK11.prototype.readRKER = function(addr) { - return this.err; + return this.regRKER; }; /** @@ -1175,7 +1175,7 @@ RK11.prototype.writeRKER = function(data, addr) */ RK11.prototype.readRKCS = function(addr) { - return this.csr & PDP11.RK11.RKCS.RMASK; + return this.regRKCS & PDP11.RK11.RKCS.RMASK; }; /** @@ -1187,9 +1187,9 @@ RK11.prototype.readRKCS = function(addr) */ RK11.prototype.writeRKCS = function(data, addr) { - this.csr = (this.csr & ~PDP11.RK11.RKCS.WMASK) | (data & PDP11.RK11.RKCS.WMASK); + this.regRKCS = (this.regRKCS & ~PDP11.RK11.RKCS.WMASK) | (data & PDP11.RK11.RKCS.WMASK); - if (this.csr & PDP11.RK11.RKCS.GO) this.processCommand(); + if (this.regRKCS & PDP11.RK11.RKCS.GO) this.processCommand(); }; /** @@ -1201,7 +1201,7 @@ RK11.prototype.writeRKCS = function(data, addr) */ RK11.prototype.readRKWC = function(addr) { - return this.wcr; + return this.regRKWC; }; /** @@ -1213,7 +1213,7 @@ RK11.prototype.readRKWC = function(addr) */ RK11.prototype.writeRKWC = function(data, addr) { - this.wcr = data; + this.regRKWC = data; }; /** @@ -1225,7 +1225,7 @@ RK11.prototype.writeRKWC = function(data, addr) */ RK11.prototype.readRKBA = function(addr) { - return this.bar; + return this.regRKBA; }; /** @@ -1237,7 +1237,7 @@ RK11.prototype.readRKBA = function(addr) */ RK11.prototype.writeRKBA = function(data, addr) { - this.bar = data; + this.regRKBA = data; }; /** @@ -1249,7 +1249,7 @@ RK11.prototype.writeRKBA = function(data, addr) */ RK11.prototype.readRKDA = function(addr) { - return this.dar; + return this.regRKDA; }; /** @@ -1261,7 +1261,7 @@ RK11.prototype.readRKDA = function(addr) */ RK11.prototype.writeRKDA = function(data, addr) { - this.dar = data; + this.regRKDA = data; }; /** @@ -1273,7 +1273,7 @@ RK11.prototype.writeRKDA = function(data, addr) */ RK11.prototype.readRKDB = function(addr) { - return this.dbr; + return this.regRKDB; }; /** @@ -1285,7 +1285,7 @@ RK11.prototype.readRKDB = function(addr) */ RK11.prototype.writeRKDB = function(data, addr) { - this.dbr = data; + this.regRKDB = data; }; /* diff --git a/modules/pdp11/lib/serialport.js b/modules/pdp11/lib/serialport.js index 74c95f402..9a807c844 100644 --- a/modules/pdp11/lib/serialport.js +++ b/modules/pdp11/lib/serialport.js @@ -313,13 +313,13 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.timerReceiveInterrupt = this.cpu.addTimer(function readyReceiver() { var b = serial.receiveByte(); if (b >= 0) { - serial.rbuf = b; - if (!(serial.rcsr & PDP11.DL11.RCSR.RD)) { - serial.rcsr |= PDP11.DL11.RCSR.RD; + serial.regRBUF = b; + if (!(serial.regRCSR & PDP11.DL11.RCSR.RD)) { + serial.regRCSR |= PDP11.DL11.RCSR.RD; } else { - serial.rbuf |= PDP11.DL11.RBUF.OE | PDP11.DL11.RBUF.ERROR; + serial.regRBUF |= PDP11.DL11.RBUF.OE | PDP11.DL11.RBUF.ERROR; } - if (serial.rcsr & PDP11.DL11.RCSR.RIE) { + if (serial.regRCSR & PDP11.DL11.RCSR.RIE) { cpu.setIRQ(serial.irqReceiver); } } @@ -328,8 +328,8 @@ SerialPortPDP11.prototype.initBus = function(cmp, bus, cpu, dbg) this.irqTransmitter = this.cpu.addIRQ(PDP11.DL11.XVEC, PDP11.DL11.PRI, MessagesPDP11.DL11); this.timerTransmitInterrupt = this.cpu.addTimer(function readyTransmitter() { - serial.xcsr |= PDP11.DL11.XCSR.READY; - if (serial.xcsr & PDP11.DL11.XCSR.TIE) { + serial.regXCSR |= PDP11.DL11.XCSR.READY; + if (serial.regXCSR & PDP11.DL11.XCSR.TIE) { cpu.setIRQ(serial.irqTransmitter); } }); @@ -482,9 +482,9 @@ SerialPortPDP11.prototype.restore = function(data) */ SerialPortPDP11.prototype.initState = function(data) { - this.rbuf = 0; - this.rcsr = 0; - this.xcsr = PDP11.DL11.XCSR.READY; + this.regRBUF = 0; + this.regRCSR = 0; + this.regXCSR = PDP11.DL11.XCSR.READY; this.abReceive = []; return true; }; @@ -681,7 +681,7 @@ SerialPortPDP11.prototype.transmitByte = function(b) */ SerialPortPDP11.prototype.readRCSR = function(addr) { - return this.rcsr & PDP11.DL11.RCSR.RMASK; + return this.regRCSR & PDP11.DL11.RCSR.RMASK; }; /** @@ -693,7 +693,7 @@ SerialPortPDP11.prototype.readRCSR = function(addr) */ SerialPortPDP11.prototype.writeRCSR = function(data, addr) { - this.rcsr = (this.rcsr & ~PDP11.DL11.RCSR.WMASK) | (data & PDP11.DL11.RCSR.WMASK); + this.regRCSR = (this.regRCSR & ~PDP11.DL11.RCSR.WMASK) | (data & PDP11.DL11.RCSR.WMASK); }; /** @@ -705,8 +705,8 @@ SerialPortPDP11.prototype.writeRCSR = function(data, addr) */ SerialPortPDP11.prototype.readRBUF = function(addr) { - this.rcsr &= ~PDP11.DL11.RCSR.RD; - return this.rbuf; + this.regRCSR &= ~PDP11.DL11.RCSR.RD; + return this.regRBUF; }; /** @@ -729,7 +729,7 @@ SerialPortPDP11.prototype.writeRBUF = function(data, addr) */ SerialPortPDP11.prototype.readXCSR = function(addr) { - return this.xcsr; + return this.regXCSR; }; /** @@ -750,14 +750,14 @@ SerialPortPDP11.prototype.writeXCSR = function(data, addr) * this fix also requires a complementary change in setIRQ(), to request hardware interrupts with * IRQ_DELAY rather than IRQ. */ - if (this.xcsr & PDP11.DL11.XCSR.READY) { + if (this.regXCSR & PDP11.DL11.XCSR.READY) { if (data & PDP11.DL11.XCSR.TIE) { this.cpu.setIRQ(this.irqTransmitter); } else { this.cpu.clearIRQ(this.irqTransmitter); } } - this.xcsr = (this.xcsr & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK); + this.regXCSR = (this.regXCSR & ~PDP11.DL11.XCSR.WMASK) | (data & PDP11.DL11.XCSR.WMASK); }; /** @@ -782,7 +782,7 @@ SerialPortPDP11.prototype.readXBUF = function(addr) SerialPortPDP11.prototype.writeXBUF = function(data, addr) { this.transmitByte(data & PDP11.DL11.XBUF.DATA); - this.xcsr &= ~PDP11.DL11.XCSR.READY; + this.regXCSR &= ~PDP11.DL11.XCSR.READY; }; /* diff --git a/versions/pdpjs/1.30.5/pdp11-dbg.js b/versions/pdpjs/1.30.5/pdp11-dbg.js index 7bd9ec1bf..bc120414d 100644 --- a/versions/pdpjs/1.30.5/pdp11-dbg.js +++ b/versions/pdpjs/1.30.5/pdp11-dbg.js @@ -34,9 +34,9 @@ */ for(var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,ca=["Math","log2"],da=0;da":62,"?":63,"@":64,tc:65,Af:66,Cf:67,Zf:68,E:69,$f:70,ag:71,bg:72,cg:73,dg:74,eg:75,fg:76,gg:77,hg:78,ig:79,jg:80,Q:81,kg:82,lg:83,mg:84,ng:85,og:86,pg:87,qg:88,rg:89,dd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,sg:97,tg:98,ug:99,d:100,e:101,vg:102,wg:103,xg:104,yg:105,Bg:106,k:107,Cg:108,Dg:109,n:110,Eg:111,p:112,q:113,r:114,Fg:115,t:116,Hg:117,Ig:118,Jg:119,x:120,y:121,z:122,"{":123, -"|":124,"}":125,"~":126,Uc:127}; +var ka={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},la={Af:0,Qc:1,Cf:2,Df:3,Ef:4,Ff:5,Gf:6,Hf:7,tc:8,If:9,Rc:10,Jf:11,Kf:12,Sc:13,Lf:14,Mf:15,Nf:16,Of:17,Pf:18,Qf:19,Rf:20,Sf:21,Tf:22,Uf:23,Vf:24,Wf:25,Xf: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,sc:65,zf:66,Bf:67,Yf:68,E:69,Zf:70,$f:71,ag:72,bg:73,cg:74,dg:75,eg:76,fg:77,gg:78,hg:79,ig:80,Q:81,jg:82,kg:83,lg:84,mg:85,ng:86,og:87,pg:88,qg:89,cd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,rg:97,sg:98,tg:99,d:100,e:101,vg:102,wg:103,xg:104,yg:105,Bg:106,k:107,Cg:108,Dg:109,n:110,Eg:111,p:112,q:113,r:114,Fg:115,t:116,Hg:117,Ig:118,Jg:119,x:120,y:121,z:122,"{":123, +"|":124,"}":125,"~":126,Tc:127}; function ma(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d}function q(a){return p(a,4,!0)} function t(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function sa(a){return a.replace(/[&<>"']/g,function(a){return qa[a]})} @@ -44,306 +44,306 @@ function ta(a,b){return(a+" ").slice(0,b) function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ea(a,b){var c,d={ha:null,ja:null,Ta:null,Sa:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Ta=g.load;d.Sa=g.exec;if(e=g.bytes)d.ha=e;else if(e=g.words)for(d.ha=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ha=Array(4*e.length),f=c=0;c>8&255,d.ha[f++]=e[c]>>16&255,d.ha[f++]=e[c]>>24&255;else d.ha=g;d.ja=g.symbols;d.ha.length?1==d.ha.length&&(w(d.ha[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.Sa=g.load;d.Ra=g.exec;if(e=g.bytes)d.ga=e;else if(e=g.words)for(d.ga=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ga=Array(4*e.length),f=c=0;c>8&255,d.ga[f++]=e[c]>>16&255,d.ga[f++]=e[c]>>24&255;else d.ga=g;d.ia=g.symbols;d.ga.length?1==d.ga.length&&(w(d.ga[0]),d=null):(w("Empty resource: "+a),d=null)}catch(h){w("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.gb=this.id:(this.hb=this.id.substr(0,b),this.gb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,jb:!1,kc:!1,ma:!1,error:!1};this.ac=null;this.C.error=!1;this.D={};this.j=null;this.na=d||0;z.push(this)}var fb=void 0,gb={}; +function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.vc=b.comment;this.Pc=b;b=this.id.indexOf(".");0>b?this.fb=this.id:(this.gb=this.id.substr(0,b),this.fb=this.id.substr(b+1));this[a]=c;this.C={ready:!1,ib:!1,jc:!1,la:!1,error:!1};this.$b=null;this.C.error=!1;this.D={};this.j=null;this.ma=d||0;z.push(this)}var fb=void 0,gb={}; if(window){fb||(fb=window.location.search.substr(1));for(var hb,ib=/\+/g,jb=/([^&=]+)=?([^&]*)/g;hb=jb.exec(fb);)gb[decodeURIComponent(hb[1].replace(ib," "))]=decodeURIComponent(hb[2].replace(ib," "))}function kb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function B(a,b){b||(b=x);a.prototype=kb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var lb=window.PCjs.Machines||(window.PCjs.Machines={}),z=window.PCjs.Components||(window.PCjs.Components=[])}else lb={},z=[];function mb(a,b,c){lb[a]&&b&&(lb[a][b]=c)}function nb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.f["S"+a]=[0,0,!1,!1,this.Dd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()}; -k.wa=function(a,b,c,d){if(this.A&&this.A.wa(a,b,c,d)||this.b&&this.b.wa(a,b,c,d)||this.j&&this.j.wa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.wa.call(this,a,b,c,d)}};k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ja=function(a,b){b||(Ob(),this.reset());return!0};k.Ia=function(){return!0}; -function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.da()),c=8==(a.j&&a.j.sa||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))} -function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Bd=function(a){a||this.b.C.W||(a=this.b,a.w.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.pb())};k.Cd=function(){};k.xd=function(a){a||this.b.da()}; -k.vd=function(a){if(!a&&!this.b.C.W)if(Gb(this,"ENABLE"))this.b.pb();else{if((a=this.j)&&!xb(a,!0))qb(a,!0),a.qb(0,null),qb(a,!1);else try{var b=this.b.qb(1);0a.b.kb?8:16,c=65472<=a.Aa&&a.Aa<65472+b,b=c?1:2,c=c?15:a.w.Fb;Gb(a,"STEP")||(b=-b);oc(a,a.Aa&~c|a.Aa+b&c)} -function oc(a,b){a.Aa=b&a.w.Fb;b=a.Aa;for(var c=0;22>c;c++)qc(a,"A"+c,b&1<c;c++)qc(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.w=this.Ha-1;this.v=this.B/this.Ha|0;this.ib=[];this.pa=0;this.A=!1;this.F=[];this.hd=[vc,wc,xc,yc];a=new K(this);zc(a,this.j);this.ca=Array(this.v);this.f=Array(this.v);for(b=0;b>>this.oa;this.G=0;this.g=this.Fb;J(this)}B(tc); -var uc=8192,Cc=uc-1;function vc(a,b){var c=-1,d=this.controller,e=d.ib[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.ib[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.pa),c;d.Na(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.pa);return c} -function wc(a,b,c){var d=!1,e=this.controller,f=e.ib[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.ib[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.pa):(e.Na(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j, -b),!0,!e.pa))}function xc(a,b){var c=-1,d=this.controller;a=d.ib[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.pa),c;d.Na(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.pa);return c} -function yc(a,b,c){var d=!1,e=this.controller;a=e.ib[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.pa):(e.Na(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.pa))} -function Dc(a,b){if(b!=a.G){for(var c=0;c>>a.oa,a.f[a.K]=a.ca[a.J])}}k=tc.prototype;k.reset=function(){for(var a=0;a>>a.oa;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.H)return l.Mb+=l.H-f,l.H=f,!0;if(f>=l.H+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.H+n;f=m+a.Ha;g-=n;h++;continue}}return Ec(1,f,g)}f=new K(a,f,n,a.Ha,d,e);zc(f,a.j,l);a.ca[h++]=f;f=m+a.Ha;g-=n}return 0>=g?(a.status((c>>10)+"Kb "+Fc[d]+" at "+na(b)),!0):Ec(2,b,c)}k.bc=function(a){return this.f[(a&this.g)>>>this.oa].cc(a&this.w,a)}; -function Gc(a,b){return a.ca[(b&a.Fb)>>>a.oa]}k.ua=function(a){return this.f[(a&this.g)>>>this.oa].za(a&this.w,a)};function mc(a,b){a.A=!1;a.pa++;b=Gc(a,b).K(b&a.w,b);a.pa--;return b}k.Lb=function(a,b){this.f[(a&this.g)>>>this.oa].fc(a&this.w,b&255,a)};function Hc(a,b,c){a.A=!1;a.pa++;Gc(a,b).G(b&a.w,c&255,b);a.pa--}k.Ab=function(a,b){this.f[(a&this.g)>>>this.oa].Yb(a&this.w,b&65535,a)};function Yb(a,b,c){a.A=!1;a.pa++;Gc(a,b).M(b&a.w,c&65535,b);a.pa--} -function Ic(a){for(var b=0,c=[],d=0;da.b.kb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,v=0;vb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Eb=128;Pc(this.b,this.f.qc,1E3/60,!0)};k.Ld=function(){return this.f.Eb};k.Ke=function(a){this.f.Eb=a&192;this.f.Eb&64||Tc(this.b,this.f.Db)};k.Nd=function(){return bd(this.b)};k.Me=function(a){cd(this.b,a&-129|this.b.Da&128)}; -k.Od=function(){return dd(this.b)};k.Pd=function(){return ed(this.b)};k.Qd=function(){return this.b.Xa};k.Ne=function(a){fd(this.b,a)};k.xe=function(a){a=a>>1&63;var b=this.b.Xb[a>>1];return a&1?b>>16:b&65535};k.wf=function(a,b){b=b>>1&63;var c=b>>1;this.b.Xb[c]=b&1?this.b.Xb[c]&65535|(a&63)<<16:this.b.Xb[c]&-65536|a&65534};k.qe=function(a){return this.b.P[1][a>>1&7]};k.pf=function(a,b){this.b.P[1][b>>1&7]=a&65295};k.oe=function(a){return this.b.P[1][(a>>1&7)+8]}; -k.mf=function(a,b){this.b.P[1][(b>>1&7)+8]=a&65295};k.pe=function(a){return this.b.ka[1][a>>1&7]};k.nf=function(a,b){b=b>>1&7;this.b.ka[1][b]=a;this.b.P[1][b]&=65295};k.ne=function(a){return this.b.ka[1][(a>>1&7)+8]};k.lf=function(a,b){b=(b>>1&7)+8;this.b.ka[1][b]=a;this.b.P[1][b]&=65295};k.Kd=function(a){return this.b.P[0][a>>1&7]};k.Je=function(a,b){this.b.P[0][b>>1&7]=a&65295};k.Id=function(a){return this.b.P[0][(a>>1&7)+8]};k.He=function(a,b){this.b.P[0][(b>>1&7)+8]=a&65295}; -k.Jd=function(a){return this.b.ka[0][a>>1&7]};k.Ie=function(a,b){b=b>>1&7;this.b.ka[0][b]=a;this.b.P[0][b]&=65295};k.Hd=function(a){return this.b.ka[0][(a>>1&7)+8]};k.Ge=function(a,b){b=(b>>1&7)+8;this.b.ka[0][b]=a;this.b.P[0][b]&=65295};k.we=function(a){return this.b.P[3][a>>1&7]};k.vf=function(a,b){this.b.P[3][b>>1&7]=a&65295};k.ue=function(a){return this.b.P[3][(a>>1&7)+8]};k.tf=function(a,b){this.b.P[3][(b>>1&7)+8]=a&65295};k.ve=function(a){return this.b.ka[3][a>>1&7]}; -k.uf=function(a,b){b=b>>1&7;this.b.ka[3][b]=a;this.b.P[3][b]&=65295};k.te=function(a){return this.b.ka[3][(a>>1&7)+8]};k.sf=function(a,b){b=(b>>1&7)+8;this.b.ka[3][b]=a;this.b.P[3][b]&=65295};k.Ib=function(a){a&=7;return this.b.O&2048?this.b.fb[a]:this.b.u[a]};k.Nb=function(a,b){b&=7;this.b.O&2048?this.b.fb[b]=a:this.b.u[b]=a};k.Vd=function(){return this.b.O&49152?this.b.Pa[0]:this.b.u[6]};k.Se=function(a){this.b.O&49152?this.b.Pa[0]=a:this.b.u[6]=a};k.Yd=function(){return this.b.u[7]}; -k.Ve=function(a){this.b.u[7]=a};k.Jb=function(a){a&=7;return this.b.O&2048?this.b.u[a]:this.b.fb[a]};k.Ob=function(a,b){b&=7;this.b.O&2048?this.b.u[b]=a:this.b.fb[b]=a};k.Wd=function(){return 1==(this.b.O&49152)>>14?this.b.u[6]:this.b.Pa[1]};k.Te=function(a){1==(this.b.O&49152)>>14?this.b.u[6]=a:this.b.Pa[1]=a};k.Xd=function(){return 3==(this.b.O&49152)>>14?this.b.u[6]:this.b.Pa[3]};k.Ue=function(a){3==(this.b.O&49152)>>14?this.b.u[6]=a:this.b.Pa[3]=a};k.Gd=function(a){return this.b.Mc[a-65504>>1]}; -k.Fe=function(a,b){this.b.Mc[b-65504>>1]=a};k.Jc=function(a){return 65520==a?(Jc(this.w)>>6)-1:0};k.Pc=function(){};k.se=function(){return 1};k.rf=function(){};k.Fd=function(){return this.b.qa};k.Ee=function(){this.b.qa=0};k.Md=function(){return this.b.Lc};k.Le=function(a,b){b&1||(a&=255);this.b.Lc=a};k.Rd=function(a,b){return b?0:this.b.Kb};k.Oe=function(a){gd(this.b,a)};k.re=function(a,b){return b?0:this.b.nb&65280};k.qf=function(a){this.b.nb=a|255};k.Ud=function(){return hd(this.b)}; -k.Re=function(a){id(this.b,a&-1793|hd(this.b)&1792);this.b.I|=256};k.Oc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; -var O={},Rc=(O[61568]=[null,null,M.prototype.xe,M.prototype.wf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.qe,M.prototype.pf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.oe,M.prototype.mf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.pe,M.prototype.nf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.ne,M.prototype.lf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Kd,M.prototype.Je,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Id,M.prototype.He,"KDPDR",8,1145,64],O[62688]= -[null,null,M.prototype.Jd,M.prototype.Ie,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Hd,M.prototype.Ge,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Qd,M.prototype.Ne,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Ld,M.prototype.Ke,"LKS"],O[65402]=[null,null,M.prototype.Nd,M.prototype.Me,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Od,M.prototype.Oc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Pd,M.prototype.Oc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.we,M.prototype.vf, -"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.ue,M.prototype.tf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ve,M.prototype.uf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.te,M.prototype.sf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Ib,M.prototype.Nb,"R0SET0"],O[65473]=[null,null,M.prototype.Ib,M.prototype.Nb,"R1SET0"],O[65474]=[null,null,M.prototype.Ib,M.prototype.Nb,"R2SET0"],O[65475]=[null,null,M.prototype.Ib,M.prototype.Nb,"R3SET0"],O[65476]=[null,null,M.prototype.Ib, -M.prototype.Nb,"R4SET0"],O[65477]=[null,null,M.prototype.Ib,M.prototype.Nb,"R5SET0"],O[65478]=[null,null,M.prototype.Vd,M.prototype.Se,"R6KERNEL"],O[65479]=[null,null,M.prototype.Yd,M.prototype.Ve,"R7KERNEL"],O[65480]=[null,null,M.prototype.Jb,M.prototype.Ob,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Jb,M.prototype.Ob,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Jb,M.prototype.Ob,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Jb,M.prototype.Ob,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Jb, -M.prototype.Ob,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Jb,M.prototype.Ob,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Wd,M.prototype.Te,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.Xd,M.prototype.Ue,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Gd,M.prototype.Fe,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Jc,M.prototype.Pc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Jc,M.prototype.Pc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.se,M.prototype.rf,"SYSID",1,1170],O[65526]= -[null,null,M.prototype.Fd,M.prototype.Ee,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Md,M.prototype.Le,"MB",1,1170],O[65530]=[null,null,M.prototype.Rd,M.prototype.Oe,"PIR"],O[65532]=[null,null,M.prototype.re,M.prototype.qf,"SL"],O[65534]=[null,null,M.prototype.Ud,M.prototype.Re,"PSW"],O); +function Eb(a){x.call(this,"Panel",a,Eb,512);this.za=this.v=this.cb=this.yb=this.B=this.F=0;this.I=this.K=this.G=!1;this.L=Fb;this.g={};this.f={START:[1,1,!0,!1,this.Ad],STEP:[1,1,!1,!1,this.Bd],ENABLE:[1,1,!1,!1,this.wd],CONT:[1,1,!0,!1,this.ud],DEP:[0,0,!0,!1,this.vd],EXAM:[1,1,!0,!1,this.xd],LOAD:[1,1,!0,!1,this.zd],TEST:[0,0,!0,!1,this.yd]};for(a=0;22>a;a++)this.f["S"+a]=[0,0,!1,!1,this.Cd,a]}B(Eb);var Fb=7;function Gb(a,b){return a.f[b]&&a.f[b][1]}k=Eb.prototype;k.reset=function(){this.stop()}; +k.va=function(a,b,c,d){if(this.A&&this.A.va(a,b,c,d)||this.b&&this.b.va(a,b,c,d)||this.j&&this.j.va(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.D[b]=c,this.F++,!0;default:return"led"==a||"rled"==a?(this.D[b]=c,this.g[b]=d?1:0,this.F++,!0):"switch"==a?(void 0===this.f[b]&&(this.f[b]=[d?1:0,d?1:0]),this.D[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Hb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ib(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Hb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ib(a,b)}}(this,b),!0):this.parent.va.call(this,a,b,c,d)}};k.Fa=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;Jb(b,this,Kb);Lb(b,this.reset.bind(this));Mb(this);Nb(this)};k.Ia=function(a,b){b||(Ob(),this.reset());return!0};k.Ha=function(){return!0}; +function Pb(a,b,c){if(a=a.D[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Mb(a,b){for(var c in a.g)Pb(a,c,null!=b?b:a.g[c])}function Qb(a,b,c){if(a=a.D[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Nb(a){for(var b in a.f)Qb(a,b,a.f[b][1])}function Rb(a,b,c,d){a.D[b]&&(void 0===c&&(Ab(a,"Value for "+b+" is invalid"),a.b.ca()),c=8==(a.j&&a.j.ra||8)?na(c,d):p(c,d),a.D[b].textContent!=c&&(a.D[b].textContent=c))} +function Hb(a,b){var c=a.f[b];Qb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.I="DEP"==b,a.K="EXAM"==b)}function Ib(a,b){var c=a.f[b];c[2]&&c[3]&&(Qb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.Ad=function(a){a||this.b.C.W||(a=this.b,a.w.reset(),Sb(a),Gb(this,"ENABLE")&&this.b.ob())};k.Bd=function(){};k.wd=function(a){a||this.b.ca()}; +k.ud=function(a){if(!a&&!this.b.C.W)if(Gb(this,"ENABLE"))this.b.ob();else{if((a=this.j)&&!xb(a,!0))qb(a,!0),a.pb(0,null),qb(a,!1);else try{var b=this.b.pb(1);0a.b.jb?8:16,c=65472<=a.za&&a.za<65472+b,b=c?1:2,c=c?15:a.w.Eb;Gb(a,"STEP")||(b=-b);oc(a,a.za&~c|a.za+b&c)} +function oc(a,b){a.za=b&a.w.Eb;b=a.za;for(var c=0;22>c;c++)qc(a,"A"+c,b&1<c;c++)qc(a,"D"+c,b&1<c;c++)a.f["S"+c][1]=b&1<>2;this.w=this.Ga-1;this.v=this.B/this.Ga|0;this.hb=[];this.oa=0;this.A=!1;this.F=[];this.gd=[vc,wc,xc,yc];a=new K(this);zc(a,this.j);this.ba=Array(this.v);this.f=Array(this.v);for(b=0;b>>this.na;this.G=0;this.g=this.Eb;J(this)}B(tc); +var uc=8192,Cc=uc-1;function vc(a,b){var c=-1,d=this.controller,e=d.hb[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.hb[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.j&&I(this.j,16|e[5])&&G(this.j,e[4]+".readByte("+L(this.j,b)+"): "+L(this.j,c),!0,!d.oa),c;d.Ma(b,16,3);c=255;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to byte @"+L(this.j,b)+": "+L(this.j,c),!0,!d.oa);return c} +function wc(a,b,c){var d=!1,e=this.controller,f=e.hb[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.hb[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d?this.j&&I(this.j,16|f[5])&&G(this.j,f[4]+".writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.oa):(e.Ma(c,16,5),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to byte @"+L(this.j,c)+": "+L(this.j, +b),!0,!e.oa))}function xc(a,b){var c=-1,d=this.controller;a=d.hb[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".readWord("+L(this.j,b)+"): "+L(this.j,c),!0,!d.oa),c;d.Ma(b,16,2);c=65535;this.j&&I(this.j,16)&&G(this.j,"warning: unconverted read access to word @"+L(this.j,b)+": "+L(this.j,c),!0,!d.oa);return c} +function yc(a,b,c){var d=!1,e=this.controller;a=e.hb[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.j&&I(this.j,16|a[5])&&G(this.j,a[4]+".writeWord("+L(this.j,c)+","+L(this.j,b)+")",!0,!e.oa):(e.Ma(c,16,4),this.j&&I(this.j,16)&&G(this.j,"warning: unconverted write access to word @"+L(this.j,c)+": "+L(this.j,b),!0,!e.oa))} +function Dc(a,b){if(b!=a.G){for(var c=0;c>>a.na,a.f[a.K]=a.ba[a.I])}}k=tc.prototype;k.reset=function(){for(var a=0;a>>a.na;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.H)return l.Lb+=l.H-f,l.H=f,!0;if(f>=l.H+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.H+n;f=m+a.Ga;g-=n;h++;continue}}return Ec(1,f,g)}f=new K(a,f,n,a.Ga,d,e);zc(f,a.j,l);a.ba[h++]=f;f=m+a.Ga;g-=n}return 0>=g?(a.status((c>>10)+"Kb "+Fc[d]+" at "+na(b)),!0):Ec(2,b,c)}k.ac=function(a){return this.f[(a&this.g)>>>this.na].bc(a&this.w,a)}; +function Gc(a,b){return a.ba[(b&a.Eb)>>>a.na]}k.ta=function(a){return this.f[(a&this.g)>>>this.na].ya(a&this.w,a)};function mc(a,b){a.A=!1;a.oa++;b=Gc(a,b).K(b&a.w,b);a.oa--;return b}k.Kb=function(a,b){this.f[(a&this.g)>>>this.na].ec(a&this.w,b&255,a)};function Hc(a,b,c){a.A=!1;a.oa++;Gc(a,b).G(b&a.w,c&255,b);a.oa--}k.zb=function(a,b){this.f[(a&this.g)>>>this.na].Xb(a&this.w,b&65535,a)};function Yb(a,b,c){a.A=!1;a.oa++;Gc(a,b).M(b&a.w,c&65535,b);a.oa--} +function Ic(a){for(var b=0,c=[],d=0;da.b.jb)){var g=f[0]?f[0].bind(b):null,h=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,m=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!h&&m&&(h=function(a){return function(b,c){return a(b,c)}.bind(b)}(m)));for(var n=f[4],r=f[5]||1,v=0;vb.indexOf(e.toUpperCase()))){b+=":";for(e=0;8>e;e++)b+=" "+L(a,c[d+e]);a.i(b+(f?"\n":""))}}k.reset=function(){this.f.Db=128;Pc(this.b,this.f.pc,1E3/60,!0)};k.Kd=function(){return this.f.Db};k.Je=function(a){this.f.Db=a&192;this.f.Db&64||Tc(this.b,this.f.Cb)};k.Md=function(){return bd(this.b)};k.Le=function(a){cd(this.b,a&-129|this.b.Ca&128)}; +k.Nd=function(){return dd(this.b)};k.Od=function(){return ed(this.b)};k.Pd=function(){return this.b.Wa};k.Me=function(a){fd(this.b,a)};k.we=function(a){a=a>>1&63;var b=this.b.Wb[a>>1];return a&1?b>>16:b&65535};k.vf=function(a,b){b=b>>1&63;var c=b>>1;this.b.Wb[c]=b&1?this.b.Wb[c]&65535|(a&63)<<16:this.b.Wb[c]&-65536|a&65534};k.pe=function(a){return this.b.R[1][a>>1&7]};k.nf=function(a,b){this.b.R[1][b>>1&7]=a&65295};k.ne=function(a){return this.b.R[1][(a>>1&7)+8]}; +k.lf=function(a,b){this.b.R[1][(b>>1&7)+8]=a&65295};k.oe=function(a){return this.b.ja[1][a>>1&7]};k.mf=function(a,b){b=b>>1&7;this.b.ja[1][b]=a;this.b.R[1][b]&=65295};k.me=function(a){return this.b.ja[1][(a>>1&7)+8]};k.kf=function(a,b){b=(b>>1&7)+8;this.b.ja[1][b]=a;this.b.R[1][b]&=65295};k.Jd=function(a){return this.b.R[0][a>>1&7]};k.Ie=function(a,b){this.b.R[0][b>>1&7]=a&65295};k.Hd=function(a){return this.b.R[0][(a>>1&7)+8]};k.Ge=function(a,b){this.b.R[0][(b>>1&7)+8]=a&65295}; +k.Id=function(a){return this.b.ja[0][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.ja[0][b]=a;this.b.R[0][b]&=65295};k.Gd=function(a){return this.b.ja[0][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.ja[0][b]=a;this.b.R[0][b]&=65295};k.ve=function(a){return this.b.R[3][a>>1&7]};k.uf=function(a,b){this.b.R[3][b>>1&7]=a&65295};k.te=function(a){return this.b.R[3][(a>>1&7)+8]};k.sf=function(a,b){this.b.R[3][(b>>1&7)+8]=a&65295};k.ue=function(a){return this.b.ja[3][a>>1&7]}; +k.tf=function(a,b){b=b>>1&7;this.b.ja[3][b]=a;this.b.R[3][b]&=65295};k.se=function(a){return this.b.ja[3][(a>>1&7)+8]};k.rf=function(a,b){b=(b>>1&7)+8;this.b.ja[3][b]=a;this.b.R[3][b]&=65295};k.Hb=function(a){a&=7;return this.b.O&2048?this.b.eb[a]:this.b.u[a]};k.Mb=function(a,b){b&=7;this.b.O&2048?this.b.eb[b]=a:this.b.u[b]=a};k.Ud=function(){return this.b.O&49152?this.b.Oa[0]:this.b.u[6]};k.Re=function(a){this.b.O&49152?this.b.Oa[0]=a:this.b.u[6]=a};k.Xd=function(){return this.b.u[7]}; +k.Ue=function(a){this.b.u[7]=a};k.Ib=function(a){a&=7;return this.b.O&2048?this.b.u[a]:this.b.eb[a]};k.Nb=function(a,b){b&=7;this.b.O&2048?this.b.u[b]=a:this.b.eb[b]=a};k.Vd=function(){return 1==(this.b.O&49152)>>14?this.b.u[6]:this.b.Oa[1]};k.Se=function(a){1==(this.b.O&49152)>>14?this.b.u[6]=a:this.b.Oa[1]=a};k.Wd=function(){return 3==(this.b.O&49152)>>14?this.b.u[6]:this.b.Oa[3]};k.Te=function(a){3==(this.b.O&49152)>>14?this.b.u[6]=a:this.b.Oa[3]=a};k.Fd=function(a){return this.b.Lc[a-65504>>1]}; +k.Ee=function(a,b){this.b.Lc[b-65504>>1]=a};k.Ic=function(a){return 65520==a?(Jc(this.w)>>6)-1:0};k.Oc=function(){};k.re=function(){return 1};k.qf=function(){};k.Ed=function(){return this.b.pa};k.De=function(){this.b.pa=0};k.Ld=function(){return this.b.Kc};k.Ke=function(a,b){b&1||(a&=255);this.b.Kc=a};k.Qd=function(a,b){return b?0:this.b.Jb};k.Ne=function(a){gd(this.b,a)};k.qe=function(a,b){return b?0:this.b.mb&65280};k.pf=function(a){this.b.mb=a|255};k.Td=function(){return hd(this.b)}; +k.Qe=function(a){id(this.b,a&-1793|hd(this.b)&1792);this.b.J|=256};k.Nc=function(a,b){I(this)&&G(this,"writeIgnored("+na(b)+"): "+na(a),!0,!0)}; +var O={},Rc=(O[61568]=[null,null,M.prototype.we,M.prototype.vf,"UNIMAP",64,1170],O[62592]=[null,null,M.prototype.pe,M.prototype.nf,"SIPDR",8,1145,64],O[62608]=[null,null,M.prototype.ne,M.prototype.lf,"SDPDR",8,1145,64],O[62624]=[null,null,M.prototype.oe,M.prototype.mf,"SIPAR",8,1145,64],O[62640]=[null,null,M.prototype.me,M.prototype.kf,"SDPAR",8,1145,64],O[62656]=[null,null,M.prototype.Jd,M.prototype.Ie,"KIPDR",8,1145,64],O[62672]=[null,null,M.prototype.Hd,M.prototype.Ge,"KDPDR",8,1145,64],O[62688]= +[null,null,M.prototype.Id,M.prototype.He,"KIPAR",8,1145,64],O[62704]=[null,null,M.prototype.Gd,M.prototype.Fe,"KDPAR",8,1145,64],O[62798]=[null,null,M.prototype.Pd,M.prototype.Me,"MMR3",1,1145,64],O[65382]=[null,null,M.prototype.Kd,M.prototype.Je,"LKS"],O[65402]=[null,null,M.prototype.Md,M.prototype.Le,"MMR0",1,1145,64],O[65404]=[null,null,M.prototype.Nd,M.prototype.Nc,"MMR1",1,1145,64],O[65406]=[null,null,M.prototype.Od,M.prototype.Nc,"MMR2",1,1145,64],O[65408]=[null,null,M.prototype.ve,M.prototype.uf, +"UIPDR",8,1145,64],O[65424]=[null,null,M.prototype.te,M.prototype.sf,"UDPDR",8,1145,64],O[65440]=[null,null,M.prototype.ue,M.prototype.tf,"UIPAR",8,1145,64],O[65456]=[null,null,M.prototype.se,M.prototype.rf,"UDPAR",8,1145,64],O[65472]=[null,null,M.prototype.Hb,M.prototype.Mb,"R0SET0"],O[65473]=[null,null,M.prototype.Hb,M.prototype.Mb,"R1SET0"],O[65474]=[null,null,M.prototype.Hb,M.prototype.Mb,"R2SET0"],O[65475]=[null,null,M.prototype.Hb,M.prototype.Mb,"R3SET0"],O[65476]=[null,null,M.prototype.Hb, +M.prototype.Mb,"R4SET0"],O[65477]=[null,null,M.prototype.Hb,M.prototype.Mb,"R5SET0"],O[65478]=[null,null,M.prototype.Ud,M.prototype.Re,"R6KERNEL"],O[65479]=[null,null,M.prototype.Xd,M.prototype.Ue,"R7KERNEL"],O[65480]=[null,null,M.prototype.Ib,M.prototype.Nb,"R0SET1",1,1145],O[65481]=[null,null,M.prototype.Ib,M.prototype.Nb,"R1SET1",1,1145],O[65482]=[null,null,M.prototype.Ib,M.prototype.Nb,"R2SET1",1,1145],O[65483]=[null,null,M.prototype.Ib,M.prototype.Nb,"R3SET1",1,1145],O[65484]=[null,null,M.prototype.Ib, +M.prototype.Nb,"R4SET1",1,1145],O[65485]=[null,null,M.prototype.Ib,M.prototype.Nb,"R5SET1",1,1145],O[65486]=[null,null,M.prototype.Vd,M.prototype.Se,"R6SUPER",1,1145],O[65487]=[null,null,M.prototype.Wd,M.prototype.Te,"R6USER",1,1145],O[65504]=[null,null,M.prototype.Fd,M.prototype.Ee,"CTRL",8,1170],O[65520]=[null,null,M.prototype.Ic,M.prototype.Oc,"LSIZE",1,1170],O[65522]=[null,null,M.prototype.Ic,M.prototype.Oc,"HSIZE",1,1170],O[65524]=[null,null,M.prototype.re,M.prototype.qf,"SYSID",1,1170],O[65526]= +[null,null,M.prototype.Ed,M.prototype.De,"CPUERR",1,1170],O[65528]=[null,null,M.prototype.Ld,M.prototype.Ke,"MB",1,1170],O[65530]=[null,null,M.prototype.Qd,M.prototype.Ne,"PIR"],O[65532]=[null,null,M.prototype.qe,M.prototype.pf,"SL"],O[65534]=[null,null,M.prototype.Td,M.prototype.Qe,"PSW"],O); bb(function(){for(var a=F(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.B,0,this.size>>2),qd(this,md?rd:sd);else{a=this.b=Array(this.size>> +function K(a,b,c,d,e,f){this.w=a;this.id=nd+=2;this.b=null;this.H=b;this.Lb=c;this.size=d||0;this.type=e||od;this.f=e==pd;this.controller=null;zc(this);this.ab=this.pd=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],qd(this,f.gd);else if(Bb)this.B=new ArrayBuffer(this.size),this.F=new DataView(this.B,0,this.size),this.D=new Uint8Array(this.B,0,this.size),this.P=new Uint16Array(this.B,0,this.size>>1),this.b=new Int32Array(this.B,0,this.size>>2),qd(this,md?rd:sd);else{a=this.b=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},ea:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},Ea:function(a,b){a&1&&this.w.Na(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},Qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.bb=!0},hb:function(a,b){if(this.j&&null!=this.H){var c=this.j;xd(c,this.H+a,1,c.M)&&c.da(!0)}return this.J(a,b)},sa:function(a,b){if(this.j&&null!=this.H){var c=this.j;xd(c,this.H+a,2,c.M)&&c.da(!0)}return this.K(a,b)},Fa:function(a, -b,c){if(this.j&&null!=this.H){var d=this.j;xd(d,this.H+a,1,d.F)&&d.da(!0)}this.f?this.v(a,b,c):this.G(a,b,c)},Ya:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;xd(d,this.H+a,2,d.F)&&d.da(!0)}this.f?this.v(a,b,c):this.M(a,b,c)},gb:function(a){return this.D[a]},Y:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},fa:function(a,b){a&1&&this.w.Na(b,64,2);return this.F.getUint16(a,!0)},ta:function(a,b){a&1&&this.w.Na(b,64,2);a= -this.R[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Ba:function(a,b){this.D[a]=b;this.bb=!0},La:function(a,b,c){this.D[a]=b;this.bb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Ra:function(a,b,c){a&1&&this.w.Na(c,64,4);this.F.setUint16(a,b,!0);this.bb=!0},Za:function(a,b,c){a&1&&this.w.Na(c,64,4);this.R[a>>1]=b;this.bb=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j, -b)+")",!0)}};function zc(a,b,c){a.j=b;a.A=a.g=0;c&&((a.A=c.A)&&wd(a,vd,!1),(a.g=c.g)&&ud(a,vd,!1))}function yd(a,b){b?--a.g||(a.fc=a.f?a.v:a.G,a.Yb=a.f?a.L:a.M):--a.A||(a.cc=a.J,a.za=a.K)}function ud(a,b,c){c&&a.g||(a.fc=!a.f&&b[1]||a.v,a.Yb=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.v,a.M=b[3]||a.L}function wd(a,b,c){c&&a.A||(a.cc=b[0]||a.S,a.za=b[2]||a.T);if(c||void 0===c)a.J=b[0]||a.S,a.K=b[2]||a.T}function qd(a,b){b||(b=zd);wd(a,b,void 0);ud(a,b,void 0)} -var zd=[],td=[K.prototype.ea,K.prototype.Qa,K.prototype.Ea,K.prototype.$a],vd=[K.prototype.hb,K.prototype.Fa,K.prototype.sa,K.prototype.Ya];if(Bb)var sd=[K.prototype.gb,K.prototype.Ba,K.prototype.fa,K.prototype.Ra],rd=[K.prototype.Y,K.prototype.La,K.prototype.ta,K.prototype.Za]; -function Ad(a,b){x.call(this,"CPU",a,Ad,1);b=a.cycles||b;var c=a.multiplier||1;this.Pb=0;this.rb=b;this.lb=c;this.Sb=Math.round(this.rb/1E4)/100;this.yb=this.Sb*this.lb;this.C.W=!1;this.C.ec=!1;this.C.Bb=a.autoStart;this.C.Cb=!1;this.Ub=this.Ea=0;this.Vb=a.csStart;this.Gb=a.csInterval;this.Hb=a.csStop;this.M=[];this.Ac=this.Be.bind(this);J(this)}B(Ad);var Bd=["power","reset"];k=Ad.prototype; -k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.j=d;this.v=a.v;for(b=0;b=a.Ea&&(a.Ea+=a.Gb,c=!0);0<=a.Hb&&a.Hb<=Hd(a)&&(a.Gb=a.Hb=-1,Ed(a),a.da(),c=!0);c&&a.i(Hd(a)+" cycles: checksum="+p(a.Ub))}} -k.wa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.C.ma)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.ta/a.yb?b=1:d=!0;a.lb=b;b=a.Sb*a.lb;if(a.yb!=b){a.yb=b;b=a.yb.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.A&&a.A.ob()}Ub(a,a.T);a.T=0;a.S=Ba();a.Y=0;Jd(a);return d}function Nc(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Pc(a,b,c,d){0<=b&&ba.M[b][0])&&(c=a.rb*a.lb/1E3*c|0,a.C.W&&(c+=Kd(a)),a.M[b][0]=c)} -function Ld(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Kd(a,b){var c=a.ea-=a.b;a.b=a.L=0;b&&(a.ea=0);return c} -k.Be=function(){if(this.C.W){this.gc>=this.rb&&Jd(this,!0);this.Ra=0;this.$a=Ba();if(this.Y){var a=this.$a-this.Y;a>this.yc&&(this.S+=a,this.S>this.$a&&(this.S=this.$a))}try{do{var b=Ld(this,this.C.Cb?1:this.sb);try{this.qb(b)}catch(e){if("number"!=typeof e)throw e;}b=Kd(this,!0);this.Ra+=b;this.T+=b;Vb(this,b);Tb(this,b);this.Ba-=b;if(0>=this.Ba){this.Ba+=this.sb;15<=++this.zc&&(this.xa(),this.zc=0);break}}while(this.C.W)}catch(e){this.da();this.A&&this.A.stop(Ba(),Hd(this));Ab(this,e.stack||e.message); -return}if(this.C.W){a=setTimeout;b=this.Ac;this.Y=Ba();var c=this.yc;this.Ra&&(c=Math.round(c*this.Ra/this.sb));var c=c-(this.Y-this.$a),d=this.Y-this.S;d&&(this.ta=Math.round(this.T/(10*d))/100,864E5<=d&&(this.fa=0,Id(this)));if(0>c||this.tac&&(this.S-=c),c=0;this.gc+=this.Ra;this.Y+=c;a(b,c)}}}; -k.pb=function(a){if(zb(this))return!1;if(this.C.W)return this.i(this.toString()+" busy"),!1;Id(this);this.C.W=!0;this.C.ec=!0;var b=this.D.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.ob(!0),this.A.start(this.S,Hd(this)));setTimeout(this.Ac,0);return!0};k.qb=function(){return 0};k.da=function(a){var b=!1;if(this.C.W){Kd(this);Ub(this,this.T);this.T=0;this.C.W=!1;if(b=this.D.run)b.textContent="Run";this.A&&this.A.stop(Ba(),Hd(this));b=!0}this.C.complete=a;return b}; -function Md(a){this.kb=+a.model||1170;this.vc=a.addrReset||0;Ad.call(this,a,6666667);this.tb=0;this.xc=255;1120==this.kb?(this.decode=Nd.bind(this),this.sa=this.od,this.tb=8,this.xc=-1):(this.decode=Od.bind(this),this.sa=this.pd);Pd(this);this.K=0;this.J=null;this.C.complete=!1}B(Md,Ad);k=Md.prototype;k.reset=function(){this.status("model "+this.kb);this.C.W&&this.da();Pd(this);Dd(this);this.C.error=!1;this.parent.reset.call(this)}; -function Pd(a){a.U=65536;a.V=32768;a.aa=65535;a.X=32768;a.O=15;a.u=[0,0,0,0,0,0,0,a.vc,-1,-2,-3,-4,-5,-6,-7,-8];a.fb=[0,0,0,0,0,0];a.Pa=[0,0,0,0];a.B=0;a.Za=0;a.ed=[4,2,0,1];a.P=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ka=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0]];a.Xb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Mc=[0,0,0,0,0,0,0,0];a.Lc=0;a.I=0;a.F=a.G=0;a.g=a.f=a.Rb=0;a.Fa=-1;Sb(a)}function Sb(a){a.Da=0;a.hc=0;a.ic=0;a.Xa=0;a.qa=0;a.Kb=0;a.nb=255;a.La=0;a.Ya=0;a.Qa=262143;a.Tb=0;a.va=0;a.J=null;a.w&&(Qd(a),a.cd=Jc(a.w))}function Qd(a){a.La?(a.R=65536,a.Qb=a.Xa&16?4186112:253952,a.ba=a.sd,a.za=a.ye,a.Yb=a.xf,Dc(a.w,a.Xa&16?22:18)):(a.R=0,a.Qb=57344,a.ba=a.rd,a.za=a.Kc,a.Yb=a.sc,Dc(a.w,16))} -function bd(a){var b=a.Da;b&57344||(b=b&-3199|a.Ya<<5|a.Za<<1);return b}function cd(a,b){b&=-3073;if(a.Da!=b){b&57344&&!(a.Da&57344)&&(a.hc=a.va>>16&65535,a.ic=a.va&65535);a.Da=b;a.Ya=b>>5&3;a.Za=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.La!=c&&(a.La=c,Qd(a))}}function dd(a){a.Da&57344||(a.hc=a.va>>16&65535);a=a.hc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ed(a){a.Da&57344||(a.ic=a.va&65535);return a.ic} -function fd(a,b){1170>a.kb&&(b&=-49);a.Xa!=b&&(a.Xa=b,a.Qa=b&16?4194303:262143,Qd(a))}k.Fc=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.fa,this.lb]);a.set(2,Ic(this.w));return a.data()}; -k.restore=function(a){var b=a[1];this.fa=b[1];Id(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.O>>14&3;a.B!=c&&(a.Pa[c]=a.u[6],a.u[6]=a.Pa[a.B]);a.O=b;a.I&=-3;a.I|=a.J?2:1}function gd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.I|=1}a.Kb=b}function U(a,b){a.I&256||(a.X=a.aa=b,a.V=0)}function Zd(a,b,c){a.I&256||(a.X=a.aa=a.U=b,a.V=c||0)} -function $d(a,b,c,d){a.I&256||(a.X=a.aa=a.U=b,a.V=(c^b)&(d^b))}function ue(a,b){a.I&256||(a.X=a.aa=a.U=b,a.V=a.X^a.U>>1)}function ve(a,b,c,d){a.I&256||(a.X=a.aa=a.U=b,a.V=(c^d)&(d^b))} -k.ra=function(a,b,c){if(!this.K){0>this.Fa?this.Fa=hd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.qa|=4,this.u[6]=4,d=!0);this.va=a|4143316992;this.B=0;var e=this.za(a|this.R),f=this.za(a+2&65535|this.R);id(this,f&-12289|this.Fa>>2&12288);we(this,this.Fa,d);we(this,this.u[7],d);T(this,e);this.b-=5;this.I&=~(b|19);this.I|=129;this.Fa=-1;this.md=a;this.gd=c;if(-3<=c)throw a;}};function xe(a){var b=ye(a),c=ye(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);T(a,b);id(a,c);a.I&=-17} -k.Oa=function(a){var b=a>>13&31;31>b&&(a=this.Xa&32?this.Xb[b]+(a&8190)&4194302:a&-3932161);return a}; -function Zb(a,b,c){var d,e,f;if(!(c&a.La))return f=b&65535,57344<=f&&(f|=a.Qb),f;d=b>>13;a.Xa&a.ed[a.B]||(d&=7);e=a.P[a.B][d];f=(a.ka[a.B][d]<<6)+(b&8191)&a.Qa;3932160<=f&&(f=a.Oa(f));if(a.K)return f;f>=a.cd&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2& -8128)&&(g|=16384));a.P[a.B][d]=e;if(f!=(4194170&a.Qa)||a.B)a.Ya=a.B,a.Za=d;g&&(g&57344&&(0<=a.Fa&&(g|=128),a.Da&57344||(g|=a.Da&4096|a.Ya<<5|a.Za<<1,cd(a,a.Da&-61695|g&61694)),a.ra(168,64,-1)),a.Da&61440||!(f<(4191360&a.Qa)||f>(4194239&a.Qa))||(a.Da|=4096,a.Da&512&&(a.I|=64)));return f}function ze(a,b){return a.w.bc(b)}function ye(a){var b=a.za(a.u[6]|a.R);a.u[6]=a.u[6]+2&65535;return b} -function we(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.va=a.va&65535|(a.va&-65536)<<8|16121856;c||a.sa(4,-2,d);a.Yb(d,b)} -function Ae(a,b,c,d){var e,f,g=d&8?0:a.R;switch(b){case 0:return a.ra(4,0,-2),0;case 1:return 6==c&&a.sa(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.sa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.za(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.sa(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.za(e)|g;a.b-=8;break;case 6:return e=a.za(Wd(a,2)),e=e+a.u[c]&65535,6==c&&a.sa(d, -0,e),a.b-=6,e|g;case 7:return e=a.za(Wd(a,2)),e=e+a.u[c]&65535,e=a.za(e|a.R),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.va=a.va&65535|(a.va&-65536)<<8|(f<<3&248|c)<<16;return e}k.od=function(a,b,c){!this.B&&0>=b&&c<=this.nb&&(this.I|=32)};k.pd=function(a,b,c){this.B||(65534<=c&&(c|=-65536),a&4&&c<=this.nb&&(c<=this.nb-32?this.ra(4,0,-3):(this.qa|=8,this.I|=32)))};function nc(a,b){a.K++;b=a.Kc(Zb(a,b,2));a.K--;return b}k.rd=function(a,b,c){a=Ae(this,a,b,c);3932160<=a&&(a=this.Oa(a));return a}; -k.sd=function(a,b,c){return Zb(this,Ae(this,a,b,c),c)};k.Kc=function(a){3932160<=a&&(a=this.Oa(a));return this.w.ua(this.Tb=a)};k.ye=function(a){return this.w.ua(this.Tb=Zb(this,a,2))};k.sc=function(a,b){3932160<=a&&(a=this.Oa(a));this.w.Ab(this.Tb=a,b&65535)};k.xf=function(a,b){this.w.Ab(this.Tb=Zb(this,a,4),b)}; -function Be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Ae(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.za(d|c&a.R),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.Pa[a.O>>12&3];return c}function Ce(a,b,c,d){a.va=a.va&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Ae(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=Zb(a,e|c&65536,4),a.B=a.O>>14&3,a.w.Ab(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.Pa[a.O>>12&3]=d} -function De(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?ze(a,a.ba(b,c,3)):a.u[c+a.tb]&a.xc}function Ee(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?a.w.ua(a.ba(b,c,2)):a.u[c+a.tb]}function Fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Ae(a,b,c,8)}function Ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ze(a,a.ba(b,c,3)):a.u[c]&255}function He(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.ua(a.ba(b,c,2)):a.u[c]} -function Ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Rb=a.ba(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ze(a,e)),e&1&&a.b--,a.w.Lb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.Ab(e,d.call(a,0>c?a.u[-c-1]:c,a.w.ua(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])} -function Je(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.w.Lb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Ke(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.ba(b,d,4),a.w.Ab(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.qb=function(a){this.C.complete=!0;var b=this.j?Le(this.j)?1:this.C.ec?-1:0:0,c=a?this.C.ec?0:1:-1;this.C.ec=!1;this.ea=this.b=a;do{if(b){if(Me(this.j,this.u[7],c)){this.da();break}c||c++;b++}if(this.I){if(a=this.I&11)if(a=!1,this.I&2){var d=160,e=(this.Kb&224)>>5,f=this.J&&this.J.mb>e?this.J:null;f&&(d=f.rc,e=f.mb);e>(this.O&224)>>5?(this.I&8&&(Wd(this,2),this.I&=-9),this.ra(d,0,-9),e=!0):e=!1;e&&(f&&Xd(this,f),a=!0);this.J||this.Kb||(this.I&=-3)}else this.I&1&&this.I++;if(a){if(b&&Me(this.j,this.u[7], -c)){this.da();break}if(0>c)break}if(this.I&112&&Yd(this)){if(b&&Me(this.j,this.u[7],c)){this.da();break}if(0>c)break}}this.I=this.I&15|this.O&16;this.decode(Vd(this))}while(0>2),b=0;b>8,c)},da:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},Da:function(a,b){a&1&&this.w.Ma(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ +1]&255)<<8},Pa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.ab=!0},gb:function(a,b){if(this.j&&null!=this.H){var c=this.j;xd(c,this.H+a,1,c.M)&&c.ca(!0)}return this.I(a,b)},ra:function(a,b){if(this.j&&null!=this.H){var c=this.j;xd(c,this.H+a,2,c.M)&&c.ca(!0)}return this.K(a,b)},Ea:function(a, +b,c){if(this.j&&null!=this.H){var d=this.j;xd(d,this.H+a,1,d.F)&&d.ca(!0)}this.f?this.v(a,b,c):this.G(a,b,c)},Xa:function(a,b,c){if(this.j&&null!=this.H){var d=this.j;xd(d,this.H+a,2,d.F)&&d.ca(!0)}this.f?this.v(a,b,c):this.M(a,b,c)},fb:function(a){return this.D[a]},Y:function(a,b){a=this.D[a];this.j&&I(this.j,32)&&G(this.j,"Memory.readByte("+L(this.j,b)+"): "+L(this.j,a),!0);return a},ea:function(a,b){a&1&&this.w.Ma(b,64,2);return this.F.getUint16(a,!0)},sa:function(a,b){a&1&&this.w.Ma(b,64,2);a= +this.P[a>>1];this.j&&I(this.j,32)&&G(this.j,"Memory.readWord("+L(this.j,b)+"): "+L(this.j,a),!0);return a},Aa:function(a,b){this.D[a]=b;this.ab=!0},Ka:function(a,b,c){this.D[a]=b;this.ab=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeByte("+L(this.j,c)+","+L(this.j,b)+")",!0)},Qa:function(a,b,c){a&1&&this.w.Ma(c,64,4);this.F.setUint16(a,b,!0);this.ab=!0},Ya:function(a,b,c){a&1&&this.w.Ma(c,64,4);this.P[a>>1]=b;this.ab=!0;this.j&&I(this.j,32)&&G(this.j,"Memory.writeWord("+L(this.j,c)+","+L(this.j, +b)+")",!0)}};function zc(a,b,c){a.j=b;a.A=a.g=0;c&&((a.A=c.A)&&wd(a,vd,!1),(a.g=c.g)&&ud(a,vd,!1))}function yd(a,b){b?--a.g||(a.ec=a.f?a.v:a.G,a.Xb=a.f?a.L:a.M):--a.A||(a.bc=a.I,a.ya=a.K)}function ud(a,b,c){c&&a.g||(a.ec=!a.f&&b[1]||a.v,a.Xb=!a.f&&b[3]||a.L);if(c||void 0===c)a.G=b[1]||a.v,a.M=b[3]||a.L}function wd(a,b,c){c&&a.A||(a.bc=b[0]||a.S,a.ya=b[2]||a.T);if(c||void 0===c)a.I=b[0]||a.S,a.K=b[2]||a.T}function qd(a,b){b||(b=zd);wd(a,b,void 0);ud(a,b,void 0)} +var zd=[],td=[K.prototype.da,K.prototype.Pa,K.prototype.Da,K.prototype.Za],vd=[K.prototype.gb,K.prototype.Ea,K.prototype.ra,K.prototype.Xa];if(Bb)var sd=[K.prototype.fb,K.prototype.Aa,K.prototype.ea,K.prototype.Qa],rd=[K.prototype.Y,K.prototype.Ka,K.prototype.sa,K.prototype.Ya]; +function Ad(a,b){x.call(this,"CPU",a,Ad,1);b=a.cycles||b;var c=a.multiplier||1;this.Ob=0;this.qb=b;this.kb=c;this.Rb=Math.round(this.qb/1E4)/100;this.xb=this.Rb*this.kb;this.C.W=!1;this.C.dc=!1;this.C.Ab=a.autoStart;this.C.Bb=!1;this.Tb=this.Da=0;this.Ub=a.csStart;this.Fb=a.csInterval;this.Gb=a.csStop;this.M=[];this.zc=this.Ae.bind(this);J(this)}B(Ad);var Bd=["power","reset"];k=Ad.prototype; +k.Fa=function(a,b,c,d){this.A=a;this.w=b;this.j=d;this.v=a.v;for(b=0;b=a.Da&&(a.Da+=a.Fb,c=!0);0<=a.Gb&&a.Gb<=Hd(a)&&(a.Fb=a.Gb=-1,Ed(a),a.ca(),c=!0);c&&a.i(Hd(a)+" cycles: checksum="+p(a.Tb))}} +k.va=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.D[b]=c,!0;case "run":return this.D[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.C.la)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;ca.sa/a.xb?b=1:d=!0;a.kb=b;b=a.Rb*a.kb;if(a.xb!=b){a.xb=b;b=a.xb.toFixed(2)+"Mhz";var e=a.D.setSpeed;e&&(e.textContent=b);a.i("target speed: "+b)}c&&a.A&&a.A.nb()}Ub(a,a.T);a.T=0;a.S=Ba();a.Y=0;Jd(a);return d}function Nc(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Pc(a,b,c,d){0<=b&&ba.M[b][0])&&(c=a.qb*a.kb/1E3*c|0,a.C.W&&(c+=Kd(a)),a.M[b][0]=c)} +function Ld(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Tb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Kd(a,b){var c=a.da-=a.b;a.b=a.L=0;b&&(a.da=0);return c} +k.Ae=function(){if(this.C.W){this.fc>=this.qb&&Jd(this,!0);this.Qa=0;this.Za=Ba();if(this.Y){var a=this.Za-this.Y;a>this.xc&&(this.S+=a,this.S>this.Za&&(this.S=this.Za))}try{do{var b=Ld(this,this.C.Bb?1:this.rb);try{this.pb(b)}catch(e){if("number"!=typeof e)throw e;}b=Kd(this,!0);this.Qa+=b;this.T+=b;Vb(this,b);Tb(this,b);this.Aa-=b;if(0>=this.Aa){this.Aa+=this.rb;15<=++this.yc&&(this.wa(),this.yc=0);break}}while(this.C.W)}catch(e){this.ca();this.A&&this.A.stop(Ba(),Hd(this));Ab(this,e.stack||e.message); +return}if(this.C.W){a=setTimeout;b=this.zc;this.Y=Ba();var c=this.xc;this.Qa&&(c=Math.round(c*this.Qa/this.rb));var c=c-(this.Y-this.Za),d=this.Y-this.S;d&&(this.sa=Math.round(this.T/(10*d))/100,864E5<=d&&(this.ea=0,Id(this)));if(0>c||this.sac&&(this.S-=c),c=0;this.fc+=this.Qa;this.Y+=c;a(b,c)}}}; +k.ob=function(a){if(zb(this))return!1;if(this.C.W)return this.i(this.toString()+" busy"),!1;Id(this);this.C.W=!0;this.C.dc=!0;var b=this.D.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.nb(!0),this.A.start(this.S,Hd(this)));setTimeout(this.zc,0);return!0};k.pb=function(){return 0};k.ca=function(a){var b=!1;if(this.C.W){Kd(this);Ub(this,this.T);this.T=0;this.C.W=!1;if(b=this.D.run)b.textContent="Run";this.A&&this.A.stop(Ba(),Hd(this));b=!0}this.C.complete=a;return b}; +function Md(a){this.jb=+a.model||1170;this.uc=a.addrReset||0;Ad.call(this,a,6666667);this.sb=0;this.wc=255;1120==this.jb?(this.decode=Nd.bind(this),this.ra=this.nd,this.sb=8,this.wc=-1):(this.decode=Od.bind(this),this.ra=this.od);Pd(this);this.K=0;this.I=null;this.C.complete=!1}B(Md,Ad);k=Md.prototype;k.reset=function(){this.status("model "+this.jb);this.C.W&&this.ca();Pd(this);Dd(this);this.C.error=!1;this.parent.reset.call(this)}; +function Pd(a){a.U=65536;a.V=32768;a.Z=65535;a.X=32768;a.O=15;a.u=[0,0,0,0,0,0,0,a.uc,-1,-2,-3,-4,-5,-6,-7,-8];a.eb=[0,0,0,0,0,0];a.Oa=[0,0,0,0];a.B=0;a.Ya=0;a.dd=[4,2,0,1];a.R=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ja=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0]];a.Wb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.Lc=[0,0,0,0,0,0,0,0];a.Kc=0;a.J=0;a.F=a.G=0;a.g=a.f=a.Qb=0;a.Ea=-1;Sb(a)}function Sb(a){a.Ca=0;a.gc=0;a.hc=0;a.Wa=0;a.pa=0;a.Jb=0;a.mb=255;a.Ka=0;a.Xa=0;a.Pa=262143;a.Sb=0;a.ua=0;a.I=null;a.w&&(Qd(a),a.bd=Jc(a.w))}function Qd(a){a.Ka?(a.P=65536,a.Pb=a.Wa&16?4186112:253952,a.aa=a.rd,a.ya=a.xe,a.Xb=a.wf,Dc(a.w,a.Wa&16?22:18)):(a.P=0,a.Pb=57344,a.aa=a.qd,a.ya=a.Jc,a.Xb=a.rc,Dc(a.w,16))} +function bd(a){var b=a.Ca;b&57344||(b=b&-3199|a.Xa<<5|a.Ya<<1);return b}function cd(a,b){b&=-3073;if(a.Ca!=b){b&57344&&!(a.Ca&57344)&&(a.gc=a.ua>>16&65535,a.hc=a.ua&65535);a.Ca=b;a.Xa=b>>5&3;a.Ya=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Ka!=c&&(a.Ka=c,Qd(a))}}function dd(a){a.Ca&57344||(a.gc=a.ua>>16&65535);a=a.gc;a&65280&&(a=(a<<8|a>>8)&65535);return a}function ed(a){a.Ca&57344||(a.hc=a.ua&65535);return a.hc} +function fd(a,b){1170>a.jb&&(b&=-49);a.Wa!=b&&(a.Wa=b,a.Pa=b&16?4194303:262143,Qd(a))}k.Ec=function(){return 0};k.save=function(){var a=new S(this);a.set(0,[]);a.set(1,[this.ea,this.kb]);a.set(2,Ic(this.w));return a.data()}; +k.restore=function(a){var b=a[1];this.ea=b[1];Id(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.O>>14&3;a.B!=c&&(a.Oa[c]=a.u[6],a.u[6]=a.Oa[a.B]);a.O=b;a.J&=-3;a.J|=a.I?2:1}function gd(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.J|=1}a.Jb=b}function U(a,b){a.J&256||(a.X=a.Z=b,a.V=0)}function Zd(a,b,c){a.J&256||(a.X=a.Z=a.U=b,a.V=c||0)} +function $d(a,b,c,d){a.J&256||(a.X=a.Z=a.U=b,a.V=(c^b)&(d^b))}function ue(a,b){a.J&256||(a.X=a.Z=a.U=b,a.V=a.X^a.U>>1)}function ve(a,b,c,d){a.J&256||(a.X=a.Z=a.U=b,a.V=(c^d)&(d^b))} +k.qa=function(a,b,c){if(!this.K){0>this.Ea?this.Ea=hd(this):this.B||(c=-3);var d=!1;-3==c&&(a=4,this.pa|=4,this.u[6]=4,d=!0);this.ua=a|4143316992;this.B=0;var e=this.ya(a|this.P),f=this.ya(a+2&65535|this.P);id(this,f&-12289|this.Ea>>2&12288);we(this,this.Ea,d);we(this,this.u[7],d);T(this,e);this.b-=5;this.J&=~(b|19);this.J|=129;this.Ea=-1;this.ld=a;this.fd=c;if(-3<=c)throw a;}};function xe(a){var b=ye(a),c=ye(a)&-1793;a.O&49152&&(c=c&-225|a.O&63712);T(a,b);id(a,c);a.J&=-17} +k.Na=function(a){var b=a>>13&31;31>b&&(a=this.Wa&32?this.Wb[b]+(a&8190)&4194302:a&-3932161);return a}; +function Zb(a,b,c){var d,e,f;if(!(c&a.Ka))return f=b&65535,57344<=f&&(f|=a.Pb),f;d=b>>13;a.Wa&a.dd[a.B]||(d&=7);e=a.R[a.B][d];f=(a.ja[a.B][d]<<6)+(b&8191)&a.Pa;3932160<=f&&(f=a.Na(f));if(a.K)return f;f>=a.bd&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2& +8128)&&(g|=16384));a.R[a.B][d]=e;if(f!=(4194170&a.Pa)||a.B)a.Xa=a.B,a.Ya=d;g&&(g&57344&&(0<=a.Ea&&(g|=128),a.Ca&57344||(g|=a.Ca&4096|a.Xa<<5|a.Ya<<1,cd(a,a.Ca&-61695|g&61694)),a.qa(168,64,-1)),a.Ca&61440||!(f<(4191360&a.Pa)||f>(4194239&a.Pa))||(a.Ca|=4096,a.Ca&512&&(a.J|=64)));return f}function ze(a,b){return a.w.ac(b)}function ye(a){var b=a.ya(a.u[6]|a.P);a.u[6]=a.u[6]+2&65535;return b} +function we(a,b,c){var d=a.u[6]-2&65535;a.u[6]=d;a.ua=a.ua&65535|(a.ua&-65536)<<8|16121856;c||a.ra(4,-2,d);a.Xb(d,b)} +function Ae(a,b,c,d){var e,f,g=d&8?0:a.P;switch(b){case 0:return a.qa(4,0,-2),0;case 1:return 6==c&&a.ra(d,0,a.u[6]),a.b-=3,7==c?a.u[c]:a.u[c]|g;case 2:f=2;e=a.u[c];6==c&&a.ra(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!=c&&(e|=g);e=a.ya(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;6==c&&a.ra(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!=c&&(e|=g);e=a.ya(e)|g;a.b-=8;break;case 6:return e=a.ya(Wd(a,2)),e=e+a.u[c]&65535,6==c&&a.ra(d, +0,e),a.b-=6,e|g;case 7:return e=a.ya(Wd(a,2)),e=e+a.u[c]&65535,e=a.ya(e|a.P),a.b-=10,e|g}a.u[c]=a.u[c]+f&65535;a.ua=a.ua&65535|(a.ua&-65536)<<8|(f<<3&248|c)<<16;return e}k.nd=function(a,b,c){!this.B&&0>=b&&c<=this.mb&&(this.J|=32)};k.od=function(a,b,c){this.B||(65534<=c&&(c|=-65536),a&4&&c<=this.mb&&(c<=this.mb-32?this.qa(4,0,-3):(this.pa|=8,this.J|=32)))};function nc(a,b){a.K++;b=a.Jc(Zb(a,b,2));a.K--;return b}k.qd=function(a,b,c){a=Ae(this,a,b,c);3932160<=a&&(a=this.Na(a));return a}; +k.rd=function(a,b,c){return Zb(this,Ae(this,a,b,c),c)};k.Jc=function(a){3932160<=a&&(a=this.Na(a));return this.w.ta(this.Sb=a)};k.xe=function(a){return this.w.ta(this.Sb=Zb(this,a,2))};k.rc=function(a,b){3932160<=a&&(a=this.Na(a));this.w.zb(this.Sb=a,b&65535)};k.wf=function(a,b){this.w.zb(this.Sb=Zb(this,a,4),b)}; +function Be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=Ae(a,b,d,2),c&65536||61440!==(a.O&61440)&&(d&=65535),a.B=a.O>>12&3,c=a.ya(d|c&a.P),a.B=a.O>>14&3):c=6!=d||(a.O>>2&12288)===(a.O&12288)?a.u[d]:a.Oa[a.O>>12&3];return c}function Ce(a,b,c,d){a.ua=a.ua&65535|1441792;var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=Ae(a,b,e,4),c&65536||(e&=65535),a.B=a.O>>12&3,e=Zb(a,e|c&65536,4),a.B=a.O>>14&3,a.w.zb(e,d)):6!=e||(a.O>>2&12288)===(a.O&12288)?a.u[e]=d:a.Oa[a.O>>12&3]=d} +function De(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?ze(a,a.aa(b,c,3)):a.u[c+a.sb]&a.wc}function Ee(a,b){b>>=6;var c=a.G=b&7;return(b=a.F=(b&56)>>3)?a.w.ta(a.aa(b,c,2)):a.u[c+a.sb]}function Fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return Ae(a,b,c,8)}function Ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?ze(a,a.aa(b,c,3)):a.u[c]&255}function He(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.ta(a.aa(b,c,2)):a.u[c]} +function Ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.Qb=a.aa(b,e,7),c=0>c?a.u[-c-1]&255:c,c=d.call(a,c,ze(a,e)),e&1&&a.b--,a.w.Kb(e,c)):(b=a.u[e],c=0>c?a.u[-c-1]&255:c,a.u[e]=b&65280|d.call(a,c,b&255))}function V(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.aa(b,e,6),a.w.zb(e,d.call(a,0>c?a.u[-c-1]:c,a.w.ta(e)))):a.u[e]=d.call(a,0>c?a.u[-c-1]:c,a.u[e])} +function Je(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,e,5),e=c=0>c?a.u[-c-1]&255:c,d&1&&a.b--,a.w.Kb(d,e)):c?(c=0>c?a.u[-c-1]&255:c,a.u[e]=a.u[e]&~d|c<<24>>24&d):a.u[e]&=~d;return c}function Ke(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=a.aa(b,d,4),a.w.zb(d,c=0>c?a.u[-c-1]:c)):a.u[d]=c=0>c?a.u[-c-1]:c;return c}function W(a,b,c){c&&(T(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.pb=function(a){this.C.complete=!0;var b=this.j?Le(this.j)?1:this.C.dc?-1:0:0,c=a?this.C.dc?0:1:-1;this.C.dc=!1;this.da=this.b=a;do{if(b){if(Me(this.j,this.u[7],c)){this.ca();break}c||c++;b++}if(this.J){if(a=this.J&11)if(a=!1,this.J&2){var d=160,e=(this.Jb&224)>>5,f=this.I&&this.I.lb>e?this.I:null;f&&(d=f.qc,e=f.lb);e>(this.O&224)>>5?(this.J&8&&(Wd(this,2),this.J&=-9),this.qa(d,0,-9),e=!0):e=!1;e&&(f&&Xd(this,f),a=!0);this.I||this.Jb||(this.J&=-3)}else this.J&1&&this.J++;if(a){if(b&&Me(this.j,this.u[7], +c)){this.ca();break}if(0>c)break}if(this.J&112&&Yd(this)){if(b&&Me(this.j,this.u[7],c)){this.ca();break}if(0>c)break}}this.J=this.J&15|this.O&16;this.decode(Vd(this))}while(0>1|b<<16;ue(this,a);return a&65535}function Se(a,b){a=b&128|b>>1|b<<8;ue(this,a<<8);return a&255}function Te(a,b){a=b&~a;U(this,a);return a}function Ue(a,b){a=b&~a;U(this,a<<8);return a}function Ve(a,b){a|=b;U(this,a);return a}function We(a,b){a|=b;U(this,a<<8);return a}function Xe(a,b){a=~b|65536;Zd(this,a);return a&65535} -function Ye(a,b){a=~b|256;Zd(this,a<<8);return a&255}function Ze(a,b){a=b-a;this.I&256||(this.X=this.aa=a,this.V=b&(b^a));return a&65535}function $e(a,b){a=b-a;var c=a<<8;b<<=8;this.I&256||(this.X=this.aa=c,this.V=b&(b^c));return a&255}function af(a,b){a=b+a;this.I&256||(this.X=this.aa=a,this.V=a&(b^a));return a&65535}function bf(a,b){a=b+a;var c=a<<8;this.I&256||(this.X=this.aa=c,this.V=c&(b<<8^c));return a&255}function cf(a,b){a=-b;Zd(this,a,a&b&32768);return a&65535} +function Ye(a,b){a=~b|256;Zd(this,a<<8);return a&255}function Ze(a,b){a=b-a;this.J&256||(this.X=this.Z=a,this.V=b&(b^a));return a&65535}function $e(a,b){a=b-a;var c=a<<8;b<<=8;this.J&256||(this.X=this.Z=c,this.V=b&(b^c));return a&255}function af(a,b){a=b+a;this.J&256||(this.X=this.Z=a,this.V=a&(b^a));return a&65535}function bf(a,b){a=b+a;var c=a<<8;this.J&256||(this.X=this.Z=c,this.V=c&(b<<8^c));return a&255}function cf(a,b){a=-b;Zd(this,a,a&b&32768);return a&65535} function df(a,b){a=-b;Zd(this,a<<8,(a&b&128)<<8);return a&255}function ef(a,b){a=b<<1|this.U>>16&1;ue(this,a);return a&65535}function ff(a,b){a=b<<1|this.U>>16&1;ue(this,a<<8);return a&255}function gf(a,b){a=(this.U&65536|b)>>1|b<<16;ue(this,a);return a&65535}function hf(a,b){a=((this.U&65536)>>8|b)>>1|b<<8;ue(this,a<<8);return a&255}function jf(a,b){var c=b-a;ve(this,c,a,b);return c&65535}function kf(a,b){var c=b-a;ve(this,c<<8,a<<8,b<<8);return c&255} -function lf(a,b){this.I&256||(this.X=this.aa=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function mf(a,b){a^=b;U(this,a);return a&65535}function nf(a){V(this,a,Ee(this,a),Ne);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} -function of(a){var b=He(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.aa=c;this.b-=(this.g?6:7)+b} -function pf(a){var b=He(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function qf(a){W(this,a,!Rd(this))}function rf(a){W(this,a,Rd(this))} +function lf(a,b){this.J&256||(this.X=this.Z=b&65280,this.V=this.U=0);return(b<<8|b>>8)&65535}function mf(a,b){a^=b;U(this,a);return a&65535}function nf(a){V(this,a,Ee(this,a),Ne);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} +function of(a){var b=He(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.U=this.V=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.V=32768)}this.u[a]=c&65535;this.X=this.Z=c;this.b-=(this.g?6:7)+b} +function pf(a){var b=He(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&=63;if(b&32){b=64-b;32>b-1;this.U=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.Z=d>>16|d;this.b-=(this.g?6:7)+b}function qf(a){W(this,a,!Rd(this))}function rf(a){W(this,a,Rd(this))} function sf(a){V(this,a,Ee(this,a),Te);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function tf(a){Ie(this,a,De(this,a),Ue);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function uf(a){V(this,a,Ee(this,a),Ve);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function vf(a){Ie(this,a,De(this,a),We);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)} function wf(a){var b=Ee(this,a);a=He(this,a);U(this,(0>b?this.u[-b-1]:b)&a);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function xf(a){var b=De(this,a);a=Ge(this,a);U(this,((0>b?this.u[-b-1]&255:b)&a)<<8);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function yf(a){W(this,a,Td(this))}function zf(a){W(this,a,!Ud(this)==!Sd(this))}function Af(a){W(this,a,!Td(this)&&!Ud(this)==!Sd(this))}function Bf(a){W(this,a,!Rd(this)&&!Td(this))} -function Cf(a){W(this,a,Td(this)||!Ud(this)!=!Sd(this))}function Df(a){W(this,a,Rd(this)||Td(this))}function Ef(a){W(this,a,!Ud(this)!=!Sd(this))}function Ff(a){W(this,a,Ud(this))}function Gf(a){W(this,a,!Td(this))}function Hf(a){W(this,a,!Ud(this))}function If(){this.ra(12,0,-8)}function Jf(a){W(this,a,!0)}function Kf(a){W(this,a,!Sd(this))}function Lf(a){W(this,a,Sd(this))}function Mf(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.aa=1);a&8&&(this.X=0);this.b-=5} +function Cf(a){W(this,a,Td(this)||!Ud(this)!=!Sd(this))}function Df(a){W(this,a,Rd(this)||Td(this))}function Ef(a){W(this,a,!Ud(this)!=!Sd(this))}function Ff(a){W(this,a,Ud(this))}function Gf(a){W(this,a,!Td(this))}function Hf(a){W(this,a,!Ud(this))}function If(){this.qa(12,0,-8)}function Jf(a){W(this,a,!0)}function Kf(a){W(this,a,!Sd(this))}function Lf(a){W(this,a,Sd(this))}function Mf(a){a&1&&(this.U=0);a&2&&(this.V=0);a&4&&(this.Z=1);a&8&&(this.X=0);this.b-=5} function Nf(a){var b=Ee(this,a);a=He(this,a);var c=(b=0>b?this.u[-b-1]:b)-a;ve(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)}function Of(a){var b=De(this,a);a=Ge(this,a);var c=(b=(0>b?this.u[-b-1]&255:b)<<8)-(a<<=8);ve(this,c,a,b);this.b-=this.g?4+(this.G&&6<=this.f?1:0):(this.F?4:3)+(7==this.f?2:0)} -function Pf(a){var b=He(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.aa=d>>16|d,this.X=d>>16):(this.V=32768,this.aa=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.X=0,this.V=32768,this.U=65536,this.b-=7}function Qf(){this.ra(24,0,-8);this.b-=20} -function Rf(){this.O&49152?(this.qa|=128,this.ra(4,0,-7)):(this.v&&1120==this.kb&&this.v.setData(this.u[0],!0),this.j?Sf(this.j):this.da());this.b-=7}function Tf(){this.ra(16,0,-8);this.b-=20}var Uf=[0,7,7,10,7,11,9,13];function Vf(a){this.L=this.b;T(this,Fe(this,a));this.b=this.L-Uf[this.g]}var Wf=[0,14,14,17,14,18,16,20];function Xf(a){this.L=this.b;var b=Fe(this,a);a=a>>6&7;we(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.L-Wf[this.g]} +function Pf(a){var b=He(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.U=this.V=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.Z=d>>16|d,this.X=d>>16):(this.V=32768,this.Z=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.Z=this.X=0,this.V=32768,this.U=65536,this.b-=7}function Qf(){this.qa(24,0,-8);this.b-=20} +function Rf(){this.O&49152?(this.pa|=128,this.qa(4,0,-7)):(this.v&&1120==this.jb&&this.v.setData(this.u[0],!0),this.j?Sf(this.j):this.ca());this.b-=7}function Tf(){this.qa(16,0,-8);this.b-=20}var Uf=[0,7,7,10,7,11,9,13];function Vf(a){this.L=this.b;T(this,Fe(this,a));this.b=this.L-Uf[this.g]}var Wf=[0,14,14,17,14,18,16,20];function Xf(a){this.L=this.b;var b=Fe(this,a);a=a>>6&7;we(this,this.u[a]);this.u[a]=this.u[7];T(this,b);this.b=this.L-Wf[this.g]} var Yf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function Zf(a){var b=Ee(this,a);this.L=this.b;U(this,Ke(this,a,b));this.b=this.L-Yf[(this.F?8:0)+this.g]+(7!=this.f||this.g?0:2)}function $f(a){var b=De(this,a);U(this,Je(this,a,b,65535)<<8);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}var ag=[7,13,13,17,14,18,17,21]; -function bg(a){var b=He(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&256||(this.X=b>>16,this.aa=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ig(a){V(this,a,Ee(this,a),jf);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function jg(a){V(this,a,0,lf);this.b-=this.g?9:3+(7==this.f?2:0)}function kg(){this.ra(28,0,-8)} -function lg(){this.v&&(this.v.pc(this.u[7],!0),this.v.setData(this.u[0],!0));this.I|=8;Wd(this,-2);this.b-=3}function mg(a){V(this,a,this.u[(a>>6&7)+this.tb],mf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Sf(b)):b=!1;b||this.ra(8,0,-8)}function Nd(a){ng[a>>12].call(this,a)}function og(a){pg[a>>6&3].call(this,a)}function qg(a){rg[a>>6&3].call(this,a)}function sg(a){tg[a>>6&3].call(this,a)} +function bg(a){var b=He(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.J&256||(this.X=b>>16,this.Z=this.X|b,this.V=0,this.U=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)T(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function ig(a){V(this,a,Ee(this,a),jf);this.b-=this.g?9+(this.G&&6<=this.f?1:0):(this.F?5:3)+(7==this.f?2:0)}function jg(a){V(this,a,0,lf);this.b-=this.g?9:3+(7==this.f?2:0)}function kg(){this.qa(28,0,-8)} +function lg(){this.v&&(this.v.oc(this.u[7],!0),this.v.setData(this.u[0],!0));this.J|=8;Wd(this,-2);this.b-=3}function mg(a){V(this,a,this.u[(a>>6&7)+this.sb],mf);this.b-=this.g?9:3+(7==this.f?2:0)}function X(a){var b;if(b=this.j)b=this.j,I(b,1)?(G(b,"undefined opcode "+L(b,a),!0,!0),b=Sf(b)):b=!1;b||this.qa(8,0,-8)}function Nd(a){ng[a>>12].call(this,a)}function og(a){pg[a>>6&3].call(this,a)}function qg(a){rg[a>>6&3].call(this,a)}function sg(a){tg[a>>6&3].call(this,a)} function ug(a){vg[a&15].call(this,a)}function wg(a){xg[a&15].call(this,a)}function yg(a){zg[a>>6&3].call(this,a)}function Ag(a){Bg[a>>6&3].call(this,a)}function Cg(a){Dg[a>>6&3].call(this,a)} var ng=[function(a){Eg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,nf,X,function(a){Fg[a>>8&15].call(this,a)},$f,Of,xf,tf,vf,ig,X],Eg=[function(a){Gg[a>>4&15].call(this,a)},Jf,Gf,yf,zf,Ef,Af,Cf,Xf,Xf,og,qg,sg,X,X,X],pg=[function(a){Zd(this,Ke(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,af);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,1,Ze);this.b-=this.g?9:3+(7==this.f?2:0)}],rg=[function(a){V(this,a,0, cf);this.b-=this.g?11:6},function(a){V(this,a,Rd(this)?1:0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,Rd(this)?1:0,jf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=He(this,a);Zd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],tg=[function(a){V(this,a,0,gf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,ef);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){V(this,a,0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)}], -Gg=[function(a){Hg[a&15].call(this,a)},X,X,X,Vf,Vf,Vf,Vf,eg,X,ug,wg,jg,jg,jg,jg],Hg=[Rf,lg,fg,If,Tf,dg,X,X,X,X,X,X,X,X,X,X],vg=[cg,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},Mf,function(){this.aa=1;this.b-=5},Mf,Mf,Mf,function(){this.X=0;this.b-=5},Mf,Mf,Mf,Mf,Mf,Mf,Mf],xg=[cg,function(){this.U=65536;this.b-=5},function(){this.V=32768;this.b-=5},gg,function(){this.aa=0;this.b-=5},gg,gg,gg,function(){this.X=32768;this.b-=5},gg,gg,gg,gg,gg,gg,gg],Fg=[Hf,Ff,Bf,Df,Kf,Lf,qf,rf,Qf,kg, -yg,Ag,Cg,X,X,X],zg=[function(a){Zd(this,Je(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,0,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,1,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,1,$e);this.b-=this.g?9:3+(7==this.f?2:0)}],Bg=[function(a){Ie(this,a,0,df);this.b-=this.g?11:6},function(a){Ie(this,a,Rd(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,Rd(this)?1:0,kf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a= -Ge(this,a);Zd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Dg=[function(a){Ie(this,a,0,hf);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Ie(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,0,Se);this.b-=this.g?9+(this.Rb&1):3+(7==this.f?2:0)},function(a){Ie(this,a,0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)}];function Od(a){Ig[a>>12].call(this,a)} -var Ig=[function(a){Jg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,nf,function(a){Kg[a>>8&15].call(this,a)},function(a){Lg[a>>8&15].call(this,a)},$f,Of,xf,tf,vf,ig,X],Jg=[function(a){Mg[a>>4&15].call(this,a)},Jf,Gf,yf,zf,Ef,Af,Cf,Xf,Xf,og,qg,sg,function(a){Ng[a>>6&3].call(this,a)},X,X],Ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.za(a|this.R);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Be(this,a,0);we(this,a);U(this,a);this.b-=11},function(a){var b=ye(this);this.L= -this.b;Ce(this,a,0,b);U(this,b);this.b=this.L-ag[this.g]},function(a){U(this,Ke(this,a,Ud(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Mg=[function(a){Og[a&15].call(this,a)},X,X,X,Vf,Vf,Vf,Vf,eg,function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.I|=1,this.I&=-3),this.b-=5):X.call(this,a)},ug,wg,jg,jg,jg,jg],Og=[Rf,lg,function(){xe(this);this.I|=this.O&16;this.b-=13},If,Tf,dg,fg,function(){this.ra(8,0,-8)},X,X,X,X,X,X,X,X],Kg=[bg,bg,Pf,Pf,of,of,pf,pf,mg,mg,X,X,X,X,hg,hg],Lg= +Gg=[function(a){Hg[a&15].call(this,a)},X,X,X,Vf,Vf,Vf,Vf,eg,X,ug,wg,jg,jg,jg,jg],Hg=[Rf,lg,fg,If,Tf,dg,X,X,X,X,X,X,X,X,X,X],vg=[cg,function(){this.U=0;this.b-=5},function(){this.V=0;this.b-=5},Mf,function(){this.Z=1;this.b-=5},Mf,Mf,Mf,function(){this.X=0;this.b-=5},Mf,Mf,Mf,Mf,Mf,Mf,Mf],xg=[cg,function(){this.U=65536;this.b-=5},function(){this.V=32768;this.b-=5},gg,function(){this.Z=0;this.b-=5},gg,gg,gg,function(){this.X=32768;this.b-=5},gg,gg,gg,gg,gg,gg,gg],Fg=[Hf,Ff,Bf,Df,Kf,Lf,qf,rf,Qf,kg,yg, +Ag,Cg,X,X,X],zg=[function(a){Zd(this,Je(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,0,Ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,1,bf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,1,$e);this.b-=this.g?9:3+(7==this.f?2:0)}],Bg=[function(a){Ie(this,a,0,df);this.b-=this.g?11:6},function(a){Ie(this,a,Rd(this)?1:0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,Rd(this)?1:0,kf);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a= +Ge(this,a);Zd(this,a<<8);this.b-=this.g?4:3+(7==this.f?2:0)}],Dg=[function(a){Ie(this,a,0,hf);this.b-=this.g?9+(this.Qb&1):3+(7==this.f?2:0)},function(a){Ie(this,a,0,ff);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){Ie(this,a,0,Se);this.b-=this.g?9+(this.Qb&1):3+(7==this.f?2:0)},function(a){Ie(this,a,0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)}];function Od(a){Ig[a>>12].call(this,a)} +var Ig=[function(a){Jg[a>>8&15].call(this,a)},Zf,Nf,wf,sf,uf,nf,function(a){Kg[a>>8&15].call(this,a)},function(a){Lg[a>>8&15].call(this,a)},$f,Of,xf,tf,vf,ig,X],Jg=[function(a){Mg[a>>4&15].call(this,a)},Jf,Gf,yf,zf,Ef,Af,Cf,Xf,Xf,og,qg,sg,function(a){Ng[a>>6&3].call(this,a)},X,X],Ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ya(a|this.P);T(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=Be(this,a,0);we(this,a);U(this,a);this.b-=11},function(a){var b=ye(this);this.L= +this.b;Ce(this,a,0,b);U(this,b);this.b=this.L-ag[this.g]},function(a){U(this,Ke(this,a,Ud(this)?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],Mg=[function(a){Og[a&15].call(this,a)},X,X,X,Vf,Vf,Vf,Vf,eg,function(a){a&8?(this.O&49152||(this.O=this.O&-2017|(a&7)<<5,this.J|=1,this.J&=-3),this.b-=5):X.call(this,a)},ug,wg,jg,jg,jg,jg],Og=[Rf,lg,function(){xe(this);this.J|=this.O&16;this.b-=13},If,Tf,dg,fg,function(){this.qa(8,0,-8)},X,X,X,X,X,X,X,X],Kg=[bg,bg,Pf,Pf,of,of,pf,pf,mg,mg,X,X,X,X,hg,hg],Lg= [Hf,Ff,Bf,Df,Kf,Lf,qf,rf,Qf,kg,yg,Ag,Cg,function(a){Pg[a>>6&3].call(this,a)},X,X],Pg=[X,function(a){a=Be(this,a,65536);we(this,a);U(this,a);this.b-=11},function(a){var b=ye(this);this.L=this.b;Ce(this,a,65536,b);U(this,b);this.b=this.L-ag[this.g]},X]; -function Qg(a){x.call(this,"ROM",a,Qg,128);this.ja=this.A=null;this.B=a.addr;this.f=a.size;this.F=!1;this.v=a.alias;this.g=a.file;this.G=t(this.g);if(this.g){a=this.g;var b=oa(this.G);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(mb(c.hb,a,b),(a=Ea(a,b))?(c.A=a.ha,c.ja=a.ja):c.g=null);Rg(c)})}}B(Qg);k=Qg.prototype; -k.Ga=function(a,b,c,d){this.w=b;this.b=c;this.j=d;Rg(this)};k.Ja=function(){this.ja&&(this.j&&Sg(this.j,this.id,this.B,this.f,this.ja),delete this.ja);return!0};k.Ia=function(){return!0}; -function Rg(a){if(!yb(a)){if(a.g){if(!a.A||!a.w)return;a.f||(a.f=a.A.length);if(a.A.length!=a.f)Ab(a,"ROM size ("+p(a.A.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.B;a.status(a.f+"-byte ROM at "+na(b));if(57344<=b&&b<57344+uc){var c={};b=(c[b]=[Qg.prototype.me,Qg.prototype.kf,null,null,null,a.f>>1],c);if(Jb(a.w,a,b)){b=a.F=!0;break a}}else if(Ac(a.w,b,a.f,pd)){for(c=0;c>>f.oa;0>>=f.oa;0>>a.oa;0>1],c);if(Jb(a.w,a,b)){b=a.F=!0;break a}}else if(Ac(a.w,b,a.f,pd)){for(c=0;c>>f.na;0>>=f.na;0>>a.na;0=b.length){G(a,"invalid block at offset "+q(m),4096);break}for(var h=h+2,n=b[h++]&255|(b[h++]&255)<<8,r=b[h++]&255|(b[h++]&255)<<8,l=l+((n&255)+(n>>8)+(r&255)+(r>>8)),v=h,u=n-=6;0=b.length){G(a,"insufficient data for block at offset "+q(m),4096);break}l+= -b[h++]&255;if(l&255){G(a,"invalid checksum ("+p(l,2,!0)+") for block at offset "+q(m),4096);break}if(u)for(G(a,"loading "+q(u)+" bytes at "+q(r)+"-"+q(r+u-1),4096);u--;)Hc(a.w,r++,b[v++]&255);else r&1?a.b.da():null==d&&(d=r),null!=d&&G(a,"starting address: "+q(d),4096);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=la.tc&&c<=la.dd&&(b=c-(la.tc-la.Rc));b&&(a.preventDefault&&a.preventDefault(),d.dc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.Tc&&(b=la.Sc);d.dc(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.dc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; -k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;var e=this;this.fa=Qc(48,4,262144);this.Y=Nc(this.b,function(){var a;a=-1;e.G.length&&(a=e.G.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.ea&&97<=a&&122>a&&(a-=32),Pc(e.b,e.Y,1E3/Math.round(e.R/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Oc(c,e.fa))});this.M=Qc(52,4,262144);this.ta=Nc(this.b,function(){e.g|=128;e.g&64&&Oc(c,e.M)});Jb(b,this,Zg);Lb(b,this.reset.bind(this));J(this)}; -k.Ic=function(){if(!this.J){var a=Cd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.gb)return;b=ya(b[1]);if(this.J=ob(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.hb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ja=function(a,b){if(!b)if(this.Ic(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Ia=function(a){return a?this.save():!0};k.reset=function(){$g(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return $g(this)};function $g(a){a.K=0;a.f=0;a.g=128;a.G=[];return!0}k.dc=function(a){if("number"==typeof a)this.G.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.F%a,this.T&&(b=ta("",c)));this.S&&!this.F&&c&&(b=String.fromCharCode(this.S)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.F+=c}}else if(null!=this.B){if(10==a||1024<= -this.B.length)this.i(this.B),this.B="";10!=a&&(this.B+=String.fromCharCode(a))}Pc(this.b,this.ta,1E3/Math.round(this.sa/10));this.g&=-129};var ah={},Zg=(ah[65392]=[null,null,Xg.prototype.$d,Xg.prototype.Xe,"RCSR"],ah[65394]=[null,null,Xg.prototype.Zd,Xg.prototype.We,"RBUF"],ah[65396]=[null,null,Xg.prototype.Ae,Xg.prototype.zf,"XCSR"],ah[65398]=[null,null,Xg.prototype.ze,Xg.prototype.yf,"XBUF"],ah); -bb(function(){for(var a=F(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick= -function(){var a=d.D.listTapes;a&&xh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.R){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;xh(d,t(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1}; -k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;this.Y=yh(a);var e=this;if((this.g=Cd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.S=Qc(56,4,4096);this.fa=Nc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.K=la.sc&&c<=la.cd&&(b=c-(la.sc-la.Qc));b&&(a.preventDefault&&a.preventDefault(),d.cc(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==la.Sc&&(b=la.Rc);d.cc(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.cc(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; +k.Fa=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;var e=this;this.ea=Qc(48,4,262144);this.Y=Nc(this.b,function(){var a;a=-1;e.G.length&&(a=e.G.shift()&255,G(e,"receiveByte("+p(a,2,!0)+")"),e.da&&97<=a&&122>a&&(a-=32),Pc(e.b,e.Y,1E3/Math.round(e.P/10)));0<=a&&(e.K=a,e.f&128?e.K|=49152:e.f|=128,e.f&64&&Oc(c,e.ea))});this.M=Qc(52,4,262144);this.sa=Nc(this.b,function(){e.g|=128;e.g&64&&Oc(c,e.M)});Jb(b,this,Zg);Lb(b,this.reset.bind(this));J(this)}; +k.Hc=function(){if(!this.I){var a=Cd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.fb)return;b=ya(b[1]);if(this.I=ob(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.gb+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ia=function(a,b){if(!b)if(this.Hc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ha=function(a){return a?this.save():!0};k.reset=function(){$g(this)};k.save=function(){var a=new S(this);a.set(0,[]);return a.data()};k.restore=function(){return $g(this)};function $g(a){a.K=0;a.f=0;a.g=128;a.G=[];return!0}k.cc=function(a){if("number"==typeof a)this.G.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.T||8,c=a-this.F%a,this.T&&(b=ta("",c)));this.S&&!this.F&&c&&(b=String.fromCharCode(this.S)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.F+=c}}else if(null!=this.B){if(10==a||1024<= +this.B.length)this.i(this.B),this.B="";10!=a&&(this.B+=String.fromCharCode(a))}Pc(this.b,this.sa,1E3/Math.round(this.ra/10));this.g&=-129};var ah={},Zg=(ah[65392]=[null,null,Xg.prototype.Zd,Xg.prototype.We,"RCSR"],ah[65394]=[null,null,Xg.prototype.Yd,Xg.prototype.Ve,"RBUF"],ah[65396]=[null,null,Xg.prototype.ze,Xg.prototype.yf,"XCSR"],ah[65398]=[null,null,Xg.prototype.ye,Xg.prototype.xf,"XBUF"],ah); +bb(function(){for(var a=F(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.D[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.D[b]=c,c.onclick= +function(){var a=d.D.listTapes;a&&xh(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.D[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;xh(d,t(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.D[b]=c,!0}return!1}; +k.Fa=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;this.Y=yh(a);var e=this;if((this.g=Cd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.S=Qc(56,4,4096);this.ea=Nc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.C.ma;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.hb,e,f),(e=Ea(e,f))&&Hh(a,b,c,d,e.ha,e.Ta, -e.Sa));a.C.jb=!1;a.F&&(a.F--,a.F||J(a));Eh(a)})}function Bh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.C.la;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(mb(a.gb,e,f),(e=Ea(e,f))&&Hh(a,b,c,d,e.ga,e.Sa, +e.Ra));a.C.ib=!1;a.F&&(a.F--,a.F||J(a));Eh(a)})}function Bh(a,b,c,d){if((a=a.D.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ga);for(d=0;dc.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.$b?"":e)+"&format=json"));return!!Da(f, +function Hh(a,b,c,d,e,f,g){a.M=b;a.B=c;a.v=d;a.ga=e;a.Sa=f;a.Ra=g;2==d?a.Y&&Vg(a.Y,e,f,g)?a.status("tape loaded: "+b):(a.M="",a.B="",a.G=vh,a.v=wh,a.N("No load address available for tape: "+b)):(a.K=0,a.I=e,a.status("tape attached: "+b),zh(a,0))}function Fh(a,b){if(a.B||!1===b)a.M="",a.B="",b||(a.v&&a.status(1==a.v?"tape detached":"tape unloaded"),a.G=vh,a.v=wh,Eh(a))}k.save=function(){return(new S(this)).data()};k.restore=function(){return!0};k.Sd=function(){return this.f&65534}; +k.Pe=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Oc(this.b,this.S)):(this.f&=-129,this.f|=2048,this.L=0,Pc(this.b,this.ea,1E3/Math.round(this.da/10))));this.f=this.f&-66|a&65};k.Rd=function(){this.f&=-129;this.f|=2048;return this.L};k.Oe=function(){};var Ih={},Ah=(Ih[65384]=[null,null,jd.prototype.Sd,jd.prototype.Pe,"PRS"],Ih[65386]=[null,null,jd.prototype.Rd,jd.prototype.Oe,"PRB"],Ih); +function Jh(a,b,c){x.call(this,"Disk",{id:a.gb+".disk"+p(++Kh,4)},Jh,8192);this.controller=a;this.A=a.A;this.j=a.j;this.v=b;this.Ta=b.name;this.Zb=b.Zb;Lh(this,c,b.fa,b.ka,b.ha,b.xa);J(this)}var Kh=0;B(Jh);k=Jh.prototype;k.Fa=function(a,b,c,d){this.j=d}; +function Lh(a,b,c,d,e,f){a.mode=b;a.fa=c;a.ka=d;a.ha=e;a.xa=f;a.b=[];if("preload"!=a.mode){b=Array(a.fa);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.fa);for(d=0;dc.indexOf("/api/v1/dump")&&(b=oa(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):pa(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.Zb?"":e)+"&format=json"));return!!Da(f, null,!0,function(b,c,d){Oh(a,b,c,d)})} -function Oh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.C.ma;if(d)a.controller.N('Unable to load disk "'+a.Ua+'" (error '+d+": "+b+")",f);else{mb(a.controller.hb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)w(h[0]);else{a.ga=h.length;a.la=h[0].length;a.ia=h[0][0].length;var l=h[0][0][0];a.ya=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var v=l.bytes;if(void 0!==v&&v.length){for(var u=m<<2,A=v.length;A>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ma?f=a.Wa+a.Ma&&(a.Ma+=f-(a.Wa+a.Ma)+1):(a.Wa=f,a.Ma=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.A&&!a.A.C.la;if(d)a.controller.N('Unable to load disk "'+a.Ta+'" (error '+d+": "+b+")",f);else{mb(a.controller.gb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)w(h[0]);else{a.fa=h.length;a.ka=h[0].length;a.ha=h[0][0].length;var l=h[0][0][0];a.xa=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var v=l.bytes;if(void 0!==v&&v.length){for(var u=m<<2,A=v.length;A>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.La?f=a.Va+a.La&&(a.La+=f-(a.Va+a.La)+1):(a.Va=f,a.La=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ua+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ta+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=Qh(this,a++);)Th(b);a=JSON.stringify(this.b,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Th(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.J=a.autoMount||{};this.B=0;this.f=Array(8);this.K=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype; -k.wa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Uh(d,a)},!0;case "loadDrive":return this.D[b]= -c,c.onclick=function(){var a=d.D.listDisks;a&&Vh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.K){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.f&&((a=d.f[ma(a.value,10)||0])?(a=a.Ca)?(a=Na(Sh(a),a.oc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.K)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= +function Th(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function Q(a){x.call(this,"RK11",a,Q,65536);this.K=a.autoMount||{};this.F=0;this.g=Array(8);this.L=!Ma("Mobi")&&window&&"FileReader"in window}B(Q);k=Q.prototype; +k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RK11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&Uh(d,a)},!0;case "loadDrive":return this.D[b]= +c,c.onclick=function(){var a=d.D.listDisks;a&&Vh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Ba)?(a=Na(Sh(a),a.nc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.L)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= !a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Vh(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;if((a=Cd(this.A,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.J[e]=a[e]);Wh(this);this.Db=Qc(144,5,65536);Jb(b,this,Xh);Lb(b,this.reset.bind(this));Yh(this,"None","",!0);this.K&&Yh(this,"Local Disk","?");Yh(this,"Remote Disk","??");Zh(this)||J(this)}; -k.Ja=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.mc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Uh(this,0)}}return!0};k.Ia=function(a){return a?this.save():!0};k.reset=function(){Wh(this)};k.save=function(){return(new S(this)).data()}; -k.restore=function(a){return Wh(this,a[0])};function Zh(a,b){b||(a.B=0);for(var c in a.J){var d=a.J[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}ai(a,e,b,c,!1,d)}else $h(a,e)} -function ai(a,b,c,d,e,f){var g=-1,h=a.f[b];h.Ka.toLowerCase()!=d.toLowerCase()&&(g++,$h(a,b,!0),h.wb?a.N("RK11 busy"):(h.wb=!0,e&&(h.vb=!0,a.B++,I(a)&&G(a,"auto-loading disk: "+c)),h.cb=!!f,Nh(new Jh(a,h,"preload"),c,d,f,a.Wc)&&g++));return g} -k.Wc=function(a,b,c,d,e){a.wb=!1;b&&(b.ga>a.ga||b.la>a.la)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.xb)),b=null);b?(a.Ca=b,a.Ua=c,a.Ka=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.xb),a.vb||e),this.A&&this.A.ob()):a.cb=!1;a.vb&&(a.vb=!1,--this.B||J(this));Uh(this,a.xb)}; +k.Fa=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;if((a=Cd(this.A,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.K[e]=a[e]);Wh(this);this.Cb=Qc(144,5,65536);Jb(b,this,Xh);Lb(b,this.reset.bind(this));Yh(this,"None","",!0);this.L&&Yh(this,"Local Disk","?");Yh(this,"Remote Disk","??");Zh(this)||J(this)}; +k.Ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.lc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Uh(this,0)}}return!0};k.Ha=function(a){return a?this.save():!0};k.reset=function(){Wh(this)};k.save=function(){return(new S(this)).data()}; +k.restore=function(a){return Wh(this,a[0])};function Zh(a,b){b||(a.F=0);for(var c in a.K){var d=a.K[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}ai(a,e,b,c,!1,d)}else $h(a,e)} +function ai(a,b,c,d,e,f){var g=-1,h=a.g[b];h.Ja.toLowerCase()!=d.toLowerCase()&&(g++,$h(a,b,!0),h.vb?a.N("RK11 busy"):(h.vb=!0,e&&(h.ub=!0,a.F++,I(a)&&G(a,"auto-loading disk: "+c)),h.bb=!!f,Nh(new Jh(a,h,"preload"),c,d,f,a.Vc)&&g++));return g} +k.Vc=function(a,b,c,d,e){a.vb=!1;b&&(b.fa>a.fa||b.ka>a.ka)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.wb)),b=null);b?(a.Ba=b,a.Ta=c,a.Ja=d,this.N('Mounted disk "'+c+'" in drive '+("RK"+a.wb),a.ub||e),this.A&&this.A.nb()):a.bb=!1;a.ub&&(a.ub=!1,--this.F||J(this));Uh(this,a.wb)}; function Yh(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.G=65536-e&65535;a&&(this.v=this.v|a|32768,this.Z|=49152);return!0};k.Xc=function(a,b,c,d,e,f,g){var h=0;a=a.Ca;var l=null,m;a||(h=128,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){h=4096;break}m=0}var n,r;if(0>(n=a.read(l,m++))||0>(r=a.read(l,m++))){h=32;break}Yb(this.w,f,n|r<<8);if(Mc(this.w)){h=1024;break}f+=2;if(m>=a.ya&&(l=null,++d>=a.ia&&(d=0,++c>=a.la&&(c=0,++b>=a.ga)))){h=64;break}}return g(h,b,c,d,e,f)}; -k.Yc=function(a,b,c,d,e,f,g){var h=0;a=a.Ca;var l=null,m;a||(h=128,e=0);for(;e--;){var n=mc(this.w,f);if(Mc(this.w)){h=1024;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){h=4096;break}m=0}if(!a.write(l,m++,n&255)||!a.write(l,m++,n>>8)){h=32;break}if(m>=a.ya&&(l=null,++d>=a.ia&&(d=0,++c>=a.la&&(c=0,++b>=a.ga)))){h=64;break}}return g(h,b,c,d,e,f)};k.ee=function(){return this.L};k.bf=function(){};k.fe=function(){return this.v};k.cf=function(){};k.be=function(){return this.Z&61438}; -k.Ze=function(a){this.Z=this.Z&-3968|a&3967;if(this.Z&1){var b,c=!0;a=(this.g&57344)>>13;var d=this.f[a],e,f,g,h;this.Z&=-129;switch(this.Z&14){case 0:this.L=d.status;this.v=0;this.Z=128;this.g=0;break;case 4:b=this.Xc;case 2:b||(b=this.Yc),e=(this.g&8160)>>5,f=(this.g&16)>>4,g=this.g&15,e>=d.ga?(this.v|=32832,this.Z|=49152):g>=d.ia?(this.v|=32800,this.Z|=49152):(h=(this.Z&48)<<12|this.F,c=65536-this.G&65535,c=b.call(this,d,e,f,g,c,h,this.Vc.bind(this)))}this.L=d.status|a<<13|this.g%9&15;c&&(this.Z&= --2,this.Z|=128,this.Z&64&&Oc(this.b,this.Db))}};k.ge=function(){return this.G};k.df=function(a){this.G=a};k.ae=function(){return this.F};k.Ye=function(a){this.F=a};k.ce=function(){return this.g};k.$e=function(a){this.g=a};k.de=function(){return this.M};k.af=function(a){this.M=a}; -var bi={},Xh=(bi[65280]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKDS"],bi[65282]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKER"],bi[65284]=[null,null,Q.prototype.be,Q.prototype.Ze,"RKCS"],bi[65286]=[null,null,Q.prototype.ge,Q.prototype.df,"RKWC"],bi[65288]=[null,null,Q.prototype.ae,Q.prototype.Ye,"RKBA"],bi[65290]=[null,null,Q.prototype.ce,Q.prototype.$e,"RKDA"],bi[65294]=[null,null,Q.prototype.de,Q.prototype.af,"RKDB"],bi); -function P(a){x.call(this,"RL11",a,P,131072);this.L=a.autoMount||{};this.J=0;this.g=Array(4);this.M=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype; -k.wa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ci(d,a)},!0;case "loadDrive":return this.D[b]= -c,c.onclick=function(){var a=d.D.listDisks;a&&di(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.M){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Ca)?(a=Na(Sh(a),a.oc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.M)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= +function Uh(a,b){if(0<=b&&b>12&48;this.I=65536-e&65535;a&&(this.B=this.B|a|32768,this.f|=49152);return!0};k.Wc=function(a,b,c,d,e,f,g){var h=0;a=a.Ba;var l=null,m;a||(h=128,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){h=4096;break}m=0}var n,r;if(0>(n=a.read(l,m++))||0>(r=a.read(l,m++))){h=32;break}Yb(this.w,f,n|r<<8);if(Mc(this.w)){h=1024;break}f+=2;if(m>=a.xa&&(l=null,++d>=a.ha&&(d=0,++c>=a.ka&&(c=0,++b>=a.fa)))){h=64;break}}return g(h,b,c,d,e,f)}; +k.Xc=function(a,b,c,d,e,f,g){var h=0;a=a.Ba;var l=null,m;a||(h=128,e=0);for(;e--;){var n=mc(this.w,f);if(Mc(this.w)){h=1024;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){h=4096;break}m=0}if(!a.write(l,m++,n&255)||!a.write(l,m++,n>>8)){h=32;break}if(m>=a.xa&&(l=null,++d>=a.ha&&(d=0,++c>=a.ka&&(c=0,++b>=a.fa)))){h=64;break}}return g(h,b,c,d,e,f)};k.de=function(){return this.M};k.af=function(){};k.ee=function(){return this.B};k.bf=function(){};k.ae=function(){return this.f&61438}; +k.Ye=function(a){this.f=this.f&-3968|a&3967;if(this.f&1){var b,c=!0;a=(this.v&57344)>>13;var d=this.g[a],e,f,g,h;this.f&=-129;switch(this.f&14){case 0:this.M=d.status;this.B=0;this.f=128;this.v=0;break;case 4:b=this.Wc;case 2:b||(b=this.Xc),e=(this.v&8160)>>5,f=(this.v&16)>>4,g=this.v&15,e>=d.fa?(this.B|=32832,this.f|=49152):g>=d.ha?(this.B|=32800,this.f|=49152):(h=(this.f&48)<<12|this.G,c=65536-this.I&65535,c=b.call(this,d,e,f,g,c,h,this.Uc.bind(this)))}this.M=d.status|a<<13|this.v%9&15;c&&(this.f&= +-2,this.f|=128,this.f&64&&Oc(this.b,this.Cb))}};k.fe=function(){return this.I};k.cf=function(a){this.I=a};k.$d=function(){return this.G};k.Xe=function(a){this.G=a};k.be=function(){return this.v};k.Ze=function(a){this.v=a};k.ce=function(){return this.P};k.$e=function(a){this.P=a}; +var bi={},Xh=(bi[65280]=[null,null,Q.prototype.de,Q.prototype.af,"RKDS"],bi[65282]=[null,null,Q.prototype.ee,Q.prototype.bf,"RKER"],bi[65284]=[null,null,Q.prototype.ae,Q.prototype.Ye,"RKCS"],bi[65286]=[null,null,Q.prototype.fe,Q.prototype.cf,"RKWC"],bi[65288]=[null,null,Q.prototype.$d,Q.prototype.Xe,"RKBA"],bi[65290]=[null,null,Q.prototype.be,Q.prototype.Ze,"RKDA"],bi[65294]=[null,null,Q.prototype.ce,Q.prototype.$e,"RKDB"],bi); +function P(a){x.call(this,"RL11",a,P,131072);this.L=a.autoMount||{};this.I=0;this.g=Array(4);this.M=!Ma("Mobi")&&window&&"FileReader"in window}B(P);k=P.prototype; +k.va=function(a,b,c){var d=this;switch(b){case "listDisks":return this.D[b]=c,c.onchange=function(){var a=d.D.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.D[b]=c,c.onchange=function(){var a=ma(c.value,10);null!=a&&ci(d,a)},!0;case "loadDrive":return this.D[b]= +c,c.onclick=function(){var a=d.D.listDisks;a&&di(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.M){c.parentNode.removeChild(c);break}this.D[b]=c;c.onclick=function(){var a=d.D.listDrives;a&&a.options&&d.g&&((a=d.g[ma(a.value,10)||0])?(a=a.Ba)?(a=Na(Sh(a),a.nc.replace(".json",".img")),w(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDrive":if(this.M)return this.D[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= !a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;di(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -k.Ga=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.j=d;if((a=Cd(this.A,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.L[e]=a[e]);ei(this);this.Db=Qc(112,5,131072);Jb(b,this,fi);Lb(b,this.reset.bind(this));gi(this,"None","",!0);this.M&&gi(this,"Local Disk","?");gi(this,"Remote Disk","??");hi(this)||J(this)}; -k.Ja=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.mc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ci(this,0)}}return!0};k.Ia=function(a){return a?this.save():!0};k.reset=function(){ei(this)};k.save=function(){return(new S(this)).data()}; -k.restore=function(a){return ei(this,a[0])};function hi(a,b){b||(a.J=0);for(var c in a.L){var d=a.L[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9b;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";ci(this,0)}}return!0};k.Ha=function(a){return a?this.save():!0};k.reset=function(){ei(this)};k.save=function(){return(new S(this)).data()}; +k.restore=function(a){return ei(this,a[0])};function hi(a,b){b||(a.I=0);for(var c in a.L){var d=a.L[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.D.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.N("Unable to load the selected drive");else if(c)if("?"==c)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}ji(a,e,b,c,!1,d)}else ii(a,e)} -function ji(a,b,c,d,e,f){var g=-1,h=a.g[b];h.Ka.toLowerCase()!=d.toLowerCase()&&(g++,ii(a,b,!0),h.wb?a.N("RL11 busy"):(h.wb=!0,e&&(h.vb=!0,a.J++,I(a)&&G(a,"auto-loading disk: "+c)),h.cb=!!f,Nh(new Jh(a,h,"preload"),c,d,f,a.$c)&&g++));return g} -k.$c=function(a,b,c,d,e){a.wb=!1;b&&(b.ga>a.ga||b.la>a.la)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.xb)),b=null);b?(a.Ca=b,a.Ua=c,a.Ka=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.vb||e),this.A&&this.A.ob()):a.cb=!1;a.vb&&(a.vb=!1,--this.J||J(this));ci(this,a.xb)}; +function ji(a,b,c,d,e,f){var g=-1,h=a.g[b];h.Ja.toLowerCase()!=d.toLowerCase()&&(g++,ii(a,b,!0),h.vb?a.N("RL11 busy"):(h.vb=!0,e&&(h.ub=!0,a.I++,I(a)&&G(a,"auto-loading disk: "+c)),h.bb=!!f,Nh(new Jh(a,h,"preload"),c,d,f,a.Zc)&&g++));return g} +k.Zc=function(a,b,c,d,e){a.vb=!1;b&&(b.fa>a.fa||b.ka>a.ka)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.wb)),b=null);b?(a.Ba=b,a.Ta=c,a.Ja=d,this.N('Mounted disk "'+c+'" in drive '+("RL"+a.wb),a.ub||e),this.A&&this.A.nb()):a.bb=!1;a.ub&&(a.ub=!1,--this.I||J(this));ci(this,a.wb)}; function gi(a,b,c,d){if((a=a.D.listDisks)&&a.options){for(var e=0;e>12&48;this.F=f>>16&63;this.B=this.v=b<<7|(c?64:0)|d&63;this.G=65536-e&65535;a&&(this.f=this.f|a|32768);return!0}; -k.ad=function(a,b,c,d,e,f,g){var h=0;a=a.Ca;var l=null,m;a||(h=5120,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){h=5120;break}m=0}var n,r;if(0>(n=a.read(l,m++))||0>(r=a.read(l,m++))){h=5120;break}Yb(this.w,this.b.Oa(f),n|r<<8);if(Mc(this.w)){h=8192;break}f+=2;if(m>=a.ya&&(l=null,++d>=a.ia&&(d=0,++c>=a.la&&(c=0,++b>=a.ga)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.bd=function(a,b,c,d,e,f,g){var h=0;a=a.Ca;var l=null,m;a||(h=5120,e=0);for(;e--;){var n=mc(this.w,this.b.Oa(f));if(Mc(this.w)){h=8192;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){h=5120;break}m=0}if(!a.write(l,m++,n&255)||!a.write(l,m++,n>>8)){h=5120;break}if(m>=a.ya&&(l=null,++d>=a.ia&&(d=0,++c>=a.la&&(c=0,++b>=a.ga)))){h=5120;break}}return g(h,b,c,d,e,f)};k.je=function(){return this.f&65535}; -k.gf=function(a){this.f=this.f&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.f&128)){var b;a=!0;var c=this.g[(this.f&768)>>8],d=c.Ca,e,f,g;this.f&=-2;switch(this.f&14){case 4:this.G&8&&(this.f&=63);this.G=c.status|this.B&64|(d&&512==d.ga?128:0);break;case 6:1==(this.v&3)&&(b=this.v&65408,c=(this.v&16)<<2,this.B=this.v&4?this.B+b:this.B-b,this.v=this.B=this.B&65408|c);break;case 8:this.G=this.B;break;case 12:b=this.ad;case 10:b||(b=this.bd),e=this.v>>7,f=this.v&64?1:0,g=this.v&63,!d||e>=d.ga|| -g>=d.ia?this.f|=37888:(d=(this.F&63)<<16|this.K,a=65536-this.G&65535,a=b.call(this,c,e,f,g,a,d,this.Zc.bind(this)))}a&&(this.f|=129,this.f&64&&Oc(this.b,this.Db))}};k.he=function(){return this.K};k.ef=function(a){this.K=a&65534};k.ke=function(){return this.v};k.hf=function(a){this.v=a};k.le=function(){return this.G};k.jf=function(a){this.G=a};k.ie=function(){return this.F};k.ff=function(a){this.F=a&63;this.f=this.f&-49|(this.F&3)<<4}; -var ki={},fi=(ki[63744]=[null,null,P.prototype.je,P.prototype.gf,"RLCS"],ki[63746]=[null,null,P.prototype.he,P.prototype.ef,"RLBA"],ki[63748]=[null,null,P.prototype.ke,P.prototype.hf,"RLDA"],ki[63750]=[null,null,P.prototype.le,P.prototype.jf,"RLMP"],ki[63752]=[null,null,P.prototype.ie,P.prototype.ff,"RLBE"],ki);function li(a){x.call(this,"Debugger",a,li);this.sa=a.base||16;this.La=!1;this.K=0;this.T=!1;this.B=-1;this.g=[];this.ea={}}B(li); -var mi={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};li.prototype.Gc=function(){return-1};li.prototype.Hc=function(){}; +function ci(a,b){if(0<=b&&b>12&48;this.F=f>>16&63;this.B=this.v=b<<7|(c?64:0)|d&63;this.G=65536-e&65535;a&&(this.f=this.f|a|32768);return!0}; +k.$c=function(a,b,c,d,e,f,g){var h=0;a=a.Ba;var l=null,m;a||(h=5120,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){h=5120;break}m=0}var n,r;if(0>(n=a.read(l,m++))||0>(r=a.read(l,m++))){h=5120;break}Yb(this.w,this.b.Na(f),n|r<<8);if(Mc(this.w)){h=8192;break}f+=2;if(m>=a.xa&&(l=null,++d>=a.ha&&(d=0,++c>=a.ka&&(c=0,++b>=a.fa)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.ad=function(a,b,c,d,e,f,g){var h=0;a=a.Ba;var l=null,m;a||(h=5120,e=0);for(;e--;){var n=mc(this.w,this.b.Na(f));if(Mc(this.w)){h=8192;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){h=5120;break}m=0}if(!a.write(l,m++,n&255)||!a.write(l,m++,n>>8)){h=5120;break}if(m>=a.xa&&(l=null,++d>=a.ha&&(d=0,++c>=a.ka&&(c=0,++b>=a.fa)))){h=5120;break}}return g(h,b,c,d,e,f)};k.ie=function(){return this.f&65535}; +k.ff=function(a){this.f=this.f&-1023|a&1022;this.F=this.F&60|(a&48)>>4;if(!(this.f&128)){var b;a=!0;var c=this.g[(this.f&768)>>8],d=c.Ba,e,f,g;this.f&=-2;switch(this.f&14){case 4:this.G&8&&(this.f&=63);this.G=c.status|this.B&64|(d&&512==d.fa?128:0);break;case 6:1==(this.v&3)&&(b=this.v&65408,c=(this.v&16)<<2,this.B=this.v&4?this.B+b:this.B-b,this.v=this.B=this.B&65408|c);break;case 8:this.G=this.B;break;case 12:b=this.$c;case 10:b||(b=this.ad),e=this.v>>7,f=this.v&64?1:0,g=this.v&63,!d||e>=d.fa|| +g>=d.ha?this.f|=37888:(d=(this.F&63)<<16|this.K,a=65536-this.G&65535,a=b.call(this,c,e,f,g,a,d,this.Yc.bind(this)))}a&&(this.f|=129,this.f&64&&Oc(this.b,this.Cb))}};k.ge=function(){return this.K};k.df=function(a){this.K=a&65534};k.je=function(){return this.v};k.gf=function(a){this.v=a};k.ke=function(){return this.G};k.hf=function(a){this.G=a};k.he=function(){return this.F};k.ef=function(a){this.F=a&63;this.f=this.f&-49|(this.F&3)<<4}; +var ki={},fi=(ki[63744]=[null,null,P.prototype.ie,P.prototype.ff,"RLCS"],ki[63746]=[null,null,P.prototype.ge,P.prototype.df,"RLBA"],ki[63748]=[null,null,P.prototype.je,P.prototype.gf,"RLDA"],ki[63750]=[null,null,P.prototype.ke,P.prototype.hf,"RLMP"],ki[63752]=[null,null,P.prototype.he,P.prototype.ef,"RLBE"],ki);function li(a){x.call(this,"Debugger",a,li);this.ra=a.base||16;this.Ka=!1;this.K=0;this.T=!1;this.B=-1;this.g=[];this.da={}}B(li); +var mi={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};li.prototype.Fc=function(){return-1};li.prototype.Gc=function(){}; function ni(a,b,c,d){if(c)if(b){0>a.B&&a.g.length&&(a.B=0);if(0>a.B||b!=a.g[a.B])a.g.splice(0,0,b),a.B=0;a.B--}else a.T?b="end":b=a.g[a.B+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function oi(a,b,c){for(c=c||-1;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop(),f=a.pop();switch(d){case "*":d=f*e;break;case "/":if(!e)return!1;d=f/e;break;case "%":if(!e)return!1;d=f%e;break;case "+":d=f+e;break;case "-":d=f-e;break;case "<<":d=f<>":d=f>>e;break;case ">>>":d=f>>>e;break;case "<":d=f":d=f>e?1:0;break;case ">=":d=f>=e?1:0;break;case "==":d=f==e?1:0;break;case "!=":d=f!=e?1:0;break;case "&":d=f&e;break; case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d=f||e?1:0;break;default:return!1}a.push(d|0)}return!0} function pi(a,b,c){var d;if(b){b=qi(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ti(a,b){if(b)return si(a,b,a.ea[b]);var c=0;for(b in a.ea)si(a,b,a.ea[b]),c++;return 0>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+na(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.i((null!=b?b+": ":"")+d);return e}function ti(a,b){if(b)return si(a,b,a.da[b]);var c=0;for(b in a.da)si(a,b,a.da[b]),c++;return 0this.b.kb?Di:[];Sc(this,16,function(a){a:{var b=d.w.ca,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Ei(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.w.oa;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Fc[c],n&&d.i(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} -k.Hc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.fb[a-8];else if(20>a)b=this.b.Pa[a-16];else{var c=this.b,d=this.v;switch(a){case 20:b=hd(this.b);break;case 21:b=c.Kb;break;case 22:b=c.qa;break;case 23:b=c.nb;break;case 24:b=bd(c);break;case 25:b=dd(c);break;case 26:b=ed(c);break;case 27:b=c.Xa;break;case 28:d&&(b=d.Aa);break;case 29:d&&(b=d.zb);break;case 30:d&&rc(d)&&(b=d.eb)}}return b}; -k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.va&65535).H));if(!this.ta||a!=this.ta)if(this.ta=a,this.na&1073741824)this.Y.push(a);else{var c;if(this.na&-2147483648&&this.b&&(c=this.b.C.W)||xb(this,!0))this.da(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Kd(a),a.Ba=0,a.xa())}}; -function wi(a){var b;if(!Le(a))a.G&&a.G.length&&a.i("instruction history buffer freed"),a.fa=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.R?Li(a):Mi(a)}}function Ki(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.ma?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ja=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Ia=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wi(this);this.Fa=0;this.ta=null;this.K=0;this.L=Y(this.b.u[7]);this.C.W=!1;Ni(this);a||Fd(this)};k.save=function(){var a=new S(this);a.set(0,Gi(this.L));a.set(1,Gi(this.S));a.set(2,[this.g,this.T,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Hi(a[b++]),this.S=Hi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.T=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.R||this.i("running");this.C.W=!0;this.Qb=a;this.Rb=b}; -k.stop=function(a,b){if(this.C.W){this.C.W=!1;this.K=b-this.Rb;if(!this.R){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=nc(a.b,b)),65535!=(d&65535)&&(a.pc(a.G[a.fa],b),++a.fa==a.G.length&&(a.fa=0)));return!1}function Sf(a){var b=a.b;if(b.C.W)throw T(b,a.b.va&65535),a.da(),-1;return!1} -function vi(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.oa],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.oa],!0);a.F=["bw"];a.$a=0}k.ub=function(a,b,c){var d=!0;c||Oi(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.i("invalid address: "+L(this,b.H)),d=!1;else{var f=this.w;f.ca[e>>>f.oa].ub(e&f.w,a==this.F)}}d&&(a.push(b),c?b.Va=!0:(Pi(this,a,a.length-1,"set"),wi(this)));return d}; -function Oi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.oa],b==a.F));h.Va||wi(a);break}}return f}function Qi(a,b){for(var c=1;c>23)&65535,y=L(u,v);else if(8192==C)v=v.H-((f&63)<<1)&65535,y=L(u,v);else if(12288==C)y=L(u,f&7,1);else if(24576==C)y=L(u,f&63,1);else if(32768==C)y=L(u,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6), -A&63)switch(A=C&7,C&56){case 0:y=Ji(A);break;case 8:y="@"+Ji(A);break;case 16:7>A?y="("+Ji(A)+")+":(C=u.ua(v,2),y="#"+L(u,C,0,!0));break;case 24:7>A?y="@("+Ji(A)+")+":(C=u.ua(v,2),y="@#"+L(u,C,0,!0));break;case 32:y="-("+Ji(A)+")";break;case 40:y="@-("+Ji(A)+")";break;case 48:C=u.ua(v,2);y=L(u,C,0,!0)+"("+Ji(A)+")";7==A&&(y=L(u,C+v.H&65535));break;case 56:C=u.ua(v,2),y="@"+L(u,C)+"("+Ji(A)+")",7==A&&(y="@"+L(u,C+v.H&65535))}u=y;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(m=u[1],u=u[0]); -0b)c=Ji(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.fb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Pa[b-16]);else switch(b){case 20:c="PS="+L(a,hd(d));break;case 21:c="IR="+L(a,d.Kb);break;case 22:c="ER="+L(a,d.qa);break;case 23:c="SL="+L(a,d.nb);break;case 24:c="MMR0="+L(a,bd(d));break;case 25:c="MMR1="+L(a,dd(d));break;case 26:c="MMR2="+L(a,ed(d));break;case 27:c="MMR3="+L(a,d.Xa);break;case 28:a.v&&(c="AR="+L(a,a.v.Aa,3));break;case 29:a.v&& -(c="DR="+L(a,a.v.zb));break;case 30:a.v&&rc(a.v)&&(c="SR="+L(a,a.v.eb,3))}c&&(c+=" ");return c}function Ui(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ti(a,"T")+Ti(a,"N")+Ti(a,"Z")+Ti(a,"V")+Ti(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Dc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Dc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Gg:b,H:c,ud:d,ja:e,Bc:f})}function Vi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.ud;if(e>=g&&ethis.b.jb?Di:[];Sc(this,16,function(a){a:{var b=d.w.ba,c=a[0],e=a=0,l=b.length;if(c){a=d.aa(Ei(d,c));if(-1===a){d.i("invalid address: "+c);break a}e=a>>>d.w.na;l=1}d.i("blockid physical blockaddr used size type");d.i("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.i("..."):(c=n.type,m=Fc[c],n&&d.i(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} +k.Gc=function(a){var b;if(0<=a)if(8>a)b=this.b.u[a];else if(16>a)b=this.b.eb[a-8];else if(20>a)b=this.b.Oa[a-16];else{var c=this.b,d=this.v;switch(a){case 20:b=hd(this.b);break;case 21:b=c.Jb;break;case 22:b=c.pa;break;case 23:b=c.mb;break;case 24:b=bd(c);break;case 25:b=dd(c);break;case 26:b=ed(c);break;case 27:b=c.Wa;break;case 28:d&&(b=d.za);break;case 29:d&&(b=d.yb);break;case 30:d&&rc(d)&&(b=d.cb)}}return b}; +k.message=function(a,b){b&&(a+=" @"+L(this,Y(this.b.ua&65535).H));if(!this.sa||a!=this.sa)if(this.sa=a,this.ma&1073741824)this.Y.push(a);else{var c;if(this.ma&-2147483648&&this.b&&(c=this.b.C.W)||xb(this,!0))this.ca(),c&&(a+=" (cpu halted)");this.i(a);this.b&&(a=this.b,Kd(a),a.Aa=0,a.wa())}}; +function wi(a){var b;if(!Le(a))a.G&&a.G.length&&a.i("instruction history buffer freed"),a.ea=0,a.G=[];else if(!a.G||!a.G.length){a.G=Array(1E3);for(b=0;b>8;a.i("trapped to "+L(a,c&255,1)+" ("+(0>d?Cb[-d]:L(a,d))+")")}a.L=Y(a.b.u[7]);b&&1!=a.P?Li(a):Mi(a)}}function Ki(a,b){var c;(c=!a.b||!yb(a.b))||(c=a.b,c.C.la?c=!0:(c.i(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.C.W?(b||a.i("cpu busy or unavailable, command ignored"),!1):!zb(a.b)}k.Ia=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ha=function(a,b){b&&this.i(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){wi(this);this.Ea=0;this.sa=null;this.K=0;this.L=Y(this.b.u[7]);this.C.W=!1;Ni(this);a||Fd(this)};k.save=function(){var a=new S(this);a.set(0,Gi(this.L));a.set(1,Gi(this.S));a.set(2,[this.g,this.T,this.ma]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Hi(a[b++]),this.S=Hi(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.T=a[b][1],this.ma|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.P||this.i("running");this.C.W=!0;this.Pb=a;this.Qb=b}; +k.stop=function(a,b){if(this.C.W){this.C.W=!1;this.K=b-this.Qb;if(!this.P){b="stopped";if(this.K){a-=this.Pb;var c=0d&&(d=nc(a.b,b)),65535!=(d&65535)&&(a.oc(a.G[a.ea],b),++a.ea==a.G.length&&(a.ea=0)));return!1}function Sf(a){var b=a.b;if(b.C.W)throw T(b,a.b.ua&65535),a.ca(),-1;return!1} +function vi(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.na],!1)}a.M=["br"];if(a.F)for(b=1;b>>d.na],!0);a.F=["bw"];a.Za=0}k.tb=function(a,b,c){var d=!0;c||Oi(this,a,b,!1,!0);if(a!=this.f){var e=this.aa(b);if(-1===e)this.i("invalid address: "+L(this,b.H)),d=!1;else{var f=this.w;f.ba[e>>>f.na].tb(e&f.w,a==this.F)}}d&&(a.push(b),c?b.Ua=!0:(Pi(this,a,a.length-1,"set"),wi(this)));return d}; +function Oi(a,b,c,d,e){var f=!1;c=a.aa(c);for(var g=1;g>>d.na],b==a.F));h.Ua||wi(a);break}}return f}function Qi(a,b){for(var c=1;c>23)&65535,y=L(u,v);else if(8192==C)v=v.H-((f&63)<<1)&65535,y=L(u,v);else if(12288==C)y=L(u,f&7,1);else if(24576==C)y=L(u,f&63,1);else if(32768==C)y=L(u,f&255,1);else if(C=f&A,A&4032&&(C>>=6,A>>=6), +A&63)switch(A=C&7,C&56){case 0:y=Ji(A);break;case 8:y="@"+Ji(A);break;case 16:7>A?y="("+Ji(A)+")+":(C=u.ta(v,2),y="#"+L(u,C,0,!0));break;case 24:7>A?y="@("+Ji(A)+")+":(C=u.ta(v,2),y="@#"+L(u,C,0,!0));break;case 32:y="-("+Ji(A)+")";break;case 40:y="@-("+Ji(A)+")";break;case 48:C=u.ta(v,2);y=L(u,C,0,!0)+"("+Ji(A)+")";7==A&&(y=L(u,C+v.H&65535));break;case 56:C=u.ta(v,2),y="@"+L(u,C)+"("+Ji(A)+")",7==A&&(y="@"+L(u,C+v.H&65535))}u=y;if(!u||!u.length){h="INVALID";break}"string"!=typeof u&&(m=u[1],u=u[0]); +0b)c=Ji(b),c+="="+L(a,d.u[b]);else if(13>b)c="A"+(b-8)+"="+L(a,d.eb[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+L(a,d.Oa[b-16]);else switch(b){case 20:c="PS="+L(a,hd(d));break;case 21:c="IR="+L(a,d.Jb);break;case 22:c="ER="+L(a,d.pa);break;case 23:c="SL="+L(a,d.mb);break;case 24:c="MMR0="+L(a,bd(d));break;case 25:c="MMR1="+L(a,dd(d));break;case 26:c="MMR2="+L(a,ed(d));break;case 27:c="MMR3="+L(a,d.Wa);break;case 28:a.v&&(c="AR="+L(a,a.v.za,3));break;case 29:a.v&& +(c="DR="+L(a,a.v.yb));break;case 30:a.v&&rc(a.v)&&(c="SR="+L(a,a.v.cb,3))}c&&(c+=" ");return c}function Ui(a,b){var c,d="";for(c=0;6>c;c++)d+=Z(a,c);d=d+"\n"+(Z(a,6)+Z(a,7));d+=Z(a,20)+Z(a,21)+Z(a,23);d+=Ti(a,"T")+Ti(a,"N")+Ti(a,"Z")+Ti(a,"V")+Ti(a,"C");b&&(b=d,c=""+(Z(a,24)+Z(a,25)),c+=Z(a,26)+Z(a,27)+Z(a,22),c=c+"\n"+(Z(a,30)+Z(a,28)+Z(a,29)),d=b+("\n"+c));return d}k.Cc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.Cc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Gg:b,H:c,td:d,ia:e,Ac:f})}function Vi(a,b,c){var d=[],e=a.aa(b)>>>0;for(b=0;b>>0,h=f.td;if(e>=g&&eb)){e.u[b]= -g&65535;break}a.i("unknown register: "+f);return}a.A.xa();a.i("updated registers:")}}a.i(Ui(a,d));c&&(a.L=Y(e.u[7]),Mi(a,L(a,a.L.H)))}}function Zi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Si(a,b,g,f);a.i(f);a.L=b;e-=b.H-l;c++}}} -function Ri(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.T&&(a.i("ended assemble at "+L(a,a.S.H)),a.L=a.S,a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ta=null;if(yb(a)&&0n||"z"va.length&&(a.i("note: only "+va.length+" available"),ea=va.length);ia-=ea;0>ia&&(null==va[va.length-1].H?(ea=ia+ea,ia=0):ia+=va.length);var ce=[];"call"==gh&&($b=1E5,ce=["CALL"]);for(void 0!==fh&&a.i(ea+" instructions earlier:");0<$b&&ia!=a.fa;){var jh=va[ia++];if(null==jh.H)break;var ac=Y(jh.H),tj= -ea--,kh=Si(a,ac,"history",tj);(!ce.length||0<=kh.indexOf(ce[0]))&&a.i(kh);ac.lc&&(ia+=ac.lc,$b-=ac.lc,ea-=ac.lc);ia>=va.length&&(ia=0);a.rb=ea;ih++;$b--}}ih||(a.i("no "+hh+"history available"),a.rb=void 0)}else{var ub=Ei(a,ua);if(ub){var bc=0,de=!1,ee="ds"==Sa;Ta&&(de=!0,"l"==Ta.charAt(0)&&(de=!1,Ta=Ta.substr(1)||sj),bc=ri(a,Ta)>>>0,65536he?String.fromCharCode(he):"."),Wc=Wc>>8}Va&&(Va+="\n");Va=ee?Va+(Wa+","):Va+(ua+": "+Wa+(0==Vc?" "+ge:""))}Va&&a.i(Va);a.Ya=ub}}}}break;case "e":if("else"==g[0])break;var wb,ie,je,ke,le=g[0],me=g[1];"eb"==le?(wb=1,ie=255,je=a.bc,ke= -a.Lb):"e"==le||"ew"==le?(wb=2,ie=65535,je=a.ua,ke=a.Ab):me=null;if(null==me)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 Xc=Ei(a,me);if(Xc)for(var Yc=2;Ycpe;){for(var Xa=null,xj=256;65536>gc.H>>>0;){qe.H=a.ua(gc,2);if(null==gc.H||!xj--)break;if(!(qe.H&1)){for(var yj=a,Zc=qe,mh=null,hc=Zc.H,nh=hc,re=1;6>=re&&hc;re++){if(2b)){e.u[b]= +g&65535;break}a.i("unknown register: "+f);return}a.A.wa();a.i("updated registers:")}}a.i(Ui(a,d));c&&(a.L=Y(e.u[7]),Mi(a,L(a,a.L.H)))}}function Zi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.i(m)}h[3]&&(g=h[3],f=null);f=Si(a,b,g,f);a.i(f);a.L=b;e-=b.H-l;c++}}} +function Ri(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.i(">> "+b):(a.T&&(a.i("ended assemble at "+L(a,a.S.H)),a.L=a.S,a.T=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.sa=null;if(yb(a)&&0n||"z"va.length&&(a.i("note: only "+va.length+" available"),ea=va.length);ia-=ea;0>ia&&(null==va[va.length-1].H?(ea=ia+ea,ia=0):ia+=va.length);var ce=[];"call"==gh&&($b=1E5,ce=["CALL"]);for(void 0!==fh&&a.i(ea+" instructions earlier:");0<$b&&ia!=a.ea;){var jh=va[ia++];if(null==jh.H)break;var ac=Y(jh.H),tj= +ea--,kh=Si(a,ac,"history",tj);(!ce.length||0<=kh.indexOf(ce[0]))&&a.i(kh);ac.kc&&(ia+=ac.kc,$b-=ac.kc,ea-=ac.kc);ia>=va.length&&(ia=0);a.qb=ea;ih++;$b--}}ih||(a.i("no "+hh+"history available"),a.qb=void 0)}else{var ub=Ei(a,ua);if(ub){var bc=0,de=!1,ee="ds"==Sa;Ta&&(de=!0,"l"==Ta.charAt(0)&&(de=!1,Ta=Ta.substr(1)||sj),bc=ri(a,Ta)>>>0,65536he?String.fromCharCode(he):"."),Wc=Wc>>8}Va&&(Va+="\n");Va=ee?Va+(Wa+","):Va+(ua+": "+Wa+(0==Vc?" "+ge:""))}Va&&a.i(Va);a.Xa=ub}}}}break;case "e":if("else"==g[0])break;var wb,ie,je,ke,le=g[0],me=g[1];"eb"==le?(wb=1,ie=255,je=a.ac,ke= +a.Kb):"e"==le||"ew"==le?(wb=2,ie=65535,je=a.ta,ke=a.zb):me=null;if(null==me)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 Xc=Ei(a,me);if(Xc)for(var Yc=2;Ycpe;){for(var Xa=null,xj=256;65536>gc.H>>>0;){qe.H=a.ta(gc,2);if(null==gc.H||!xj--)break;if(!(qe.H&1)){for(var yj=a,Zc=qe,mh=null,hc=Zc.H,nh=hc,re=1;6>=re&&hc;re++){if(2\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.i("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bdj){if(fj(d,this.J)){this.B=new S(this,"1.30.5","failsafe");fj(this.B)&&(kj(this,d),a=2,lj(this.B));this.B.set("timestamp",Ca());mj(this.B);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=jj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fj(d,g):("error"== -f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.A=null)):this.i(f+": "+g),lj(d),fj(d)?(c=jj(d),e=!0):c=!1))}e&&ij(this,c?d:null)}else 2==a&&d.clear()}else ij(this);delete this.J;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.fa=!0;this.C.ma=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(nj(this,this.b,b,c,a),this.xa(),this.b.Bb());this.R&&(kj(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.g=0}; -function kj(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.ea;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function aj(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ia&&(c&&a.b.da(),d=a.b.Ia(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.ma=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;l=c||30<=(b.Pb+=c))&&(d.textContent=b.C.W?b.ta.toFixed(2)+"Mhz":"Stopped",b.Pb=0)}if(this.v&&(b=this.v,a=a||0,b.F)){c=b.b.C.W;d=!!(b.b.I&8);if(0>=a||60<=(b.B+=a)){for(var e=0;edj){if(fj(d,this.I)){this.B=new S(this,"1.30.5","failsafe");fj(this.B)&&(kj(this,d),a=2,lj(this.B));this.B.set("timestamp",Ca());mj(this.B);var e=this.f&&!this.F;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=jj(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?fj(d,g):("error"== +f&&"no machine state"!=g?(this.N("Error: "+g),"unable to verify user"==g&&(La("user",""),this.A=null)):this.i(f+": "+g),lj(d),fj(d)?(c=jj(d),e=!0):c=!1))}e&&ij(this,c?d:null)}else 2==a&&d.clear()}else ij(this);delete this.I;delete this.K}e=nb(this.id);for(f=0;fa[1];a=a[2];this.ea=!0;this.C.la=!0;var d=this.D.power;d&&(d.textContent="Shutdown");this.b&&(nj(this,this.b,b,c,a),this.wa(),this.b.Ab());this.P&&(kj(this,b),b.clear());!c&&this.B&&(this.B.clear(),delete this.B);this.g=0}; +function kj(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.da;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function aj(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new S(a,"1.30.5"),g=new S(a,"1.30.5","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ha&&(c&&a.b.ca(),d=a.b.Ha(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.C.la=!1,!1===d&&(e=null)));for(var h=nb(a.id),l=0;l=c||30<=(b.Ob+=c))&&(d.textContent=b.C.W?b.sa.toFixed(2)+"Mhz":"Stopped",b.Ob=0)}if(this.v&&(b=this.v,a=a||0,b.F)){c=b.b.C.W;d=!!(b.b.J&8);if(0>=a||60<=(b.B+=a)){for(var e=0;e":62,"?":63,"@":64,Qb:65,Qe:66,Se:67,qf:68,E:69,rf:70,sf:71,tf:72,uf:73,vf:74,wf:75,xf:76,yf:77,zf:78,Af:79,Bf:80,Q:81,Cf:82,Df:83,Ef:84,Ff:85,Gf:86,Hf:87,If:88,Jf:89,wc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Kf:97,Lf:98,Mf:99,d:100,e:101,Nf:102,Of:103,Pf:104,Qf:105,Tf:106,k:107,Uf:108,Vf:109,n:110,Wf:111,p:112,q:113,r:114,Xf:115,t:116,Yf:117,Zf:118,$f:119,x:120,y:121,z:122,"{":123, -"|":124,"}":125,"~":126,nc:127}; +var ia={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],21368320:[615,4,17],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},m={Qe:0,jc:1,Se:2,Te:3,Ue:4,Ve:5,We:6,Xe:7,Qb:8,Ye:9,kc:10,Ze:11,$e:12,lc:13,af:14,bf:15,cf:16,df:17,ef:18,ff:19,gf:20,hf:21,jf:22,kf:23,lf:24,mf:25,nf: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,Pe:66,Re:67,pf:68,E:69,qf:70,rf:71,sf:72,tf:73,uf:74,vf:75,wf:76,xf:77,yf:78,zf:79,Af:80,Q:81,Bf:82,Cf:83,Df:84,Ef:85,Ff:86,Gf:87,Hf:88,If:89,vc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Jf:97,Kf:98,Lf:99,d:100,e:101,Nf:102,Of:103,Pf:104,Qf:105,Tf:106,k:107,Uf:108,Vf:109,n:110,Wf:111,p:112,q:113,r:114,Xf:115,t:116,Yf:117,Zf:118,$f:119,x:120,y:121,z:122,"{":123, +"|":124,"}":125,"~":126,mc:127}; function q(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return""+c}function r(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function t(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function na(a){return a.replace(/[&<>"']/g,function(a){return ma[a]})} @@ -44,93 +44,93 @@ function oa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function ra(){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 v(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function sa(a,b){var c,d={N:null,ca:null,na:null,ma:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.na=g.load;d.ma=g.exec;if(e=g.bytes)d.N=e;else if(e=g.words)for(d.N=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.N=Array(4*e.length),f=c=0;c>8&255,d.N[f++]=e[c]>>16&255,d.N[f++]=e[c]>>24&255;else d.N=g;d.ca=g.symbols;d.N.length?1==d.N.length&&(w(d.N[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ma=g.load;d.la=g.exec;if(e=g.bytes)d.M=e;else if(e=g.words)for(d.M=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.M=Array(4*e.length),f=c=0;c>8&255,d.M[f++]=e[c]>>16&255,d.M[f++]=e[c]>>24&255;else d.M=g;d.ba=g.symbols;d.M.length?1==d.M.length&&(w(d.M[0]),d=null):(w("Empty resource: "+a),d=null)}catch(k){w("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.xa=this.id:(this.ya=this.id.substr(0,b),this.xa=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Ga:!1,Hb:!1,R:!1,error:!1};this.ub=null;this.o.error=!1;this.j={};this.F=null;this.Ic=d||0;y.push(this)}var Ma=void 0,Na={}; +Ha(Ba("Opera")||Ba("iOS")?"onunload":"onbeforeunload",function(){Ja(Da.exit)});function x(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ub=b.comment;this.Jc=b;b=this.id.indexOf(".");0>b?this.wa=this.id:(this.xa=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.o={ready:!1,Fa:!1,Gb:!1,P:!1,error:!1};this.tb=null;this.o.error=!1;this.j={};this.F=null;this.Hc=d||0;y.push(this)}var Ma=void 0,Na={}; if(window){Ma||(Ma=window.location.search.substr(1));for(var Oa,Pa=/\+/g,Qa=/([^&=]+)=?([^&]*)/g;Oa=Qa.exec(Ma);)Na[decodeURIComponent(Oa[1].replace(Pa," "))]=decodeURIComponent(Oa[2].replace(Pa," "))}function Ra(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function A(a,b){b||(b=x);a.prototype=Ra(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Sa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Sa={},y=[];function Ta(a,b,c){Sa[a]&&b&&(Sa[a][b]=c)}function B(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.Tc,a]}A($a);var ab=7;function bb(a,b){return a.b[b]&&a.b[b][1]}h=$a.prototype;h.reset=function(){this.stop()}; -h.ba=function(a,b,c,d){if(this.l&&this.l.ba(a,b,c,d)||this.a&&this.a.ba(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.f[b]=d?1:0,this.v++,!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(){cb(a, -b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){db(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){cb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){db(a,b)}}(this,b),!0):this.parent.ba.call(this,a,b,c,d)}};h.ga=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;eb(b,this,fb);gb(b,this.reset.bind(this));hb(this);ib(this)};h.ia=function(a,b){b||(jb(),this.reset());return!0};h.ha=function(){return!0}; +function $a(a){x.call(this,"Panel",a,$a,512);this.ia=this.i=this.c=this.m=this.s=this.v=0;this.A=this.B=this.w=!1;this.G=ab;this.f={};this.b={START:[1,1,!0,!1,this.Qc],STEP:[1,1,!1,!1,this.Rc],ENABLE:[1,1,!1,!1,this.Mc],CONT:[1,1,!0,!1,this.Kc],DEP:[0,0,!0,!1,this.Lc],EXAM:[1,1,!0,!1,this.Nc],LOAD:[1,1,!0,!1,this.Pc],TEST:[0,0,!0,!1,this.Oc]};for(a=0;22>a;a++)this.b["S"+a]=[0,0,!1,!1,this.Sc,a]}A($a);var ab=7;function bb(a,b){return a.b[b]&&a.b[b][1]}h=$a.prototype;h.reset=function(){this.stop()}; +h.aa=function(a,b,c,d){if(this.l&&this.l.aa(a,b,c,d)||this.a&&this.a.aa(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.j[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.f[b]=d?1:0,this.v++,!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(){cb(a, +b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){db(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){cb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){db(a,b)}}(this,b),!0):this.parent.aa.call(this,a,b,c,d)}};h.fa=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;eb(b,this,fb);gb(b,this.reset.bind(this));hb(this);ib(this)};h.ha=function(a,b){b||(jb(),this.reset());return!0};h.ga=function(){return!0}; function kb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function hb(a,b){for(var c in a.f)kb(a,c,null!=b?b:a.f[c])}function lb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function ib(a){for(var b in a.b)lb(a,b,a.b[b][1])}function mb(a,b,c,d){a.j[b]&&(void 0===c&&(Ya(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.F&&a.F.h||8)?ja(c,d):r(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))} -function cb(a,b){var c=a.b[b];lb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.B="EXAM"==b)}function db(a,b){var c=a.b[b];c[2]&&c[3]&&(lb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Rc=function(a){a||this.a.o.S||(a=this.a,a.h.reset(),nb(a),bb(this,"ENABLE")&&ob(this.a))};h.Sc=function(){};h.Nc=function(a){a||G(this.a)}; -h.Lc=function(a){if(!a&&!this.a.o.S)if(bb(this,"ENABLE"))ob(this.a);else{a=this.F;var b;if(b=a)a.o.Ga&&(a.o.Hb=!0),b=!a.o.Ga;if(b)Wa(a,!0),a.xb(0,null),Wa(a,!1);else try{var c=this.a.xb(1);0a;a++)this.b["S"+a][1]=0&1<a.a.Ra?8:16,c=65472<=a.ja&&a.ja<65472+b,b=c?1:2,c=c?15:a.h.Da;bb(a,"STEP")||(b=-b);xb(a,a.ja&~c|a.ja+b&c)}function xb(a,b){a.ja=b&a.h.Da;b=a.ja;for(var c=0;22>c;c++)yb(a,"A"+c,b&1<c;c++)yb(a,"D"+c,b&1<>2;this.l=this.c-1;this.v=this.w/this.c|0;this.Ca=[];this.m=0;this.s=!1;this.A=[];this.xc=[Cb,Db,Eb,Fb];a=new H(this);Gb(a,this.F);this.h=Array(this.v);this.f=Array(this.v);for(b=0;b>>this.b;this.B=0;this.i=this.Da;F(this)}A(Ab); -var Bb=8192,Jb=Bb-1;function Cb(a,b){var c=-1,d=this.controller,e=d.Ca[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Ca[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255} -function Db(a,b,c){var d=!1,e=this.controller,f=e.Ca[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ca[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Eb(a,b){var c=-1,d=this.controller;a=d.Ca[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535} -function Fb(a,b,c){var d=!1,e=this.controller;a=e.Ca[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Kb(a,b){if(b!=a.B){for(var c=0;c>>a.b,a.f[a.I]=a.h[a.G])}}Ab.prototype.reset=function(){for(var a=0;a>>a.b;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Fa)return l.jb+=l.Fa-f,l.Fa=f,!0;if(f>=l.Fa+l.jb){p=l.size-(f-n);p>g&&(p=g);l.jb=f-l.Fa+p;f=n+a.c;g-=p;k++;continue}}return Lb(1,f,g)}f=new H(a,f,p,a.c,d,e);Gb(f,a.F,l);a.h[k++]=f;f=n+a.c;g-=p}return 0>=g?(a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Lb(2,b,c)}function Nb(a,b){return a.f[(b&a.i)>>>a.b].Lb(b&a.l,b)} -function Ob(a,b){return a.f[(b&a.i)>>>a.b].Y(b&a.l,b)}function wb(a,b){a.s=!1;a.m++;b=a.h[(b&a.Da)>>>a.b].cc(b&a.l,b);a.m--;return b}function Pb(a,b,c){a.s=!1;a.m++;a.h[(b&a.Da)>>>a.b].Pb(b&a.l,c&255,b);a.m--}function Qb(a,b,c){a.f[(b&a.i)>>>a.b].zb(b&a.l,c&65535,b)}function ub(a,b,c){a.s=!1;a.m++;a.h[(b&a.Da)>>>a.b].ic(b&a.l,c&65535,b);a.m--} -function Rb(a){for(var b=0,c=[],d=0;da.a.Ra)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,z=0;z>16&65535);a=a.Gb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.ed=function(){var a=this.a;a.aa&57344||(a.Ib=a.A&65535);return a.Ib};h.fd=function(){return this.a.Ea};h.ee=function(a){var b=this.a;1170>b.Ra&&(a&=-49);b.Ea!=a&&(b.Ea=a,b.Ya=a&16?4194303:262143,cc(b))};h.Od=function(a){a=a>>1&63;var b=this.a.ib[a>>1];return a&1?b>>16:b&65535}; -h.Me=function(a,b){b=b>>1&63;var c=b>>1;this.a.ib[c]=b&1?this.a.ib[c]&65535|(a&63)<<16:this.a.ib[c]&-65536|a&65534};h.Hd=function(a){return this.a.H[1][a>>1&7]};h.Fe=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Fd=function(a){return this.a.H[1][(a>>1&7)+8]};h.De=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Gd=function(a){return this.a.da[1][a>>1&7]};h.Ee=function(a,b){b=b>>1&7;this.a.da[1][b]=a;this.a.H[1][b]&=65295};h.Ed=function(a){return this.a.da[1][(a>>1&7)+8]}; -h.Ce=function(a,b){b=(b>>1&7)+8;this.a.da[1][b]=a;this.a.H[1][b]&=65295};h.$c=function(a){return this.a.H[0][a>>1&7]};h.ae=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Zd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Zc=function(a){return this.a.da[0][a>>1&7]};h.$d=function(a,b){b=b>>1&7;this.a.da[0][b]=a;this.a.H[0][b]&=65295};h.Xc=function(a){return this.a.da[0][(a>>1&7)+8]};h.Yd=function(a,b){b=(b>>1&7)+8;this.a.da[0][b]=a;this.a.H[0][b]&=65295}; -h.Nd=function(a){return this.a.H[3][a>>1&7]};h.Le=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Ld=function(a){return this.a.H[3][(a>>1&7)+8]};h.Je=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Md=function(a){return this.a.da[3][a>>1&7]};h.Ke=function(a,b){b=b>>1&7;this.a.da[3][b]=a;this.a.H[3][b]&=65295};h.Kd=function(a){return this.a.da[3][(a>>1&7)+8]};h.Ie=function(a,b){b=(b>>1&7)+8;this.a.da[3][b]=a;this.a.H[3][b]&=65295};h.Ta=function(a){a&=7;return this.a.D&2048?this.a.Ka[a]:this.a.g[a]}; -h.Va=function(a,b){b&=7;this.a.D&2048?this.a.Ka[b]=a:this.a.g[b]=a};h.ld=function(){return this.a.D&49152?this.a.qa[0]:this.a.g[6]};h.je=function(a){this.a.D&49152?this.a.qa[0]=a:this.a.g[6]=a};h.od=function(){return this.a.g[7]};h.me=function(a){this.a.g[7]=a};h.Ua=function(a){a&=7;return this.a.D&2048?this.a.g[a]:this.a.Ka[a]};h.Wa=function(a,b){b&=7;this.a.D&2048?this.a.g[b]=a:this.a.Ka[b]=a};h.md=function(){return 1==(this.a.D&49152)>>14?this.a.g[6]:this.a.qa[1]}; -h.ke=function(a){1==(this.a.D&49152)>>14?this.a.g[6]=a:this.a.qa[1]=a};h.nd=function(){return 3==(this.a.D&49152)>>14?this.a.g[6]:this.a.qa[3]};h.le=function(a){3==(this.a.D&49152)>>14?this.a.g[6]=a:this.a.qa[3]=a};h.Wc=function(a){return this.a.fc[a-65504>>1]};h.Xd=function(a,b){this.a.fc[b-65504>>1]=a};h.bc=function(a){return 65520==a?(Sb(this.h)>>6)-1:0};h.hc=function(){};h.Jd=function(){return 1};h.He=function(){};h.Vc=function(){return this.a.Z};h.Wd=function(){this.a.Z=0};h.bd=function(){return this.a.ec}; -h.ce=function(a,b){b&1||(a&=255);this.a.ec=a};h.gd=function(a,b){return b?0:this.a.wb};h.fe=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.wb=a};h.Id=function(a,b){return b?0:this.a.hb&65280};h.Ge=function(a){this.a.hb=a|255};h.kd=function(){return dc(this.a)};h.ie=function(a){ec(this.a,a&-1793|dc(this.a)&1792);this.a.u|=256};h.gc=function(){}; -var L={},$b=(L[61568]=[null,null,K.prototype.Od,K.prototype.Me,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Hd,K.prototype.Fe,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Fd,K.prototype.De,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.$c,K.prototype.ae,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Yc,K.prototype.Zd,"KDPDR",8,1145,64],L[62688]= -[null,null,K.prototype.Zc,K.prototype.$d,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.fd,K.prototype.ee,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.ad,K.prototype.be,"LKS"],L[65402]=[null,null,K.prototype.cd,K.prototype.de,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.dd,K.prototype.gc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.ed,K.prototype.gc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Nd,K.prototype.Le, -"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Ld,K.prototype.Je,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Md,K.prototype.Ke,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Ta,K.prototype.Va,"R0SET0"],L[65473]=[null,null,K.prototype.Ta,K.prototype.Va,"R1SET0"],L[65474]=[null,null,K.prototype.Ta,K.prototype.Va,"R2SET0"],L[65475]=[null,null,K.prototype.Ta,K.prototype.Va,"R3SET0"],L[65476]=[null,null,K.prototype.Ta, -K.prototype.Va,"R4SET0"],L[65477]=[null,null,K.prototype.Ta,K.prototype.Va,"R5SET0"],L[65478]=[null,null,K.prototype.ld,K.prototype.je,"R6KERNEL"],L[65479]=[null,null,K.prototype.od,K.prototype.me,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ua,K.prototype.Wa,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ua,K.prototype.Wa,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ua,K.prototype.Wa,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ua,K.prototype.Wa,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ua, -K.prototype.Wa,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ua,K.prototype.Wa,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.md,K.prototype.ke,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.nd,K.prototype.le,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Wc,K.prototype.Xd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.bc,K.prototype.hc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.bc,K.prototype.hc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Jd,K.prototype.He,"SYSID",1,1170],L[65526]= -[null,null,K.prototype.Vc,K.prototype.Wd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.bd,K.prototype.ce,"MB",1,1170],L[65530]=[null,null,K.prototype.gd,K.prototype.fe,"PIR"],L[65532]=[null,null,K.prototype.Id,K.prototype.Ge,"SL"],L[65534]=[null,null,K.prototype.kd,K.prototype.ie,"PSW"],L); +function cb(a,b){var c=a.b[b];lb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.B="EXAM"==b)}function db(a,b){var c=a.b[b];c[2]&&c[3]&&(lb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Qc=function(a){a||this.a.o.R||(a=this.a,a.h.reset(),nb(a),bb(this,"ENABLE")&&ob(this.a))};h.Rc=function(){};h.Mc=function(a){a||G(this.a)}; +h.Kc=function(a){if(!a&&!this.a.o.R)if(bb(this,"ENABLE"))ob(this.a);else{a=this.F;var b;if(b=a)a.o.Fa&&(a.o.Gb=!0),b=!a.o.Fa;if(b)Wa(a,!0),a.wb(0,null),Wa(a,!1);else try{var c=this.a.wb(1);0a;a++)this.b["S"+a][1]=0&1<a.a.Qa?8:16,c=65472<=a.ia&&a.ia<65472+b,b=c?1:2,c=c?15:a.h.Ca;bb(a,"STEP")||(b=-b);xb(a,a.ia&~c|a.ia+b&c)}function xb(a,b){a.ia=b&a.h.Ca;b=a.ia;for(var c=0;22>c;c++)yb(a,"A"+c,b&1<c;c++)yb(a,"D"+c,b&1<>2;this.l=this.c-1;this.v=this.w/this.c|0;this.Ba=[];this.m=0;this.s=!1;this.A=[];this.wc=[Cb,Db,Eb,Fb];a=new H(this);Gb(a,this.F);this.h=Array(this.v);this.f=Array(this.v);for(b=0;b>>this.b;this.B=0;this.i=this.Ca;F(this)}A(Ab); +var Bb=8192,Jb=Bb-1;function Cb(a,b){var c=-1,d=this.controller,e=d.Ba[a],f=b&65535;e?e[0]?c=e[0](f):e[2]&&(c=f&1?e[2](f&-2)>>8:e[2](f)&255):f&1&&(e=d.Ba[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;I(d,b,16);return 255} +function Db(a,b,c){var d=!1,e=this.controller,f=e.Ba[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](g,!0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else g&1&&(f=e.Ba[a&-2])&&(f[3]?(g&=-2,a=f[2]?f[2](g,!0):0,f[3](a&255|b<<8,g),d=!0):f[1]&&(f[1](b,g),d=!0));d||I(e,c,16)}function Eb(a,b){var c=-1,d=this.controller;a=d.Ba[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535} +function Fb(a,b,c){var d=!1,e=this.controller;a=e.Ba[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Kb(a,b){if(b!=a.B){for(var c=0;c>>a.b,a.f[a.I]=a.h[a.G])}}Ab.prototype.reset=function(){for(var a=0;a>>a.b;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ea)return l.ib+=l.Ea-f,l.Ea=f,!0;if(f>=l.Ea+l.ib){p=l.size-(f-n);p>g&&(p=g);l.ib=f-l.Ea+p;f=n+a.c;g-=p;k++;continue}}return Lb(1,f,g)}f=new H(a,f,p,a.c,d,e);Gb(f,a.F,l);a.h[k++]=f;f=n+a.c;g-=p}return 0>=g?(a.status((c>>10)+"Kb "+Mb[d]+" at "+ja(b)),!0):Lb(2,b,c)}function Nb(a,b){return a.f[(b&a.i)>>>a.b].Kb(b&a.l,b)} +function Ob(a,b){return a.f[(b&a.i)>>>a.b].X(b&a.l,b)}function wb(a,b){a.s=!1;a.m++;b=a.h[(b&a.Ca)>>>a.b].bc(b&a.l,b);a.m--;return b}function Pb(a,b,c){a.s=!1;a.m++;a.h[(b&a.Ca)>>>a.b].Ob(b&a.l,c&255,b);a.m--}function Qb(a,b,c){a.f[(b&a.i)>>>a.b].yb(b&a.l,c&65535,b)}function ub(a,b,c){a.s=!1;a.m++;a.h[(b&a.Ca)>>>a.b].hc(b&a.l,c&65535,b);a.m--} +function Rb(a){for(var b=0,c=[],d=0;da.a.Qa)){var g=f[0]?f[0].bind(b):null,k=f[1]?f[1].bind(b):null,l=f[2]?f[2].bind(b):null,n=f[3]?f[3].bind(b):null;65472<=e&&65487>=e&&(!g&&l&&(g=function(a){return function(b){return a(b)&255}.bind(b)}(l)),!k&&n&&(k=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var p=f[4],u=f[5]||1,z=0;z>16&65535);a=a.Fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.dd=function(){var a=this.a;a.Z&57344||(a.Hb=a.A&65535);return a.Hb};h.ed=function(){return this.a.Da};h.de=function(a){var b=this.a;1170>b.Qa&&(a&=-49);b.Da!=a&&(b.Da=a,b.Xa=a&16?4194303:262143,cc(b))};h.Nd=function(a){a=a>>1&63;var b=this.a.hb[a>>1];return a&1?b>>16:b&65535}; +h.Le=function(a,b){b=b>>1&63;var c=b>>1;this.a.hb[c]=b&1?this.a.hb[c]&65535|(a&63)<<16:this.a.hb[c]&-65536|a&65534};h.Gd=function(a){return this.a.H[1][a>>1&7]};h.Ee=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Ed=function(a){return this.a.H[1][(a>>1&7)+8]};h.Ce=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295};h.Fd=function(a){return this.a.ca[1][a>>1&7]};h.De=function(a,b){b=b>>1&7;this.a.ca[1][b]=a;this.a.H[1][b]&=65295};h.Dd=function(a){return this.a.ca[1][(a>>1&7)+8]}; +h.Be=function(a,b){b=(b>>1&7)+8;this.a.ca[1][b]=a;this.a.H[1][b]&=65295};h.Zc=function(a){return this.a.H[0][a>>1&7]};h.$d=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Xc=function(a){return this.a.H[0][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Yc=function(a){return this.a.ca[0][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.ca[0][b]=a;this.a.H[0][b]&=65295};h.Wc=function(a){return this.a.ca[0][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.ca[0][b]=a;this.a.H[0][b]&=65295}; +h.Md=function(a){return this.a.H[3][a>>1&7]};h.Ke=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.Kd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Ie=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.Ld=function(a){return this.a.ca[3][a>>1&7]};h.Je=function(a,b){b=b>>1&7;this.a.ca[3][b]=a;this.a.H[3][b]&=65295};h.Jd=function(a){return this.a.ca[3][(a>>1&7)+8]};h.He=function(a,b){b=(b>>1&7)+8;this.a.ca[3][b]=a;this.a.H[3][b]&=65295};h.Sa=function(a){a&=7;return this.a.D&2048?this.a.Ja[a]:this.a.g[a]}; +h.Ua=function(a,b){b&=7;this.a.D&2048?this.a.Ja[b]=a:this.a.g[b]=a};h.kd=function(){return this.a.D&49152?this.a.pa[0]:this.a.g[6]};h.ie=function(a){this.a.D&49152?this.a.pa[0]=a:this.a.g[6]=a};h.nd=function(){return this.a.g[7]};h.le=function(a){this.a.g[7]=a};h.Ta=function(a){a&=7;return this.a.D&2048?this.a.g[a]:this.a.Ja[a]};h.Va=function(a,b){b&=7;this.a.D&2048?this.a.g[b]=a:this.a.Ja[b]=a};h.ld=function(){return 1==(this.a.D&49152)>>14?this.a.g[6]:this.a.pa[1]}; +h.je=function(a){1==(this.a.D&49152)>>14?this.a.g[6]=a:this.a.pa[1]=a};h.md=function(){return 3==(this.a.D&49152)>>14?this.a.g[6]:this.a.pa[3]};h.ke=function(a){3==(this.a.D&49152)>>14?this.a.g[6]=a:this.a.pa[3]=a};h.Vc=function(a){return this.a.ec[a-65504>>1]};h.Wd=function(a,b){this.a.ec[b-65504>>1]=a};h.ac=function(a){return 65520==a?(Sb(this.h)>>6)-1:0};h.gc=function(){};h.Id=function(){return 1};h.Ge=function(){};h.Uc=function(){return this.a.Y};h.Vd=function(){this.a.Y=0};h.ad=function(){return this.a.dc}; +h.be=function(a,b){b&1||(a&=255);this.a.dc=a};h.fd=function(a,b){return b?0:this.a.vb};h.ee=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.u|=1}b.vb=a};h.Hd=function(a,b){return b?0:this.a.gb&65280};h.Fe=function(a){this.a.gb=a|255};h.jd=function(){return dc(this.a)};h.he=function(a){ec(this.a,a&-1793|dc(this.a)&1792);this.a.u|=256};h.fc=function(){}; +var L={},$b=(L[61568]=[null,null,K.prototype.Nd,K.prototype.Le,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Gd,K.prototype.Ee,"SIPDR",8,1145,64],L[62608]=[null,null,K.prototype.Ed,K.prototype.Ce,"SDPDR",8,1145,64],L[62624]=[null,null,K.prototype.Fd,K.prototype.De,"SIPAR",8,1145,64],L[62640]=[null,null,K.prototype.Dd,K.prototype.Be,"SDPAR",8,1145,64],L[62656]=[null,null,K.prototype.Zc,K.prototype.$d,"KIPDR",8,1145,64],L[62672]=[null,null,K.prototype.Xc,K.prototype.Yd,"KDPDR",8,1145,64],L[62688]= +[null,null,K.prototype.Yc,K.prototype.Zd,"KIPAR",8,1145,64],L[62704]=[null,null,K.prototype.Wc,K.prototype.Xd,"KDPAR",8,1145,64],L[62798]=[null,null,K.prototype.ed,K.prototype.de,"MMR3",1,1145,64],L[65382]=[null,null,K.prototype.$c,K.prototype.ae,"LKS"],L[65402]=[null,null,K.prototype.bd,K.prototype.ce,"MMR0",1,1145,64],L[65404]=[null,null,K.prototype.cd,K.prototype.fc,"MMR1",1,1145,64],L[65406]=[null,null,K.prototype.dd,K.prototype.fc,"MMR2",1,1145,64],L[65408]=[null,null,K.prototype.Md,K.prototype.Ke, +"UIPDR",8,1145,64],L[65424]=[null,null,K.prototype.Kd,K.prototype.Ie,"UDPDR",8,1145,64],L[65440]=[null,null,K.prototype.Ld,K.prototype.Je,"UIPAR",8,1145,64],L[65456]=[null,null,K.prototype.Jd,K.prototype.He,"UDPAR",8,1145,64],L[65472]=[null,null,K.prototype.Sa,K.prototype.Ua,"R0SET0"],L[65473]=[null,null,K.prototype.Sa,K.prototype.Ua,"R1SET0"],L[65474]=[null,null,K.prototype.Sa,K.prototype.Ua,"R2SET0"],L[65475]=[null,null,K.prototype.Sa,K.prototype.Ua,"R3SET0"],L[65476]=[null,null,K.prototype.Sa, +K.prototype.Ua,"R4SET0"],L[65477]=[null,null,K.prototype.Sa,K.prototype.Ua,"R5SET0"],L[65478]=[null,null,K.prototype.kd,K.prototype.ie,"R6KERNEL"],L[65479]=[null,null,K.prototype.nd,K.prototype.le,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ta,K.prototype.Va,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ta,K.prototype.Va,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ta,K.prototype.Va,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ta,K.prototype.Va,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ta, +K.prototype.Va,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ta,K.prototype.Va,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.ld,K.prototype.je,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.md,K.prototype.ke,"R6USER",1,1145],L[65504]=[null,null,K.prototype.Vc,K.prototype.Wd,"CTRL",8,1170],L[65520]=[null,null,K.prototype.ac,K.prototype.gc,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.ac,K.prototype.gc,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Id,K.prototype.Ge,"SYSID",1,1170],L[65526]= +[null,null,K.prototype.Uc,K.prototype.Vd,"CPUERR",1,1170],L[65528]=[null,null,K.prototype.ad,K.prototype.be,"MB",1,1170],L[65530]=[null,null,K.prototype.fd,K.prototype.ee,"PIR"],L[65532]=[null,null,K.prototype.Hd,K.prototype.Fe,"SL"],L[65534]=[null,null,K.prototype.jd,K.prototype.he,"PSW"],L); Ia(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),mc(this,ic?nc:oc);else{a=this.a=Array(this.size>> +function H(a,b,c,d,e,f){this.h=a;this.id=jc+=2;this.a=null;this.Ea=b;this.ib=c;this.size=d||0;this.type=e||kc;this.l=e==lc;this.controller=null;Gb(this);this.ta=this.Cc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],mc(this,f.wc);else if(Za)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.j=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),mc(this,ic?nc:oc);else{a=this.a=Array(this.size>> 2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},la:function(a,b){a&1&&I(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ua=!0},G:function(a,b){return this.I(a,b)},U:function(a,b){return this.cc(a,b)},ya:function(a,b,c){this.l?this.f(a,b,c):this.Pb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.ic(a,b,c)},B:function(a){return this.j[a]},J:function(a){return this.j[a]},T:function(a,b){a&1&&I(this.h,b,64);return this.c.getUint16(a,!0)},ka:function(a,b){a&1&&I(this.h,b,64);return this.s[a>>1]},xa:function(a,b){this.j[a]=b;this.ua=!0},za:function(a,b){this.j[a]=b;this.ua=!0},sa:function(a,b,c){a&1&&I(this.h, -c,64);this.c.setUint16(a,b,!0);this.ua=!0},Aa:function(a,b,c){a&1&&I(this.h,c,64);this.s[a>>1]=b;this.ua=!0}};function Gb(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&sc(a,tc,!1),(a.m=c.m)&&uc(a,tc,!1))}function uc(a,b,c){c&&a.m||(a.yb=!a.l&&b[1]||a.f,a.zb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Pb=b[1]||a.f,a.ic=b[3]||a.A}function sc(a,b,c){c&&a.i||(a.Lb=b[0]||a.v,a.Y=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.cc=b[2]||a.w}function mc(a,b){b||(b=vc);sc(a,b,void 0);uc(a,b,void 0)} -var vc=[],pc=[H.prototype.M,H.prototype.ra,H.prototype.la,H.prototype.Ba],tc=[H.prototype.G,H.prototype.ya,H.prototype.U,H.prototype.ta];if(Za)var oc=[H.prototype.B,H.prototype.xa,H.prototype.T,H.prototype.sa],nc=[H.prototype.J,H.prototype.za,H.prototype.ka,H.prototype.Aa]; -function wc(a,b){x.call(this,"CPU",a,wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Bb=0;this.pb=b;this.sa=c;this.Ab=Math.round(this.pb/1E4)/100;this.La=this.Ab*this.sa;this.o.S=!1;this.o.Nb=!1;this.o.eb=a.autoStart;this.o.sb=!1;this.nb=this.Ma=0;this.ob=a.csStart;this.Za=a.csInterval;this.$a=a.csStop;this.M=[];this.ac=this.Sd.bind(this);F(this)}A(wc);var xc=["power","reset"];h=wc.prototype; -h.ga=function(a,b,c,d){this.l=a;this.h=b;this.F=d;this.w=a.w;for(b=0;b=a.Ma&&(a.Ma+=a.Za,c=!0);0<=a.$a&&a.$a<=Bc(a)&&(a.Za=a.$a=-1,Ac(a),G(a),c=!0);c&&a.W(Bc(a)+" cycles: checksum="+r(a.nb))}} -h.ba=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.l)if(a=d.l,a.o.R)a=!0;else{var b=null,c,k=B(a.id);for(c=0;ca.Ba/a.La&&(b=1);a.sa=b;b=a.Ab*a.sa;if(a.La!=b){a.La=b;b=a.La.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.W("target speed: "+b)}c&&a.l&&Ec(a.l)}qb(a,a.la);a.la=0;a.ka=qa();a.za=0;Dc(a)}function Wb(a,b){var c=a.M.length;a.M.push([-1,b]);return c}function Yb(a,b,c,d){0<=b&&ba.M[b][0])&&(c=a.pb*a.sa/1E3*c|0,a.o.S&&(c+=Fc(a)),a.M[b][0]=c)} -function pb(a,b){for(var c=a.M.length-1;0<=c;c--){var d=a.M[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fc(a,b){var c=a.ra-=a.a;a.a=a.J=0;b&&(a.ra=0);return c} -h.Sd=function(){if(this.o.S){this.Eb>=this.pb&&Dc(this,!0);this.bb=0;this.mb=qa();if(this.za){var a=this.mb-this.za;a>this.Yb&&(this.ka+=a,this.ka>this.mb&&(this.ka=this.mb))}try{do{for(var b,c=this.o.sb?1:this.qb,d=this.M.length-1;0<=d;d--){var e=this.M[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.xb(b)}catch(f){if("number"!=typeof f)throw f;}b=Fc(this,!0);this.bb+=b;this.la+=b;rb(this,b);pb(this,b);this.ab-=b;if(0>=this.ab){this.ab+=this.qb;15<=++this.Zb&&(this.wa(),this.Zb=0);break}}while(this.o.S)}catch(f){G(this); -this.l&&this.l.stop(qa(),Bc(this));Ya(this,f.stack||f.message);return}if(this.o.S){a=setTimeout;b=this.ac;this.za=qa();c=this.Yb;this.bb&&(c=Math.round(c*this.bb/this.qb));c-=this.za-this.mb;if(d=this.za-this.ka)this.Ba=Math.round(this.la/(10*d))/100,864E5<=d&&(this.ta=0,Cc(this));if(0>c||this.Bac&&(this.ka-=c),c=0;this.Eb+=this.bb;this.za+=c;a(b,c)}}}; -function ob(a){var b;a.o.error?(a.W(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.S)a.W(a.toString()+" busy");else{Cc(a);a.o.S=!0;a.o.Nb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.ka,Bc(a));setTimeout(a.ac,0)}}h.xb=function(){return 0};function G(a){var b=!1;if(a.o.S){Fc(a);qb(a,a.la);a.la=0;a.o.S=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(qa(),Bc(a));b=!0}a.o.complete=void 0;return b} -function Gc(a){this.Ra=+a.model||1170;this.Ub=a.addrReset||0;wc.call(this,a,6666667);this.rb=0;this.Wb=255;1120==this.Ra?(this.decode=Hc.bind(this),this.Aa=this.Bc,this.rb=8,this.Wb=-1):(this.decode=Ic.bind(this),this.Aa=this.Cc);Jc(this);this.Na=0;this.I=null;this.o.complete=!1}A(Gc,wc);h=Gc.prototype;h.reset=function(){this.status("model "+this.Ra);this.o.S&&G(this);Jc(this);zc(this);this.o.error=!1;this.parent.reset.call(this)}; -function Jc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.D=15;a.g=[0,0,0,0,0,0,0,a.Ub,-1,-2,-3,-4,-5,-6,-7,-8];a.Ka=[0,0,0,0,0,0];a.qa=[0,0,0,0];a.v=0;a.lb=0;a.Jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.da=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0]];a.ib=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.fc=[0,0,0,0,0,0,0,0];a.ec=0;a.u=0;a.B=a.G=0;a.c=a.b=a.Db=0;a.Oa=-1;nb(a)}function nb(a){a.aa=0;a.Gb=0;a.Ib=0;a.Ea=0;a.Z=0;a.wb=0;a.hb=255;a.Xa=0;a.kb=0;a.Ya=262143;a.cb=0;a.A=0;a.I=null;a.h&&(cc(a),a.Hc=Sb(a.h))}function cc(a){a.Xa?(a.U=65536,a.Cb=a.Ea&16?4186112:253952,a.T=a.Fc,a.Y=a.Pd,a.zb=a.Ne,Kb(a.h,a.Ea&16?22:18)):(a.U=0,a.Cb=57344,a.T=a.Ec,a.Y=a.dc,a.zb=a.jc,Kb(a.h,16))} -function bc(a,b){b&=-3073;if(a.aa!=b){b&57344&&!(a.aa&57344)&&(a.Gb=a.A>>16&65535,a.Ib=a.A&65535);a.aa=b;a.kb=b>>5&3;a.lb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Xa!=c&&(a.Xa=c,cc(a))}}h.Xb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ta,this.sa]);a.set(2,Rb(this.h));return a.data()}; -h.restore=function(a){var b=a[1];this.ta=b[1];Cc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.D>>14&3;a.v!=c&&(a.qa[c]=a.g[6],a.g[6]=a.qa[a.v]);a.D=b;a.u&=-3;a.u|=a.I?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.f=0)} +H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Za)for(a=Array(this.size>>2),b=0;b>8,c)},L:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ka:function(a,b){a&1&&I(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},G:function(a,b){return this.I(a,b)},T:function(a,b){return this.bc(a,b)},xa:function(a,b,c){this.l?this.f(a,b,c):this.Ob(a,b,c)},sa:function(a,b,c){this.l?this.f(a,b,c):this.hc(a,b,c)},B:function(a){return this.j[a]},J:function(a){return this.j[a]},S:function(a,b){a&1&&I(this.h,b,64);return this.c.getUint16(a,!0)},ja:function(a,b){a&1&&I(this.h,b,64);return this.s[a>>1]},wa:function(a,b){this.j[a]=b;this.ta=!0},ya:function(a,b){this.j[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.h, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},za:function(a,b,c){a&1&&I(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function Gb(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&sc(a,tc,!1),(a.m=c.m)&&uc(a,tc,!1))}function uc(a,b,c){c&&a.m||(a.xb=!a.l&&b[1]||a.f,a.yb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Ob=b[1]||a.f,a.hc=b[3]||a.A}function sc(a,b,c){c&&a.i||(a.Kb=b[0]||a.v,a.X=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.bc=b[2]||a.w}function mc(a,b){b||(b=vc);sc(a,b,void 0);uc(a,b,void 0)} +var vc=[],pc=[H.prototype.L,H.prototype.qa,H.prototype.ka,H.prototype.Aa],tc=[H.prototype.G,H.prototype.xa,H.prototype.T,H.prototype.sa];if(Za)var oc=[H.prototype.B,H.prototype.wa,H.prototype.S,H.prototype.ra],nc=[H.prototype.J,H.prototype.ya,H.prototype.ja,H.prototype.za]; +function wc(a,b){x.call(this,"CPU",a,wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Ab=0;this.ob=b;this.ra=c;this.zb=Math.round(this.ob/1E4)/100;this.Ka=this.zb*this.ra;this.o.R=!1;this.o.Mb=!1;this.o.cb=a.autoStart;this.o.rb=!1;this.mb=this.La=0;this.nb=a.csStart;this.Ya=a.csInterval;this.Za=a.csStop;this.L=[];this.$b=this.Rd.bind(this);F(this)}A(wc);var xc=["power","reset"];h=wc.prototype; +h.fa=function(a,b,c,d){this.l=a;this.h=b;this.F=d;this.w=a.w;for(b=0;b=a.La&&(a.La+=a.Ya,c=!0);0<=a.Za&&a.Za<=Bc(a)&&(a.Ya=a.Za=-1,Ac(a),G(a),c=!0);c&&a.V(Bc(a)+" cycles: checksum="+r(a.mb))}} +h.aa=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.l)if(a=d.l,a.o.P)a=!0;else{var b=null,c,k=B(a.id);for(c=0;ca.Aa/a.Ka&&(b=1);a.ra=b;b=a.zb*a.ra;if(a.Ka!=b){a.Ka=b;b=a.Ka.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.V("target speed: "+b)}c&&a.l&&Ec(a.l)}qb(a,a.ka);a.ka=0;a.ja=qa();a.ya=0;Dc(a)}function Wb(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Yb(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.ob*a.ra/1E3*c|0,a.o.R&&(c+=Fc(a)),a.L[b][0]=c)} +function pb(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Fc(a,b){var c=a.qa-=a.a;a.a=a.J=0;b&&(a.qa=0);return c} +h.Rd=function(){if(this.o.R){this.Db>=this.ob&&Dc(this,!0);this.ab=0;this.lb=qa();if(this.ya){var a=this.lb-this.ya;a>this.Xb&&(this.ja+=a,this.ja>this.lb&&(this.ja=this.lb))}try{do{for(var b,c=this.o.rb?1:this.pb,d=this.L.length-1;0<=d;d--){var e=this.L[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.wb(b)}catch(f){if("number"!=typeof f)throw f;}b=Fc(this,!0);this.ab+=b;this.ka+=b;rb(this,b);pb(this,b);this.$a-=b;if(0>=this.$a){this.$a+=this.pb;15<=++this.Yb&&(this.va(),this.Yb=0);break}}while(this.o.R)}catch(f){G(this); +this.l&&this.l.stop(qa(),Bc(this));Ya(this,f.stack||f.message);return}if(this.o.R){a=setTimeout;b=this.$b;this.ya=qa();c=this.Xb;this.ab&&(c=Math.round(c*this.ab/this.pb));c-=this.ya-this.lb;if(d=this.ya-this.ja)this.Aa=Math.round(this.ka/(10*d))/100,864E5<=d&&(this.sa=0,Cc(this));if(0>c||this.Aac&&(this.ja-=c),c=0;this.Db+=this.ab;this.ya+=c;a(b,c)}}}; +function ob(a){var b;a.o.error?(a.V(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.o.R)a.V(a.toString()+" busy");else{Cc(a);a.o.R=!0;a.o.Mb=!0;if(b=a.j.run)b.textContent="Halt";a.l&&a.l.start(a.ja,Bc(a));setTimeout(a.$b,0)}}h.wb=function(){return 0};function G(a){var b=!1;if(a.o.R){Fc(a);qb(a,a.ka);a.ka=0;a.o.R=!1;if(b=a.j.run)b.textContent="Run";a.l&&a.l.stop(qa(),Bc(a));b=!0}a.o.complete=void 0;return b} +function Gc(a){this.Qa=+a.model||1170;this.Tb=a.addrReset||0;wc.call(this,a,6666667);this.qb=0;this.Vb=255;1120==this.Qa?(this.decode=Hc.bind(this),this.za=this.Ac,this.qb=8,this.Vb=-1):(this.decode=Ic.bind(this),this.za=this.Bc);Jc(this);this.Ma=0;this.I=null;this.o.complete=!1}A(Gc,wc);h=Gc.prototype;h.reset=function(){this.status("model "+this.Qa);this.o.R&&G(this);Jc(this);zc(this);this.o.error=!1;this.parent.reset.call(this)}; +function Jc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.D=15;a.g=[0,0,0,0,0,0,0,a.Tb,-1,-2,-3,-4,-5,-6,-7,-8];a.Ja=[0,0,0,0,0,0];a.pa=[0,0,0,0];a.v=0;a.kb=0;a.Ic=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.ca=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0]];a.hb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];a.ec=[0,0,0,0,0,0,0,0];a.dc=0;a.u=0;a.B=a.G=0;a.c=a.b=a.Cb=0;a.Na=-1;nb(a)}function nb(a){a.Z=0;a.Fb=0;a.Hb=0;a.Da=0;a.Y=0;a.vb=0;a.gb=255;a.Wa=0;a.jb=0;a.Xa=262143;a.bb=0;a.A=0;a.I=null;a.h&&(cc(a),a.Gc=Sb(a.h))}function cc(a){a.Wa?(a.T=65536,a.Bb=a.Da&16?4186112:253952,a.S=a.Ec,a.X=a.Od,a.yb=a.Me,Kb(a.h,a.Da&16?22:18)):(a.T=0,a.Bb=57344,a.S=a.Dc,a.X=a.cc,a.yb=a.ic,Kb(a.h,16))} +function bc(a,b){b&=-3073;if(a.Z!=b){b&57344&&!(a.Z&57344)&&(a.Fb=a.A>>16&65535,a.Hb=a.A&65535);a.Z=b;a.jb=b>>5&3;a.kb=b>>1&15;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Wa!=c&&(a.Wa=c,cc(a))}}h.Wb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.sa,this.ra]);a.set(2,Rb(this.h));return a.data()}; +h.restore=function(a){var b=a[1];this.sa=b[1];Cc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.D>>14&3;a.v!=c&&(a.pa[c]=a.g[6],a.g[6]=a.pa[a.v]);a.D=b;a.u&=-3;a.u|=a.I?2:1}function R(a,b){a.u&256||(a.s=a.i=b,a.f=0)} function Oc(a,b,c){a.u&256||(a.s=a.i=a.m=b,a.f=c||0)}function Pc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Qc(a,b){a.u&256||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Rc(a,b,c,d){a.u&256||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function J(a,b,c,d){if(!a.Na){0>a.Oa?a.Oa=dc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.Z|=4,a.g[6]=4,e=!0);a.A=b|4143316992;a.v=0;var f=a.Y(b|a.U),g=a.Y(b+2&65535|a.U);ec(a,g&-12289|a.Oa>>2&12288);Sc(a,a.Oa,e);Sc(a,a.g[7],e);Q(a,f);a.a-=5;a.u&=~(c|19);a.u|=129;a.Oa=-1;if(-3<=d)throw b;}}function Tc(a){var b=Uc(a),c=Uc(a)&-1793;a.D&49152&&(c=c&-225|a.D&63712);Q(a,b);ec(a,c);a.u&=-17}function Vc(a,b){var c=b>>13&31;31>c&&(b=a.Ea&32?a.ib[c]+(b&8190)&4194302:b&-3932161);return b} -function vb(a,b,c){var d,e,f;if(!(c&a.Xa))return f=b&65535,57344<=f&&(f|=a.Cb),f;d=b>>13;a.Ea&a.Jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.da[a.v][d]<<6)+(b&8191)&a.Ya;3932160<=f&&(f=Vc(a,f));if(a.Na)return f;f>=a.Hc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& -(g|=16384));a.H[a.v][d]=e;if(f!=(4194170&a.Ya)||a.v)a.kb=a.v,a.lb=d;g&&(g&57344&&(0<=a.Oa&&(g|=128),a.aa&57344||(g|=a.aa&4096|a.kb<<5|a.lb<<1,bc(a,a.aa&-61695|g&61694)),J(a,168,64,-1)),a.aa&61440||!(f<(4191360&a.Ya)||f>(4194239&a.Ya))||(a.aa|=4096,a.aa&512&&(a.u|=64)));return f}function Uc(a){var b=a.Y(a.g[6]|a.U);a.g[6]=a.g[6]+2&65535;return b}function Sc(a,b,c){var d=a.g[6]-2&65535;a.g[6]=d;a.A=a.A&65535|(a.A&-65536)<<8|16121856;c||a.Aa(4,-2,d);a.zb(d,b)} -function Wc(a,b,c,d){var e,f,g=d&8?0:a.U;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.Aa(d,0,a.g[6]),a.a-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.Aa(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.Y(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.Aa(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.Y(e)|g;a.a-=8;break;case 6:return e=a.Y(Mc(a,2)),e=e+a.g[c]&65535,6==c&&a.Aa(d,0, -e),a.a-=6,e|g;case 7:return e=a.Y(Mc(a,2)),e=e+a.g[c]&65535,e=a.Y(e|a.U),a.a-=10,e|g}a.g[c]=a.g[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;return e}h.Bc=function(a,b,c){!this.v&&0>=b&&c<=this.hb&&(this.u|=32)};h.Cc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.hb&&(c<=this.hb-32?J(this,4,0,-3):(this.Z|=8,this.u|=32)))};h.Ec=function(a,b,c){a=Wc(this,a,b,c);3932160<=a&&(a=Vc(this,a));return a};h.Fc=function(a,b,c){return vb(this,Wc(this,a,b,c),c)}; -h.dc=function(a){3932160<=a&&(a=Vc(this,a));return Ob(this.h,this.cb=a)};h.Pd=function(a){return Ob(this.h,this.cb=vb(this,a,2))};h.jc=function(a,b){3932160<=a&&(a=Vc(this,a));Qb(this.h,this.cb=a,b&65535)};h.Ne=function(a,b){Qb(this.h,this.cb=vb(this,a,4),b)};function Xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Wc(a,b,d,2),c&65536||61440!==(a.D&61440)&&(d&=65535),a.v=a.D>>12&3,c=a.Y(d|c&a.U),a.v=a.D>>14&3):c=6!=d||(a.D>>2&12288)===(a.D&12288)?a.g[d]:a.qa[a.D>>12&3];return c} -function Yc(a,b,c,d){a.A=a.A&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Wc(a,b,e,4),c&65536||(e&=65535),a.v=a.D>>12&3,e=vb(a,e|c&65536,4),a.v=a.D>>14&3,Qb(a.h,e,d)):6!=e||(a.D>>2&12288)===(a.D&12288)?a.g[e]=d:a.qa[a.D>>12&3]=d}function Zc(a,b){b>>=6;var c=a.G=b&7;(b=a.B=(b&56)>>3)?(c=a.T(b,c,3),a=Nb(a.h,c)):a=a.g[c+a.rb]&a.Wb;return a}function $c(a,b){b>>=6;var c=a.G=b&7;return(b=a.B=(b&56)>>3)?Ob(a.h,a.T(b,c,2)):a.g[c+a.rb]} -function ad(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Wc(a,b,c,8)}function bd(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.T(b,c,3),a=Nb(a.h,c)):a=a.g[c]&255;return a}function cd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Ob(a.h,a.T(b,c,2)):a.g[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Db=a.T(b,e,7),c=0>c?a.g[-c-1]&255:c,c=d.call(a,c,Nb(a.h,e)),e&1&&a.a--,a=a.h,a.f[(e&a.i)>>>a.b].yb(e&a.l,c&255,e)):(b=a.g[e],c=0>c?a.g[-c-1]&255:c,a.g[e]=b&65280|d.call(a,c,b&255))} -function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.T(b,e,6),Qb(a.h,e,d.call(a,0>c?a.g[-c-1]:c,Ob(a.h,e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function dd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.T(b,e,5),e=c=0>c?a.g[-c-1]&255:c,d&1&&a.a--,a=a.h,a.f[(d&a.i)>>>a.b].yb(d&a.l,e&255,d)):c?(c=0>c?a.g[-c-1]&255:c,a.g[e]=a.g[e]&~d|c<<24>>24&d):a.g[e]&=~d;return c} -function ed(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.T(b,d,4),Qb(a.h,d,c=0>c?a.g[-c-1]:c)):a.g[d]=c=0>c?a.g[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.xb=function(a){this.o.complete=!0;var b=a?this.o.Nb?0:1:-1;this.o.Nb=!1;this.ra=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.wb&224)>>5,e=this.I&&this.I.Sa>d?this.I:null;e&&(c=e.Ud,d=e.Sa);d>(this.D&224)>>5?(this.u&8&&(Mc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&ac(this,e),a=!0);this.I||this.wb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Nc(this)&&0>b)break}this.u=this.u&15|this.D&16;this.decode(Lc(this))}while(0>1|b<<16;Qc(this,a);return a&65535} +function J(a,b,c,d){if(!a.Ma){0>a.Na?a.Na=dc(a):a.v||(d=-3);var e=!1;-3==d&&(b=4,a.Y|=4,a.g[6]=4,e=!0);a.A=b|4143316992;a.v=0;var f=a.X(b|a.T),g=a.X(b+2&65535|a.T);ec(a,g&-12289|a.Na>>2&12288);Sc(a,a.Na,e);Sc(a,a.g[7],e);Q(a,f);a.a-=5;a.u&=~(c|19);a.u|=129;a.Na=-1;if(-3<=d)throw b;}}function Tc(a){var b=Uc(a),c=Uc(a)&-1793;a.D&49152&&(c=c&-225|a.D&63712);Q(a,b);ec(a,c);a.u&=-17}function Vc(a,b){var c=b>>13&31;31>c&&(b=a.Da&32?a.hb[c]+(b&8190)&4194302:b&-3932161);return b} +function vb(a,b,c){var d,e,f;if(!(c&a.Wa))return f=b&65535,57344<=f&&(f|=a.Bb),f;d=b>>13;a.Da&a.Ic[a.v]||(d&=7);e=a.H[a.v][d];f=(a.ca[a.v][d]<<6)+(b&8191)&a.Xa;3932160<=f&&(f=Vc(a,f));if(a.Ma)return f;f>=a.Gc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& +(g|=16384));a.H[a.v][d]=e;if(f!=(4194170&a.Xa)||a.v)a.jb=a.v,a.kb=d;g&&(g&57344&&(0<=a.Na&&(g|=128),a.Z&57344||(g|=a.Z&4096|a.jb<<5|a.kb<<1,bc(a,a.Z&-61695|g&61694)),J(a,168,64,-1)),a.Z&61440||!(f<(4191360&a.Xa)||f>(4194239&a.Xa))||(a.Z|=4096,a.Z&512&&(a.u|=64)));return f}function Uc(a){var b=a.X(a.g[6]|a.T);a.g[6]=a.g[6]+2&65535;return b}function Sc(a,b,c){var d=a.g[6]-2&65535;a.g[6]=d;a.A=a.A&65535|(a.A&-65536)<<8|16121856;c||a.za(4,-2,d);a.yb(d,b)} +function Wc(a,b,c,d){var e,f,g=d&8?0:a.T;switch(b){case 0:return J(a,4,0,-2),0;case 1:return 6==c&&a.za(d,0,a.g[6]),a.a-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.za(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.X(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.za(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.X(e)|g;a.a-=8;break;case 6:return e=a.X(Mc(a,2)),e=e+a.g[c]&65535,6==c&&a.za(d,0, +e),a.a-=6,e|g;case 7:return e=a.X(Mc(a,2)),e=e+a.g[c]&65535,e=a.X(e|a.T),a.a-=10,e|g}a.g[c]=a.g[c]+f&65535;a.A=a.A&65535|(a.A&-65536)<<8|(f<<3&248|c)<<16;return e}h.Ac=function(a,b,c){!this.v&&0>=b&&c<=this.gb&&(this.u|=32)};h.Bc=function(a,b,c){this.v||(65534<=c&&(c|=-65536),a&4&&c<=this.gb&&(c<=this.gb-32?J(this,4,0,-3):(this.Y|=8,this.u|=32)))};h.Dc=function(a,b,c){a=Wc(this,a,b,c);3932160<=a&&(a=Vc(this,a));return a};h.Ec=function(a,b,c){return vb(this,Wc(this,a,b,c),c)}; +h.cc=function(a){3932160<=a&&(a=Vc(this,a));return Ob(this.h,this.bb=a)};h.Od=function(a){return Ob(this.h,this.bb=vb(this,a,2))};h.ic=function(a,b){3932160<=a&&(a=Vc(this,a));Qb(this.h,this.bb=a,b&65535)};h.Me=function(a,b){Qb(this.h,this.bb=vb(this,a,4),b)};function Xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Wc(a,b,d,2),c&65536||61440!==(a.D&61440)&&(d&=65535),a.v=a.D>>12&3,c=a.X(d|c&a.T),a.v=a.D>>14&3):c=6!=d||(a.D>>2&12288)===(a.D&12288)?a.g[d]:a.pa[a.D>>12&3];return c} +function Yc(a,b,c,d){a.A=a.A&65535|1441792;var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Wc(a,b,e,4),c&65536||(e&=65535),a.v=a.D>>12&3,e=vb(a,e|c&65536,4),a.v=a.D>>14&3,Qb(a.h,e,d)):6!=e||(a.D>>2&12288)===(a.D&12288)?a.g[e]=d:a.pa[a.D>>12&3]=d}function Zc(a,b){b>>=6;var c=a.G=b&7;(b=a.B=(b&56)>>3)?(c=a.S(b,c,3),a=Nb(a.h,c)):a=a.g[c+a.qb]&a.Vb;return a}function $c(a,b){b>>=6;var c=a.G=b&7;return(b=a.B=(b&56)>>3)?Ob(a.h,a.S(b,c,2)):a.g[c+a.qb]} +function ad(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Wc(a,b,c,8)}function bd(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.S(b,c,3),a=Nb(a.h,c)):a=a.g[c]&255;return a}function cd(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Ob(a.h,a.S(b,c,2)):a.g[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.Cb=a.S(b,e,7),c=0>c?a.g[-c-1]&255:c,c=d.call(a,c,Nb(a.h,e)),e&1&&a.a--,a=a.h,a.f[(e&a.i)>>>a.b].xb(e&a.l,c&255,e)):(b=a.g[e],c=0>c?a.g[-c-1]&255:c,a.g[e]=b&65280|d.call(a,c,b&255))} +function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.S(b,e,6),Qb(a.h,e,d.call(a,0>c?a.g[-c-1]:c,Ob(a.h,e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function dd(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.S(b,e,5),e=c=0>c?a.g[-c-1]&255:c,d&1&&a.a--,a=a.h,a.f[(d&a.i)>>>a.b].xb(d&a.l,e&255,d)):c?(c=0>c?a.g[-c-1]&255:c,a.g[e]=a.g[e]&~d|c<<24>>24&d):a.g[e]&=~d;return c} +function ed(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=a.S(b,d,4),Qb(a.h,d,c=0>c?a.g[-c-1]:c)):a.g[d]=c=0>c?a.g[-c-1]:c;return c}function V(a,b,c){c&&(Q(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.wb=function(a){this.o.complete=!0;var b=a?this.o.Mb?0:1:-1;this.o.Mb=!1;this.qa=this.a=a;do{if(this.u){if(a=this.u&11){a=!1;if(this.u&2){var c=160,d=(this.vb&224)>>5,e=this.I&&this.I.Ra>d?this.I:null;e&&(c=e.Td,d=e.Ra);d>(this.D&224)>>5?(this.u&8&&(Mc(this,2),this.u&=-9),J(this,c,0,-9),d=!0):d=!1;d&&(e&&ac(this,e),a=!0);this.I||this.vb||(this.u&=-3)}else this.u&1&&this.u++;a=a&&0>b}if(a)break;if(this.u&112&&Nc(this)&&0>b)break}this.u=this.u&15|this.D&16;this.decode(Lc(this))}while(0>1|b<<16;Qc(this,a);return a&65535} function kd(a,b){a=b&128|b>>1|b<<8;Qc(this,a<<8);return a&255}function ld(a,b){a=b&~a;R(this,a);return a}function md(a,b){a=b&~a;R(this,a<<8);return a}function nd(a,b){a|=b;R(this,a);return a}function od(a,b){a|=b;R(this,a<<8);return a}function pd(a,b){a=~b|65536;Oc(this,a);return a&65535}function qd(a,b){a=~b|256;Oc(this,a<<8);return a&255}function rd(a,b){a=b-a;this.u&256||(this.s=this.i=a,this.f=b&(b^a));return a&65535} function sd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&256||(this.s=this.i=c,this.f=b&(b^c));return a&255}function td(a,b){a=b+a;this.u&256||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ud(a,b){a=b+a;var c=a<<8;this.u&256||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function vd(a,b){a=-b;Oc(this,a,a&b&32768);return a&65535}function wd(a,b){a=-b;Oc(this,a<<8,(a&b&128)<<8);return a&255}function xd(a,b){a=b<<1|this.m>>16&1;Qc(this,a);return a&65535} function yd(a,b){a=b<<1|this.m>>16&1;Qc(this,a<<8);return a&255}function zd(a,b){a=(this.m&65536|b)>>1|b<<16;Qc(this,a);return a&65535}function Ad(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Qc(this,a<<8);return a&255}function Bd(a,b){var c=b-a;Rc(this,c,a,b);return c&65535}function Cd(a,b){var c=b-a;Rc(this,c<<8,a<<8,b<<8);return c&255}function Dd(a,b){this.u&256||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535}function Ed(a,b){a^=b;R(this,a);return a&65535} @@ -141,121 +141,121 @@ function Od(a){var b=$c(this,a);a=cd(this,a);R(this,(0>b?this.g[-b-1]:b)&a);this function Td(a){V(this,a,!P(this)&&!!(this.i&65535))}function Ud(a){V(this,a,(this.i&65535?0:4)||!Kc(this)!=!(this.f&32768))}function Vd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Wd(a){V(this,a,!Kc(this)!=!(this.f&32768))}function Xd(a){V(this,a,Kc(this))}function Yd(a){V(this,a,!!(this.i&65535))}function Zd(a){V(this,a,!Kc(this))}function $d(){J(this,12,0,-8)}function ae(a){V(this,a,!0)}function be(a){V(this,a,!(this.f&32768))}function ce(a){V(this,a,this.f&32768?2:0)} function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function de(a){var b=$c(this,a);a=cd(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;Rc(this,c,a,b);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)}function ee(a){var b=Zc(this,a);a=bd(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);Rc(this,c,a,b);this.a-=this.c?4+(this.G&&6<=this.b?1:0):(this.B?4:3)+(7==this.b?2:0)} function fe(a){var b=cd(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function ge(){J(this,24,0,-8);this.a-=20} -function he(){this.D&49152?(this.Z|=128,J(this,4,0,-7)):(this.w&&1120==this.Ra&&this.w.setData(this.g[0],!0),this.F?this.F.b():G(this));this.a-=7}function ie(){J(this,16,0,-8);this.a-=20}var je=[0,7,7,10,7,11,9,13];function ke(a){this.J=this.a;Q(this,ad(this,a));this.a=this.J-je[this.c]}var le=[0,14,14,17,14,18,16,20];function me(a){this.J=this.a;var b=ad(this,a);a=a>>6&7;Sc(this,this.g[a]);this.g[a]=this.g[7];Q(this,b);this.a=this.J-le[this.c]}var ne=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function he(){this.D&49152?(this.Y|=128,J(this,4,0,-7)):(this.w&&1120==this.Qa&&this.w.setData(this.g[0],!0),this.F?this.F.b():G(this));this.a-=7}function ie(){J(this,16,0,-8);this.a-=20}var je=[0,7,7,10,7,11,9,13];function ke(a){this.J=this.a;Q(this,ad(this,a));this.a=this.J-je[this.c]}var le=[0,14,14,17,14,18,16,20];function me(a){this.J=this.a;var b=ad(this,a);a=a>>6&7;Sc(this,this.g[a]);this.g[a]=this.g[7];Q(this,b);this.a=this.J-le[this.c]}var ne=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function oe(a){var b=$c(this,a);this.J=this.a;R(this,ed(this,a,b));this.a=this.J-ne[(this.B?8:0)+this.c]+(7!=this.b||this.c?0:2)}function pe(a){var b=Zc(this,a);R(this,dd(this,a,b,65535)<<8);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}var qe=[7,13,13,17,14,18,17,21]; function re(a){var b=cd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&256||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)Q(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function xe(a){U(this,a,$c(this,a),Bd);this.a-=this.c?9+(this.G&&6<=this.b?1:0):(this.B?5:3)+(7==this.b?2:0)}function ye(a){U(this,a,0,Dd);this.a-=this.c?9:3+(7==this.b?2:0)}function ze(){J(this,28,0,-8)} -function Ae(){this.w&&(this.w.ja=this.g[7],this.w.setData(this.g[0],!0));this.u|=8;Mc(this,-2);this.a-=3}function Be(a){U(this,a,this.g[(a>>6&7)+this.rb],Ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Hc(a){Ce[a>>12].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)}function Je(a){Ke[a&15].call(this,a)}function Le(a){Me[a&15].call(this,a)}function Ne(a){Oe[a>>6&3].call(this,a)} +function Ae(){this.w&&(this.w.ia=this.g[7],this.w.setData(this.g[0],!0));this.u|=8;Mc(this,-2);this.a-=3}function Be(a){U(this,a,this.g[(a>>6&7)+this.qb],Ed);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,0,-8)}function Hc(a){Ce[a>>12].call(this,a)}function De(a){Ee[a>>6&3].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)}function Je(a){Ke[a&15].call(this,a)}function Le(a){Me[a&15].call(this,a)}function Ne(a){Oe[a>>6&3].call(this,a)} function Pe(a){Qe[a>>6&3].call(this,a)}function Re(a){Se[a>>6&3].call(this,a)} var Ce=[function(a){Te[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,Fd,Y,function(a){Ue[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,xe,Y],Te=[function(a){Ve[a>>4&15].call(this,a)},ae,Yd,Qd,Rd,Wd,Sd,Ud,me,me,De,Fe,He,Y,Y,Y],Ee=[function(a){Oc(this,ed(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,rd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ge=[function(a){U(this,a,0, vd);this.a-=this.c?11:6},function(a){U(this,a,P(this)?1:0,fd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,P(this)?1:0,Bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=cd(this,a);Oc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Ie=[function(a){U(this,a,0,zd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,xd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)}], Ve=[function(a){We[a&15].call(this,a)},Y,Y,Y,ke,ke,ke,ke,ue,Y,Je,Le,ye,ye,ye,ye],We=[he,Ae,ve,$d,ie,te,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ke=[se,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Me=[se,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ue=[Zd,Xd,Td,Vd,be,ce,Id,Jd,ge,ze,Ne,Pe,Re,Y,Y,Y],Oe=[function(a){Oc(this, dd(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,sd);this.a-=this.c?9:3+(7==this.b?2:0)}],Qe=[function(a){S(this,a,0,wd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,Cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=bd(this,a);Oc(this,a<<8);this.a-=this.c?4:3+(7== -this.b?2:0)}],Se=[function(a){S(this,a,0,Ad);this.a-=this.c?9+(this.Db&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,kd);this.a-=this.c?9+(this.Db&1):3+(7==this.b?2:0)},function(a){S(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)}];function Ic(a){Xe[a>>12].call(this,a)} -var Xe=[function(a){Ye[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,Fd,function(a){Ze[a>>8&15].call(this,a)},function(a){$e[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,xe,Y],Ye=[function(a){af[a>>4&15].call(this,a)},ae,Yd,Qd,Rd,Wd,Sd,Ud,me,me,De,Fe,He,function(a){bf[a>>6&3].call(this,a)},Y,Y],bf=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.Y(a|this.U);Q(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Xc(this,a,0);Sc(this,a);R(this,a);this.a-=11},function(a){var b=Uc(this);this.J= +this.b?2:0)}],Se=[function(a){S(this,a,0,Ad);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,yd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,kd);this.a-=this.c?9+(this.Cb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)}];function Ic(a){Xe[a>>12].call(this,a)} +var Xe=[function(a){Ye[a>>8&15].call(this,a)},oe,de,Od,Kd,Md,Fd,function(a){Ze[a>>8&15].call(this,a)},function(a){$e[a>>8&15].call(this,a)},pe,ee,Pd,Ld,Nd,xe,Y],Ye=[function(a){af[a>>4&15].call(this,a)},ae,Yd,Qd,Rd,Wd,Sd,Ud,me,me,De,Fe,He,function(a){bf[a>>6&3].call(this,a)},Y,Y],bf=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.X(a|this.T);Q(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Xc(this,a,0);Sc(this,a);R(this,a);this.a-=11},function(a){var b=Uc(this);this.J= this.a;Yc(this,a,0,b);R(this,b);this.a=this.J-qe[this.c]},function(a){R(this,ed(this,a,Kc(this)?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],af=[function(a){cf[a&15].call(this,a)},Y,Y,Y,ke,ke,ke,ke,ue,function(a){a&8?(this.D&49152||(this.D=this.D&-2017|(a&7)<<5,this.u|=1,this.u&=-3),this.a-=5):J(this,8,0,-8)},Je,Le,ye,ye,ye,ye],cf=[he,Ae,function(){Tc(this);this.u|=this.D&16;this.a-=13},$d,ie,te,ve,function(){J(this,8,0,-8)},Y,Y,Y,Y,Y,Y,Y,Y],Ze=[re,re,fe,fe,Gd,Gd,Hd,Hd,Be,Be,Y,Y,Y,Y,we,we],$e=[Zd, Xd,Td,Vd,be,ce,Id,Jd,ge,ze,Ne,Pe,Re,function(a){df[a>>6&3].call(this,a)},Y,Y],df=[Y,function(a){a=Xc(this,a,65536);Sc(this,a);R(this,a);this.a-=11},function(a){var b=Uc(this);this.J=this.a;Yc(this,a,65536,b);R(this,b);this.a=this.J-qe[this.c]},Y]; -function ef(a){x.call(this,"ROM",a,ef,128);this.ca=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=t(this.l);if(this.l){a=this.l;var b=ka(this.s);"json"!=b&&"hex"!=b&&(a=ta()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;v(a,null,!0,function(a,b,f){f?(c.C("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ta(c.ya,a,b),(a=sa(a,b))?(c.c=a.N,c.ca=a.ca):c.l=null);ff(c)})}}A(ef);h=ef.prototype; -h.ga=function(a,b,c,d){this.h=b;this.a=c;this.F=d;ff(this)};h.ia=function(){this.ca&&(this.F&&this.F.a(this.id,this.i,this.b,this.ca),delete this.ca);return!0};h.ha=function(){return!0}; -function ff(a){if(!Xa(a)){if(a.l){if(!a.c||!a.h)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Ya(a,"ROM size ("+r(a.c.length,8,!0)+") does not match specified size ("+r(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+Bb){var c={};b=(c[b]=[ef.prototype.Dd,ef.prototype.Be,null,null,null,a.b>>1],c);if(eb(a.h,a,b)){b=a.m=!0;break a}}else if(Hb(a.h,b,a.b,lc)){for(c=0;c>>f.b;0>>=f.b;0>>a.b;0>1],c);if(eb(a.h,a,b)){b=a.m=!0;break a}}else if(Hb(a.h,b,a.b,lc)){for(c=0;c>>f.b;0>>=f.b;0>>a.b;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,z=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(z)for(;z--;)Pb(a.h,p++,b[u++]&255);else p&1?G(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=m.Qb&&c<=m.wc&&(b=c-(m.Qb-m.kc));b&&(a.preventDefault&&a.preventDefault(),d.vb(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.mc&&(b=m.lc);d.vb(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.vb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; -h.ga=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;var e=this;this.U=Zb(48,4,262144);this.M=Wb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.T&&97<=a&&122>a&&(a-=32),Yb(e.a,e.M,1E3/Math.round(e.G/10)));0<=a&&(e.w=a,e.b&128?e.w|=49152:e.b|=128,e.b&64&&Xb(c,e.U))});this.B=Zb(52,4,262144);this.la=Wb(this.a,function(){e.c|=128;e.c&64&&Xb(c,e.B)});eb(b,this,mf);gb(b,this.reset.bind(this));F(this)}; -h.$b=function(){if(!this.v){var a=yc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=oa(b[0]);if(c!=this.xa)return;b=oa(b[1]);if(this.v=Ua(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.ya+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ia=function(a,b){if(!b)if(this.$b(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ha=function(a){return a?this.save():!0};h.reset=function(){nf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return nf(this)};function nf(a){a.w=0;a.b=0;a.c=128;a.s=[];return!0}h.vb=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.m%a,this.J&&(b=" ".slice(0,c)));this.I&&!this.m&&c&&(b=String.fromCharCode(this.I)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a|| -1024<=this.i.length)this.W(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Yb(this.a,this.la,1E3/Math.round(this.ka/10));this.c&=-129};var of={},mf=(of[65392]=[null,null,Z.prototype.qd,Z.prototype.oe,"RCSR"],of[65394]=[null,null,Z.prototype.pd,Z.prototype.ne,"RBUF"],of[65396]=[null,null,Z.prototype.Rd,Z.prototype.Pe,"XCSR"],of[65398]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XBUF"],of); -Ia(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick= +c+g,b[g]);g=!0}g&&null!=d&&(a=a.a,a.Tb=d,a.h.reset(),nb(a),Q(a,d),ec(a,0),!f&&a.F&&(G(a)||a.F.c()));return g}Ia(function(){for(var a=E(document,"pdp11","ram"),b=0;b=m.Pb&&c<=m.vc&&(b=c-(m.Pb-m.jc));b&&(a.preventDefault&&a.preventDefault(),d.ub(b));return!0},c.onkeypress=function(a){a=a||window.event;var b=a.which||a.keyCode;a.altKey&&b==m.lc&&(b=m.kc);d.ub(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.ub(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; +h.fa=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;var e=this;this.T=Zb(48,4,262144);this.L=Wb(this.a,function(){var a;a=-1;e.s.length&&(a=e.s.shift()&255,e.S&&97<=a&&122>a&&(a-=32),Yb(e.a,e.L,1E3/Math.round(e.G/10)));0<=a&&(e.w=a,e.b&128?e.w|=49152:e.b|=128,e.b&64&&Xb(c,e.T))});this.B=Zb(52,4,262144);this.ka=Wb(this.a,function(){e.c|=128;e.c&64&&Xb(c,e.B)});eb(b,this,mf);gb(b,this.reset.bind(this));F(this)}; +h.Zb=function(){if(!this.v){var a=yc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=oa(b[0]);if(c!=this.wa)return;b=oa(b[1]);if(this.v=Ua(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.xa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ha=function(a,b){if(!b)if(this.Zb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +h.ga=function(a){return a?this.save():!0};h.reset=function(){nf(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return nf(this)};function nf(a){a.w=0;a.b=0;a.c=128;a.s=[];return!0}h.ub=function(a){if("number"==typeof a)this.s.push(a);else if("string"==typeof a)for(var b=0,c,d=0;d":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.m%a,this.J&&(b=" ".slice(0,c)));this.I&&!this.m&&c&&(b=String.fromCharCode(this.I)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.m+=c}}else if(null!=this.i){if(10==a|| +1024<=this.i.length)this.V(this.i),this.i="";10!=a&&(this.i+=String.fromCharCode(a))}Yb(this.a,this.ka,1E3/Math.round(this.ja/10));this.c&=-129};var of={},mf=(of[65392]=[null,null,Z.prototype.pd,Z.prototype.ne,"RCSR"],of[65394]=[null,null,Z.prototype.od,Z.prototype.me,"RBUF"],of[65396]=[null,null,Z.prototype.Qd,Z.prototype.Oe,"XCSR"],of[65398]=[null,null,Z.prototype.Pd,Z.prototype.Ne,"XBUF"],of); +Ia(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.j[b]=c,c.onclick= function(){var a=d.j.listTapes;a&&rf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.G){c.parentNode.removeChild(c);break}this.j[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;rf(d,t(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.j[b]=c,!0}return!1}; -h.ga=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;this.M=sf(a);var e=this;if((this.c=yc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){w("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.I=Zb(56,4,4096);this.U=Wb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=ka(c),f="json"==e||"gz"==e?encodeURI(c):ta()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!v(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.R;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ta(a.ya,e,f),(e=sa(e,f))&&Bf(a,b,c,d,e.N,e.na,e.ma)); -a.o.Ga=!1;a.m&&(a.m--,a.m||F(a));yf(a)})}function vf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.L);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ka(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):la(c,"/")&&(d="dir"),f=ta()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.tb?"":e)+"&format=json"));return!!v(f, +function rf(a,b,c,d,e){if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local tape.');else{if("??"==c){c=window.prompt("Enter the URL of a remote tape image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"');a.s="??"}else a.s=c;xf(a,b,c,d,!1,e)}else zf(a,!1)}function xf(a,b,c,d,e,f){var g=-1;if(a.i.toLowerCase()!=c.toLowerCase()||a.f!=d)g++,zf(a,!0),a.o.Fa?a.C("PC11 busy"):(e&&a.m++,Af(a,b,c,d,f)?g++:a.o.Fa=!0);g&&Bf(a,a.B,a.i,a.f,a.M,a.ma,a.la)} +function Af(a,b,c,d,e){var f=c;if(e){var g=new FileReader;g.onload=function(){var e=g.result;e&&(e=new Uint8Array(e,0,e.byteLength),Bf(a,b,c,d,e),a.s="?");yf(a)};g.readAsArrayBuffer(e);return!0}0>c.indexOf("/api/v1/dump")&&(e=ka(c),f="json"==e||"gz"==e?encodeURI(c):ta()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!v(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.o.P;g?a.C('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ta(a.xa,e,f),(e=sa(e,f))&&Bf(a,b,c,d,e.M,e.ma,e.la)); +a.o.Fa=!1;a.m&&(a.m--,a.m||F(a));yf(a)})}function vf(a,b,c,d){if((a=a.j.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.K);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ka(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):la(c,"/")&&(d="dir"),f=ta()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!v(f, null,!0,function(b,c,d){If(a,b,c,d)})} -function If(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.o.R;if(d)a.controller.C('Unable to load disk "'+a.oa+'" (error '+d+": "+b+")",f);else{Ta(a.controller.ya,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)w(k[0]);else{a.L=k.length;a.P=k[0].length;a.O=k[0][0].length;var l=k[0][0][0];a.V=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var z=l.bytes;if(void 0!==z&&z.length){for(var T=n<<2,za=z.length;za>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.fa?f=a.pa+a.fa&&(a.fa+=f-(a.pa+a.fa)+1):(a.pa=f,a.fa=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.l&&!a.l.o.P;if(d)a.controller.C('Unable to load disk "'+a.na+'" (error '+d+": "+b+")",f);else{Ta(a.controller.xa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(k.length)if(1==k.length)w(k[0]);else{a.K=k.length;a.O=k[0].length;a.N=k[0][0].length;var l=k[0][0][0];a.U=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var u=l.data;if(void 0===u){var z=l.bytes;if(void 0!==z&&z.length){for(var T=n<<2,za=z.length;za>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ea?f=a.oa+a.ea&&(a.ea+=f-(a.oa+a.ea)+1):(a.oa=f,a.ea=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.oa+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.C("Unable to restore disk '"+this.na+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Kf(this,a++);)Nf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.v=a.autoMount||{};this.i=0;this.b=Array(8);this.w=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; -h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]= -c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.w){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.b&&((a=d.b[q(a.value)||0])?(a=a.X)?(a=Ca(Mf(a),a.Mb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.w)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= +function Nf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RK11",a,N,65536);this.w=a.autoMount||{};this.m=0;this.c=Array(8);this.A=!Ba("Mobi")&&window&&"FileReader"in window}A(N);h=N.prototype; +h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RK11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Of(d,a)},!0;case "loadDrive":return this.j[b]= +c,c.onclick=function(){var a=d.j.listDisks;a&&Pf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.W)?(a=Ca(Mf(a),a.Lb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.A)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= !a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Pf(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.ga=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;if((a=yc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.v[e]=a[e]);Qf(this);this.Pa=Zb(144,5,65536);eb(b,this,Rf);gb(b,this.reset.bind(this));Sf(this,"None","",!0);this.w&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||F(this)}; -h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Jb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()}; -h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.i=0);for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)} -function Vf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ia?a.C("RK11 busy"):(k.Ia=!0,e&&(k.Ha=!0,a.i++),k.va=!!f,Hf(new Df(a,k,"preload"),c,d,f,a.pc)&&g++));return g}h.pc=function(a,b,c,d,e){a.Ia=!1;b&&(b.L>a.L||b.P>a.P)&&(this.C('Disk "'+c+'" too large for drive '+("RK"+a.Ja)),b=null);b?(a.X=b,a.oa=c,a.ea=d,this.C('Mounted disk "'+c+'" in drive '+("RK"+a.Ja),a.Ha||e),this.l&&Ec(this.l)):a.va=!1;a.Ha&&(a.Ha=!1,--this.i||F(this));Of(this,a.Ja)}; +h.fa=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;if((a=yc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.w[e]=a[e]);Qf(this);this.Oa=Zb(144,5,65536);eb(b,this,Rf);gb(b,this.reset.bind(this));Sf(this,"None","",!0);this.A&&Sf(this,"Local Disk","?");Sf(this,"Remote Disk","??");Tf(this)||F(this)}; +h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Ib){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";Of(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Qf(this)};h.save=function(){return(new O(this)).data()}; +h.restore=function(a){return Qf(this,a[0])};function Tf(a,b){b||(a.m=0);for(var c in a.w){var d=a.w[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vf(a,e,b,c,!1,d)}else Uf(a,e)} +function Vf(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,Uf(a,b,!0),k.Ha?a.C("RK11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.m++),k.ua=!!f,Hf(new Df(a,k,"preload"),c,d,f,a.oc)&&g++));return g}h.oc=function(a,b,c,d,e){a.Ha=!1;b&&(b.K>a.K||b.O>a.O)&&(this.C('Disk "'+c+'" too large for drive '+("RK"+a.Ia)),b=null);b?(a.W=b,a.na=c,a.da=d,this.C('Mounted disk "'+c+'" in drive '+("RK"+a.Ia),a.Ga||e),this.l&&Ec(this.l)):a.ua=!1;a.Ga&&(a.Ga=!1,--this.m||F(this));Of(this,a.Ia)}; function Sf(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.s=65536-e&65535;a&&(this.f=this.f|a|32768,this.K|=49152);return!0}; -h.qc=function(a,b,c,d,e,f,g){var k=0;a=a.X;var l=null,n;a||(k=128,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){k=4096;break}n=0}var p,u;if(0>(p=a.read(l,n++))||0>(u=a.read(l,n++))){k=32;break}ub(this.h,f,p|u<<8);if(Vb(this.h)){k=1024;break}f+=2;if(n>=a.V&&(l=null,++d>=a.O&&(d=0,++c>=a.P&&(c=0,++b>=a.L)))){k=64;break}}return g(k,b,c,d,e,f)}; -h.rc=function(a,b,c,d,e,f,g){var k=0;a=a.X;var l=null,n;a||(k=128,e=0);for(;e--;){var p=wb(this.h,f);if(Vb(this.h)){k=1024;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=4096;break}n=0}if(!a.write(l,n++,p&255)||!a.write(l,n++,p>>8)){k=32;break}if(n>=a.V&&(l=null,++d>=a.O&&(d=0,++c>=a.P&&(c=0,++b>=a.L)))){k=64;break}}return g(k,b,c,d,e,f)};h.vd=function(){return this.A};h.te=function(){};h.wd=function(){return this.f};h.ue=function(){};h.sd=function(){return this.K&61438}; -h.qe=function(a){this.K=this.K&-3968|a&3967;if(this.K&1){var b,c=!0;a=(this.c&57344)>>13;var d=this.b[a],e,f,g,k;this.K&=-129;switch(this.K&14){case 0:this.A=d.status;this.f=0;this.K=128;this.c=0;break;case 4:b=this.qc;case 2:b||(b=this.rc),e=(this.c&8160)>>5,f=(this.c&16)>>4,g=this.c&15,e>=d.L?(this.f|=32832,this.K|=49152):g>=d.O?(this.f|=32800,this.K|=49152):(k=(this.K&48)<<12|this.m,c=65536-this.s&65535,c=b.call(this,d,e,f,g,c,k,this.oc.bind(this)))}this.A=d.status|a<<13|this.c%9&15;c&&(this.K&= --2,this.K|=128,this.K&64&&Xb(this.a,this.Pa))}};h.xd=function(){return this.s};h.ve=function(a){this.s=a};h.rd=function(){return this.m};h.pe=function(a){this.m=a};h.td=function(){return this.c};h.re=function(a){this.c=a};h.ud=function(){return this.B};h.se=function(a){this.B=a}; -var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.vd,N.prototype.te,"RKDS"],Wf[65282]=[null,null,N.prototype.wd,N.prototype.ue,"RKER"],Wf[65284]=[null,null,N.prototype.sd,N.prototype.qe,"RKCS"],Wf[65286]=[null,null,N.prototype.xd,N.prototype.ve,"RKWC"],Wf[65288]=[null,null,N.prototype.rd,N.prototype.pe,"RKBA"],Wf[65290]=[null,null,N.prototype.td,N.prototype.re,"RKDA"],Wf[65294]=[null,null,N.prototype.ud,N.prototype.se,"RKDB"],Wf); +function Of(a,b){if(0<=b&&b>12&48;this.v=65536-e&65535;a&&(this.i=this.i|a|32768,this.b|=49152);return!0}; +h.pc=function(a,b,c,d,e,f,g){var k=0;a=a.W;var l=null,n;a||(k=128,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){k=4096;break}n=0}var p,u;if(0>(p=a.read(l,n++))||0>(u=a.read(l,n++))){k=32;break}ub(this.h,f,p|u<<8);if(Vb(this.h)){k=1024;break}f+=2;if(n>=a.U&&(l=null,++d>=a.N&&(d=0,++c>=a.O&&(c=0,++b>=a.K)))){k=64;break}}return g(k,b,c,d,e,f)}; +h.qc=function(a,b,c,d,e,f,g){var k=0;a=a.W;var l=null,n;a||(k=128,e=0);for(;e--;){var p=wb(this.h,f);if(Vb(this.h)){k=1024;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=4096;break}n=0}if(!a.write(l,n++,p&255)||!a.write(l,n++,p>>8)){k=32;break}if(n>=a.U&&(l=null,++d>=a.N&&(d=0,++c>=a.O&&(c=0,++b>=a.K)))){k=64;break}}return g(k,b,c,d,e,f)};h.ud=function(){return this.B};h.se=function(){};h.vd=function(){return this.i};h.te=function(){};h.rd=function(){return this.b&61438}; +h.pe=function(a){this.b=this.b&-3968|a&3967;if(this.b&1){var b,c=!0;a=(this.f&57344)>>13;var d=this.c[a],e,f,g,k;this.b&=-129;switch(this.b&14){case 0:this.B=d.status;this.i=0;this.b=128;this.f=0;break;case 4:b=this.pc;case 2:b||(b=this.qc),e=(this.f&8160)>>5,f=(this.f&16)>>4,g=this.f&15,e>=d.K?(this.i|=32832,this.b|=49152):g>=d.N?(this.i|=32800,this.b|=49152):(k=(this.b&48)<<12|this.s,c=65536-this.v&65535,c=b.call(this,d,e,f,g,c,k,this.nc.bind(this)))}this.B=d.status|a<<13|this.f%9&15;c&&(this.b&= +-2,this.b|=128,this.b&64&&Xb(this.a,this.Oa))}};h.wd=function(){return this.v};h.ue=function(a){this.v=a};h.qd=function(){return this.s};h.oe=function(a){this.s=a};h.sd=function(){return this.f};h.qe=function(a){this.f=a};h.td=function(){return this.G};h.re=function(a){this.G=a}; +var Wf={},Rf=(Wf[65280]=[null,null,N.prototype.ud,N.prototype.se,"RKDS"],Wf[65282]=[null,null,N.prototype.vd,N.prototype.te,"RKER"],Wf[65284]=[null,null,N.prototype.rd,N.prototype.pe,"RKCS"],Wf[65286]=[null,null,N.prototype.wd,N.prototype.ue,"RKWC"],Wf[65288]=[null,null,N.prototype.qd,N.prototype.oe,"RKBA"],Wf[65290]=[null,null,N.prototype.sd,N.prototype.qe,"RKDA"],Wf[65294]=[null,null,N.prototype.td,N.prototype.re,"RKDB"],Wf); function M(a){x.call(this,"RL11",a,M,131072);this.A=a.autoMount||{};this.v=0;this.c=Array(4);this.B=!Ba("Mobi")&&window&&"FileReader"in window}A(M);h=M.prototype; -h.ba=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]= -c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.X)?(a=Ca(Mf(a),a.Mb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= +h.aa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.j[b]=c,c.onchange=function(){var a=d.j.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){w("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=q(c.value);null!=a&&Xf(d,a)},!0;case "loadDrive":return this.j[b]= +c,c.onclick=function(){var a=d.j.listDisks;a&&Yf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.B){c.parentNode.removeChild(c);break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.c&&((a=d.c[q(a.value)||0])?(a=a.W)?(a=Ca(Mf(a),a.Lb.replace(".json",".img")),w(a)):d.C("No disk loaded in drive."):d.C("No disk drive selected."))};return!0;case "mountDrive":if(this.B)return this.j[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled= !a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Yf(d,t(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.ga=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;if((a=yc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.Pa=Zb(112,5,131072);eb(b,this,$f);gb(b,this.reset.bind(this));ag(this,"None","",!0);this.B&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||F(this)}; -h.ia=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Jb){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ha=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()}; +h.fa=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.F=d;if((a=yc(this.l,"autoMount"))&&"string"==typeof a)try{a=eval("("+a+")")}catch(f){w(this.type+" auto-mount error: "+f.message+" ("+a+")"),a=null}if(a)for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.A[e]=a[e]);Zf(this);this.Oa=Zb(112,5,131072);eb(b,this,$f);gb(b,this.reset.bind(this));ag(this,"None","",!0);this.B&&ag(this,"Local Disk","?");ag(this,"Remote Disk","??");bg(this)||F(this)}; +h.ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.l.Ib){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Xf(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){Zf(this)};h.save=function(){return(new O(this)).data()}; h.restore=function(a){return Zf(this,a[0])};function bg(a,b){b||(a.v=0);for(var c in a.A){var d=a.A[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.j.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.c.length)a.C("Unable to load the selected drive");else if(c)if("?"==c)a.C('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=t(c);a.status("Attempting to load "+c+' as "'+b+'"')}dg(a,e,b,c,!1,d)}else cg(a,e)} -function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.ea.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ia?a.C("RL11 busy"):(k.Ia=!0,e&&(k.Ha=!0,a.v++),k.va=!!f,Hf(new Df(a,k,"preload"),c,d,f,a.tc)&&g++));return g}h.tc=function(a,b,c,d,e){a.Ia=!1;b&&(b.L>a.L||b.P>a.P)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.Ja)),b=null);b?(a.X=b,a.oa=c,a.ea=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.Ja),a.Ha||e),this.l&&Ec(this.l)):a.va=!1;a.Ha&&(a.Ha=!1,--this.v||F(this));Xf(this,a.Ja)}; +function dg(a,b,c,d,e,f){var g=-1,k=a.c[b];k.da.toLowerCase()!=d.toLowerCase()&&(g++,cg(a,b,!0),k.Ha?a.C("RL11 busy"):(k.Ha=!0,e&&(k.Ga=!0,a.v++),k.ua=!!f,Hf(new Df(a,k,"preload"),c,d,f,a.sc)&&g++));return g}h.sc=function(a,b,c,d,e){a.Ha=!1;b&&(b.K>a.K||b.O>a.O)&&(this.C('Disk "'+c+'" too large for drive '+("RL"+a.Ia)),b=null);b?(a.W=b,a.na=c,a.da=d,this.C('Mounted disk "'+c+'" in drive '+("RL"+a.Ia),a.Ga||e),this.l&&Ec(this.l)):a.ua=!1;a.Ga&&(a.Ga=!1,--this.v||F(this));Xf(this,a.Ia)}; function ag(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e>12&48;this.m=f>>16&63;this.i=this.f=b<<7|(c?64:0)|d&63;this.s=65536-e&65535;a&&(this.b=this.b|a|32768);return!0}; -h.uc=function(a,b,c,d,e,f,g){var k=0;a=a.X;var l=null,n;a||(k=5120,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){k=5120;break}n=0}var p,u;if(0>(p=a.read(l,n++))||0>(u=a.read(l,n++))){k=5120;break}ub(this.h,Vc(this.a,f),p|u<<8);if(Vb(this.h)){k=8192;break}f+=2;if(n>=a.V&&(l=null,++d>=a.O&&(d=0,++c>=a.P&&(c=0,++b>=a.L)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.vc=function(a,b,c,d,e,f,g){var k=0;a=a.X;var l=null,n;a||(k=5120,e=0);for(;e--;){var p=wb(this.h,Vc(this.a,f));if(Vb(this.h)){k=8192;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=5120;break}n=0}if(!a.write(l,n++,p&255)||!a.write(l,n++,p>>8)){k=5120;break}if(n>=a.V&&(l=null,++d>=a.O&&(d=0,++c>=a.P&&(c=0,++b>=a.L)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Ad=function(){return this.b&65535}; -h.ye=function(a){this.b=this.b&-1023|a&1022;this.m=this.m&60|(a&48)>>4;if(!(this.b&128)){var b;a=!0;var c=this.c[(this.b&768)>>8],d=c.X,e,f,g;this.b&=-2;switch(this.b&14){case 4:this.s&8&&(this.b&=63);this.s=c.status|this.i&64|(d&&512==d.L?128:0);break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.i=this.f&4?this.i+b:this.i-b,this.f=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.uc;case 10:b||(b=this.vc),e=this.f>>7,f=this.f&64?1:0,g=this.f&63,!d||e>=d.L||g>= -d.O?this.b|=37888:(d=(this.m&63)<<16|this.w,a=65536-this.s&65535,a=b.call(this,c,e,f,g,a,d,this.sc.bind(this)))}a&&(this.b|=129,this.b&64&&Xb(this.a,this.Pa))}};h.yd=function(){return this.w};h.we=function(a){this.w=a&65534};h.Bd=function(){return this.f};h.ze=function(a){this.f=a};h.Cd=function(){return this.s};h.Ae=function(a){this.s=a};h.zd=function(){return this.m};h.xe=function(a){this.m=a&63;this.b=this.b&-49|(this.m&3)<<4}; -var eg={},$f=(eg[63744]=[null,null,M.prototype.Ad,M.prototype.ye,"RLCS"],eg[63746]=[null,null,M.prototype.yd,M.prototype.we,"RLBA"],eg[63748]=[null,null,M.prototype.Bd,M.prototype.ze,"RLDA"],eg[63750]=[null,null,M.prototype.Cd,M.prototype.Ae,"RLMP"],eg[63752]=[null,null,M.prototype.zd,M.prototype.xe,"RLBE"],eg); -function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.R=!1;gg(this,b);this.A=yc(this,"autoPower",a);this.l=0;this.M=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.I=!1;this.T=yc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Va("CPU",this.id)){this.F=Va("Debugger",this.id);this.h=new Ab({id:this.ya+".bus",busWidth:this.M},this.a,this.F);var d,e=B(this.id);if((this.w=Va("Panel",this.id))&&this.w.fb)for(b=0;b\nLicense: GPL version 3 or later ");this.W("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b>12&48;this.m=f>>16&63;this.i=this.f=b<<7|(c?64:0)|d&63;this.s=65536-e&65535;a&&(this.b=this.b|a|32768);return!0}; +h.tc=function(a,b,c,d,e,f,g){var k=0;a=a.W;var l=null,n;a||(k=5120,e=0);for(;e--;){if(!l){l=a.seek(b,c,d+1);if(!l){k=5120;break}n=0}var p,u;if(0>(p=a.read(l,n++))||0>(u=a.read(l,n++))){k=5120;break}ub(this.h,Vc(this.a,f),p|u<<8);if(Vb(this.h)){k=8192;break}f+=2;if(n>=a.U&&(l=null,++d>=a.N&&(d=0,++c>=a.O&&(c=0,++b>=a.K)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.uc=function(a,b,c,d,e,f,g){var k=0;a=a.W;var l=null,n;a||(k=5120,e=0);for(;e--;){var p=wb(this.h,Vc(this.a,f));if(Vb(this.h)){k=8192;break}f+=2;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=5120;break}n=0}if(!a.write(l,n++,p&255)||!a.write(l,n++,p>>8)){k=5120;break}if(n>=a.U&&(l=null,++d>=a.N&&(d=0,++c>=a.O&&(c=0,++b>=a.K)))){k=5120;break}}return g(k,b,c,d,e,f)};h.zd=function(){return this.b&65535}; +h.xe=function(a){this.b=this.b&-1023|a&1022;this.m=this.m&60|(a&48)>>4;if(!(this.b&128)){var b;a=!0;var c=this.c[(this.b&768)>>8],d=c.W,e,f,g;this.b&=-2;switch(this.b&14){case 4:this.s&8&&(this.b&=63);this.s=c.status|this.i&64|(d&&512==d.K?128:0);break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.i=this.f&4?this.i+b:this.i-b,this.f=this.i=this.i&65408|c);break;case 8:this.s=this.i;break;case 12:b=this.tc;case 10:b||(b=this.uc),e=this.f>>7,f=this.f&64?1:0,g=this.f&63,!d||e>=d.K||g>= +d.N?this.b|=37888:(d=(this.m&63)<<16|this.w,a=65536-this.s&65535,a=b.call(this,c,e,f,g,a,d,this.rc.bind(this)))}a&&(this.b|=129,this.b&64&&Xb(this.a,this.Oa))}};h.xd=function(){return this.w};h.ve=function(a){this.w=a&65534};h.Ad=function(){return this.f};h.ye=function(a){this.f=a};h.Bd=function(){return this.s};h.ze=function(a){this.s=a};h.yd=function(){return this.m};h.we=function(a){this.m=a&63;this.b=this.b&-49|(this.m&3)<<4}; +var eg={},$f=(eg[63744]=[null,null,M.prototype.zd,M.prototype.xe,"RLCS"],eg[63746]=[null,null,M.prototype.xd,M.prototype.ve,"RLBA"],eg[63748]=[null,null,M.prototype.Ad,M.prototype.ye,"RLDA"],eg[63750]=[null,null,M.prototype.Bd,M.prototype.ze,"RLMP"],eg[63752]=[null,null,M.prototype.yd,M.prototype.we,"RLBE"],eg); +function fg(a,b,c){x.call(this,"Computer",a,fg,33554432);this.o.P=!1;gg(this,b);this.A=yc(this,"autoPower",a);this.l=0;this.L=a.busWidth||a.buswidth;this.b=hg;this.s=null;this.i=this.I=!1;this.S=yc(this,"url")||"";(Math.random()+.1).toString(36);this.c=ig(this);if(this.a=Va("CPU",this.id)){this.F=Va("Debugger",this.id);this.h=new Ab({id:this.xa+".bus",busWidth:this.L},this.a,this.F);var d,e=B(this.id);if((this.w=Va("Panel",this.id))&&this.w.eb)for(b=0;b\nLicense: GPL version 3 or later ");this.V("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bhg){if(jg(d,this.s)){this.f=new O(this,"1.30.5","failsafe");jg(this.f)&&(og(this,d),a=2,pg(this.f));this.f.set("timestamp",ra());qg(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== -f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(ya("user",""),this.c=null)):this.W(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=B(this.id);for(f=0;fa[1];a=a[2];this.U=!0;this.o.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.wa(),this.a.eb());this.G&&(og(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; -function og(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.T;d.user=c;d.type="bug";d.data=b;v("http://www.pcjs.org/api/v1/report",d,!0)}} -function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=ra();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ha&&(c&&G(a.a),d=a.a.ha(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.R=!1,!1===d&&(e=null)));for(var k=B(a.id),l=0;l=c||30<=(b.Bb+=c))&&(d.textContent=b.o.S?b.Ba.toFixed(2)+"Mhz":"Stopped",b.Bb=0)}if(this.w&&(b=this.w,a=a||0,b.v)){c=b.a.o.S;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;ehg){if(jg(d,this.s)){this.f=new O(this,"1.30.5","failsafe");jg(this.f)&&(og(this,d),a=2,pg(this.f));this.f.set("timestamp",ra());qg(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=ng(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?jg(d,g):("error"== +f&&"no machine state"!=g?(this.C("Error: "+g),"unable to verify user"==g&&(ya("user",""),this.c=null)):this.V(f+": "+g),pg(d),jg(d)?(c=ng(d),e=!0):c=!1))}e&&mg(this,c?d:null)}else 2==a&&d.clear()}else mg(this);delete this.s;delete this.v}e=B(this.id);for(f=0;fa[1];a=a[2];this.T=!0;this.o.P=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.a&&(tg(this,this.a,b,c,a),this.va(),this.a.cb());this.G&&(og(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; +function og(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.5"};d.url=a.S;d.user=c;d.type="bug";d.data=b;v("http://www.pcjs.org/api/v1/report",d,!0)}} +function ug(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.5"),g=new O(a,"1.30.5","validate"),k=ra();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.5");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ga&&(c&&G(a.a),d=a.a.ga(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.o.P=!1,!1===d&&(e=null)));for(var k=B(a.id),l=0;l=c||30<=(b.Ab+=c))&&(d.textContent=b.o.R?b.Aa.toFixed(2)+"Mhz":"Stopped",b.Ab=0)}if(this.w&&(b=this.w,a=a||0,b.v)){c=b.a.o.R;d=!!(b.a.u&8);if(0>=a||60<=(b.s+=a)){for(var e=0;e