diff --git a/modules/pcx86/bin/pcx86 b/modules/pcx86/bin/pcx86 index df32ccc8b..94db4933f 100644 --- a/modules/pcx86/bin/pcx86 +++ b/modules/pcx86/bin/pcx86 @@ -58,10 +58,6 @@ try { * used in a JSON machine definition file; eg: * * [ - * {name: "panel", - * Create: Panel, - * objects: [] - * }, * {name: "chipset": * Create: ChipSet, * objects: [] @@ -77,7 +73,7 @@ try { var Component; var dbg; var aComponents = []; -var asComponentsIgnore = ["embed", "save"]; +var asComponentsIgnore = ["panel", "embed", "save"]; /* * A few of the components are subclasses of other classes (eg, "x86cpu" is a subclass diff --git a/modules/pdp11/bin/pdp11 b/modules/pdp11/bin/pdp11 index 431bd2772..6fadaa1ef 100644 --- a/modules/pdp11/bin/pdp11 +++ b/modules/pdp11/bin/pdp11 @@ -78,7 +78,7 @@ try { * TODO: Update the list of ignored (ie, ignorable) components. */ var Component; -var dbg; +var dbg, serial, fnSendData; var aComponents = []; var asComponentsIgnore = ["embed", "save"]; @@ -204,6 +204,11 @@ function initMachine(xml) } var machine = xml['machine']; + + if (fDebug) { + console.log(JSON.stringify(machine, null, 2)); + } + var idMachine = machine[idAttrs] && machine[idAttrs]['id'] || ""; for (var iComponent = 0; iComponent < aComponents.length; iComponent++) { @@ -257,7 +262,7 @@ function initMachine(xml) } if (sDeviceName == "cpu") { - parmsObj['autoStart'] = false; + parmsObj['autoStart'] = true; } try { @@ -267,12 +272,24 @@ function initMachine(xml) continue; } - console.log(obj['id'] + " object created"); + console.log(obj['type'] + " object created: " + obj['id']); component.objects.push(obj); if (obj.type == "Debugger") { dbg = obj; } + else if (obj.type == "SerialPort") { + serial = obj; + var exports = serial['exports']; + if (exports) { + var fnSetConnection = exports['setConnection']; + if (fnSetConnection) { + if (fnSetConnection.call(serial, null, receiveData)) { + fnSendData = exports['receiveData']; + } + } + } + } } } } @@ -381,6 +398,9 @@ function doCommand(sCmd) } catch(err) { console.log(err.message); } + if (sCmd == '?') { + console.log(".exit exit REPL and connect console to machine"); + } } break; } @@ -423,6 +443,37 @@ function onCommand(cmd, context, filename, callback) callback(null, result); } +/** + * receiveData(b) + * + * @param {number} b + */ +function receiveData(b) +{ + var s; + if (b != Str.ASCII.CR && b != Str.ASCII.LF) { + s = Str.aASCIICodes[b]; + } + if (s) { + s = '<' + s + '>'; + } else { + s = String.fromCharCode(b); + } + process.stdout.write(s); +} + +/** + * sendData(b) + * + * @param {number} b + */ +function sendData(b) +{ + if (serial && fnSendData) { + fnSendData.call(serial, b); + } +} + /** * startInput() * @@ -432,7 +483,7 @@ function startInput() { var stdin = process.stdin; if (!stdin.setRawMode) return false; - console.log("switching to raw input (alt-r to launch REPL, alt-x to exit)"); + console.log("console connected to machine (alt-r for REPL prompt, alt-x to exit)"); stdin.setRawMode(true); stdin.resume(); stdin.on('data', function(buf){ @@ -440,9 +491,15 @@ function startInput() stdin.removeAllListeners('data'); stdin.setRawMode(false); stdin.pause(); - if (buf[1] == 0x72) startREPL(); + if (buf[1] == 0x72) { + startREPL(); + } else { + console.log("exiting..."); + process.exit(); + } + return; } - // process.stdout.write(buf); + sendData(buf[0]); }); return true; } @@ -452,6 +509,7 @@ function startInput() */ function startREPL() { + console.log("starting REPL..."); replServer = repl.start({ prompt: "PDP11> ", input: process.stdin, @@ -479,4 +537,4 @@ if (argv['cmd'] !== undefined) { sCmdPrev = ""; } -if (!startInput()) startREPL(); +startInput(); diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index 134bd2b8b..bbf62590a 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -102,7 +102,7 @@ class BusPDP11 extends Component { * Supported values for nBusWidth are 16 (default), 18, and 22. This represents the maximum size * of the bus for the life of the machine, regardless what memory management mode the CPU has enabled. */ - this.nBusWidth = parmsBus['busWidth'] || 16; + this.nBusWidth = +parmsBus['busWidth'] || 16; /* * Compute all BusPDP11 memory block parameters now, based on the width of the bus. diff --git a/modules/pdp11/lib/computer.js b/modules/pdp11/lib/computer.js index c61fcbae5..be43ba571 100644 --- a/modules/pdp11/lib/computer.js +++ b/modules/pdp11/lib/computer.js @@ -113,7 +113,7 @@ class ComputerPDP11 extends Component { this.parmsMachine = null; this.setMachineParms(parmsMachine); - this.fAutoPower = this.getMachineParm('autoPower', parmsComputer); + this.fAutoPower = this.getMachineParm('autoPower', parmsComputer, Str.TYPES.BOOLEAN); /* * nPowerChange is 0 while the power state is stable, 1 while power is transitioning @@ -124,7 +124,7 @@ class ComputerPDP11 extends Component { /* * TODO: Deprecate 'buswidth' (it should have always used camelCase) */ - this.nBusWidth = parmsComputer['busWidth'] || parmsComputer['buswidth']; + this.nBusWidth = +parmsComputer['busWidth'] || +parmsComputer['buswidth']; this.resume = ComputerPDP11.RESUME_NONE; this.sStateData = null; @@ -303,7 +303,7 @@ class ComputerPDP11 extends Component { } /** - * getMachineParm(sParm, parmsComponent) + * getMachineParm(sParm, parmsComponent, type) * * If the machine parameter doesn't exist, we check for a matching component parameter (if parmsComponent is provided), * and failing that, we check the bundled resources (if any). @@ -313,10 +313,11 @@ class ComputerPDP11 extends Component { * resource to obtain the actual state. * * @param {string} sParm - * @param {Object} [parmsComponent] + * @param {Object|null} [parmsComponent] + * @param {number} [type] (from Str.TYPES) * @return {string|undefined} */ - getMachineParm(sParm, parmsComponent) + getMachineParm(sParm, parmsComponent, type) { /* * When checking parmsURL, the check is allowed be a bit looser, because URL parameters are @@ -336,6 +337,16 @@ class ComputerPDP11 extends Component { if (value === undefined && typeof resources == 'object' && resources[sParm]) { value = sParm; } + if (typeof value == "string" && type) { + switch(type) { + case Str.TYPES.NUMBER: + value = +value; + break; + case Str.TYPES.BOOLEAN: + value = (value == "true"); + break; + } + } return value; } diff --git a/modules/pdp11/lib/cpu.js b/modules/pdp11/lib/cpu.js index df3b0ece2..691e9b6d5 100644 --- a/modules/pdp11/lib/cpu.js +++ b/modules/pdp11/lib/cpu.js @@ -98,9 +98,9 @@ class CPUPDP11 extends Component { { super("CPU", parmsCPU, CPUPDP11, MessagesPDP11.CPU); - var nCycles = parmsCPU['cycles'] || nCyclesDefault; + var nCycles = +parmsCPU['cycles'] || nCyclesDefault; - var nMultiplier = parmsCPU['multiplier'] || 1; + var nMultiplier = +parmsCPU['multiplier'] || 1; this.nDisplayCount = 0; this.nDisplayLimit = 30; @@ -122,6 +122,7 @@ class CPUPDP11 extends Component { this.flags.running = false; this.flags.starting = false; this.flags.autoStart = parmsCPU['autoStart']; + if (typeof this.flags.autoStart == "string") this.flags.autoStart = (this.flags.autoStart == "true"); /* * Get checksum parameters, if any. runCPU() behavior is not affected until fChecksum @@ -134,9 +135,9 @@ class CPUPDP11 extends Component { */ this.flags.checksum = false; this.nChecksum = this.nCyclesChecksumNext = 0; - this.nCyclesChecksumStart = parmsCPU["csStart"]; - this.nCyclesChecksumInterval = parmsCPU["csInterval"]; - this.nCyclesChecksumStop = parmsCPU["csStop"]; + this.nCyclesChecksumStart = +parmsCPU["csStart"]; + this.nCyclesChecksumInterval = +parmsCPU["csInterval"]; + this.nCyclesChecksumStop = +parmsCPU["csStop"]; /* * Array of countdown timers managed by addTimer() and setTimer(). @@ -257,8 +258,8 @@ class CPUPDP11 extends Component { this.dbg.init(this.flags.autoStart); } else { /* - * The Computer (this.cmp) knows if there's a Control Panel (this.cmp.panel), and the Control Panel - * knows if there's a "print" control (this.cmp.panel.controlPrint), and if there IS a "print" control + * The Computer (this.cmp) knows if there's a Control Panel (this.panel), and the Control Panel + * knows if there's a "print" control (this.panel.controlPrint), and if there IS a "print" control * but no debugger, the machine is probably misconfigured (most likely, the page simply neglected to * load the Debugger component). * @@ -268,7 +269,7 @@ class CPUPDP11 extends Component { this.println("No debugger detected"); } if (!this.flags.autoStart) { - this.println("CPU will not be auto-started, click Run to start"); + this.println("CPU will not be auto-started " + (this.panel? "(click Run to start)" : "(type 'go' to start)")); } } /* diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 12a318bac..166feb258 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -109,7 +109,7 @@ class CPUStatePDP11 extends CPUPDP11 { super(parmsCPU, nCyclesDefault); this.model = model; - this.addrReset = parmsCPU['addrReset'] || 0; + this.addrReset = +parmsCPU['addrReset'] || 0; /* * These properties will be initialized by initCPU() diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index ed2795583..40a633281 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -226,9 +226,9 @@ class DebuggerPDP11 extends Debugger { * @param {number} [nBase] * @return {DbgAddrPDP11} */ - newAddr(addr, fPhysical, nBase) + newAddr(addr = null, fPhysical = false, nBase) { - return {addr: addr || null, fPhysical: fPhysical || false, fTemporary: false, nBase: nBase}; + return {addr: addr, fPhysical: fPhysical, fTemporary: false, nBase: nBase}; } /** diff --git a/modules/pdp11/lib/disk.js b/modules/pdp11/lib/disk.js index 168fe6989..68262d580 100644 --- a/modules/pdp11/lib/disk.js +++ b/modules/pdp11/lib/disk.js @@ -382,7 +382,7 @@ class DiskPDP11 extends Component { * * @this {DiskPDP11} * @param {string} sURL - * @param {string} sDiskData + * @param {string|null} sDiskData * @param {number} nErrorCode (response from server if anything other than 200) */ doneLoad(sURL, sDiskData, nErrorCode) diff --git a/modules/pdp11/lib/panel.js b/modules/pdp11/lib/panel.js index 8b93518bf..b9da45549 100644 --- a/modules/pdp11/lib/panel.js +++ b/modules/pdp11/lib/panel.js @@ -46,8 +46,9 @@ class PanelPDP11 extends Component { * The PanelPDP11 component has no required (parmsPanel) properties. * * @param {Object} parmsPanel + * @param {boolean} fBindings (true if panel may have bindings, otherwise not) */ - constructor(parmsPanel) + constructor(parmsPanel, fBindings) { super("Panel", parmsPanel, PanelPDP11, MessagesPDP11.PANEL); @@ -59,6 +60,7 @@ class PanelPDP11 extends Component { this.nDisplayCount = 0; this.nDisplayLimit = 60; this.fDisplayLiveRegs = true; + this.fBindings = fBindings; /* * regSwitches contains the Front Panel (aka Console) SWITCH register, which is also available @@ -145,6 +147,8 @@ class PanelPDP11 extends Component { /** @type {DebuggerPDP11} */ this.dbg = null; + + this.setReady(); } /** @@ -386,9 +390,10 @@ class PanelPDP11 extends Component { /* * As noted in init(), our powerUp() method gives us a second opportunity to notify any * components that that might care (eg, CPU, Keyboard, and Debugger) that we have some controls - * they might want to use. + * (ie, bindings) they might want to use. */ - PanelPDP11.init(); + if (this.fBindings) PanelPDP11.init(); + /* * TODO: Until we implement a restore() function, all we can do is reset() */ @@ -1089,18 +1094,13 @@ class PanelPDP11 extends Component { */ static init() { - var fReady = false; var aePanels = Component.getElementsByClass(document, PDP11.APPCLASS, "panel"); for (var iPanel=0; iPanel < aePanels.length; iPanel++) { var ePanel = aePanels[iPanel]; var parmsPanel = Component.getComponentParms(ePanel); var panel = Component.getComponentByID(parmsPanel['id']); - if (!panel) { - fReady = true; - panel = new PanelPDP11(parmsPanel); - } + if (!panel) panel = new PanelPDP11(parmsPanel, true); Component.bindComponentControls(panel, ePanel, PDP11.APPCLASS); - if (fReady) panel.setReady(); } } } diff --git a/modules/pdp11/lib/pc11.js b/modules/pdp11/lib/pc11.js index bffbb9227..ae93a9e60 100644 --- a/modules/pdp11/lib/pc11.js +++ b/modules/pdp11/lib/pc11.js @@ -72,7 +72,7 @@ class PC11 extends Component { */ this.configMount = this.parseConfig(parms['autoMount']); this.cAutoMount = 0; - this.nBaudReceive = parms['baudReceive'] || PDP11.PC11.PRS.BAUD; + this.nBaudReceive = +parms['baudReceive'] || PDP11.PC11.PRS.BAUD; this.regPRS = 0; // PRS register this.regPRB = 0; // PRB register diff --git a/modules/pdp11/lib/ram.js b/modules/pdp11/lib/ram.js index 185184b0d..f09567d3c 100644 --- a/modules/pdp11/lib/ram.js +++ b/modules/pdp11/lib/ram.js @@ -69,10 +69,13 @@ class RAMPDP11 extends Component { this.abInit = null; this.aSymbols = null; - this.addrRAM = parmsRAM['addr']; - this.sizeRAM = parmsRAM['size']; + this.addrRAM = +parmsRAM['addr']; + this.sizeRAM = +parmsRAM['size']; + this.addrLoad = parmsRAM['load']; this.addrExec = parmsRAM['exec']; + if (this.addrLoad != null) this.addrLoad = +this.addrLoad; + if (this.addrExec != null) this.addrExec = +this.addrExec; this.fInstalled = (!!this.sizeRAM); // 0 is the default value for 'size' when none is specified this.fAllocated = false; @@ -222,7 +225,13 @@ class RAMPDP11 extends Component { * Too early... */ if (!this.abInit || !this.bus) return; - this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM); + + if (this.loadImage(this.abInit, this.addrLoad, this.addrExec, this.addrRAM)) { + this.status('Loaded image "' + this.sFileName + '"'); + } else { + this.notice('Error loading image "' + this.sFileName + '"'); + } + /* * NOTE: We now retain this data, so that reset() can return the RAM to its predefined state. * diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index f258fe42a..a9ab1464f 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -67,8 +67,8 @@ class ROMPDP11 extends Component { this.abInit = null; this.aSymbols = null; - this.addrROM = parmsROM['addr']; - this.sizeROM = parmsROM['size']; + this.addrROM = +parmsROM['addr']; + this.sizeROM = +parmsROM['size']; this.fRetainROM = false; /* @@ -83,6 +83,9 @@ class ROMPDP11 extends Component { * Most ROMs are not aliased, in which case the 'alias' property should have the default value of null. */ this.addrAlias = parmsROM['alias']; + if (typeof this.addrAlias == "string") { + this.addrAlias = eval(this.addrAlias); + } this.sFilePath = parmsROM['file']; this.sFileName = Str.getBaseName(this.sFilePath); diff --git a/modules/pdp11/lib/serial.js b/modules/pdp11/lib/serial.js index 16f15a6a3..14d89360e 100644 --- a/modules/pdp11/lib/serial.js +++ b/modules/pdp11/lib/serial.js @@ -100,11 +100,11 @@ class SerialPortPDP11 extends Component { { super("SerialPort", parmsSerial, SerialPortPDP11, MessagesPDP11.SERIAL); - this.iAdapter = parmsSerial['adapter']; - this.nBaudReceive = parmsSerial['baudReceive'] || PDP11.DL11.RCSR.BAUD; - this.nBaudTransmit = parmsSerial['baudTransmit'] || PDP11.DL11.XCSR.BAUD; + this.iAdapter = +parmsSerial['adapter']; + this.nBaudReceive = +parmsSerial['baudReceive'] || PDP11.DL11.RCSR.BAUD; + this.nBaudTransmit = +parmsSerial['baudTransmit'] || PDP11.DL11.XCSR.BAUD; this.fUpperCase = parmsSerial['upperCase']; - + if (typeof this.fUpperCase == "string") this.fUpperCase = (this.fUpperCase == "true"); /** * consoleOutput becomes a string that records serial port output if the 'binding' property is set to the * reserved name "console". Nothing is written to the console, however, until a linefeed (0x0A) is output @@ -138,8 +138,8 @@ class SerialPortPDP11 extends Component { * charBOL, if nonzero, is a character to automatically output at the beginning of every line. This probably * isn't generally useful; I use it internally to preformat serial output. */ - this.tabSize = parmsSerial['tabSize']; - this.charBOL = parmsSerial['charBOL']; + this.tabSize = +parmsSerial['tabSize']; + this.charBOL = +parmsSerial['charBOL']; this.iLogicalCol = 0; this.fNullModem = true; @@ -171,7 +171,8 @@ class SerialPortPDP11 extends Component { this['exports'] = { 'connect': this.initConnection, 'receiveData': this.receiveData, - 'receiveStatus': this.receiveStatus + 'receiveStatus': this.receiveStatus, + 'setConnection': this.setConnection }; } @@ -624,6 +625,24 @@ class SerialPortPDP11 extends Component { } } + /** + * setConnection(component, fn) + * + * @this {SerialPortPDP11} + * @param {Object|null} component + * @param {function(number)} fn + * @return {boolean} + */ + setConnection(component, fn) + { + if (!this.connection) { + this.connection = component; + this.sendData = fn; + return true; + } + return false; + } + /** * transmitByte(b) * diff --git a/modules/shared/es6/debugger.js b/modules/shared/es6/debugger.js index 09f41d89d..f8fc5070b 100644 --- a/modules/shared/es6/debugger.js +++ b/modules/shared/es6/debugger.js @@ -97,7 +97,7 @@ class Debugger extends Component { /* * Default base used to display all values; modified with the "s base" command. */ - this.nBase = parmsDbg['base'] || 16; + this.nBase = +parmsDbg['base'] || 16; this.fParens = false; /* diff --git a/modules/shared/es6/netlib.js b/modules/shared/es6/netlib.js index e4dc5ab1b..366f34f00 100644 --- a/modules/shared/es6/netlib.js +++ b/modules/shared/es6/netlib.js @@ -310,23 +310,25 @@ class Net { * @param {string} sURL * @param {Object|null} [dataPost] for a POST request (default is a GET request) * @param {boolean} [fAsync] is true for an asynchronous request - * @param {function(string,string,number)} [done] + * @param {function(string,string|null,number)} [done] * @return {Array|null} Array containing [sResource, nErrorCode], or null if no response yet */ static getResource(sURL, dataPost, fAsync, done) { var nErrorCode = -1, sResource = null, response = null; + /* + * TODO: Revisit why we pass back sBaseName instead of the original sURL.... + */ + var sBaseName = Str.getBaseName(sURL); + if (Net.isRemote(sURL)) { console.log('Net.getResource("' + sURL + '"): unimplemented'); + if (done) done(sBaseName, null, -1); } else { if (!Net.sServerRoot) { Net.sServerRoot = path.join(path.dirname(fs.realpathSync(__filename)), "../../../"); } - /* - * TODO: Revisit why we pass back sBaseName instead of the original sURL.... - */ - var sBaseName = Str.getBaseName(sURL); var sFile = path.join(Net.sServerRoot, sURL); if (fAsync) { fs.readFile(sFile, {encoding: "utf8"}, function(err, s) diff --git a/modules/shared/es6/strlib.js b/modules/shared/es6/strlib.js index 9495d2e9a..ad3dda4fb 100644 --- a/modules/shared/es6/strlib.js +++ b/modules/shared/es6/strlib.js @@ -620,4 +620,16 @@ Str.aASCIICodes = { 0x1F: "US" // Unit Separator }; +Str.TYPES = { + NULL: 0, + BYTE: 1, + WORD: 2, + DWORD: 3, + NUMBER: 4, + STRING: 5, + BOOLEAN: 6, + OBJECT: 7, + ARRAY: 8 +}; + module.exports = Str; diff --git a/versions/pc8080/1.31.1/pc8080-dbg.js b/versions/pc8080/1.31.1/pc8080-dbg.js index 4e4d726ca..55fec27d0 100644 --- a/versions/pc8080/1.31.1/pc8080-dbg.js +++ b/versions/pc8080/1.31.1/pc8080-dbg.js @@ -184,7 +184,7 @@ k.Kb=function(a){null!=a&&(this.A="number"!=typeof a?a:this.A+String.fromCharCod k.Jd=function(a,b,c){y(this,a,b,c,"DATA");this.O=b;this.ia&=~(Qd|Hf);pb(this,"transmitByte("+ea(b)+")");if(19==b)this.N=!0;else if(17==b)this.N=!1;else if(this.Ra&&this.Ra.call(this.b,b),this.g)if(8==b)this.g.value=this.g.value.slice(0,-1),0":String.fromCharCode(b);c=a.length;9==b?(b=this.V||8,c=b-this.w%b,this.V&&(a=na("",c))):13==b&&(this.w=c=0,a="\n");this.R&&!this.w&&c&&(a=String.fromCharCode(this.R)+a);this.g.value+=a;this.g.scrollTop= this.g.scrollHeight;this.w+=c}else if(null!=this.j){if(10==b||1024<=this.j.length)this.i(this.j),this.j="";10!=b&&(this.j+=String.fromCharCode(b))}this.u&&Kc(this.u,this.Z,zf(this,If))};k.Id=function(a,b,c){y(this,a,b,c,"CONTROL");this.F?(this.I&&(b^this.C)&(Jf|Kf)&&(a=0,this.D?(a|=b&Jf?32:0,a|=b&Kf?320:0):(a|=b&Jf?16:0,a|=b&Kf?1048576:0),this.I.call(this.b,a)),this.C=b,this.C&Lf&&(this.F=!1)):(this.B=b,this.F=!0)};k.Hd=function(a,b,c){y(this,a,b,c,"BAUDRATES");this.L=b}; var Bf=12,Cf=16,Df=192,Kf=2,Jf=32,Lf=64,Qd=1,Ef=2,Hf=4,Gf=128,Ff=15,If=240,Af=[50,75,110,134.5,150,200,300,600,1200,1800,2E3,2400,3600,4800,9600,19200],yf=[!1,0,0,133,142,39,238],tf="buffer",vf={0:sf.prototype.zd,1:sf.prototype.yd},wf={0:sf.prototype.Jd,1:sf.prototype.Id,2:sf.prototype.Hd};Oa(function(){for(var a=hb(document,"pc8080","serial"),b=0;bthis.b&&this.g.length&&(this.b=0);if(0>this.b||a!=this.g[this.b])this.g.splice(0,0,a),this.b=0;this.b--}else this.L?a="end":a=this.g[this.b+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(oa(a.substring(d,f))),d=f+1}}return b}; function Nf(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} diff --git a/versions/pdpjs/1.31.1/pdp11-dbg.js b/versions/pdpjs/1.31.1/pdp11-dbg.js index 9e073f61b..504eee60e 100644 --- a/versions/pdpjs/1.31.1/pdp11-dbg.js +++ b/versions/pdpjs/1.31.1/pdp11-dbg.js @@ -35,8 +35,8 @@ var h;function p(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(b,d);e&&Object.defineProperty(a,d,e)}else a[d]=b[d]} for(var 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,Ic:65,og:66,qg:67,Ng:68,E:69,Og:70,Pg:71,Qg:72,Rg:73,Sg:74,Tg:75,Ug:76,Vg:77,Wg:78,Xg:79,Yg:80,Q:81,Zg:82,$g:83,ah:84,bh:85,dh:86,eh:87,fh:88,gh:89,Gd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,hh:97,ih:98,jh:99,d:100,e:101,lh:102,mh:103,nh:104,oh:105,rh:106,k:107,sh:108,th:109,n:110,uh:111,p:112,q:113,r:114,vh:115,t:116,xh:117,yh:118,zh:119,x:120,y:121,z:122,"{":123, +var ja={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]},ka={qg:0,ud:1,sg:2,tg:3,ug:4,vg:5,wg:6,xg:7,Lc:8,yg:9,vd:10,zg:11,Ag:12,wd:13,Bg:14,Cg:15,Dg:16,Eg:17,Fg:18,Gg:19,Hg:20,Ig:21,Jg:22,Kg:23,Lg:24,Mg:25,Ng: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,Ic:65,pg:66,rg:67,Og:68,E:69,Pg:70,Qg:71,Rg:72,Sg:73,Tg:74,Ug:75,Vg:76,Wg:77,Xg:78,Yg:79,Zg:80,Q:81,$g:82,ah:83,bh:84,dh:85,eh:86,fh:87,gh:88,hh:89,Gd:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,ih:97,jh:98,kh:99,d:100,e:101,mh:102,nh:103,oh:104,ph:105,sh:106,k:107,th:108,uh:109,n:110,vh:111,p:112,q:113,r:114,wh:115,t:116,yh:117,zh:118,Ah:119,x:120,y:121,z:122,"{":123, "|":124,"}":125,"~":126,xd:127}; function la(a,b){var c;if(a){b||(b=10);var d=a.charAt(0),e=0>=1,f--;return d}function q(a,b,c){var d="";b?11>=3;return(c?"0o":"")+d} @@ -46,7 +46,7 @@ function ua(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function xa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,k;k=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Aa(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var 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="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));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 Ba(a,b){var c,d={ba:null,ea:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.ba=e;else if(e=g.words)for(d.ba=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ba=Array(4*e.length),f=c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.wa=g.load;d.va=g.exec;if(e=g.bytes)d.ba=e;else if(e=g.words)for(d.ba=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ba=Array(4*e.length),f=c=0;c>8&255,d.ba[f++]=e[c]>>16&255,d.ba[f++]=e[c]>>24&255;else d.ba=g;d.ea=g.symbols;d.ba.length?1==d.ba.length&&(y(d.ba[0]),d=null):(y("Empty resource: "+a),d=null)}catch(k){y("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.kb=this.id:(this.lb=this.id.substr(0,a),this.kb=this.id.substr(a+1));this.A={ready:!1,cb:!1,zc:!1,fa:!1,error:!1};this.bc=null;this.A.error=!1;this.B={};this.ga=d||0;this.F=this.f=this.D=this.I=this.Oa=null;eb.push(this)} +Ta(Na("Opera")||Na("iOS")?"onunload":"onbeforeunload",function(){Za(Ya.exit)});function A(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Rc=b.comment;this.Fd=b;this.exports={};a=this.id.indexOf(".");0>a?this.kb=this.id:(this.lb=this.id.substr(0,a),this.kb=this.id.substr(a+1));this.A={ready:!1,cb:!1,zc:!1,fa:!1,error:!1};this.bc=null;this.A.error=!1;this.B={};this.ga=d||0;this.F=this.f=this.D=this.J=this.Pa=null;eb.push(this)} function gb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function y(a){Da&&Da(a)}function nb(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.Zd,a];this.F=this.f=this.D=this.I=null}p(Fb,A);h=Fb.prototype;h.reset=function(){this.stop()}; -h.oa=function(a,b,c,d){if(this.I&&this.I.oa(a,b,c,d)||this.f&&this.f.oa(a,b,c,d)||this.F&&this.F.oa(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.B[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.B[b]=c,this.g[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.B[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Nb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ob(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Nb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ob(a,b)}}(this,b),!0):A.prototype.oa.call(this,a,b,c,d)}};h.qa=function(a,b,c,d){this.I=a;this.D=b;this.f=c;this.F=d;Pb(b,this,Qb);Rb(b,this.reset.bind(this));Sb(this);Tb(this)};h.ra=function(a,b){b||(Ub(),this.reset());return!0};h.Aa=function(){return!0}; -function Vb(a,b,c){if(a=a.B[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Sb(a,b){for(var c in a.g)Vb(a,c,null!=b?b:a.g[c])}function Wb(a,b,c){if(a=a.B[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Tb(a){for(var b in a.b)Wb(a,b,a.b[b][1])}function Xb(a,b,c,d){a.B[b]&&(void 0===c&&(rb(a,"Value for "+b+" is invalid"),a.f.Y()),c=8==(a.F&&a.F.va||8)?q(c,d):v(c,d),a.B[b].textContent!=c&&(a.B[b].textContent=c))} -function Nb(a,b){var c=a.b[b];Wb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=Yb&&(a.C=b==Zb,a.G=b==$b)}function Ob(a,b){var c=a.b[b];c[2]&&c[3]&&(Wb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Xd=function(a){a||this.f.A.U||(a=this.f,a.D.reset(),ac(a),this.b[bc]&&this.b[bc][1]&&cc(this.f))};h.Yd=function(){};h.Td=function(a){a||this.f.Y()}; -h.Rd=function(a){if(!a&&!this.f.A.U)if(this.b[bc]&&this.b[bc][1])cc(this.f);else{if((a=this.F)&&!ub(a,!0))vb(a,!0),dc(a,0,null),vb(a,!1);else try{var b=this.f.$b(1);0a.f.ya?8:16,c=65472<=a.sa&&a.sa<65472+b,b=c?1:2,c=c?15:a.D.J;a.b[Yb]&&a.b[Yb][1]||(b=-b);nc(a,a.sa&~c|a.sa+b&c)} -function nc(a,b){a.sa=b&a.D.J;b=a.sa;for(var c=0;22>c;c++)pc(a,"A"+c,b&1<c;c++)pc(a,"D"+c,b&1<c;c++)a.b["S"+c][1]=b&1<>2;this.i=this.j-1;this.H=this.M/this.j|0;this.T=this.H-1;this.Ja=[];this.ia=0;this.G=!1;this.O=[];this.Hd=[Gc,Hc,Ic,Jc];this.b=this.v=[];this.C=this.L=this.w=this.P=this.R=0;a=new M(this);Kc(a,this.F);this.b=Array(this.H);this.v=Array(this.H);for(b=0;b>>this.g;this.L=0;this.w=this.J;H(this)}p(Ec,A);function Nc(a,b){if(b!=a.L){for(var c=0;c>>a.g,a.v[a.R]=a.b[a.P])}}h=Ec.prototype;h.reset=function(){for(var a=0;aa;a++)this.b["S"+a]=[0,0,!1,!1,this.Zd,a];this.F=this.f=this.D=this.J=null;H(this)}p(Fb,A);h=Fb.prototype;h.reset=function(){this.stop()}; +h.oa=function(a,b,c,d){if(this.J&&this.J.oa(a,b,c,d)||this.f&&this.f.oa(a,b,c,d)||this.F&&this.F.oa(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.B[b]=c,this.v++,!0;default:return"led"==a||"rled"==a?(this.B[b]=c,this.g[b]=d?1:0,this.v++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.B[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Nb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Ob(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Nb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Ob(a,b)}}(this,b),!0):A.prototype.oa.call(this,a,b,c,d)}};h.ra=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;Pb(b,this,Qb);Rb(b,this.reset.bind(this));Sb(this);Tb(this)};h.sa=function(a,b){b||(this.I&&Ub(),this.reset());return!0};h.Ca=function(){return!0}; +function Vb(a,b,c){if(a=a.B[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Sb(a,b){for(var c in a.g)Vb(a,c,null!=b?b:a.g[c])}function Wb(a,b,c){if(a=a.B[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Tb(a){for(var b in a.b)Wb(a,b,a.b[b][1])}function Xb(a,b,c,d){a.B[b]&&(void 0===c&&(rb(a,"Value for "+b+" is invalid"),a.f.Z()),c=8==(a.F&&a.F.xa||8)?q(c,d):v(c,d),a.B[b].textContent!=c&&(a.B[b].textContent=c))} +function Nb(a,b){var c=a.b[b];Wb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=Yb&&(a.C=b==Zb,a.G=b==$b)}function Ob(a,b){var c=a.b[b];c[2]&&c[3]&&(Wb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.Xd=function(a){a||this.f.A.U||(a=this.f,a.D.reset(),ac(a),this.b[bc]&&this.b[bc][1]&&cc(this.f))};h.Yd=function(){};h.Td=function(a){a||this.f.Z()}; +h.Rd=function(a){if(!a&&!this.f.A.U)if(this.b[bc]&&this.b[bc][1])cc(this.f);else{if((a=this.F)&&!ub(a,!0))vb(a,!0),dc(a,0,null),vb(a,!1);else try{var b=this.f.$b(1);0a.f.Aa?8:16,c=65472<=a.ta&&a.ta<65472+b,b=c?1:2,c=c?15:a.D.I;a.b[Yb]&&a.b[Yb][1]||(b=-b);nc(a,a.ta&~c|a.ta+b&c)} +function nc(a,b){a.ta=b&a.D.I;b=a.ta;for(var c=0;22>c;c++)pc(a,"A"+c,b&1<c;c++)pc(a,"D"+c,b&1<c;c++)a.b["S"+c][1]=b&1<>2;this.i=this.j-1;this.H=this.N/this.j|0;this.T=this.H-1;this.Ma=[];this.ia=0;this.G=!1;this.O=[];this.Hd=[Gc,Hc,Ic,Jc];this.b=this.v=[];this.C=this.L=this.w=this.P=this.R=0;a=new M(this);Kc(a,this.F);this.b=Array(this.H);this.v=Array(this.H);for(b=0;b>>this.g;this.L=0;this.w=this.I;H(this)}p(Ec,A);function Nc(a,b){if(b!=a.L){for(var c=0;c>>a.g,a.v[a.R]=a.b[a.P])}}h=Ec.prototype;h.reset=function(){for(var a=0;a>>a.g;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.K)return l.Hb+=l.K-f,l.K=f,!0;if(f>=l.K+l.Hb){n=l.size-(f-m);n>g&&(n=g);l.Hb=f-l.K+n;f=m+a.j;g-=n;k++;continue}}return Oc(Pc,f,g)}f=new M(a,f,n,a.j,d,e);Kc(f,a.F,l);a.b[k++]=f;f=m+a.j;g-=n}return 0>=g?(a.status((c>>10)+"Kb "+Qc[d]+" at "+q(b)),!0):Oc(Rc,b,c)}h.Jc=function(a){return this.v[(a&this.w)>>>this.g].sb(a&this.i,a)}; -h.Zb=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Bb||b!=this.i?this.v[c].ja(b,a):this.v[c++].sb(b,a)|this.v[c&this.T].sb(0,a+1)<<8};h.Kc=function(a,b){this.v[(a&this.w)>>>this.g].ub(a&this.i,b,a)};h.Lb=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Bb||c!=this.i?this.v[d].vb(c,b,a):(this.v[d++].ub(c,b&255,a),this.v[d&this.T].ub(0,b>>8&255,a+1))};function Sc(a,b){return a.b[(b&a.J)>>>a.g]} +h.Zb=function(a){var b=a&this.i,c=(a&this.w)>>>this.g;return Bb||b!=this.i?this.v[c].ja(b,a):this.v[c++].sb(b,a)|this.v[c&this.T].sb(0,a+1)<<8};h.Kc=function(a,b){this.v[(a&this.w)>>>this.g].ub(a&this.i,b,a)};h.Lb=function(a,b){var c=a&this.i,d=(a&this.w)>>>this.g;Bb||c!=this.i?this.v[d].vb(c,b,a):(this.v[d++].ub(c,b&255,a),this.v[d&this.T].ub(0,b>>8&255,a+1))};function Sc(a,b){return a.b[(b&a.I)>>>a.g]} function lc(a,b){var c;a.G=!1;a.ia++;var d=b&a.i,e=Sc(a,b);Bb||d!=a.i?c=e.C(d,b):c=e.j(d,b)|Sc(a,b+1).j(0,b+1)<<8;a.ia--;return c}function Tc(a,b,c){a.G=!1;a.ia++;Sc(a,b).D(b&a.i,c&255,b);a.ia--}function jc(a,b,c){a.G=!1;a.ia++;var d=b&a.i,e=Sc(a,b);Bb||d!=a.i?e.G(d,c&65535,b):(e.D(d,c&255,b),Sc(a,b+1).D(0,c>>8&255,b+1));a.ia--} function Uc(a){for(var b=0,c=[],d=0;da.f.ya)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var r=g[4],u=g[5]||1,t=0;t>8:e[2](f)&255):f&1&&(e=d.Ja[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.f&&I(this.f,16|e[5])&&J(this.f,e[4]+".readByte("+O(this.f,b)+"): "+O(this.f,c),!0,!d.ia),c;d.Ia(b,16,3);c=255;this.f&&I(this.f,16)&&J(this.f,"warning: unconverted read access to byte @"+O(this.f,b)+": "+O(this.f,c),!0,!d.ia);return c} -function Hc(a,b,c){var d=!1,e=this.controller,f=e.Ja[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.Ja[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.f&&I(this.f,16|f[5])&&J(this.f,f[4]+".writeByte("+O(this.f,c)+","+O(this.f,b)+")",!0,!e.ia):(e.Ia(c,16,5),this.f&&I(this.f,16)&&J(this.f,"warning: unconverted write access to byte @"+O(this.f,c)+": "+O(this.f, -b),!0,!e.ia))}function Ic(a,b){var c=-1,d=this.controller;a=d.Ja[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.f&&I(this.f,16|a[5])&&J(this.f,a[4]+".readWord("+O(this.f,b)+"): "+O(this.f,c),!0,!d.ia),c;d.Ia(b,16,2);c=65535;this.f&&I(this.f,16)&&J(this.f,"warning: unconverted read access to word @"+O(this.f,b)+": "+O(this.f,c),!0,!d.ia);return c} -function Jc(a,b,c){var d=!1,e=this.controller;a=e.Ja[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.f&&I(this.f,16|a[5])&&J(this.f,a[4]+".writeWord("+O(this.f,c)+","+O(this.f,b)+")",!0,!e.ia):(e.Ia(c,16,4),this.f&&I(this.f,16)&&J(this.f,"warning: unconverted write access to word @"+O(this.f,c)+": "+O(this.f,b),!0,!e.ia))}function P(a){A.call(this,"Device",a,0,256);this.b={kh:0,Gc:-1}}p(P,A);h=P.prototype; -h.qa=function(a,b,c,d){this.D=b;this.I=a;this.f=c;this.F=d;var e=this;this.b.Gc=$c(c,function(){e.b.Eb|=128;e.b.Eb&64&&ad(e.f,e.b.eb);e.I&&L(e.I,1);bd(e.f,e.b.Gc,1E3/60)});this.b.eb=cd(c,64,6,524288);Pb(b,this,dd);Rb(b,this.reset.bind(this));d&&ed(d,64,function(a){var b=e.f;fd(e,"KIPDR",b.C[0],0,a[0]);fd(e,"KDPDR",b.C[0],8,a[0]);fd(e,"KIPAR",b.M[0],0,a[0]);fd(e,"KDPAR",b.M[0],8,a[0],!0);fd(e,"SIPDR",b.C[1],0,a[0]);fd(e,"SDPDR",b.C[1],8,a[0]);fd(e,"SIPAR",b.M[1],0,a[0]);fd(e,"SDPAR",b.M[1],8,a[0], -!0);fd(e,"UIPDR",b.C[3],0,a[0]);fd(e,"UDPDR",b.C[3],8,a[0]);fd(e,"UIPAR",b.M[3],0,a[0]);fd(e,"UDPAR",b.M[3],8,a[0],!0);b.T&32&&fd(e,"UNIMAP",b.Ra,-1,a[0])});H(this)};function fd(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n>1&63;var b=this.f.Ra[a>>1];return a&1?b>>16:b&65535};h.fg=function(a,b){b=b>>1&63;var c=b>>1;this.f.Ra[c]=b&1?this.f.Ra[c]&65535|(a&63)<<16:this.f.Ra[c]&-65536|a&65534}; -h.Qe=function(a){return this.f.C[1][a>>1&7]};h.Zf=function(a,b){this.f.C[1][b>>1&7]=a&65295};h.Oe=function(a){return this.f.C[1][(a>>1&7)+8]};h.Xf=function(a,b){this.f.C[1][(b>>1&7)+8]=a&65295};h.Pe=function(a){return this.f.M[1][a>>1&7]};h.Yf=function(a,b){b=b>>1&7;this.f.M[1][b]=a;this.f.C[1][b]&=65295};h.Ne=function(a){return this.f.M[1][(a>>1&7)+8]};h.Wf=function(a,b){b=(b>>1&7)+8;this.f.M[1][b]=a;this.f.C[1][b]&=65295};h.je=function(a){return this.f.C[0][a>>1&7]}; -h.uf=function(a,b){this.f.C[0][b>>1&7]=a&65295};h.he=function(a){return this.f.C[0][(a>>1&7)+8]};h.sf=function(a,b){this.f.C[0][(b>>1&7)+8]=a&65295};h.ie=function(a){return this.f.M[0][a>>1&7]};h.tf=function(a,b){b=b>>1&7;this.f.M[0][b]=a;this.f.C[0][b]&=65295};h.ge=function(a){return this.f.M[0][(a>>1&7)+8]};h.rf=function(a,b){b=(b>>1&7)+8;this.f.M[0][b]=a;this.f.C[0][b]&=65295};h.We=function(a){return this.f.C[3][a>>1&7]};h.eg=function(a,b){this.f.C[3][b>>1&7]=a&65295}; -h.Ue=function(a){return this.f.C[3][(a>>1&7)+8]};h.cg=function(a,b){this.f.C[3][(b>>1&7)+8]=a&65295};h.Ve=function(a){return this.f.M[3][a>>1&7]};h.dg=function(a,b){b=b>>1&7;this.f.M[3][b]=a;this.f.C[3][b]&=65295};h.Te=function(a){return this.f.M[3][(a>>1&7)+8]};h.bg=function(a,b){b=(b>>1&7)+8;this.f.M[3][b]=a;this.f.C[3][b]&=65295};h.Fb=function(a){a&=7;return this.f.w&2048?this.f.pa[a]:this.f.g[a]};h.Jb=function(a,b){b&=7;this.f.w&2048?this.f.pa[b]=a:this.f.g[b]=a}; -h.ue=function(){return this.f.w&49152?this.f.X[0]:this.f.g[6]};h.Df=function(a){this.f.w&49152?this.f.X[0]=a:this.f.g[6]=a};h.xe=function(){return this.f.g[7]};h.Gf=function(a){this.f.g[7]=a};h.Gb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.pa[a]};h.Kb=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.pa[b]=a};h.ve=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[1]};h.Ef=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[1]=a}; -h.we=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[3]};h.Ff=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[3]=a};h.fe=function(a){return this.f.nc[a-65504>>1]};h.qf=function(a,b){this.f.nc[b-65504>>1]=a};h.nd=function(a){return 65520==a?(Vc(this.D)>>6)-1:0};h.sd=function(){};h.Se=function(){return 1};h.ag=function(){};h.ee=function(){return this.f.R};h.pf=function(){this.f.R=0};h.le=function(){return this.f.mc};h.wf=function(a,b){b&1||(a&=255);this.f.mc=a}; -h.qe=function(a,b){return b?0:this.f.bb};h.zf=function(a){md(this.f,a)};h.Re=function(a,b){return b?0:this.f.za&65280};h.$f=function(a){this.f.za=a|255};h.te=function(){return nd(this.f)};h.Cf=function(a){od(this.f,a)};h.rd=function(a,b){I(this)&&J(this,"writeIgnored("+q(b)+"): "+q(a),!0,!0)}; -var Q={},dd=(Q[61568]=[null,null,P.prototype.Xe,P.prototype.fg,"UNIMAP",64,1170],Q[62592]=[null,null,P.prototype.Qe,P.prototype.Zf,"SIPDR",8,1145,64],Q[62608]=[null,null,P.prototype.Oe,P.prototype.Xf,"SDPDR",8,1145,64],Q[62624]=[null,null,P.prototype.Pe,P.prototype.Yf,"SIPAR",8,1145,64],Q[62640]=[null,null,P.prototype.Ne,P.prototype.Wf,"SDPAR",8,1145,64],Q[62656]=[null,null,P.prototype.je,P.prototype.uf,"KIPDR",8,1145,64],Q[62672]=[null,null,P.prototype.he,P.prototype.sf,"KDPDR",8,1145,64],Q[62688]= -[null,null,P.prototype.ie,P.prototype.tf,"KIPAR",8,1145,64],Q[62704]=[null,null,P.prototype.ge,P.prototype.rf,"KDPAR",8,1145,64],Q[62798]=[null,null,P.prototype.pe,P.prototype.yf,"MMR3",1,1145,64],Q[65382]=[null,null,P.prototype.ke,P.prototype.vf,"LKS"],Q[65402]=[null,null,P.prototype.me,P.prototype.xf,"MMR0",1,1145,64],Q[65404]=[null,null,P.prototype.ne,P.prototype.rd,"MMR1",1,1145,64],Q[65406]=[null,null,P.prototype.oe,P.prototype.rd,"MMR2",1,1145,64],Q[65408]=[null,null,P.prototype.We,P.prototype.eg, -"UIPDR",8,1145,64],Q[65424]=[null,null,P.prototype.Ue,P.prototype.cg,"UDPDR",8,1145,64],Q[65440]=[null,null,P.prototype.Ve,P.prototype.dg,"UIPAR",8,1145,64],Q[65456]=[null,null,P.prototype.Te,P.prototype.bg,"UDPAR",8,1145,64],Q[65472]=[null,null,P.prototype.Fb,P.prototype.Jb,"R0SET0"],Q[65473]=[null,null,P.prototype.Fb,P.prototype.Jb,"R1SET0"],Q[65474]=[null,null,P.prototype.Fb,P.prototype.Jb,"R2SET0"],Q[65475]=[null,null,P.prototype.Fb,P.prototype.Jb,"R3SET0"],Q[65476]=[null,null,P.prototype.Fb, -P.prototype.Jb,"R4SET0"],Q[65477]=[null,null,P.prototype.Fb,P.prototype.Jb,"R5SET0"],Q[65478]=[null,null,P.prototype.ue,P.prototype.Df,"R6KERNEL"],Q[65479]=[null,null,P.prototype.xe,P.prototype.Gf,"R7KERNEL"],Q[65480]=[null,null,P.prototype.Gb,P.prototype.Kb,"R0SET1",1,1145],Q[65481]=[null,null,P.prototype.Gb,P.prototype.Kb,"R1SET1",1,1145],Q[65482]=[null,null,P.prototype.Gb,P.prototype.Kb,"R2SET1",1,1145],Q[65483]=[null,null,P.prototype.Gb,P.prototype.Kb,"R3SET1",1,1145],Q[65484]=[null,null,P.prototype.Gb, -P.prototype.Kb,"R4SET1",1,1145],Q[65485]=[null,null,P.prototype.Gb,P.prototype.Kb,"R5SET1",1,1145],Q[65486]=[null,null,P.prototype.ve,P.prototype.Ef,"R6SUPER",1,1145],Q[65487]=[null,null,P.prototype.we,P.prototype.Ff,"R6USER",1,1145],Q[65504]=[null,null,P.prototype.fe,P.prototype.qf,"CTRL",8,1170],Q[65520]=[null,null,P.prototype.nd,P.prototype.sd,"LSIZE",1,1170],Q[65522]=[null,null,P.prototype.nd,P.prototype.sd,"HSIZE",1,1170],Q[65524]=[null,null,P.prototype.Se,P.prototype.ag,"SYSID",1,1170],Q[65526]= -[null,null,P.prototype.ee,P.prototype.pf,"ERR",1,1170],Q[65528]=[null,null,P.prototype.le,P.prototype.wf,"MBR",1,1170],Q[65530]=[null,null,P.prototype.qe,P.prototype.zf,"PIR"],Q[65532]=[null,null,P.prototype.Re,P.prototype.$f,"SLR"],Q[65534]=[null,null,P.prototype.te,P.prototype.Cf,"PSW"],Q); +function Xc(a,b,c,d,e,f,g,k,l){for(var m=b==c?-1:0;b<=c;b+=2){var n=b&Yc;if(void 0!==a.Ma[n])return Da&&Da("I/O address already registered: "+v(b,8,!0)),!1;var r=l||"unknown";r&&0<=m&&(r+=m++);a.Ma[n]=[d,e,f,g,r,k||16,!1]}return!0} +function Pb(a,b,c,d){for(var e in c){var f=+e+(d||0),g=c[e];if(!(g[6]&&g[6]>a.f.Aa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var r=g[4],u=g[5]||1,t=0;t>8:e[2](f)&255):f&1&&(e=d.Ma[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return this.f&&I(this.f,16|e[5])&&J(this.f,e[4]+".readByte("+O(this.f,b)+"): "+O(this.f,c),!0,!d.ia),c;d.La(b,16,3);c=255;this.f&&I(this.f,16)&&J(this.f,"warning: unconverted read access to byte @"+O(this.f,b)+": "+O(this.f,c),!0,!d.ia);return c} +function Hc(a,b,c){var d=!1,e=this.controller,f=e.Ma[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.Ma[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.f&&I(this.f,16|f[5])&&J(this.f,f[4]+".writeByte("+O(this.f,c)+","+O(this.f,b)+")",!0,!e.ia):(e.La(c,16,5),this.f&&I(this.f,16)&&J(this.f,"warning: unconverted write access to byte @"+O(this.f,c)+": "+O(this.f, +b),!0,!e.ia))}function Ic(a,b){var c=-1,d=this.controller;a=d.Ma[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.f&&I(this.f,16|a[5])&&J(this.f,a[4]+".readWord("+O(this.f,b)+"): "+O(this.f,c),!0,!d.ia),c;d.La(b,16,2);c=65535;this.f&&I(this.f,16)&&J(this.f,"warning: unconverted read access to word @"+O(this.f,b)+": "+O(this.f,c),!0,!d.ia);return c} +function Jc(a,b,c){var d=!1,e=this.controller;a=e.Ma[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.f&&I(this.f,16|a[5])&&J(this.f,a[4]+".writeWord("+O(this.f,c)+","+O(this.f,b)+")",!0,!e.ia):(e.La(c,16,4),this.f&&I(this.f,16)&&J(this.f,"warning: unconverted write access to word @"+O(this.f,c)+": "+O(this.f,b),!0,!e.ia))}function P(a){A.call(this,"Device",a,0,256);this.b={lh:0,Gc:-1}}p(P,A);h=P.prototype; +h.ra=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.F=d;var e=this;this.b.Gc=$c(c,function(){e.b.Eb|=128;e.b.Eb&64&&ad(e.f,e.b.eb);e.J&&L(e.J,1);bd(e.f,e.b.Gc,1E3/60)});this.b.eb=cd(c,64,6,524288);Pb(b,this,dd);Rb(b,this.reset.bind(this));d&&ed(d,64,function(a){var b=e.f;fd(e,"KIPDR",b.C[0],0,a[0]);fd(e,"KDPDR",b.C[0],8,a[0]);fd(e,"KIPAR",b.N[0],0,a[0]);fd(e,"KDPAR",b.N[0],8,a[0],!0);fd(e,"SIPDR",b.C[1],0,a[0]);fd(e,"SDPDR",b.C[1],8,a[0]);fd(e,"SIPAR",b.N[1],0,a[0]);fd(e,"SDPAR",b.N[1],8,a[0], +!0);fd(e,"UIPDR",b.C[3],0,a[0]);fd(e,"UDPDR",b.C[3],8,a[0]);fd(e,"UIPAR",b.N[3],0,a[0]);fd(e,"UDPAR",b.N[3],8,a[0],!0);b.T&32&&fd(e,"UNIMAP",b.Sa,-1,a[0])});H(this)};function fd(a,b,c,d,e,f){a=a.F;if(!(e&&0>b.indexOf(e.toUpperCase()))){e=8;var g="",k=!1,l=0,m=8;0>d&&(e=c.length,d=0,k=!0,l=3,m=4);for(var n=0;n>1&63;var b=this.f.Sa[a>>1];return a&1?b>>16:b&65535};h.gg=function(a,b){b=b>>1&63;var c=b>>1;this.f.Sa[c]=b&1?this.f.Sa[c]&65535|(a&63)<<16:this.f.Sa[c]&-65536|a&65534}; +h.Qe=function(a){return this.f.C[1][a>>1&7]};h.$f=function(a,b){this.f.C[1][b>>1&7]=a&65295};h.Oe=function(a){return this.f.C[1][(a>>1&7)+8]};h.Yf=function(a,b){this.f.C[1][(b>>1&7)+8]=a&65295};h.Pe=function(a){return this.f.N[1][a>>1&7]};h.Zf=function(a,b){b=b>>1&7;this.f.N[1][b]=a;this.f.C[1][b]&=65295};h.Ne=function(a){return this.f.N[1][(a>>1&7)+8]};h.Xf=function(a,b){b=(b>>1&7)+8;this.f.N[1][b]=a;this.f.C[1][b]&=65295};h.je=function(a){return this.f.C[0][a>>1&7]}; +h.vf=function(a,b){this.f.C[0][b>>1&7]=a&65295};h.he=function(a){return this.f.C[0][(a>>1&7)+8]};h.tf=function(a,b){this.f.C[0][(b>>1&7)+8]=a&65295};h.ie=function(a){return this.f.N[0][a>>1&7]};h.uf=function(a,b){b=b>>1&7;this.f.N[0][b]=a;this.f.C[0][b]&=65295};h.ge=function(a){return this.f.N[0][(a>>1&7)+8]};h.sf=function(a,b){b=(b>>1&7)+8;this.f.N[0][b]=a;this.f.C[0][b]&=65295};h.We=function(a){return this.f.C[3][a>>1&7]};h.fg=function(a,b){this.f.C[3][b>>1&7]=a&65295}; +h.Ue=function(a){return this.f.C[3][(a>>1&7)+8]};h.dg=function(a,b){this.f.C[3][(b>>1&7)+8]=a&65295};h.Ve=function(a){return this.f.N[3][a>>1&7]};h.eg=function(a,b){b=b>>1&7;this.f.N[3][b]=a;this.f.C[3][b]&=65295};h.Te=function(a){return this.f.N[3][(a>>1&7)+8]};h.cg=function(a,b){b=(b>>1&7)+8;this.f.N[3][b]=a;this.f.C[3][b]&=65295};h.Fb=function(a){a&=7;return this.f.w&2048?this.f.qa[a]:this.f.g[a]};h.Jb=function(a,b){b&=7;this.f.w&2048?this.f.qa[b]=a:this.f.g[b]=a}; +h.ue=function(){return this.f.w&49152?this.f.X[0]:this.f.g[6]};h.Ef=function(a){this.f.w&49152?this.f.X[0]=a:this.f.g[6]=a};h.xe=function(){return this.f.g[7]};h.Hf=function(a){this.f.g[7]=a};h.Gb=function(a){a&=7;return this.f.w&2048?this.f.g[a]:this.f.qa[a]};h.Kb=function(a,b){b&=7;this.f.w&2048?this.f.g[b]=a:this.f.qa[b]=a};h.ve=function(){return 1==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[1]};h.Ff=function(a){1==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[1]=a}; +h.we=function(){return 3==(this.f.w&49152)>>14?this.f.g[6]:this.f.X[3]};h.Gf=function(a){3==(this.f.w&49152)>>14?this.f.g[6]=a:this.f.X[3]=a};h.fe=function(a){return this.f.nc[a-65504>>1]};h.rf=function(a,b){this.f.nc[b-65504>>1]=a};h.nd=function(a){return 65520==a?(Vc(this.D)>>6)-1:0};h.sd=function(){};h.Se=function(){return 1};h.bg=function(){};h.ee=function(){return this.f.R};h.qf=function(){this.f.R=0};h.le=function(){return this.f.mc};h.xf=function(a,b){b&1||(a&=255);this.f.mc=a}; +h.qe=function(a,b){return b?0:this.f.bb};h.Af=function(a){md(this.f,a)};h.Re=function(a,b){return b?0:this.f.Ba&65280};h.ag=function(a){this.f.Ba=a|255};h.te=function(){return nd(this.f)};h.Df=function(a){od(this.f,a)};h.rd=function(a,b){I(this)&&J(this,"writeIgnored("+q(b)+"): "+q(a),!0,!0)}; +var Q={},dd=(Q[61568]=[null,null,P.prototype.Xe,P.prototype.gg,"UNIMAP",64,1170],Q[62592]=[null,null,P.prototype.Qe,P.prototype.$f,"SIPDR",8,1145,64],Q[62608]=[null,null,P.prototype.Oe,P.prototype.Yf,"SDPDR",8,1145,64],Q[62624]=[null,null,P.prototype.Pe,P.prototype.Zf,"SIPAR",8,1145,64],Q[62640]=[null,null,P.prototype.Ne,P.prototype.Xf,"SDPAR",8,1145,64],Q[62656]=[null,null,P.prototype.je,P.prototype.vf,"KIPDR",8,1145,64],Q[62672]=[null,null,P.prototype.he,P.prototype.tf,"KDPDR",8,1145,64],Q[62688]= +[null,null,P.prototype.ie,P.prototype.uf,"KIPAR",8,1145,64],Q[62704]=[null,null,P.prototype.ge,P.prototype.sf,"KDPAR",8,1145,64],Q[62798]=[null,null,P.prototype.pe,P.prototype.zf,"MMR3",1,1145,64],Q[65382]=[null,null,P.prototype.ke,P.prototype.wf,"LKS"],Q[65402]=[null,null,P.prototype.me,P.prototype.yf,"MMR0",1,1145,64],Q[65404]=[null,null,P.prototype.ne,P.prototype.rd,"MMR1",1,1145,64],Q[65406]=[null,null,P.prototype.oe,P.prototype.rd,"MMR2",1,1145,64],Q[65408]=[null,null,P.prototype.We,P.prototype.fg, +"UIPDR",8,1145,64],Q[65424]=[null,null,P.prototype.Ue,P.prototype.dg,"UDPDR",8,1145,64],Q[65440]=[null,null,P.prototype.Ve,P.prototype.eg,"UIPAR",8,1145,64],Q[65456]=[null,null,P.prototype.Te,P.prototype.cg,"UDPAR",8,1145,64],Q[65472]=[null,null,P.prototype.Fb,P.prototype.Jb,"R0SET0"],Q[65473]=[null,null,P.prototype.Fb,P.prototype.Jb,"R1SET0"],Q[65474]=[null,null,P.prototype.Fb,P.prototype.Jb,"R2SET0"],Q[65475]=[null,null,P.prototype.Fb,P.prototype.Jb,"R3SET0"],Q[65476]=[null,null,P.prototype.Fb, +P.prototype.Jb,"R4SET0"],Q[65477]=[null,null,P.prototype.Fb,P.prototype.Jb,"R5SET0"],Q[65478]=[null,null,P.prototype.ue,P.prototype.Ef,"R6KERNEL"],Q[65479]=[null,null,P.prototype.xe,P.prototype.Hf,"R7KERNEL"],Q[65480]=[null,null,P.prototype.Gb,P.prototype.Kb,"R0SET1",1,1145],Q[65481]=[null,null,P.prototype.Gb,P.prototype.Kb,"R1SET1",1,1145],Q[65482]=[null,null,P.prototype.Gb,P.prototype.Kb,"R2SET1",1,1145],Q[65483]=[null,null,P.prototype.Gb,P.prototype.Kb,"R3SET1",1,1145],Q[65484]=[null,null,P.prototype.Gb, +P.prototype.Kb,"R4SET1",1,1145],Q[65485]=[null,null,P.prototype.Gb,P.prototype.Kb,"R5SET1",1,1145],Q[65486]=[null,null,P.prototype.ve,P.prototype.Ff,"R6SUPER",1,1145],Q[65487]=[null,null,P.prototype.we,P.prototype.Gf,"R6USER",1,1145],Q[65504]=[null,null,P.prototype.fe,P.prototype.rf,"CTRL",8,1170],Q[65520]=[null,null,P.prototype.nd,P.prototype.sd,"LSIZE",1,1170],Q[65522]=[null,null,P.prototype.nd,P.prototype.sd,"HSIZE",1,1170],Q[65524]=[null,null,P.prototype.Se,P.prototype.bg,"SYSID",1,1170],Q[65526]= +[null,null,P.prototype.ee,P.prototype.qf,"ERR",1,1170],Q[65528]=[null,null,P.prototype.le,P.prototype.xf,"MBR",1,1170],Q[65530]=[null,null,P.prototype.qe,P.prototype.Af,"PIR"],Q[65532]=[null,null,P.prototype.Re,P.prototype.ag,"SLR"],Q[65534]=[null,null,P.prototype.te,P.prototype.Df,"PSW"],Q); Xa(function(){for(var a=G(document,E,"device"),b=0;b>1),this.b=new Int32Array(this.v,0,this.size>>2),ud(this,Dd?Ed:Fd);else{a=this.b=Array(this.size>>2);for(f=0;f>2),b=0;b>8,c)};h.ce=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.cf=function(a,b){Ab&&a&1&&this.B.Ia(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}; -h.mf=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.Ta=!0};h.ae=function(a,b){this.f&&null!=this.K&&Md(this.f,this.K+a);return this.j(a,b)};h.Ze=function(a,b){this.f&&null!=this.K&&Md(this.f,this.K+a,2);return this.C(a,b)}; -h.kf=function(a,b,c){this.f&&null!=this.K&&Nd(this.f,this.K+a);this.I?this.Ib(0,b,c):this.D(a,b,c)};h.hg=function(a,b,c){this.f&&null!=this.K&&Nd(this.f,this.K+a,2);this.I?this.Ib(0,b,c):this.G(a,b,c)};h.$d=function(a){return this.g[a]};h.be=function(a,b){a=this.g[a];this.f&&I(this.f,32)&&J(this.f,"Memory.readByte("+O(this.f,b)+"): "+O(this.f,a),!0);return a};h.Ye=function(a,b){Ab&&a&1&&this.B.Ia(b,64,2);return this.w.getUint16(a,!0)}; -h.bf=function(a,b){Ab&&a&1&&this.B.Ia(b,64,2);a=!Bb&&a&1?this.g[a]|this.g[a+1]<<8:this.H[a>>1];this.f&&I(this.f,32)&&J(this.f,"Memory.readWord("+O(this.f,b)+"): "+O(this.f,a),!0);return a};h.jf=function(a,b){this.g[a]=b;this.Ta=!0};h.lf=function(a,b,c){this.g[a]=b;this.Ta=!0;this.f&&I(this.f,32)&&J(this.f,"Memory.writeByte("+O(this.f,c)+","+O(this.f,b)+")",!0)};h.gg=function(a,b,c){Ab&&a&1&&this.B.Ia(c,64,4);this.w.setUint16(a,b,!0);this.Ta=!0}; -h.ig=function(a,b,c){Ab&&a&1&&this.B.Ia(c,64,4);!Bb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.H[a>>1]=b;this.Ta=!0;this.f&&I(this.f,32)&&J(this.f,"Memory.writeWord("+O(this.f,c)+","+O(this.f,b)+")",!0)};var sd=0,Wc=1,td=2,Mc=4,Qc=["NONE","RAM","ROM","VID","H/W"],rd=0,Hd=[],Gd=[M.prototype.ce,M.prototype.mf,M.prototype.cf,M.prototype.jg],Kd=[M.prototype.ae,M.prototype.kf,M.prototype.Ze,M.prototype.hg]; -if(wb)var Fd=[M.prototype.$d,M.prototype.jf,M.prototype.Ye,M.prototype.gg],Ed=[M.prototype.be,M.prototype.lf,M.prototype.bf,M.prototype.ig];var Od;if(wb){var Pd=new ArrayBuffer(2);(new DataView(Pd)).setUint16(0,256,!0);Od=256===(new Uint16Array(Pd))[0]}else Od=!1;var Dd=Od; -function Qd(a,b){A.call(this,"CPU",a,0,1);b=a.cycles||b;var c=a.multiplier||1;this.oc=0;this.ic=b;this.Za=c;this.vc=Math.round(this.ic/1E4)/100;this.nb=this.vc*this.Za;this.wc=this.Sb=this.hb=this.jc=0;this.A.U=!1;this.A.fc=!1;this.A.Sa=a.autoStart;this.A.zb=!1;this.Qb=this.Bb=0;this.Rb=a.csStart;this.Ab=a.csInterval;this.Cb=a.csStop;this.Ba=[];this.Tc=this.gf.bind(this);this.$a=this.Fa=this.Ya=this.b=this.da=this.Ea=this.Pb=this.Xa=this.Db=this.xc=this.mb=0;this.ta=null;H(this)}p(Qd,A);h=Qd.prototype; -h.qa=function(a,b,c,d){this.I=a;this.D=b;this.F=d;this.ta=a.i;for(a=0;a=a.Bb&&(a.Bb+=a.Ab,c=!0);0<=a.Cb&&a.Cb<=Yd(a)&&(a.Ab=a.Cb=-1,Ud(a),a.Y(),c=!0);c&&a.u(Yd(a)+" cycles: checksum="+v(a.Qb))}} -h.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.B[b]=c,!0;case "run":return this.B[b]=c,c.onclick=function(){var a;if(a=d.I)if(a=d.I,a.A.fa)a=!0;else{var b=null,c,k=nb(a.id);for(c=0;ca.mb/a.nb?b=1:d=!0;a.Za=b;b=a.vc*a.Za;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.B.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.I&&be(a.I)}fc(a,a.Fa);a.Fa=0;a.Ea=ya();a.Xa=0;$d(a);return d}function $c(a,b){var c=a.Ba.length;a.Ba.push([-1,b]);return c}function bd(a,b,c,d){0<=b&&ba.Ba[b][0])&&(c=a.ic*a.Za/1E3*c|0,a.A.U&&(c+=ce(a)),a.Ba[b][0]=c)} -function de(a,b){for(var c=a.Ba.length-1;0<=c;c--){var d=a.Ba[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ec(a,b){for(var c=a.Ba.length-1;0<=c;c--){var d=a.Ba[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ce(a,b){var c=a.Ya-=a.b;a.b=a.da=0;b&&(a.Ya=0);return c} -h.gf=function(){if(this.A.U){this.jc>=this.ic&&$d(this,!0);this.Db=0;this.Pb=ya();if(this.Xa){var a=this.Pb-this.Xa;a>this.wc&&(this.Ea+=a,this.Ea>this.Pb&&(this.Ea=this.Pb))}try{do{var b=de(this,this.A.zb?1:this.Sb);try{this.$b(b)}catch(e){if("number"!=typeof e)throw e;}b=ce(this,!0);this.Db+=b;this.Fa+=b;gc(this,b);ec(this,b);this.hb-=b;if(0>=this.hb){this.hb+=this.Sb;++this.xc>=ee&&(this.I&&L(this.I,void 0),this.xc=0);break}}while(this.A.U)}catch(e){this.Y();this.I&&this.I.stop(ya(),Yd(this)); -rb(this,e.stack||e.message);return}if(this.A.U){a=setTimeout;b=this.Tc;this.Xa=ya();var c=this.wc;this.Db&&(c=Math.round(c*this.Db/this.Sb));var c=c-(this.Xa-this.Pb),d=this.Xa-this.Ea;d&&(this.mb=Math.round(this.Fa/(10*d))/100,864E5<=d&&(this.$a=0,Zd(this)));if(0>c||this.mbc&&(this.Ea-=c),c=0;this.jc+=this.Db;this.Xa+=c;a(b,c)}}}; -function cc(a,b){if(!sb(a))if(a.A.U)a.u(a.toString()+" busy");else{Zd(a);a.A.U=!0;a.A.fc=!0;var c=a.B.run;c&&(c.textContent="Halt");a.I&&(b&&be(a.I,!0),a.I.start(a.Ea,Yd(a)));a.F||a.status("Started");setTimeout(a.Tc,0)}}h.$b=function(){return 0};h.Y=function(a){var b=!1;if(this.A.U){ce(this);fc(this,this.Fa);this.Fa=0;this.A.U=!1;if(b=this.B.run)b.textContent="Run";this.I&&this.I.stop(ya(),Yd(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var ae=30,ee=15,Rd=["power","reset"]; -function fe(a){var b=+a.model||1170;Qd.call(this,a,6666667);this.ya=b;this.Qc=a.addrReset||0;this.w=this.G=this.H=this.L=this.J=0;this.g=this.pa=this.X=[];this.O=0;this.uc=[];this.C=this.M=this.Ra=this.nc=[];this.lc=this.jb=this.P=this.Pc=this.Wa=this.xb=this.yb=this.Da=this.R=this.bb=this.za=this.S=this.Wb=this.Xb=this.T=this.ab=this.v=this.j=this.hc=this.V=this.Z=this.i=this.mc=0;this.Sc=255;1120>=this.ya?(this.Oc=ge.bind(this),this.wb=this.Ld,this.lc=8,this.Sc=-1,this.Xc=255,this.Uc=0):(this.Oc= -he.bind(this),this.wb=this.Md,this.Xc=~(1792|(1145>this.ya?2048:0))&65535,this.Uc=1145<=this.ya?2048:0);this.ma=0;this.la=null;this.tc=[];this.A.complete=!1;this.Mb=this.pc=this.fd;this.Nb=this.qc=this.ld;this.gc=this.rc=this.pd;this.Ob=this.sc=this.qd;this.Ca=this.ib=this.Tb=this.Vb=0;this.ua=this.kd;this.ja=this.Ec;this.vb=this.Hc;this.Zc=this.Yc=0}p(fe,Qd);h=fe.prototype; -h.qa=function(a,b,c,d){Qd.prototype.qa.call(this,a,b,c,d);this.pc=b.Jc.bind(b);this.qc=b.Zb.bind(b);this.rc=b.Kc.bind(b);this.sc=b.Lb.bind(b)};h.ra=function(a,b){for(var c=192,d=0;de.Yb&&(e.Yb=c,c+=4)}return Qd.prototype.ra.call(this,a,b)}; -h.reset=function(){this.status("Model "+this.ya);this.A.U&&this.Y();this.G=65536;this.H=32768;this.L=65535;this.J=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Qc,-1,-2,-3,-4,-5,-6,-7,-8];this.pa=[0,0,0,0,0,0];this.X=[0,0,0,0];this.O=0;this.uc=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,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]];this.M=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], -[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Ra=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nc=[0,0,0,0,0,0,0,0];this.v=this.j=this.hc=this.V=this.Z=this.i=this.mc=0;this.ab=-1;ac(this);Td(this);this.A.error=!1;Qd.prototype.reset.call(this)};function ac(a){a.S=0;a.Wb=0;a.Xb=0;a.T=0;a.R=0;a.bb=0;a.za=255;a.Wa=0;a.xb=0;a.yb=0;a.Da=262143;a.jb=a.g[7];a.P=0;a.la=null;a.D&&(ie(a),a.Pc=Vc(a.D))} -function ie(a){a.Mb=a.pc;a.Nb=a.qc;a.gc=a.rc;a.Ob=a.sc;a.Tb&&(a.Mb=a.fd,a.Nb=a.ld);a.Vb&&(a.gc=a.pd,a.Ob=a.qd);a.Wa?(a.Ca=65536,a.ib=a.T&16?4186112:253952,a.ua=a.kd,a.ja=a.Tb?a.af:a.Ec,a.vb=a.Vb?a.lg:a.Hc,Nc(a.D,a.T&16?22:18)):(a.Ca=0,a.ib=57344,a.ua=a.Od,a.ja=a.Tb?a.$e:a.od,a.vb=a.Vb?a.kg:a.td,Nc(a.D,16))}function hd(a){var b=a.S;b&57344||(b=b&-3199|a.xb<<5|a.yb<<1);return b} -function id(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.Wb=a.P>>16&65535,a.Xb=a.P&65535);a.S=b;a.xb=(b&96)>>5;a.yb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Wa!=c&&(a.Wa=c,ie(a))}}function jd(a){a.S&57344||(a.Wb=a.P>>16&65535);a=a.Wb;a&65280&&(a=(a<<8|a>>8)&65535);return a}function kd(a){a.S&57344||(a.Xb=a.P&65535);return a.Xb}function ld(a,b){1170>a.ya&&(b&=-49);a.T!=b&&(a.T=b,a.Da=b&16?4194303:262143,ie(a))} -function je(a,b,c){a.Qc=b;a.D.reset();ac(a);ke(a,b);od(a,0);if(c){for(b=2;5>=b;b++)a.g[b]=0;a.A.U||cc(a)}else a.F?a.Y()||Vd(a.F):!1===c&&a.Y();!a.A.U&&a.ta&&a.ta.stop()}h.gd=function(){return 0};h.save=function(){var a=new le(this);a.set(0,[this.g,this.pa,this.X,this.Ra,this.nc,this.R,this.mc,this.bb,this.za,nd(this),this.ab,this.O,this.i,this.S,this.Wb,this.Xb,this.T,this.xb,this.yb,this.C,this.M,this.Wa,this.Da,this.jb,this.P]);a.set(1,[this.$a,this.Za]);a.set(2,Uc(this.D));return a.data()}; -h.restore=function(a){var b=a[1];this.$a=b[1];Zd(this,b[3]);a:{b=this.D;a=a[2];var c;for(c=0;c>8,c)};h.ce=function(a){return this.b[a>>2]>>>((a&3)<<3)&255};h.cf=function(a,b){Ab&&a&1&&this.B.La(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}; +h.nf=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.Ta=!0};h.ae=function(a,b){this.f&&null!=this.K&&Md(this.f,this.K+a);return this.j(a,b)};h.Ze=function(a,b){this.f&&null!=this.K&&Md(this.f,this.K+a,2);return this.C(a,b)}; +h.lf=function(a,b,c){this.f&&null!=this.K&&Nd(this.f,this.K+a);this.J?this.Ib(0,b,c):this.D(a,b,c)};h.ig=function(a,b,c){this.f&&null!=this.K&&Nd(this.f,this.K+a,2);this.J?this.Ib(0,b,c):this.G(a,b,c)};h.$d=function(a){return this.g[a]};h.be=function(a,b){a=this.g[a];this.f&&I(this.f,32)&&J(this.f,"Memory.readByte("+O(this.f,b)+"): "+O(this.f,a),!0);return a};h.Ye=function(a,b){Ab&&a&1&&this.B.La(b,64,2);return this.w.getUint16(a,!0)}; +h.bf=function(a,b){Ab&&a&1&&this.B.La(b,64,2);a=!Bb&&a&1?this.g[a]|this.g[a+1]<<8:this.H[a>>1];this.f&&I(this.f,32)&&J(this.f,"Memory.readWord("+O(this.f,b)+"): "+O(this.f,a),!0);return a};h.kf=function(a,b){this.g[a]=b;this.Ta=!0};h.mf=function(a,b,c){this.g[a]=b;this.Ta=!0;this.f&&I(this.f,32)&&J(this.f,"Memory.writeByte("+O(this.f,c)+","+O(this.f,b)+")",!0)};h.hg=function(a,b,c){Ab&&a&1&&this.B.La(c,64,4);this.w.setUint16(a,b,!0);this.Ta=!0}; +h.jg=function(a,b,c){Ab&&a&1&&this.B.La(c,64,4);!Bb&&a&1?(this.g[a]=b,this.g[a+1]=b>>8):this.H[a>>1]=b;this.Ta=!0;this.f&&I(this.f,32)&&J(this.f,"Memory.writeWord("+O(this.f,c)+","+O(this.f,b)+")",!0)};var sd=0,Wc=1,td=2,Mc=4,Qc=["NONE","RAM","ROM","VID","H/W"],rd=0,Hd=[],Gd=[M.prototype.ce,M.prototype.nf,M.prototype.cf,M.prototype.kg],Kd=[M.prototype.ae,M.prototype.lf,M.prototype.Ze,M.prototype.ig]; +if(wb)var Fd=[M.prototype.$d,M.prototype.kf,M.prototype.Ye,M.prototype.hg],Ed=[M.prototype.be,M.prototype.mf,M.prototype.bf,M.prototype.jg];var Od;if(wb){var Pd=new ArrayBuffer(2);(new DataView(Pd)).setUint16(0,256,!0);Od=256===(new Uint16Array(Pd))[0]}else Od=!1;var Dd=Od; +function Qd(a,b){A.call(this,"CPU",a,0,1);b=+a.cycles||b;var c=+a.multiplier||1;this.oc=0;this.ic=b;this.Za=c;this.vc=Math.round(this.ic/1E4)/100;this.nb=this.vc*this.Za;this.wc=this.Sb=this.hb=this.jc=0;this.A.U=!1;this.A.fc=!1;this.A.Ia=a.autoStart;"string"==typeof this.A.Ia&&(this.A.Ia="true"==this.A.Ia);this.A.zb=!1;this.Qb=this.Bb=0;this.Rb=+a.csStart;this.Ab=+a.csInterval;this.Cb=+a.csStop;this.Da=[];this.Tc=this.gf.bind(this);this.$a=this.Ha=this.Ya=this.b=this.da=this.Ga=this.Pb=this.Xa=this.Db= +this.xc=this.mb=0;this.pa=null;H(this)}p(Qd,A);h=Qd.prototype;h.ra=function(a,b,c,d){this.J=a;this.D=b;this.F=d;this.pa=a.i;for(a=0;a=a.Bb&&(a.Bb+=a.Ab,c=!0);0<=a.Cb&&a.Cb<=Yd(a)&&(a.Ab=a.Cb=-1,Ud(a),a.Z(),c=!0);c&&a.u(Yd(a)+" cycles: checksum="+v(a.Qb))}} +h.oa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.B[b]=c,!0;case "run":return this.B[b]=c,c.onclick=function(){var a;if(a=d.J)if(a=d.J,a.A.fa)a=!0;else{var b=null,c,k=nb(a.id);for(c=0;ca.mb/a.nb?b=1:d=!0;a.Za=b;b=a.vc*a.Za;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.B.setSpeed;e&&(e.textContent=b);a.u("target speed: "+b)}c&&a.J&&be(a.J)}fc(a,a.Ha);a.Ha=0;a.Ga=ya();a.Xa=0;$d(a);return d}function $c(a,b){var c=a.Da.length;a.Da.push([-1,b]);return c}function bd(a,b,c,d){0<=b&&ba.Da[b][0])&&(c=a.ic*a.Za/1E3*c|0,a.A.U&&(c+=ce(a)),a.Da[b][0]=c)} +function de(a,b){for(var c=a.Da.length-1;0<=c;c--){var d=a.Da[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function ec(a,b){for(var c=a.Da.length-1;0<=c;c--){var d=a.Da[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ce(a,b){var c=a.Ya-=a.b;a.b=a.da=0;b&&(a.Ya=0);return c} +h.gf=function(){if(this.A.U){this.jc>=this.ic&&$d(this,!0);this.Db=0;this.Pb=ya();if(this.Xa){var a=this.Pb-this.Xa;a>this.wc&&(this.Ga+=a,this.Ga>this.Pb&&(this.Ga=this.Pb))}try{do{var b=de(this,this.A.zb?1:this.Sb);try{this.$b(b)}catch(e){if("number"!=typeof e)throw e;}b=ce(this,!0);this.Db+=b;this.Ha+=b;gc(this,b);ec(this,b);this.hb-=b;if(0>=this.hb){this.hb+=this.Sb;++this.xc>=ee&&(this.J&&L(this.J,void 0),this.xc=0);break}}while(this.A.U)}catch(e){this.Z();this.J&&this.J.stop(ya(),Yd(this)); +rb(this,e.stack||e.message);return}if(this.A.U){a=setTimeout;b=this.Tc;this.Xa=ya();var c=this.wc;this.Db&&(c=Math.round(c*this.Db/this.Sb));var c=c-(this.Xa-this.Pb),d=this.Xa-this.Ga;d&&(this.mb=Math.round(this.Ha/(10*d))/100,864E5<=d&&(this.$a=0,Zd(this)));if(0>c||this.mbc&&(this.Ga-=c),c=0;this.jc+=this.Db;this.Xa+=c;a(b,c)}}}; +function cc(a,b){if(!sb(a))if(a.A.U)a.u(a.toString()+" busy");else{Zd(a);a.A.U=!0;a.A.fc=!0;var c=a.B.run;c&&(c.textContent="Halt");a.J&&(b&&be(a.J,!0),a.J.start(a.Ga,Yd(a)));a.F||a.status("Started");setTimeout(a.Tc,0)}}h.$b=function(){return 0};h.Z=function(a){var b=!1;if(this.A.U){ce(this);fc(this,this.Ha);this.Ha=0;this.A.U=!1;if(b=this.B.run)b.textContent="Run";this.J&&this.J.stop(ya(),Yd(this));b=!0;this.F||this.status("Stopped")}this.A.complete=a;return b};var ae=30,ee=15,Rd=["power","reset"]; +function fe(a){var b=+a.model||1170;Qd.call(this,a,6666667);this.Aa=b;this.Qc=+a.addrReset||0;this.w=this.G=this.H=this.L=this.I=0;this.g=this.qa=this.X=[];this.O=0;this.uc=[];this.C=this.N=this.Sa=this.nc=[];this.lc=this.jb=this.P=this.Pc=this.Wa=this.xb=this.yb=this.Fa=this.R=this.bb=this.Ba=this.S=this.Wb=this.Xb=this.T=this.ab=this.v=this.j=this.hc=this.V=this.Y=this.i=this.mc=0;this.Sc=255;1120>=this.Aa?(this.Oc=ge.bind(this),this.wb=this.Ld,this.lc=8,this.Sc=-1,this.Xc=255,this.Uc=0):(this.Oc= +he.bind(this),this.wb=this.Md,this.Xc=~(1792|(1145>this.Aa?2048:0))&65535,this.Uc=1145<=this.Aa?2048:0);this.ma=0;this.la=null;this.tc=[];this.A.complete=!1;this.Mb=this.pc=this.fd;this.Nb=this.qc=this.ld;this.gc=this.rc=this.pd;this.Ob=this.sc=this.qd;this.Ea=this.ib=this.Tb=this.Vb=0;this.ua=this.kd;this.ja=this.Ec;this.vb=this.Hc;this.Zc=this.Yc=0}p(fe,Qd);h=fe.prototype; +h.ra=function(a,b,c,d){Qd.prototype.ra.call(this,a,b,c,d);this.pc=b.Jc.bind(b);this.qc=b.Zb.bind(b);this.rc=b.Kc.bind(b);this.sc=b.Lb.bind(b)};h.sa=function(a,b){for(var c=192,d=0;de.Yb&&(e.Yb=c,c+=4)}return Qd.prototype.sa.call(this,a,b)}; +h.reset=function(){this.status("Model "+this.Aa);this.A.U&&this.Z();this.G=65536;this.H=32768;this.L=65535;this.I=32768;this.w=15;this.g=[0,0,0,0,0,0,0,this.Qc,-1,-2,-3,-4,-5,-6,-7,-8];this.qa=[0,0,0,0,0,0];this.X=[0,0,0,0];this.O=0;this.uc=[4,2,0,1];this.C=[[0,0,0,0,0,0,0,0,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]];this.N=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Sa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nc=[0,0,0,0,0,0,0,0];this.v=this.j=this.hc=this.V=this.Y=this.i=this.mc=0;this.ab=-1;ac(this);Td(this);this.A.error=!1;Qd.prototype.reset.call(this)};function ac(a){a.S=0;a.Wb=0;a.Xb=0;a.T=0;a.R=0;a.bb=0;a.Ba=255;a.Wa=0;a.xb=0;a.yb=0;a.Fa=262143;a.jb=a.g[7];a.P=0;a.la=null;a.D&&(ie(a),a.Pc=Vc(a.D))} +function ie(a){a.Mb=a.pc;a.Nb=a.qc;a.gc=a.rc;a.Ob=a.sc;a.Tb&&(a.Mb=a.fd,a.Nb=a.ld);a.Vb&&(a.gc=a.pd,a.Ob=a.qd);a.Wa?(a.Ea=65536,a.ib=a.T&16?4186112:253952,a.ua=a.kd,a.ja=a.Tb?a.af:a.Ec,a.vb=a.Vb?a.mg:a.Hc,Nc(a.D,a.T&16?22:18)):(a.Ea=0,a.ib=57344,a.ua=a.Od,a.ja=a.Tb?a.$e:a.od,a.vb=a.Vb?a.lg:a.td,Nc(a.D,16))}function hd(a){var b=a.S;b&57344||(b=b&-3199|a.xb<<5|a.yb<<1);return b} +function id(a,b){b&=-3073;if(a.S!=b){b&57344&&!(a.S&57344)&&(a.Wb=a.P>>16&65535,a.Xb=a.P&65535);a.S=b;a.xb=(b&96)>>5;a.yb=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Wa!=c&&(a.Wa=c,ie(a))}}function jd(a){a.S&57344||(a.Wb=a.P>>16&65535);a=a.Wb;a&65280&&(a=(a<<8|a>>8)&65535);return a}function kd(a){a.S&57344||(a.Xb=a.P&65535);return a.Xb}function ld(a,b){1170>a.Aa&&(b&=-49);a.T!=b&&(a.T=b,a.Fa=b&16?4194303:262143,ie(a))} +function je(a,b,c){a.Qc=b;a.D.reset();ac(a);ke(a,b);od(a,0);if(c){for(b=2;5>=b;b++)a.g[b]=0;a.A.U||cc(a)}else a.F?a.Z()||Vd(a.F):!1===c&&a.Z();!a.A.U&&a.pa&&a.pa.stop()}h.gd=function(){return 0};h.save=function(){var a=new le(this);a.set(0,[this.g,this.qa,this.X,this.Sa,this.nc,this.R,this.mc,this.bb,this.Ba,nd(this),this.ab,this.O,this.i,this.S,this.Wb,this.Xb,this.T,this.xb,this.yb,this.C,this.N,this.Wa,this.Fa,this.jb,this.P]);a.set(1,[this.$a,this.Za]);a.set(2,Uc(this.D));return a.data()}; +h.restore=function(a){var b=a[1];this.$a=b[1];Zd(this,b[3]);a:{b=this.D;a=a[2];var c;for(c=0;c>23)),a.b-=2);a.b-=3}function ke(a,b){a.g[7]=b&65535}function cd(a,b,c,d){c={Yb:b,fb:c,message:d||0,next:null};c.name=Db[b];a.tc.push(c);return c}function re(a,b){var c=a.la;if(c==b)a.la=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.la&&(a.i|=1)} function ad(a,b){if(b){if(b!=a.la){var c=a.la;if(!c||c.fb<=b.fb)b.next=c,a.la=b;else{do{var d=c.next;if(!d||d.fb<=b.fb){b.next=d;c.next=b;break}c=d}while(c)}}a.i|=1;b.message&&I(a,b.message|8)&&J(a,"setIRQ(vector="+q(b.Yb)+",priority="+b.fb+")",!0,!0)}}function gd(a,b){b&&(re(a,b),b.message&&I(a,b.message|8)&&J(a,"clearIRQ(vector="+q(b.Yb)+",priority="+b.fb+")",!0,!0))}function se(a){return a.i&64?(a.ka(168,64,-6),!0):a.i&32?(a.ka(4,32,-5),!0):a.i&16?(a.ka(12,16,-7),!0):!1} -function nd(a){return a.w=a.w&63728|pe(a)|oe(a)|ne(a)|me(a)}function od(a,b){b&=a.Xc;a.J=b<<12;a.L=~b&4;a.H=b<<14;a.G=b<<16;if((b^a.w)&a.Uc)for(var c=a.pa.length;0<=--c;){var d=a.g[c];a.g[c]=a.pa[c];a.pa[c]=d}a.O=b>>14&3;c=a.w>>14&3;a.O!=c&&(a.X[c]=a.g[6],a.g[6]=a.X[a.O]);a.w=b;a.i&=-3;a.i|=a.la?2:1}function md(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.bb=b}h.xa=function(a){this.J=this.L=a;this.H=0};h.gb=function(a,b){this.J=this.L=this.G=a;this.H=b||0}; -function te(a,b){a.J=a.L=a.G=b;a.H=a.J^a.G>>1}function ue(a,b,c,d){a.J=a.L=a.G=b;a.H=(c^d)&(d^b)} -h.ka=function(a,b,c){if(!this.ma){0>this.ab?this.ab=nd(this):this.O||(c=-4);-4==c&&(this.i&256&&(c=-1),this.i|=256,this.R|=4,this.g[6]=a=4);if(-1!=c){this.P=a|4143316992;this.O=0;var d=this.ja(a|this.Ca),e=this.ja(a+2&65535|this.Ca);od(this,e&-12289|this.ab>>2&12288);ve(this,this.ab);ve(this,this.g[7]);ke(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.ab=-1;this.Zc=a;this.Yc=c;-1==c&&this.Y();if(-4<=c)throw a;}}; -function we(a){var b=xe(a),c=xe(a);a.w&49152&&(c=c&-225|a.w&63712);ke(a,b);od(a,c);a.i&=-17}function ye(a,b){var c=b>>13&31;31>c&&(b=a.T&32?a.Ra[c]+(b&8191)&4194303:b&-3932161);return b} -function ze(a,b,c){var d=[];if(c){c=ye(a,b);var e=b>>13&31;d.push(c);d.push(e);a.T&32&&(d.push(a.Ra[e]),d.push(b&8191))}else if(a.Wa){var e=a.O<<1,f=b>>13;7>13;a.T&a.uc[a.O]||(d&=7);e=a.C[a.O][d];f=(a.M[a.O][d]<<6)+(b&8191)&a.Da;3932160<=f&&(f=ye(a,f));if(a.ma)return f;f>=a.Pc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& -(g|=16384));a.C[a.O][d]=e;if(f!=(4194170&a.Da)||a.O)a.xb=a.O,a.yb=d;g&&(g&57344&&(0<=a.ab&&(g|=128),a.S&57344||(g|=a.S&4096|a.xb<<5|a.yb<<1,id(a,a.S&-61695|g&61694)),a.ka(168,64,-2)),a.S&61440||!(f<(4191360&a.Da)||f>(4194239&a.Da))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function xe(a){var b=a.ja(a.g[6]|a.Ca);a.g[6]=a.g[6]+2&65535;return b}function ve(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.P=a.P&65535|(a.P&-65536)<<8|16121856;a.i&256||a.wb(4,-2,c);a.vb(c,b)} -function Ae(a,b,c,d){var e,f,g=d&8?0:a.Ca;switch(b){case 0:return a.ka(4,0,-3),0;case 1:return 6==c&&a.wb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.wb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.ja(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.wb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.ja(e)|g;a.b-=8;break;case 6:return e=a.ja(qe(a,2)),e=e+a.g[c]&65535,6==c&&a.wb(d, -0,e),a.b-=6,e|g;case 7:return e=a.ja(qe(a,2)),e=e+a.g[c]&65535,e=a.ja(e|a.Ca),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.P=a.P&65535|(a.P&-65536)<<8|(f<<3&248|c)<<16;return e}h.Ld=function(a,b,c){!this.O&&0>=b&&c<=this.za&&(this.i|=32)};h.Md=function(a,b,c){this.O||(65534<=c&&(c|=-65536),a&4&&c<=this.za&&(c<=this.za-32?this.ka(4,0,-4):(this.R|=8,this.i|=32)))};h.fd=function(a){this.F&&Md(this.F,a,1);return this.pc(a)};h.ld=function(a){this.F&&Md(this.F,a,2);return this.qc(a)}; +function nd(a){return a.w=a.w&63728|pe(a)|oe(a)|ne(a)|me(a)}function od(a,b){b&=a.Xc;a.I=b<<12;a.L=~b&4;a.H=b<<14;a.G=b<<16;if((b^a.w)&a.Uc)for(var c=a.qa.length;0<=--c;){var d=a.g[c];a.g[c]=a.qa[c];a.qa[c]=d}a.O=b>>14&3;c=a.w>>14&3;a.O!=c&&(a.X[c]=a.g[6],a.g[6]=a.X[a.O]);a.w=b;a.i&=-3;a.i|=a.la?2:1}function md(a,b){if(b&=65024){var c=b>>9;do b+=34;while(c>>=1);a.i|=1}a.bb=b}h.za=function(a){this.I=this.L=a;this.H=0};h.gb=function(a,b){this.I=this.L=this.G=a;this.H=b||0}; +function te(a,b){a.I=a.L=a.G=b;a.H=a.I^a.G>>1}function ue(a,b,c,d){a.I=a.L=a.G=b;a.H=(c^d)&(d^b)} +h.ka=function(a,b,c){if(!this.ma){0>this.ab?this.ab=nd(this):this.O||(c=-4);-4==c&&(this.i&256&&(c=-1),this.i|=256,this.R|=4,this.g[6]=a=4);if(-1!=c){this.P=a|4143316992;this.O=0;var d=this.ja(a|this.Ea),e=this.ja(a+2&65535|this.Ea);od(this,e&-12289|this.ab>>2&12288);ve(this,this.ab);ve(this,this.g[7]);ke(this,d)}this.b-=5;this.i&=~(b|19);this.i|=129;this.ab=-1;this.Zc=a;this.Yc=c;-1==c&&this.Z();if(-4<=c)throw a;}}; +function we(a){var b=xe(a),c=xe(a);a.w&49152&&(c=c&-225|a.w&63712);ke(a,b);od(a,c);a.i&=-17}function ye(a,b){var c=b>>13&31;31>c&&(b=a.T&32?a.Sa[c]+(b&8191)&4194303:b&-3932161);return b} +function ze(a,b,c){var d=[];if(c){c=ye(a,b);var e=b>>13&31;d.push(c);d.push(e);a.T&32&&(d.push(a.Sa[e]),d.push(b&8191))}else if(a.Wa){var e=a.O<<1,f=b>>13;7>13;a.T&a.uc[a.O]||(d&=7);e=a.C[a.O][d];f=(a.N[a.O][d]<<6)+(b&8191)&a.Fa;3932160<=f&&(f=ye(a,f));if(a.ma)return f;f>=a.Pc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& +(g|=16384));a.C[a.O][d]=e;if(f!=(4194170&a.Fa)||a.O)a.xb=a.O,a.yb=d;g&&(g&57344&&(0<=a.ab&&(g|=128),a.S&57344||(g|=a.S&4096|a.xb<<5|a.yb<<1,id(a,a.S&-61695|g&61694)),a.ka(168,64,-2)),a.S&61440||!(f<(4191360&a.Fa)||f>(4194239&a.Fa))||(a.S|=4096,a.S&512&&(a.i|=64)));return f}function xe(a){var b=a.ja(a.g[6]|a.Ea);a.g[6]=a.g[6]+2&65535;return b}function ve(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.P=a.P&65535|(a.P&-65536)<<8|16121856;a.i&256||a.wb(4,-2,c);a.vb(c,b)} +function Ae(a,b,c,d){var e,f,g=d&8?0:a.Ea;switch(b){case 0:return a.ka(4,0,-3),0;case 1:return 6==c&&a.wb(d,0,a.g[6]),a.b-=3,7==c?a.g[c]:a.g[c]|g;case 2:f=2;e=a.g[c];6==c&&a.wb(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.g[c];7!=c&&(e|=g);e=a.ja(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;6==c&&a.wb(d,f,e);7!=c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!=c&&(e|=g);e=a.ja(e)|g;a.b-=8;break;case 6:return e=a.ja(qe(a,2)),e=e+a.g[c]&65535,6==c&&a.wb(d, +0,e),a.b-=6,e|g;case 7:return e=a.ja(qe(a,2)),e=e+a.g[c]&65535,e=a.ja(e|a.Ea),a.b-=10,e|g}a.g[c]=a.g[c]+f&65535;a.P=a.P&65535|(a.P&-65536)<<8|(f<<3&248|c)<<16;return e}h.Ld=function(a,b,c){!this.O&&0>=b&&c<=this.Ba&&(this.i|=32)};h.Md=function(a,b,c){this.O||(65534<=c&&(c|=-65536),a&4&&c<=this.Ba&&(c<=this.Ba-32?this.ka(4,0,-4):(this.R|=8,this.i|=32)))};h.fd=function(a){this.F&&Md(this.F,a,1);return this.pc(a)};h.ld=function(a){this.F&&Md(this.F,a,2);return this.qc(a)}; h.pd=function(a,b){this.F&&Nd(this.F,a,1);this.rc(a,b)};h.qd=function(a,b){this.F&&Nd(this.F,a,2);this.sc(a,b)};function mc(a,b){a.ma++;b=a.D.Zb(kc(a,b,2));a.ma--;return b}function Be(a,b){(b?--a.Vb:--a.Tb)||ie(a)}h.Od=function(a,b,c){return Ae(this,a,b,c)};h.kd=function(a,b,c){return kc(this,Ae(this,a,b,c),c)};h.od=function(a){return this.D.Zb(this.jb=a)};h.$e=function(a){this.F&&Md(this.F,a,2);return this.od(a)};h.Ec=function(a){return this.D.Zb(this.jb=kc(this,a,2))}; -h.af=function(a){this.F&&Md(this.F,a,2);return this.Ec(a)};h.td=function(a,b){this.D.Lb(this.jb=a,b)};h.kg=function(a,b){this.F&&Nd(this.F,a,2);this.td(a,b)};h.Hc=function(a,b){this.D.Lb(this.jb=kc(this,a,4),b)};h.lg=function(a,b){this.F&&Nd(this.F,a,2);this.Hc(a,b)};function Ce(a,b,c){var d=a.j=b&7;(b=a.v=(b&56)>>3)?(d=Ae(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.O=a.w>>12&3,c=a.ja(d|c&a.Ca),a.O=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.X[a.w>>12&3];return c} -function De(a,b,c,d){a.P=a.P&65535|1441792;var e=a.j=b&7;(b=a.v=(b&56)>>3)?(e=Ae(a,b,e,4),c&65536||(e&=65535),a.O=a.w>>12&3,e=kc(a,e|c&65536,4),a.O=a.w>>14&3,a.Ob(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.X[a.w>>12&3]=d}function Ee(a,b){b>>=6;var c=a.Z=b&7;return(b=a.V=(b&56)>>3)?a.Mb(a.ua(b,c,3)):a.g[c+a.lc]&a.Sc}function Fe(a,b){var c;b>>=6;var d=a.Z=b&7;(b=a.V=(b&56)>>3)?c=a.Nb(a.ua(b,d,2)):c=a.g[d+a.lc];return c}function Ge(a,b){var c=a.j=b&7;b=a.v=(b&56)>>3;return Ae(a,b,c,8)} +h.af=function(a){this.F&&Md(this.F,a,2);return this.Ec(a)};h.td=function(a,b){this.D.Lb(this.jb=a,b)};h.lg=function(a,b){this.F&&Nd(this.F,a,2);this.td(a,b)};h.Hc=function(a,b){this.D.Lb(this.jb=kc(this,a,4),b)};h.mg=function(a,b){this.F&&Nd(this.F,a,2);this.Hc(a,b)};function Ce(a,b,c){var d=a.j=b&7;(b=a.v=(b&56)>>3)?(d=Ae(a,b,d,2),c&65536||61440!==(a.w&61440)&&(d&=65535),a.O=a.w>>12&3,c=a.ja(d|c&a.Ea),a.O=a.w>>14&3):c=6!=d||(a.w>>2&12288)===(a.w&12288)?a.g[d]:a.X[a.w>>12&3];return c} +function De(a,b,c,d){a.P=a.P&65535|1441792;var e=a.j=b&7;(b=a.v=(b&56)>>3)?(e=Ae(a,b,e,4),c&65536||(e&=65535),a.O=a.w>>12&3,e=kc(a,e|c&65536,4),a.O=a.w>>14&3,a.Ob(e,d)):6!=e||(a.w>>2&12288)===(a.w&12288)?a.g[e]=d:a.X[a.w>>12&3]=d}function Ee(a,b){b>>=6;var c=a.Y=b&7;return(b=a.V=(b&56)>>3)?a.Mb(a.ua(b,c,3)):a.g[c+a.lc]&a.Sc}function Fe(a,b){var c;b>>=6;var d=a.Y=b&7;(b=a.V=(b&56)>>3)?c=a.Nb(a.ua(b,d,2)):c=a.g[d+a.lc];return c}function Ge(a,b){var c=a.j=b&7;b=a.v=(b&56)>>3;return Ae(a,b,c,8)} function He(a,b){var c=a.j=b&7;return(b=a.v=(b&56)>>3)?a.Mb(a.ua(b,c,3)):a.g[c]&255}function Ie(a,b){var c,d=a.j=b&7;(b=a.v=(b&56)>>3)?c=a.Nb(a.ua(b,d,2)):c=a.g[d];return c}function Je(a,b,c,d){var e=a.j=b&7;(b=a.v=(b&56)>>3)?(e=a.hc=a.ua(b,e,7),c=0>c?a.g[-c-1]&255:c,a.gc(e,d.call(a,c,a.Mb(e))),e&1&&a.b--):(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 T(a,b,c,d){var e=a.j=b&7;(b=a.v=(b&56)>>3)?(e=a.ua(b,e,6),a.Ob(e,d.call(a,0>c?a.g[-c-1]:c,a.Nb(e)))):a.g[e]=d.call(a,0>c?a.g[-c-1]:c,a.g[e])}function Ke(a,b,c,d,e){var f=a.j=b&7;(b=a.v=(b&56)>>3)?(d=a.ua(b,f,5),e.call(a,(c=0>c?a.g[-c-1]&255:c)<<8),a.gc(d,c),d&1&&a.b--):(c?(c=0>c?a.g[-c-1]&255:c,a.g[f]=a.g[f]&~d|c<<24>>24&d):a.g[f]&=~d,e.call(a,c<<8))} function ff(a,b,c,d){var e=a.j=b&7;(b=a.v=(b&56)>>3)?(e=a.ua(b,e,4),d.call(a,c=0>c?a.g[-c-1]:c),a.Ob(e,c)):(a.g[e]=c=0>c?a.g[-c-1]:c,d.call(a,c))} -h.$b=function(a){this.A.complete=!0;var b=this.F?gf(this.F)?1:this.A.fc?-1:0:0,c=a?this.A.fc?0:1:-1;this.A.fc=!1;this.Ya=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(hf(this.F,this.g[7],c)){this.Y();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.bb&224)>>5,f=this.la&&this.la.fb>e?this.la:null;f&&(d=f.Yb,e=f.fb);e>(this.w&224)>>5?(this.i&8&&(qe(this,2),this.i&=-9),this.ka(d,0,-10),e=!0):e=!1;e&&(f&&re(this,f),a=!0);this.la||this.bb||(this.i&=-3)}else this.i& -1&&this.i++;if(a){if(this.i&4&&hf(this.F,this.g[7],c)){this.Y();break}if(0>c)break}if(this.i&112&&se(this)){if(this.i&4&&hf(this.F,this.g[7],c)){this.Y();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.P=this.g[7];f=this.ja(a);this.g[7]=a+2&65535;this.Oc(f)}while(0>1|b<<16;te(this,a);return a&65535}function of(a,b){a=b&128|b>>1|b<<8;te(this,a<<8);return a&255}function pf(a,b){a=b&~a;this.xa(a);return a}function qf(a,b){a=b&~a;this.xa(a<<8);return a} -function rf(a,b){a|=b;this.xa(a);return a}function sf(a,b){a|=b;this.xa(a<<8);return a}function tf(a,b){a=~b|65536;this.gb(a);return a&65535}function uf(a,b){a=~b|256;this.gb(a<<8);return a&255}function vf(a,b){this.J=this.L=a=b-a;this.H=b&(b^a);return a&65535}function wf(a,b){a=b-a;var c=a<<8;b<<=8;this.J=this.L=c;this.H=b&(b^c);return a&255}function xf(a,b){this.J=this.L=a=b+a;this.H=a&(b^a);return a&65535}function yf(a,b){a=b+a;var c=a<<8;this.J=this.L=c;this.H=c&(b<<8^c);return a&255} +h.$b=function(a){this.A.complete=!0;var b=this.F?gf(this.F)?1:this.A.fc?-1:0:0,c=a?this.A.fc?0:1:-1;this.A.fc=!1;this.Ya=this.b=a;this.i=this.i&-5|(b?4:0);do{if(this.i){if(this.i&4){if(hf(this.F,this.g[7],c)){this.Z();break}++b||(this.i&=-5);c||c++}if(a=this.i&11)if(a=!1,this.i&2){var d=160,e=(this.bb&224)>>5,f=this.la&&this.la.fb>e?this.la:null;f&&(d=f.Yb,e=f.fb);e>(this.w&224)>>5?(this.i&8&&(qe(this,2),this.i&=-9),this.ka(d,0,-10),e=!0):e=!1;e&&(f&&re(this,f),a=!0);this.la||this.bb||(this.i&=-3)}else this.i& +1&&this.i++;if(a){if(this.i&4&&hf(this.F,this.g[7],c)){this.Z();break}if(0>c)break}if(this.i&112&&se(this)){if(this.i&4&&hf(this.F,this.g[7],c)){this.Z();break}if(0>c)break}}this.i=this.i&15|this.w&16;a=this.P=this.g[7];f=this.ja(a);this.g[7]=a+2&65535;this.Oc(f)}while(0>1|b<<16;te(this,a);return a&65535}function of(a,b){a=b&128|b>>1|b<<8;te(this,a<<8);return a&255}function pf(a,b){a=b&~a;this.za(a);return a}function qf(a,b){a=b&~a;this.za(a<<8);return a} +function rf(a,b){a|=b;this.za(a);return a}function sf(a,b){a|=b;this.za(a<<8);return a}function tf(a,b){a=~b|65536;this.gb(a);return a&65535}function uf(a,b){a=~b|256;this.gb(a<<8);return a&255}function vf(a,b){this.I=this.L=a=b-a;this.H=b&(b^a);return a&65535}function wf(a,b){a=b-a;var c=a<<8;b<<=8;this.I=this.L=c;this.H=b&(b^c);return a&255}function xf(a,b){this.I=this.L=a=b+a;this.H=a&(b^a);return a&65535}function yf(a,b){a=b+a;var c=a<<8;this.I=this.L=c;this.H=c&(b<<8^c);return a&255} function zf(a,b){a=-b;this.gb(a,a&b&32768);return a&65535}function Af(a,b){a=-b;this.gb(a<<8,(a&b&128)<<8);return a&255}function Bf(a,b){a=b<<1|this.G>>16&1;te(this,a);return a&65535}function Cf(a,b){a=b<<1|this.G>>16&1;te(this,a<<8);return a&255}function Df(a,b){a=(this.G&65536|b)>>1|b<<16;te(this,a);return a&65535}function Ef(a,b){a=((this.G&65536)>>8|b)>>1|b<<8;te(this,a<<8);return a&255}function Ff(a,b){var c=b-a;ue(this,c,a,b);return c&65535} -function Gf(a,b){var c=b-a;ue(this,c<<8,a<<8,b<<8);return c&255}function Hf(a,b){this.J=this.L=b&65280;this.H=this.G=0;return(b<<8|b>>8)&65535}function If(a,b){a^=b;this.xa(a);return a&65535}function Jf(a){T(this,a,Fe(this,a),jf);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)} -function Kf(a){var b=Ie(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.G=this.H=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.H=32768)}this.g[a]=c&65535;this.J=this.L=c;this.b-=(this.v?6:7)+b} -function Lf(a){var b=Ie(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.G=this.H=0;b&=63;if(b&32){b=64-b;32>b-1;this.G=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.J=d>>16;this.L=d>>16|d;this.b-=(this.v?6:7)+b}function Mf(a){S(this,a,!me(this))}function Nf(a){S(this,a,me(this))} -function Of(a){T(this,a,Fe(this,a),pf);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Pf(a){Je(this,a,Ee(this,a),qf);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Qf(a){T(this,a,Fe(this,a),rf);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Rf(a){Je(this,a,Ee(this,a),sf);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)} -function Sf(a){var b=Fe(this,a);a=Ie(this,a);this.xa((0>b?this.g[-b-1]:b)&a);this.b-=this.v?4+(this.Z&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function Tf(a){var b=Ee(this,a);a=He(this,a);this.xa(((0>b?this.g[-b-1]&255:b)&a)<<8);this.b-=this.v?4+(this.Z&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function Uf(a){S(this,a,oe(this))}function Vf(a){S(this,a,!pe(this)==!ne(this))}function Wf(a){S(this,a,!oe(this)&&!pe(this)==!ne(this))}function Xf(a){S(this,a,!me(this)&&!oe(this))} -function Yf(a){S(this,a,oe(this)||!pe(this)!=!ne(this))}function Zf(a){S(this,a,me(this)||oe(this))}function $f(a){S(this,a,!pe(this)!=!ne(this))}function ag(a){S(this,a,pe(this))}function bg(a){S(this,a,!oe(this))}function cg(a){S(this,a,!pe(this))}function dg(){this.ka(12,0,-9)}function eg(a){S(this,a,!0)}function fg(a){S(this,a,!ne(this))}function gg(a){S(this,a,ne(this))}function hg(a){a&1&&(this.G=0);a&2&&(this.H=0);a&4&&(this.L=1);a&8&&(this.J=0);this.b-=5} -function ig(a){var b=Fe(this,a);a=Ie(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;ue(this,c,a,b);this.b-=this.v?4+(this.Z&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function jg(a){var b=Ee(this,a);a=He(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);ue(this,c,a,b);this.b-=this.v?4+(this.Z&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)} -function kg(a){var b=Ie(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.G=this.H=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.L=d>>16|d,this.J=d>>16):(this.H=32768,this.L=d>>15|d,this.J=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.b-=53}else this.L=this.J=0,this.H=32768,this.G=65536,this.b-=7}function lg(){this.ka(24,0,-9);this.b-=20} -function mg(){this.w&49152?(this.R|=128,this.ka(4,0,-8)):(this.ta&&1120==this.ya&&this.ta.setData(this.g[0],!0),this.F?ng(this.F):this.Y());this.b-=7}function og(){this.ka(16,0,-9);this.b-=20}var pg=[0,7,7,10,7,11,9,13];function qg(a){this.da=this.b;ke(this,Ge(this,a));this.b=this.da-pg[this.v]}var rg=[0,14,14,17,14,18,16,20];function sg(a){this.da=this.b;var b=Ge(this,a);a=a>>6&7;ve(this,this.g[a]);this.g[a]=this.g[7];ke(this,b);this.b=this.da-rg[this.v]} -var tg=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ug(a){var b=Fe(this,a);this.da=this.b;ff(this,a,b,this.xa);this.b=this.da-tg[(this.V?8:0)+this.v]+(7!=this.j||this.v?0:2)}function vg(a){var b=Ee(this,a);Ke(this,a,b,65535,this.xa);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}var wg=[7,13,13,17,14,18,17,21]; -function xg(a){var b=Ie(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.J=b>>16;this.L=this.J|b;this.H=0;this.G=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)ke(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Eg(a){T(this,a,Fe(this,a),Ff);this.b-=this.v?9+(this.Z&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Fg(a){T(this,a,0,Hf);this.b-=this.v?9:3+(7==this.j?2:0)}function Gg(){this.ka(28,0,-9)} -function Hg(){this.ta&&(this.ta.Fc(this.g[7],!0),this.ta.setData(this.g[0],!0));this.i|=8;qe(this,-2);this.b-=3}function Ig(a){T(this,a,this.g[(a>>6&7)+this.lc],If);this.b-=this.v?9:3+(7==this.j?2:0)}function U(a){var b;if(b=this.F)b=this.F,I(b,1)?(J(b,"undefined opcode "+O(b,a),!0,!0),b=ng(b)):b=!1;b||this.ka(8,0,-9)}function ge(a){Jg[a>>12].call(this,a)}function Kg(a){Lg[a>>6&3].call(this,a)}function Mg(a){Ng[a>>6&3].call(this,a)}function Og(a){Pg[a>>6&3].call(this,a)} +function Gf(a,b){var c=b-a;ue(this,c<<8,a<<8,b<<8);return c&255}function Hf(a,b){this.I=this.L=b&65280;this.H=this.G=0;return(b<<8|b>>8)&65535}function If(a,b){a^=b;this.za(a);return a&65535}function Jf(a){T(this,a,Fe(this,a),jf);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)} +function Kf(a){var b=Ie(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.G=this.H=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.H=32768)}this.g[a]=c&65535;this.I=this.L=c;this.b-=(this.v?6:7)+b} +function Lf(a){var b=Ie(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.G=this.H=0;b&=63;if(b&32){b=64-b;32>b-1;this.G=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.I=d>>16;this.L=d>>16|d;this.b-=(this.v?6:7)+b}function Mf(a){S(this,a,!me(this))}function Nf(a){S(this,a,me(this))} +function Of(a){T(this,a,Fe(this,a),pf);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Pf(a){Je(this,a,Ee(this,a),qf);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Qf(a){T(this,a,Fe(this,a),rf);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Rf(a){Je(this,a,Ee(this,a),sf);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)} +function Sf(a){var b=Fe(this,a);a=Ie(this,a);this.za((0>b?this.g[-b-1]:b)&a);this.b-=this.v?4+(this.Y&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function Tf(a){var b=Ee(this,a);a=He(this,a);this.za(((0>b?this.g[-b-1]&255:b)&a)<<8);this.b-=this.v?4+(this.Y&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function Uf(a){S(this,a,oe(this))}function Vf(a){S(this,a,!pe(this)==!ne(this))}function Wf(a){S(this,a,!oe(this)&&!pe(this)==!ne(this))}function Xf(a){S(this,a,!me(this)&&!oe(this))} +function Yf(a){S(this,a,oe(this)||!pe(this)!=!ne(this))}function Zf(a){S(this,a,me(this)||oe(this))}function $f(a){S(this,a,!pe(this)!=!ne(this))}function ag(a){S(this,a,pe(this))}function bg(a){S(this,a,!oe(this))}function cg(a){S(this,a,!pe(this))}function dg(){this.ka(12,0,-9)}function eg(a){S(this,a,!0)}function fg(a){S(this,a,!ne(this))}function gg(a){S(this,a,ne(this))}function hg(a){a&1&&(this.G=0);a&2&&(this.H=0);a&4&&(this.L=1);a&8&&(this.I=0);this.b-=5} +function ig(a){var b=Fe(this,a);a=Ie(this,a);var c=(b=0>b?this.g[-b-1]:b)-a;ue(this,c,a,b);this.b-=this.v?4+(this.Y&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)}function jg(a){var b=Ee(this,a);a=He(this,a);var c=(b=(0>b?this.g[-b-1]&255:b)<<8)-(a<<=8);ue(this,c,a,b);this.b-=this.v?4+(this.Y&&6<=this.j?1:0):(this.V?4:3)+(7==this.j?2:0)} +function kg(a){var b=Ie(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.G=this.H=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.L=d>>16|d,this.I=d>>16):(this.H=32768,this.L=d>>15|d,this.I=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.b-=53}else this.L=this.I=0,this.H=32768,this.G=65536,this.b-=7}function lg(){this.ka(24,0,-9);this.b-=20} +function mg(){this.w&49152?(this.R|=128,this.ka(4,0,-8)):(this.pa&&1120==this.Aa&&this.pa.setData(this.g[0],!0),this.F?ng(this.F):this.Z());this.b-=7}function og(){this.ka(16,0,-9);this.b-=20}var pg=[0,7,7,10,7,11,9,13];function qg(a){this.da=this.b;ke(this,Ge(this,a));this.b=this.da-pg[this.v]}var rg=[0,14,14,17,14,18,16,20];function sg(a){this.da=this.b;var b=Ge(this,a);a=a>>6&7;ve(this,this.g[a]);this.g[a]=this.g[7];ke(this,b);this.b=this.da-rg[this.v]} +var tg=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17];function ug(a){var b=Fe(this,a);this.da=this.b;ff(this,a,b,this.za);this.b=this.da-tg[(this.V?8:0)+this.v]+(7!=this.j||this.v?0:2)}function vg(a){var b=Ee(this,a);Ke(this,a,b,65535,this.za);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}var wg=[7,13,13,17,14,18,17,21]; +function xg(a){var b=Ie(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.I=b>>16;this.L=this.I|b;this.H=0;this.G=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)ke(this,this.g[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Eg(a){T(this,a,Fe(this,a),Ff);this.b-=this.v?9+(this.Y&&6<=this.j?1:0):(this.V?5:3)+(7==this.j?2:0)}function Fg(a){T(this,a,0,Hf);this.b-=this.v?9:3+(7==this.j?2:0)}function Gg(){this.ka(28,0,-9)} +function Hg(){this.pa&&(this.pa.Fc(this.g[7],!0),this.pa.setData(this.g[0],!0));this.i|=8;qe(this,-2);this.b-=3}function Ig(a){T(this,a,this.g[(a>>6&7)+this.lc],If);this.b-=this.v?9:3+(7==this.j?2:0)}function U(a){var b;if(b=this.F)b=this.F,I(b,1)?(J(b,"undefined opcode "+O(b,a),!0,!0),b=ng(b)):b=!1;b||this.ka(8,0,-9)}function ge(a){Jg[a>>12].call(this,a)}function Kg(a){Lg[a>>6&3].call(this,a)}function Mg(a){Ng[a>>6&3].call(this,a)}function Og(a){Pg[a>>6&3].call(this,a)} function Qg(a){Rg[a&15].call(this,a)}function Sg(a){Tg[a&15].call(this,a)}function Ug(a){Vg[a>>6&3].call(this,a)}function Wg(a){Xg[a>>6&3].call(this,a)}function Yg(a){Zg[a>>6&3].call(this,a)} var Jg=[function(a){$g[a>>8&15].call(this,a)},ug,ig,Sf,Of,Qf,Jf,U,function(a){ah[a>>8&15].call(this,a)},vg,jg,Tf,Pf,Rf,Eg,U],$g=[function(a){bh[a>>4&15].call(this,a)},eg,bg,Uf,Vf,$f,Wf,Yf,sg,sg,Kg,Mg,Og,U,U,U],Lg=[function(a){ff(this,a,0,this.gb);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,0,tf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,1,xf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,1,vf);this.b-=this.v?9:3+(7==this.j?2:0)}],Ng=[function(a){T(this,a,0,zf); this.b-=this.v?11:6},function(a){T(this,a,me(this)?1:0,jf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,me(this)?1:0,Ff);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){a=Ie(this,a);this.gb(a);this.b-=this.v?4:3+(7==this.j?2:0)}],Pg=[function(a){T(this,a,0,Df);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,0,Bf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,0,nf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){T(this,a,0,lf);this.b-=this.v?9:3+(7==this.j?2:0)}],bh= -[function(a){ch[a&15].call(this,a)},U,U,U,qg,qg,qg,qg,Ag,U,Qg,Sg,Fg,Fg,Fg,Fg],ch=[mg,Hg,Bg,dg,og,zg,U,U,U,U,U,U,U,U,U,U],Rg=[yg,function(){this.G=0;this.b-=5},function(){this.H=0;this.b-=5},hg,function(){this.L=1;this.b-=5},hg,hg,hg,function(){this.J=0;this.b-=5},hg,hg,hg,hg,hg,hg,hg],Tg=[yg,function(){this.G=65536;this.b-=5},function(){this.H=32768;this.b-=5},Cg,function(){this.L=0;this.b-=5},Cg,Cg,Cg,function(){this.J=32768;this.b-=5},Cg,Cg,Cg,Cg,Cg,Cg,Cg],ah=[cg,ag,Xf,Zf,fg,gg,Mf,Nf,lg,Gg,Ug,Wg, +[function(a){ch[a&15].call(this,a)},U,U,U,qg,qg,qg,qg,Ag,U,Qg,Sg,Fg,Fg,Fg,Fg],ch=[mg,Hg,Bg,dg,og,zg,U,U,U,U,U,U,U,U,U,U],Rg=[yg,function(){this.G=0;this.b-=5},function(){this.H=0;this.b-=5},hg,function(){this.L=1;this.b-=5},hg,hg,hg,function(){this.I=0;this.b-=5},hg,hg,hg,hg,hg,hg,hg],Tg=[yg,function(){this.G=65536;this.b-=5},function(){this.H=32768;this.b-=5},Cg,function(){this.L=0;this.b-=5},Cg,Cg,Cg,function(){this.I=32768;this.b-=5},Cg,Cg,Cg,Cg,Cg,Cg,Cg],ah=[cg,ag,Xf,Zf,fg,gg,Mf,Nf,lg,Gg,Ug,Wg, Yg,U,U,U],Vg=[function(a){Ke(this,a,0,255,this.gb);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){Je(this,a,0,uf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){Je(this,a,1,yf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){Je(this,a,1,wf);this.b-=this.v?9:3+(7==this.j?2:0)}],Xg=[function(a){Je(this,a,0,Af);this.b-=this.v?11:6},function(a){Je(this,a,me(this)?1:0,kf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){Je(this,a,me(this)?1:0,Gf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){a=He(this, a);this.gb(a<<8);this.b-=this.v?4:3+(7==this.j?2:0)}],Zg=[function(a){Je(this,a,0,Ef);this.b-=this.v?9+(this.hc&1):3+(7==this.j?2:0)},function(a){Je(this,a,0,Cf);this.b-=this.v?9:3+(7==this.j?2:0)},function(a){Je(this,a,0,of);this.b-=this.v?9+(this.hc&1):3+(7==this.j?2:0)},function(a){Je(this,a,0,mf);this.b-=this.v?9:3+(7==this.j?2:0)}];function he(a){dh[a>>12].call(this,a)} -var dh=[function(a){eh[a>>8&15].call(this,a)},ug,ig,Sf,Of,Qf,Jf,function(a){fh[a>>8&15].call(this,a)},function(a){gh[a>>8&15].call(this,a)},vg,jg,Tf,Pf,Rf,Eg,U],eh=[function(a){hh[a>>4&15].call(this,a)},eg,bg,Uf,Vf,$f,Wf,Yf,sg,sg,Kg,Mg,Og,function(a){ih[a>>6&3].call(this,a)},U,U],ih=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.ja(a|this.Ca);ke(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.b-=8},function(a){a=Ce(this,a,0);this.xa(a);ve(this,a);this.b-=11},function(a){var b=xe(this); -this.da=this.b;this.xa(b);De(this,a,0,b);this.b=this.da-wg[this.v]},function(a){ff(this,a,pe(this)?65535:0,this.xa);this.b-=this.v?9:3+(7==this.j?2:0)}],hh=[function(a){jh[a&15].call(this,a)},U,U,U,qg,qg,qg,qg,Ag,function(a){a&8?(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5):U.call(this,a)},Qg,Sg,Fg,Fg,Fg,Fg],jh=[mg,Hg,function(){we(this);this.i|=this.w&16;this.b-=13},dg,og,zg,Bg,function(){this.ka(8,0,-9)},U,U,U,U,U,U,U,U],fh=[xg,xg,kg,kg,Kf,Kf,Lf,Lf,Ig,Ig,U,U,U,U,Dg, -Dg],gh=[cg,ag,Xf,Zf,fg,gg,Mf,Nf,lg,Gg,Ug,Wg,Yg,function(a){kh[a>>6&3].call(this,a)},U,U],kh=[U,function(a){a=Ce(this,a,65536);this.xa(a);ve(this,a);this.b-=11},function(a){var b=xe(this);this.da=this.b;this.xa(b);De(this,a,65536,b);this.b=this.da-wg[this.v]},U]; -function lh(a){A.call(this,"ROM",a,0,128);this.ea=this.g=null;this.v=a.addr;this.b=a.size;this.w=!1;this.j=a.alias;this.i=a.file;this.C=x(this.i);if(this.i){a=this.i;var b=oa(this.C);"json"!=b&&"hex"!=b&&(a=Ca()+"/api/v1/dump?file="+this.i+"&format=bytes&decimal=true");var c=this;Aa(a,null,!0,function(a,b,f){f?(c.N("Unable to load ROM resource (error "+f+": "+a+")"),c.i=null):(gb(c.lb,a,b),(a=Ba(a,b))?(c.g=a.ba,c.ea=a.ea):c.i=null);mh(c)})}}p(lh,A);h=lh.prototype; -h.qa=function(a,b,c,d){this.D=b;this.f=c;this.F=d;mh(this)};h.ra=function(){this.ea&&(this.F&&nh(this.F,this.id,this.v,this.b,this.ea),delete this.ea);return!0};h.Aa=function(){return!0}; -function mh(a){if(!tb(a)){if(a.i){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)rb(a,"ROM size ("+v(a.g.length,8,!0)+") does not match specified size ("+v(a.b,8,!0)+")");else{var b;a:{b=a.v;a.status(a.b+"-byte ROM at "+q(b));if(57344<=b&&b<57344+Fc){var c={};b=(c[b]=[lh.prototype.Me,lh.prototype.Vf,null,null,null,a.b>>1],c);if(Pb(a.D,a,b)){b=a.w=!0;break a}}else if(Lc(a.D,b,a.b,td)){for(c=0;c>>f.g;0>>=f.g;0>>a.g;0>8&15].call(this,a)},ug,ig,Sf,Of,Qf,Jf,function(a){fh[a>>8&15].call(this,a)},function(a){gh[a>>8&15].call(this,a)},vg,jg,Tf,Pf,Rf,Eg,U],eh=[function(a){hh[a>>4&15].call(this,a)},eg,bg,Uf,Vf,$f,Wf,Yf,sg,sg,Kg,Mg,Og,function(a){ih[a>>6&3].call(this,a)},U,U],ih=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.ja(a|this.Ea);ke(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.b-=8},function(a){a=Ce(this,a,0);this.za(a);ve(this,a);this.b-=11},function(a){var b=xe(this); +this.da=this.b;this.za(b);De(this,a,0,b);this.b=this.da-wg[this.v]},function(a){ff(this,a,pe(this)?65535:0,this.za);this.b-=this.v?9:3+(7==this.j?2:0)}],hh=[function(a){jh[a&15].call(this,a)},U,U,U,qg,qg,qg,qg,Ag,function(a){a&8?(this.w&49152||(this.w=this.w&-225|(a&7)<<5,this.i|=1,this.i&=-3),this.b-=5):U.call(this,a)},Qg,Sg,Fg,Fg,Fg,Fg],jh=[mg,Hg,function(){we(this);this.i|=this.w&16;this.b-=13},dg,og,zg,Bg,function(){this.ka(8,0,-9)},U,U,U,U,U,U,U,U],fh=[xg,xg,kg,kg,Kf,Kf,Lf,Lf,Ig,Ig,U,U,U,U,Dg, +Dg],gh=[cg,ag,Xf,Zf,fg,gg,Mf,Nf,lg,Gg,Ug,Wg,Yg,function(a){kh[a>>6&3].call(this,a)},U,U],kh=[U,function(a){a=Ce(this,a,65536);this.za(a);ve(this,a);this.b-=11},function(a){var b=xe(this);this.da=this.b;this.za(b);De(this,a,65536,b);this.b=this.da-wg[this.v]},U]; +function lh(a){A.call(this,"ROM",a,0,128);this.ea=this.g=null;this.v=+a.addr;this.b=+a.size;this.w=!1;this.i=a.alias;"string"==typeof this.i&&(this.i=eval(this.i));this.j=a.file;this.C=x(this.j);if(this.j){a=this.j;var b=oa(this.C);"json"!=b&&"hex"!=b&&(a=Ca()+"/api/v1/dump?file="+this.j+"&format=bytes&decimal=true");var c=this;Aa(a,null,!0,function(a,b,f){f?(c.M("Unable to load ROM resource (error "+f+": "+a+")"),c.j=null):(gb(c.lb,a,b),(a=Ba(a,b))?(c.g=a.ba,c.ea=a.ea):c.j=null);mh(c)})}}p(lh,A); +h=lh.prototype;h.ra=function(a,b,c,d){this.D=b;this.f=c;this.F=d;mh(this)};h.sa=function(){this.ea&&(this.F&&nh(this.F,this.id,this.v,this.b,this.ea),delete this.ea);return!0};h.Ca=function(){return!0}; +function mh(a){if(!tb(a)){if(a.j){if(!a.g||!a.D)return;a.b||(a.b=a.g.length);if(a.g.length!=a.b)rb(a,"ROM size ("+v(a.g.length,8,!0)+") does not match specified size ("+v(a.b,8,!0)+")");else{var b;a:{b=a.v;a.status(a.b+"-byte ROM at "+q(b));if(57344<=b&&b<57344+Fc){var c={};b=(c[b]=[lh.prototype.Me,lh.prototype.Wf,null,null,null,a.b>>1],c);if(Pb(a.D,a,b)){b=a.w=!0;break a}}else if(Lc(a.D,b,a.b,td)){for(c=0;c>>f.g;0>>=f.g;0>>a.g;0=b.length){J(a,"invalid block at offset "+w(n),4096);break}for(var l=l+2,r=b[l++]&255|(b[l++]&255)<<8,u=b[l++]&255|(b[l++]&255)<<8,m=m+((r&255)+(r>>8)+(u&255)+(u>>8)),t=l,D=r-=6;0=b.length){J(a,"insufficient data for block at offset "+w(n),4096);break}m+= -b[l++]&255;if(m&255){J(a,"invalid checksum ("+v(m,2,!0)+") for block at offset "+w(n),4096);break}if(D)for(J(a,"loading "+w(D)+" bytes at "+w(u)+"-"+w(u+D),4096);D--;)Tc(a.D,u++,b[t++]&255);else u&1?g=!0:null==d&&(d=u),null!=d&&J(a,"starting address: "+w(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e=ka.Ic&&c<=ka.Gd&&(b=c-(ka.Ic-ka.ud));b&&(a.preventDefault&&a.preventDefault(),d.cc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ka.wd&&(b=ka.vd);d.cc(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +b[l++]&255;if(m&255){J(a,"invalid checksum ("+v(m,2,!0)+") for block at offset "+w(n),4096);break}if(D)for(J(a,"loading "+w(D)+" bytes at "+w(u)+"-"+w(u+D),4096);D--;)Tc(a.D,u++,b[t++]&255);else u&1?g=!0:null==d&&(d=u),null!=d&&J(a,"starting address: "+w(d),4096);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e=ka.Ic&&c<=ka.Gd&&(b=c-(ka.Ic-ka.ud));b&&(a.preventDefault&&a.preventDefault(),d.cc(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==ka.wd&&(b=ka.vd);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}; -h.qa=function(a,b,c,d){this.I=a;this.D=b;this.f=c;this.F=d;var e=this;this.P=cd(this.f,this.J?-1:48,4,262144);this.R=$c(this.f,function(){var a;a=-1;e.j.length&&(a=e.j.shift()&255,J(e,"receiveByte("+v(a,2,!0)+")"),e.Z&&97<=a&&122>a&&(a-=32),bd(e.f,e.R,1E3/Math.round(e.S/10)));0<=a&&(e.G=a,e.b&128?e.G|=49152:e.b|=128,e.b&64&&ad(c,e.P))});this.L=cd(this.f,this.J?-1:52,4,262144);this.X=$c(this.f,function(){e.g|=128;e.g&64&&ad(c,e.L)});Pb(b,this,uh,this.J?64832+8*(this.J-1)-65392:0);Rb(b,this.reset.bind(this)); -H(this)};h.md=function(a){if(!this.v){var b=Sd(this.I,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ua(c[0]);if(d!=this.kb)return;c=ua(c[1]);if(this.v=ob(c)){var e=this.v.exports;if(e){var f=e.connect;f&&f.call(this.v,this.H);if(this.M=e.receiveData){this.H=a;this.O=e.receiveStatus;this.status(this.lb+"."+d+" connected to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; -h.ra=function(a,b){if(!b)if(this.md(this.H),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.Aa=function(a){return a?this.save():!0};h.reset=function(){vh(this)};h.save=function(){var a=new le(this);a.set(0,[]);return a.data()};h.restore=function(){return vh(this)};function vh(a){a.G=0;a.b=8192;a.g=128;a.j=[];return!0} -h.cc=function(a){if("number"==typeof a)this.j.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.V||8,c=a-this.C%a,this.V&&(b=ta("",c)));this.T&&!this.C&&c&&(b=String.fromCharCode(this.T)+b);this.i.value+=b;this.i.scrollTop=this.i.scrollHeight;this.C+=c}}else if(null!=this.w){if(10== -a||1024<=this.w.length)this.u(this.w),this.w="";10!=a&&(this.w+=String.fromCharCode(a))}bd(this.f,this.X,1E3/Math.round(this.da/10));this.g&=-129};var th="buffer",wh={},uh=(wh[65392]=[null,null,sh.prototype.ze,sh.prototype.If,"RCSR"],wh[65394]=[null,null,sh.prototype.ye,sh.prototype.Hf,"RBUF"],wh[65396]=[null,null,sh.prototype.ef,sh.prototype.ng,"XCSR"],wh[65398]=[null,null,sh.prototype.df,sh.prototype.mg,"XBUF"],wh); -Xa(function(){for(var a=G(document,E,"serial"),b=0;ba&&(a-=32),bd(e.f,e.S,1E3/Math.round(e.T/10)));0<=a&&(e.G=a,e.b&128?e.G|=49152:e.b|=128,e.b&64&&ad(c,e.R))});this.O=cd(this.f,this.N?-1:52,4,262144);this.Y=$c(this.f,function(){e.g|=128;e.g&64&&ad(c,e.O)});Pb(b,this,uh,this.N?64832+8*(this.N-1)-65392:0);Rb(b,this.reset.bind(this)); +H(this)};h.md=function(a){if(!this.i){var b=Sd(this.J,"connection");if(b){var c=b.split("->");if(2==c.length){var d=ua(c[0]);if(d!=this.kb)return;c=ua(c[1]);if(this.i=ob(c)){var e=this.i.exports;if(e){var f=e.connect;f&&f.call(this.i,this.I);if(this.H=e.receiveData){this.I=a;this.P=e.receiveStatus;this.status(this.lb+"."+d+" connected to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; +h.sa=function(a,b){if(!b)if(this.md(this.I),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){vh(this)};h.save=function(){var a=new le(this);a.set(0,[]);return a.data()};h.restore=function(){return vh(this)};function vh(a){a.G=0;a.b=8192;a.g=128;a.v=[];return!0} +h.cc=function(a){if("number"==typeof a)this.v.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.X||8,c=a-this.C%a,this.X&&(b=ta("",c)));this.V&&!this.C&&c&&(b=String.fromCharCode(this.V)+b);this.j.value+=b;this.j.scrollTop=this.j.scrollHeight;this.C+=c}}else if(null!=this.w){if(10== +a||1024<=this.w.length)this.u(this.w),this.w="";10!=a&&(this.w+=String.fromCharCode(a))}bd(this.f,this.Y,1E3/Math.round(this.da/10));this.g&=-129};var th="buffer",wh={},uh=(wh[65392]=[null,null,sh.prototype.ze,sh.prototype.Jf,"RCSR"],wh[65394]=[null,null,sh.prototype.ye,sh.prototype.If,"RBUF"],wh[65396]=[null,null,sh.prototype.ef,sh.prototype.og,"XCSR"],wh[65398]=[null,null,sh.prototype.df,sh.prototype.ng,"XBUF"],wh); +Xa(function(){for(var a=G(document,E,"serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.B[b]=c,!0;case "readTape":e=Ah;case "loadTape":return e||(e=Bh),this.B[b]=c,c.onclick= function(){var a=d.B.listTapes;a&&Ch(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){c.parentNode.removeChild(c);break}this.B[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;Ch(d,x(b,!0),b,Bh,a)}return!1};return!0;case Dh:return this.B[b]=c,!0}return!1}; -h.qa=function(a,b,c,d){this.I=a;this.D=b;this.f=c;this.F=d;this.J=Eh(a);var e=this;if(a=xh(this,Sd(this.I,"autoMount")))for(var f in a)"PTR"==f&&(this.M[f]=a[f]);this.H=cd(this.f,56,4,4096);this.R=$c(this.f,function(){1==(e.b&32769)&&!(e.b&128)&&e.Cc.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Ca()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Aa(f,null,!0,function(e,f,g){var k=0>g&&!!a.I&&!a.I.A.fa;g?a.N('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(gb(a.lb,e,f),(e=Ba(e,f))&&Ph(a,b,c,d,e.ba,e.La, -e.Ka));a.A.cb=!1;a.g&&(a.g--,a.g||H(a));Mh(a)})}function Hh(a,b,c,d){if((a=a.B.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=oa(c),f="json"==e||"gz"==e?encodeURI(c):Ca()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Aa(f,null,!0,function(e,f,g){var k=0>g&&!!a.J&&!a.J.A.fa;g?a.M('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(gb(a.lb,e,f),(e=Ba(e,f))&&Ph(a,b,c,d,e.ba,e.wa, +e.va));a.A.cb=!1;a.g&&(a.g--,a.g||H(a));Mh(a)})}function Hh(a,b,c,d){if((a=a.B.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.W);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=Ca()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ac?"":e)+"&format=json"));return!!Aa(f,null, +function Wh(a,b,c,d,e){var f=c;if(a.g)return!0;a.Na=b;a.ya=c;a.ec=x(c);a.g=e;a.w=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ja[d];if(e){a.W=e[0];a.ca=e[1];a.aa=e[2];a.na=e[3]||512;c=a.na>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.W);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=Ca()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ac?"":e)+"&format=json"));return!!Aa(f,null, !0,function(b,c,d){Xh(a,b,c,d)})} -function Xh(a,b,c,d){var e=null,f=0>d&&!!a.I&&!a.I.A.fa;a.j=!1;if(d)a.controller.N('Unable to load disk "'+a.Ma+'" (error '+d+": "+b+")",f);else{gb(a.controller.lb,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function Xh(a,b,c,d){var e=null,f=0>d&&!!a.J&&!a.J.A.fa;a.j=!1;if(d)a.controller.M('Unable to load disk "'+a.Na+'" (error '+d+": "+b+")",f);else{gb(a.controller.lb,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)y(k[0]);else{a.W=k.length;a.ca=k[0].length;a.aa=k[0][0].length;var l=k[0][0][0];a.na=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 u=l.bytes;if(void 0!==u&&u.length){for(var t=m<<2,D=u.length;D>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ga?f=a.Qa+a.Ga&&(a.Ga+=f-(a.Qa+a.Ga)+1):(a.Qa=f,a.Ga=1);d[f]=d[f]&~(255<>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.j)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ja?f=a.Ra+a.Ja&&(a.Ja+=f-(a.Ra+a.Ja)+1):(a.Ra=f,a.Ja=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[k].length||m>=this.b[k][l].length){c="sector (CHS="+k+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.j){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.b[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.N("Unable to restore disk '"+this.Ma+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.j){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.b[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.M("Unable to restore disk '"+this.Na+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Zh(this,a++);)bi(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 bi(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)}}var Th=0;function R(a){A.call(this,"RK11",a,0,65536);this.G=ci(this,a.autoMount);this.C=0;this.i=Array(8);this.H=!Na("Mobi")&&window&&"FileReader"in window;this.eb=null;this.L=this.g=this.b=this.w=this.v=this.j=this.J=0}p(R,A); +function bi(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)}}var Th=0;function R(a){A.call(this,"RK11",a,0,65536);this.G=ci(this,a.autoMount);this.C=0;this.i=Array(8);this.H=!Na("Mobi")&&window&&"FileReader"in window;this.eb=null;this.L=this.g=this.b=this.w=this.v=this.j=this.I=0}p(R,A); function ci(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){y(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=R.prototype; h.oa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.B[b]=c,c.onchange=function(){var a=d.B.descDisk,b=c.options&&c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){y("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.B[b]=c,c.onchange=function(){var a=la(c.value,10);null!=a&&di(d, -a)},!0;case "loadDisk":return this.B[b]=c,c.onclick=function(){var a=d.B.listDisks;a&&a.options&&ei(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.B[b]=c,c.onclick=function(){var a,b=d.B.listDrives,b=b&&la(b.value,10);null==b||0>b||b>=d.i.length||!(a=d.i[b])?d.N("Unable to boot the selected drive"):a.ha?(je(d.f,0,!0),(a=d.Vc(a,0,0,0,512,0,2))&&d.N("Unable to read the boot sector ("+a+")")):d.N("Load a disk into the drive first")},!0;case "saveDisk":if(!this.H){c.parentNode.removeChild(c); -break}this.B[b]=c;c.onclick=function(){var a=d.B.listDrives;a&&a.options&&d.i&&((a=d.i[la(a.value,10)||0])?(a=a.ha)?(a=Qa(ai(a),a.ec.replace(".json",".img")),Da(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDisk":if(this.H)return this.B[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;ei(d,x(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.qa=function(a,b,c,d){this.I=a;this.D=b;this.f=c;this.F=d;if(a=ci(this,Sd(this.I,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.G[e]=a[e]);yi(this);this.eb=cd(this.f,144,5,65536);Pb(b,this,Ai);Rb(b,this.reset.bind(this));Bi(this,"None",Ci,!0);this.H&&Bi(this,"Local Disk",Di);Bi(this,"Remote Disk",Ei);Fi(this)||H(this)}; -h.ra=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.I.w){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";di(this,0)}}return!0};h.Aa=function(a){return a?this.save():!0};h.reset=function(){yi(this)};h.save=function(){return(new le(this)).data()}; -h.restore=function(a){return yi(this,a[0])};function Fi(a,b){b||(a.C=0);for(var c in a.G){var d=a.G[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.B.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.i.length)a.N("Unable to load the selected drive");else if(c)if(c==Di)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==Ei){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=x(c);a.status("Attempting to load "+c+' as "'+b+'"')}Hi(a,e,b,c,!1,d)}else Gi(a,e)} -function Hi(a,b,c,d,e,f){var g=-1,k=a.i[b];k.wa.toLowerCase()!=d.toLowerCase()&&(g++,Gi(a,b,!0),k.qb?a.N("RK11 busy"):(k.qb=!0,e&&(k.pb=!0,a.C++,I(a)&&J(a,"auto-loading disk: "+c)),k.Ua=!!f,Wh(new Sh(a,k,"preload"),c,d,f,a.Ad)&&g++));return g} -h.Ad=function(a,b,c,d,e){a.qb=!1;b&&(b.W>a.W||b.ca>a.ca)&&(this.N('Disk "'+c+'" too large for drive '+("RK"+a.rb)),b=null);b?(a.ha=b,a.Ma=c,a.wa=d,this.N('Loaded disk "'+c+'" in drive '+("RK"+a.rb),a.pb||e),this.I&&be(this.I)):a.Ua=!1;a.pb&&(a.pb=!1,--this.C||H(this));di(this,a.rb)}; +a)},!0;case "loadDisk":return this.B[b]=c,c.onclick=function(){var a=d.B.listDisks;a&&a.options&&ei(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.B[b]=c,c.onclick=function(){var a,b=d.B.listDrives,b=b&&la(b.value,10);null==b||0>b||b>=d.i.length||!(a=d.i[b])?d.M("Unable to boot the selected drive"):a.ha?(je(d.f,0,!0),(a=d.Vc(a,0,0,0,512,0,2))&&d.M("Unable to read the boot sector ("+a+")")):d.M("Load a disk into the drive first")},!0;case "saveDisk":if(!this.H){c.parentNode.removeChild(c); +break}this.B[b]=c;c.onclick=function(){var a=d.B.listDrives;a&&a.options&&d.i&&((a=d.i[la(a.value,10)||0])?(a=a.ha)?(a=Qa(ai(a),a.ec.replace(".json",".img")),Da(a)):d.M("No disk loaded in drive."):d.M("No disk drive selected."))};return!0;case "mountDisk":if(this.H)return this.B[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;ei(d,x(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +h.ra=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;if(a=ci(this,Sd(this.J,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.G[e]=a[e]);yi(this);this.eb=cd(this.f,144,5,65536);Pb(b,this,Ai);Rb(b,this.reset.bind(this));Bi(this,"None",Ci,!0);this.H&&Bi(this,"Local Disk",Di);Bi(this,"Remote Disk",Ei);Fi(this)||H(this)}; +h.sa=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.J.w){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";di(this,0)}}return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){yi(this)};h.save=function(){return(new le(this)).data()}; +h.restore=function(a){return yi(this,a[0])};function Fi(a,b){b||(a.C=0);for(var c in a.G){var d=a.G[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.B.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.i.length)a.M("Unable to load the selected drive");else if(c)if(c==Di)a.M('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==Ei){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=x(c);a.status("Attempting to load "+c+' as "'+b+'"')}Hi(a,e,b,c,!1,d)}else Gi(a,e)} +function Hi(a,b,c,d,e,f){var g=-1,k=a.i[b];k.ya.toLowerCase()!=d.toLowerCase()&&(g++,Gi(a,b,!0),k.qb?a.M("RK11 busy"):(k.qb=!0,e&&(k.pb=!0,a.C++,I(a)&&J(a,"auto-loading disk: "+c)),k.Ua=!!f,Wh(new Sh(a,k,"preload"),c,d,f,a.Ad)&&g++));return g} +h.Ad=function(a,b,c,d,e){a.qb=!1;b&&(b.W>a.W||b.ca>a.ca)&&(this.M('Disk "'+c+'" too large for drive '+("RK"+a.rb)),b=null);b?(a.ha=b,a.Na=c,a.ya=d,this.M('Loaded disk "'+c+'" in drive '+("RK"+a.rb),a.pb||e),this.J&&be(this.J)):a.Ua=!1;a.pb&&(a.pb=!1,--this.C||H(this));di(this,a.rb)}; function Bi(a,b,c,d){if((a=a.B.listDisks)&&a.options){for(var e=0;e=a.W){m=64;break}n=a.seek(b,c,d+1);if(!n){m=4096;break}r=0;++d>=a.aa&&(d=0,++c>=a.ca&&(c=0,++b))}var u,t;if(0>(u=a.read(n,r++))||0>(t=a.read(n,r++))){m=32;break}if(!k&&(jc(this.D,ye(this.f,f),u|t<<8),Zc(this.D))){m=1024;break}r>=a.na&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; h.Bd=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.ha;var n=null,r;a||(m=128,e=0);for(;e;){var u=lc(this.D,ye(this.f,f));if(Zc(this.D)){m=1024;break}if(!n){if(b>=a.W){m=64;break}n=a.seek(b,c,d+1,!0);if(!n){m=4096;break}r=0;++d>=a.aa&&(d=0,++c>=a.ca&&(c=0,++b))}if(k){var t,D;if(0>(t=a.read(n,r++))||0>(D=a.read(n,r++))){m=32;break}if(u!=(t|D<<8)){m=1;break}}else if(!a.write(n,r++,u&255)||!a.write(n,r++,u>>8)){m=32;break}r>=a.na&&(n=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; -h.zd=function(a,b,c,d,e,f){this.v=f&65535;this.b=this.b&-49|f>>12&48;this.w=65536-e&65535;this.j=this.j&-16|d&15;this.g|=a;Ii(this);return!0};function Ii(a){a.b&=-32769;a.g&&(a.g|=32768,a.b|=32768,a.g&32736&&(a.b|=16384),I(a)&&J(a,a.type+": ERROR: "+q(a.g)))}h.Ee=function(){return this.L};h.Nf=function(){};h.Fe=function(){return this.g};h.Of=function(){};h.Be=function(){return this.b&61438}; -h.Kf=function(a){this.b=this.b&-3968|a&3967;if(this.b&1){a=!0;var b,c,d="",e=(this.j&57344)>>13,f=this.i[e],g,k,l,m,n,r;this.b&=-8321;this.g&=-4;switch(c=this.b&14){case 0:I(this)&&J(this,this.type+": CRESET("+e+")",!0);this.g=this.j=0;this.b=128;break;case 10:d="RCHK";case 4:d||(d="READ"),b=this.Vc;case 6:d||(d="WCHK");case 2:d||(d="WRITE");b||(b=this.Bd);g=(this.j&8160)>>5;k=(this.j&16)>>4;l=this.j&15;m=65536-this.w&65535;n=(this.b&48)<<12|this.v;r=this.b&2048?0:2;I(this)&&J(this,this.type+": "+ +h.zd=function(a,b,c,d,e,f){this.v=f&65535;this.b=this.b&-49|f>>12&48;this.w=65536-e&65535;this.j=this.j&-16|d&15;this.g|=a;Ii(this);return!0};function Ii(a){a.b&=-32769;a.g&&(a.g|=32768,a.b|=32768,a.g&32736&&(a.b|=16384),I(a)&&J(a,a.type+": ERROR: "+q(a.g)))}h.Ee=function(){return this.L};h.Of=function(){};h.Fe=function(){return this.g};h.Pf=function(){};h.Be=function(){return this.b&61438}; +h.Lf=function(a){this.b=this.b&-3968|a&3967;if(this.b&1){a=!0;var b,c,d="",e=(this.j&57344)>>13,f=this.i[e],g,k,l,m,n,r;this.b&=-8321;this.g&=-4;switch(c=this.b&14){case 0:I(this)&&J(this,this.type+": CRESET("+e+")",!0);this.g=this.j=0;this.b=128;break;case 10:d="RCHK";case 4:d||(d="READ"),b=this.Vc;case 6:d||(d="WCHK");case 2:d||(d="WRITE");b||(b=this.Bd);g=(this.j&8160)>>5;k=(this.j&16)>>4;l=this.j&15;m=65536-this.w&65535;n=(this.b&48)<<12|this.v;r=this.b&2048?0:2;I(this)&&J(this,this.type+": "+ d+"("+g+":"+k+":"+l+") "+q(n)+"--"+q(n+(m<<1)),!0,!0);if(g>=f.W){this.g|=64;break}if(l>=f.aa){this.g|=32;break}a=b.call(this,f,g,k,l,m,n,r,6<=c,this.zd.bind(this));break;case 8:g=(this.j&8160)>>5;I(this)&&J(this,this.type+": SEEK("+g+")",!0);g'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.B[b]=c,c.onchange=function(){var a=la(c.value,10);null!=a&&Li(d, -a)},!0;case "loadDisk":return this.B[b]=c,c.onclick=function(){var a=d.B.listDisks;a&&a.options&&Mi(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.B[b]=c,c.onclick=function(){var a,b=d.B.listDrives,b=b&&la(b.value,10);null==b||0>b||b>=d.g.length||!(a=d.g[b])?d.N("Unable to boot the selected drive"):a.ha?(je(d.f,0,!0),(a=d.Wc(a,0,0,0,512,0))&&d.N("Unable to read the boot sector ("+a+")")):d.N("Load a disk into the drive first")},!0;case "saveDisk":if(!this.J){c.parentNode.removeChild(c); -break}this.B[b]=c;c.onclick=function(){var a=d.B.listDrives;a&&a.options&&d.g&&((a=d.g[la(a.value,10)||0])?(a=a.ha)?(a=Qa(ai(a),a.ec.replace(".json",".img")),Da(a)):d.N("No disk loaded in drive."):d.N("No disk drive selected."))};return!0;case "mountDisk":if(this.J)return this.B[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;Mi(d,x(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.qa=function(a,b,c,d){this.I=a;this.D=b;this.f=c;this.F=d;if(a=Ki(this,Sd(this.I,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.H[e]=a[e]);Ni(this);this.eb=cd(this.f,112,5,131072);Pb(b,this,Oi);Rb(b,this.reset.bind(this));Pi(this,"None",Qi,!0);this.J&&Pi(this,"Local Disk",Ri);Pi(this,"Remote Disk",Si);Ti(this)||H(this)}; -h.ra=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.I.w){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Li(this,0)}}return!0};h.Aa=function(a){return a?this.save():!0};h.reset=function(){Ni(this)};h.save=function(){return(new le(this)).data()}; -h.restore=function(a){return Ni(this,a[0])};function Ti(a,b){b||(a.G=0);for(var c in a.H){var d=a.H[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.B.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==Ri)a.N('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==Si){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=x(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vi(a,e,b,c,!1,d)}else Ui(a,e)} -function Vi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.wa.toLowerCase()!=d.toLowerCase()&&(g++,Ui(a,b,!0),k.qb?a.N("RL11 busy"):(k.qb=!0,e&&(k.pb=!0,a.G++,I(a)&&J(a,"auto-loading disk: "+c)),k.Ua=!!f,Wh(new Sh(a,k,"preload"),c,d,f,a.Dd)&&g++));return g} -h.Dd=function(a,b,c,d,e){a.qb=!1;b&&(b.W>a.W||b.ca>a.ca)&&(this.N('Disk "'+c+'" too large for drive '+("RL"+a.rb)),b=null);b?(a.ha=b,a.Ma=c,a.wa=d,this.N('Loaded disk "'+c+'" in drive '+("RL"+a.rb),a.pb||e),this.I&&be(this.I)):a.Ua=!1;a.pb&&(a.pb=!1,--this.G||H(this));Li(this,a.rb)}; +a)},!0;case "loadDisk":return this.B[b]=c,c.onclick=function(){var a=d.B.listDisks;a&&a.options&&Mi(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.B[b]=c,c.onclick=function(){var a,b=d.B.listDrives,b=b&&la(b.value,10);null==b||0>b||b>=d.g.length||!(a=d.g[b])?d.M("Unable to boot the selected drive"):a.ha?(je(d.f,0,!0),(a=d.Wc(a,0,0,0,512,0))&&d.M("Unable to read the boot sector ("+a+")")):d.M("Load a disk into the drive first")},!0;case "saveDisk":if(!this.I){c.parentNode.removeChild(c); +break}this.B[b]=c;c.onclick=function(){var a=d.B.listDrives;a&&a.options&&d.g&&((a=d.g[la(a.value,10)||0])?(a=a.ha)?(a=Qa(ai(a),a.ec.replace(".json",".img")),Da(a)):d.M("No disk loaded in drive."):d.M("No disk drive selected."))};return!0;case "mountDisk":if(this.I)return this.B[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;Mi(d,x(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +h.ra=function(a,b,c,d){this.J=a;this.D=b;this.f=c;this.F=d;if(a=Ki(this,Sd(this.J,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.H[e]=a[e]);Ni(this);this.eb=cd(this.f,112,5,131072);Pb(b,this,Oi);Rb(b,this.reset.bind(this));Pi(this,"None",Qi,!0);this.I&&Pi(this,"Local Disk",Ri);Pi(this,"Remote Disk",Si);Ti(this)||H(this)}; +h.sa=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.J.w){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Li(this,0)}}return!0};h.Ca=function(a){return a?this.save():!0};h.reset=function(){Ni(this)};h.save=function(){return(new le(this)).data()}; +h.restore=function(a){return Ni(this,a[0])};function Ti(a,b){b||(a.G=0);for(var c in a.H){var d=a.H[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.B.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.g.length)a.M("Unable to load the selected drive");else if(c)if(c==Ri)a.M('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==Si){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=x(c);a.status("Attempting to load "+c+' as "'+b+'"')}Vi(a,e,b,c,!1,d)}else Ui(a,e)} +function Vi(a,b,c,d,e,f){var g=-1,k=a.g[b];k.ya.toLowerCase()!=d.toLowerCase()&&(g++,Ui(a,b,!0),k.qb?a.M("RL11 busy"):(k.qb=!0,e&&(k.pb=!0,a.G++,I(a)&&J(a,"auto-loading disk: "+c)),k.Ua=!!f,Wh(new Sh(a,k,"preload"),c,d,f,a.Dd)&&g++));return g} +h.Dd=function(a,b,c,d,e){a.qb=!1;b&&(b.W>a.W||b.ca>a.ca)&&(this.M('Disk "'+c+'" too large for drive '+("RL"+a.rb)),b=null);b?(a.ha=b,a.Na=c,a.ya=d,this.M('Loaded disk "'+c+'" in drive '+("RL"+a.rb),a.pb||e),this.J&&be(this.J)):a.Ua=!1;a.pb&&(a.pb=!1,--this.G||H(this));Li(this,a.rb)}; function Pi(a,b,c,d){if((a=a.B.listDisks)&&a.options){for(var e=0;e(n=a.read(l,m++))||0>(r=a.read(l,m++))){k=5120;break}jc(this.D,ye(this.f,f),n|r<<8);if(Zc(this.D)){k=8192;break}f+=2;e--;if(m>=a.na&&(l=null,++d>=a.aa&&(d=0,++c>=a.ca&&(c=0,++b>=a.W)))){k=5120;break}}return g?g(k,b,c,d,e,f):k}; h.Ed=function(a,b,c,d,e,f,g){var k=0;a=a.ha;var l=null,m;a||(k=5120,e=0);for(;e;){var n=lc(this.D,ye(this.f,f));if(Zc(this.D)){k=8192;break}f+=2;e--;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=5120;break}m=0}if(!a.write(l,m++,n&255)||!a.write(l,m++,n>>8)){k=5120;break}if(m>=a.na&&(l=null,++d>=a.aa&&(d=0,++c>=a.ca&&(c=0,++b>=a.W)))){k=5120;break}}return g?g(k,b,c,d,e,f):k}; h.Cd=function(a,b,c,d,e,f){this.C=f&65535;this.b=this.b&-49|f>>12&48;this.v=f>>16&63;this.j=this.i=b<<7|(c?64:0)|d&63;this.w=65536-e&65535;a&&(this.b=this.b|a|32768);return!0};h.Je=function(){return this.b&65535}; -h.Sf=function(a){this.b=this.b&-1023|a&1022;this.v=this.v&60|(a&48)>>4;if(!(this.b&128)){a=!0;var b,c="",d=this.g[(this.b&768)>>8],e=d.ha,f,g,k;this.b&=-2;switch(this.b&14){case 4:this.w&8&&(this.b&=63);this.w=d.status|this.j&64|(e&&512==e.W?128:0);break;case 6:1==(this.i&3)&&(b=this.i&65408,c=(this.i&16)<<2,this.j=this.i&4?this.j+b:this.j-b,this.i=this.j=this.j&65408|c);break;case 8:this.w=this.j;break;case 12:c="READ",b=this.Wc;case 10:c||(c="WRITE"),b||(b=this.Ed),f=this.i>>7,g=this.i&64?1:0,k= -this.i&63,!e||f>=e.W||k>=e.aa?this.b|=37888:(a=65536-this.w&65535,e=(this.v&63)<<16|this.C,I(this)&&J(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+q(e)+"--"+q(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,this.Cd.bind(this)))}a&&(this.b|=129,this.b&64&&ad(this.f,this.eb))}};h.He=function(){return this.C};h.Qf=function(a){this.C=a&65534};h.Ke=function(){return this.i};h.Tf=function(a){this.i=a};h.Le=function(){return this.w};h.Uf=function(a){this.w=a};h.Ie=function(){return this.v}; -h.Rf=function(a){this.v=a&63;this.b=this.b&-49|(this.v&3)<<4};var Qi="",Ri="?",Si="??",Wi={},Oi=(Wi[63744]=[null,null,qd.prototype.Je,qd.prototype.Sf,"RLCS"],Wi[63746]=[null,null,qd.prototype.He,qd.prototype.Qf,"RLBA"],Wi[63748]=[null,null,qd.prototype.Ke,qd.prototype.Tf,"RLDA"],Wi[63750]=[null,null,qd.prototype.Le,qd.prototype.Uf,"RLMP"],Wi[63752]=[null,null,qd.prototype.Ie,qd.prototype.Rf,"RLBE"],Wi); -function Xi(a){A.call(this,"Debugger",a);this.va=a.base||16;this.da=!1;this.w=0;this.P=!1;this.v=-1;this.j=[];this.T={}}p(Xi,A);Xi.prototype.hd=function(){return-1};Xi.prototype.jd=function(){}; +h.Tf=function(a){this.b=this.b&-1023|a&1022;this.v=this.v&60|(a&48)>>4;if(!(this.b&128)){a=!0;var b,c="",d=this.g[(this.b&768)>>8],e=d.ha,f,g,k;this.b&=-2;switch(this.b&14){case 4:this.w&8&&(this.b&=63);this.w=d.status|this.j&64|(e&&512==e.W?128:0);break;case 6:1==(this.i&3)&&(b=this.i&65408,c=(this.i&16)<<2,this.j=this.i&4?this.j+b:this.j-b,this.i=this.j=this.j&65408|c);break;case 8:this.w=this.j;break;case 12:c="READ",b=this.Wc;case 10:c||(c="WRITE"),b||(b=this.Ed),f=this.i>>7,g=this.i&64?1:0,k= +this.i&63,!e||f>=e.W||k>=e.aa?this.b|=37888:(a=65536-this.w&65535,e=(this.v&63)<<16|this.C,I(this)&&J(this,this.type+": "+c+"("+f+":"+g+":"+k+") "+q(e)+"--"+q(e+(a<<1)),!0,!0),a=b.call(this,d,f,g,k,a,e,this.Cd.bind(this)))}a&&(this.b|=129,this.b&64&&ad(this.f,this.eb))}};h.He=function(){return this.C};h.Rf=function(a){this.C=a&65534};h.Ke=function(){return this.i};h.Uf=function(a){this.i=a};h.Le=function(){return this.w};h.Vf=function(a){this.w=a};h.Ie=function(){return this.v}; +h.Sf=function(a){this.v=a&63;this.b=this.b&-49|(this.v&3)<<4};var Qi="",Ri="?",Si="??",Wi={},Oi=(Wi[63744]=[null,null,qd.prototype.Je,qd.prototype.Tf,"RLCS"],Wi[63746]=[null,null,qd.prototype.He,qd.prototype.Rf,"RLBA"],Wi[63748]=[null,null,qd.prototype.Ke,qd.prototype.Uf,"RLDA"],Wi[63750]=[null,null,qd.prototype.Le,qd.prototype.Vf,"RLMP"],Wi[63752]=[null,null,qd.prototype.Ie,qd.prototype.Sf,"RLBE"],Wi); +function Xi(a){A.call(this,"Debugger",a);this.xa=+a.base||16;this.da=!1;this.w=0;this.P=!1;this.v=-1;this.j=[];this.T={}}p(Xi,A);Xi.prototype.hd=function(){return-1};Xi.prototype.jd=function(){}; function Yi(a,b,c,d){if(c)if(b){0>a.v&&a.j.length&&(a.v=0);if(0>a.v||b!=a.j[a.v])a.j.splice(0,0,b),a.v=0;a.v--}else a.P?b="end":b=a.j[a.v+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ua(b.substring(c,f))),c=f+1}}return a} function Zi(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 $i(a,b,c){var d;if(b){b=aj(a,b);for(var e=0,f=!1,g=b,k=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=8;d=v(c,0,!0)+" "+c+". "+q(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e} -function ej(a,b){if(b)return dj(a,b,a.T[b]);var c=0;for(b in a.T)dj(a,b,a.T[b]),c++;return 0=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; -function fj(a){Xi.call(this,a);this.Ba=!1;this.da=!0;this.H=W();this.za=W();this.O=W();this.C=[];this.g=this.L=this.G=[];gj(this);this.R=this.Z=0;this.i=[];this.pa=void 0;hj(this);this.F=this;this.la={};this.ga=this.cd=0;this.S=null;this.M=[];ij(this,a.messages);this.ua=a.commands;this.Ea=jj;this.ya=[];this.J=0;this.Fa=this.ta=null;this.w=this.Da=this.Ca=this.X=this.ma=0;this.b=this.V=null;var b=this;window?void 0===window[E]&&(window[E]=function(a){return Xd(b,a)}):void 0===global[E]&&(global[E]= -function(a){return Xd(b,a)})}p(fj,Xi);function kj(a){a=a&&a.K;null==a&&(a=-1);return a}function W(a,b,c){return{K:a||null,Ha:b||!1,Pa:!1,va:c}}h=fj.prototype;h.Fc=function(a,b){a.K=b;a.Pa=!1;a.va=void 0;return a};function lj(a){return[a.K,a.Ha,a.va,a.Pa,a.dc]}function mj(a,b){var c=W(b[0],b[1],b[2]);c.Pa=b[3];b[4]&&(c.$c=Yi(a,c.dc=b[4]));return c} -h.qa=function(a,b,c,d){this.D=b;this.I=a;this.f=c;this.b=a.i;(a=Sd(a,"messages"))&&ij(this,a);1145>this.f.ya&&(this.ya=nj);ed(this,16,function(a){a:{var b=d.D.b,c=a[0],e=a=0,l=b.length;if(c){a=kj(oj(d,c));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.D.g;l=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.u("..."):(c=n.type,m=Qc[c],n&&d.u(v(n.id,8)+" %"+v(e<>=8;d=v(c,0,!0)+" "+c+". "+q(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.u((null!=b?b+": ":"")+d);return e} +function ej(a,b){if(b)return dj(a,b,a.T[b]);var c=0;for(b in a.T)dj(a,b,a.T[b]),c++;return 0=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9}; +function fj(a){Xi.call(this,a);this.Da=!1;this.da=!0;this.H=W();this.Ba=W();this.O=W();this.C=[];this.g=this.L=this.G=[];gj(this);this.R=this.Y=0;this.i=[];this.pa=void 0;hj(this);this.F=this;this.la={};this.ga=this.cd=0;this.S=null;this.N=[];ij(this,a.messages);this.ua=a.commands;this.Ga=jj;this.Aa=[];this.I=0;this.Ha=this.qa=null;this.w=this.Fa=this.Ea=this.X=this.ma=0;this.b=this.V=null;var b=this;window?void 0===window[E]&&(window[E]=function(a){return Xd(b,a)}):void 0===global[E]&&(global[E]= +function(a){return Xd(b,a)})}p(fj,Xi);function kj(a){a=a&&a.K;null==a&&(a=-1);return a}function W(a,b,c){return{K:void 0===a?null:a,Ka:void 0===b?!1:b,Qa:!1,xa:c}}h=fj.prototype;h.Fc=function(a,b){a.K=b;a.Qa=!1;a.xa=void 0;return a};function lj(a){return[a.K,a.Ka,a.xa,a.Qa,a.dc]}function mj(a,b){var c=W(b[0],b[1],b[2]);c.Qa=b[3];b[4]&&(c.$c=Yi(a,c.dc=b[4]));return c} +h.ra=function(a,b,c,d){this.D=b;this.J=a;this.f=c;this.b=a.i;(a=Sd(a,"messages"))&&ij(this,a);1145>this.f.Aa&&(this.Aa=nj);ed(this,16,function(a){a:{var b=d.D.b,c=a[0],e=a=0,l=b.length;if(c){a=kj(oj(d,c));if(-1===a){d.u("invalid address: "+c);break a}e=a>>>d.D.g;l=1}d.u("blockid physical blockaddr used size type");d.u("-------- --------- --------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.u("..."):(c=n.type,m=Qc[c],n&&d.u(v(n.id,8)+" %"+v(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;dd&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"} -h.jd=function(a){var b;if(0<=a)if(8>a)b=this.f.g[a];else if(16>a)b=this.f.pa[a-8];else if(20>a)b=this.f.X[a-16];else{var c=this.f,d=this.b;switch(a){case uj:b=nd(this.f);break;case vj:b=c.bb;break;case wj:b=c.R;break;case xj:b=c.za&65280;break;case yj:b=hd(c);break;case zj:b=jd(c);break;case Aj:b=kd(c);break;case Bj:b=c.T;break;case Cj:d&&(b=d.sa);break;case Dj:d&&(b=d.tb);break;case Ej:d&&qc(d)&&(b=d.Va)}}return b}; -h.message=function(a,b){b&&(a+=" @"+rj(this,W(this.f.P&65535)));if(!this.S||a!=this.S)if(this.S=a,this.ga&1073741824)this.M.push(a);else{var c;if(this.ga&-2147483648&&this.f&&(c=this.f.A.U)||ub(this,!0))this.Y(),c&&(a+=" (cpu halted)");this.u(a);this.f&&(a=this.f,ce(a),a.hb=0,a.I&&L(a.I,void 0))}}; +h.jd=function(a){var b;if(0<=a)if(8>a)b=this.f.g[a];else if(16>a)b=this.f.qa[a-8];else if(20>a)b=this.f.X[a-16];else{var c=this.f,d=this.b;switch(a){case uj:b=nd(this.f);break;case vj:b=c.bb;break;case wj:b=c.R;break;case xj:b=c.Ba&65280;break;case yj:b=hd(c);break;case zj:b=jd(c);break;case Aj:b=kd(c);break;case Bj:b=c.T;break;case Cj:d&&(b=d.ta);break;case Dj:d&&(b=d.tb);break;case Ej:d&&qc(d)&&(b=d.Va)}}return b}; +h.message=function(a,b){b&&(a+=" @"+rj(this,W(this.f.P&65535)));if(!this.S||a!=this.S)if(this.S=a,this.ga&1073741824)this.N.push(a);else{var c;if(this.ga&-2147483648&&this.f&&(c=this.f.A.U)||ub(this,!0))this.Z(),c&&(a+=" (cpu halted)");this.u(a);this.f&&(a=this.f,ce(a),a.hb=0,a.J&&L(a.J,void 0))}}; function hj(a){var b;if(!gf(a))a.i&&a.i.length&&a.u("instruction history buffer freed"),a.R=0,a.i=[];else if(!a.i||!a.i.length){a.i=Array(Fj);for(b=0;b>8;a.u("trapped to "+O(a,c&255,1)+" ("+(0>d?Cb[-d]:O(a,d))+")")}a.H=W(a.f.g[7]);b&&1!=a.J?Ij(a):Jj(a)}}function Hj(a,b){var c;(c=!a.f||!tb(a.f))||(c=a.f,c.A.fa?c=!0:(c.u(c.toString()+" not powered"),c=!1),c=!c);return c||a.f.A.U?(b||a.u("cpu busy or unavailable, command ignored"),!1):!sb(a.f)}h.ra=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -h.Aa=function(a,b){b&&this.u(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){hj(this);this.X=0;this.S=null;this.w=0;this.H=W(this.f.g[7]);this.A.U=!1;Kj(this);a||Vd(this)};h.save=function(){var a=new le(this);a.set(0,lj(this.H));a.set(1,lj(this.O));a.set(2,[this.j,this.P,this.ga]);a.set(3,this.C);return a.data()}; -h.restore=function(a){var b=0;void 0!==a[2]&&(this.H=mj(this,a[b++]),this.O=mj(this,a[b++]),this.j=a[b][0],"string"==typeof this.j&&(this.j=[this.j]),this.P=a[b][1],this.ga|=a[b][2]);a[3]&&(this.C=a[3]);return!0};h.start=function(a,b){this.J||this.u("running");this.A.U=!0;this.Ca=a;this.Da=b}; -h.stop=function(a,b){if(this.A.U){this.A.U=!1;this.w=b-this.Da;if(!this.J){b="stopped";if(this.w){a-=this.Ca;var c=0d&&(d=mc(a.f,b)),65535!=(d&65535)&&(a.Fc(a.i[a.R],b),++a.R==a.i.length&&(a.R=0)));return!1}function ng(a){var b=a.f;if(b.A.U)throw ke(b,a.f.P&65535),a.Y(),-1;return!1}function Md(a,b,c){Lj(a,b,c||1,a.L)&&a.Y(!0)}function Nd(a,b,c){Lj(a,b,c||1,a.G)&&a.Y(!0)} -function gj(a){var b,c,d;a.g=["bp"];if(a.L)for(b=1;b>>c.g],!1)):Be(a.f,!1);a.L=["br"];if(a.G)for(b=1;b>>c.g],!0)):Be(a.f,!0);a.G=["bw"];a.ma=0} -h.ob=function(a,b,c){var d=!0;c||Mj(this,a,b,!1,!0);if(a!=this.g){var e=kj(b);if(-1===e)this.u("invalid address: "+rj(this,b)),d=!1;else{var f=a==this.G;65535>>g.g].ob(e&g.i,f)}else e=this.f,(f?e.Vb++:e.Tb++)||ie(e)}}d&&(a.push(b),c?b.Pa=!0:(Nj(this,a,a.length-1,"set"),hj(this)));return d}; -function Mj(a,b,c,d,e){var f=!1;c=kj(c);for(var g=1;g>>d.g],b)):Be(a.f,b));k.Pa||hj(a);break}}return f}function Oj(a,b){for(var c=1;c>23)&65535,z=O(t,u);else if(C==Uj)u=u.K-((f&63)<<1)&65535,z=O(t,u);else if(C==Vj)z=O(t,f&7,1);else if(C==Wj)z=O(t,f&63,1);else if(C==Xj)z=O(t,f&255,1);else if(C=f&D,D&Yj&&(C>>=6,D>>=6),D&Y){var D=null,F=C& -Zj;switch(C&ak){case 0:z=tj(F);break;case 8:z="@"+tj(F);D=bk(t,t.f.g[F]);break;case 16:7>F?z="("+tj(F)+")+":(C=t.Na(u,2),z="#"+O(t,C,0,!0));break;case 24:7>F?z="@("+tj(F)+")+":(C=t.Na(u,2),z="@#"+O(t,C,0,!0),D=bk(t,C));break;case 32:z="-("+tj(F)+")";break;case 40:z="@-("+tj(F)+")";break;case 48:C=t.Na(u,2);z=O(t,C,0,!0)+"("+tj(F)+")";7==F&&(z=O(t,C=C+u.K&65535),D=bk(t,C));break;case 56:C=t.Na(u,2),z="@"+O(t,C)+"("+tj(F)+")",7==F&&(z="@"+O(t,C=C+u.K&65535),D=bk(t,mc(t.f,C)))}D&&(z=[z,D])}t=z;if(!t|| -!t.length){k="INVALID";break}"string"!=typeof t&&(m=t[1],t=t[0]);0=a.f.ib&&b=c.C&&(b=c.Ja[b&Yc])&&(a=b[4]);return a}function ck(a,b){switch(b){case "N":a=pe(a.f);break;case "Z":a=oe(a.f);break;case "V":a=ne(a.f);break;case "C":a=me(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "} -function Z(a,b){var c="",d=a.f;if(8>b)c=tj(b),c+="="+O(a,d.g[b]);else if(13>b)c="A"+(b-8)+"="+O(a,d.pa[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+O(a,d.X[b-16]);else switch(b){case uj:c="PS="+O(a,nd(d));break;case vj:c="PI="+O(a,d.bb);break;case wj:c="ER="+O(a,d.R);break;case xj:c="SL="+O(a,d.za&65280);break;case yj:c="M0="+O(a,hd(d));break;case zj:c="M1="+O(a,jd(d));break;case Aj:c="M2="+O(a,kd(d));break;case Bj:c="M3="+O(a,d.T);break;case Cj:a.b&&(c="AR="+O(a,a.b.sa,3));break;case Dj:a.b&&(c="DR="+ +function dc(a,b,c,d){if(!Hj(a))return!1;null===c&&(c=!a.qa||"tr"==a.qa);a.w=0;b||gf(a)&&hf(a,a.f.g[7],0);try{b=de(a.f,b);var e=a.f.$b(b);0>8;a.u("trapped to "+O(a,c&255,1)+" ("+(0>d?Cb[-d]:O(a,d))+")")}a.H=W(a.f.g[7]);b&&1!=a.I?Ij(a):Jj(a)}}function Hj(a,b){var c;(c=!a.f||!tb(a.f))||(c=a.f,c.A.fa?c=!0:(c.u(c.toString()+" not powered"),c=!1),c=!c);return c||a.f.A.U?(b||a.u("cpu busy or unavailable, command ignored"),!1):!sb(a.f)}h.sa=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +h.Ca=function(a,b){b&&this.u(a?"suspending":"shutting down");return a?this.save():!0};h.reset=function(a){hj(this);this.X=0;this.S=null;this.w=0;this.H=W(this.f.g[7]);this.A.U=!1;Kj(this);a||Vd(this)};h.save=function(){var a=new le(this);a.set(0,lj(this.H));a.set(1,lj(this.O));a.set(2,[this.j,this.P,this.ga]);a.set(3,this.C);return a.data()}; +h.restore=function(a){var b=0;void 0!==a[2]&&(this.H=mj(this,a[b++]),this.O=mj(this,a[b++]),this.j=a[b][0],"string"==typeof this.j&&(this.j=[this.j]),this.P=a[b][1],this.ga|=a[b][2]);a[3]&&(this.C=a[3]);return!0};h.start=function(a,b){this.I||this.u("running");this.A.U=!0;this.Ea=a;this.Fa=b}; +h.stop=function(a,b){if(this.A.U){this.A.U=!1;this.w=b-this.Fa;if(!this.I){b="stopped";if(this.w){a-=this.Ea;var c=0d&&(d=mc(a.f,b)),65535!=(d&65535)&&(a.Fc(a.i[a.R],b),++a.R==a.i.length&&(a.R=0)));return!1}function ng(a){var b=a.f;if(b.A.U)throw ke(b,a.f.P&65535),a.Z(),-1;return!1}function Md(a,b,c){Lj(a,b,c||1,a.L)&&a.Z(!0)}function Nd(a,b,c){Lj(a,b,c||1,a.G)&&a.Z(!0)} +function gj(a){var b,c,d;a.g=["bp"];if(a.L)for(b=1;b>>c.g],!1)):Be(a.f,!1);a.L=["br"];if(a.G)for(b=1;b>>c.g],!0)):Be(a.f,!0);a.G=["bw"];a.ma=0} +h.ob=function(a,b,c){var d=!0;c||Mj(this,a,b,!1,!0);if(a!=this.g){var e=kj(b);if(-1===e)this.u("invalid address: "+rj(this,b)),d=!1;else{var f=a==this.G;65535>>g.g].ob(e&g.i,f)}else e=this.f,(f?e.Vb++:e.Tb++)||ie(e)}}d&&(a.push(b),c?b.Qa=!0:(Nj(this,a,a.length-1,"set"),hj(this)));return d}; +function Mj(a,b,c,d,e){var f=!1;c=kj(c);for(var g=1;g>>d.g],b)):Be(a.f,b));k.Qa||hj(a);break}}return f}function Oj(a,b){for(var c=1;c>23)&65535,z=O(t,u);else if(C==Uj)u=u.K-((f&63)<<1)&65535,z=O(t,u);else if(C==Vj)z=O(t,f&7,1);else if(C==Wj)z=O(t,f&63,1);else if(C==Xj)z=O(t,f&255,1);else if(C=f&D,D&Yj&&(C>>=6,D>>=6),D&Y){var D=null,F=C& +Zj;switch(C&ak){case 0:z=tj(F);break;case 8:z="@"+tj(F);D=bk(t,t.f.g[F]);break;case 16:7>F?z="("+tj(F)+")+":(C=t.Oa(u,2),z="#"+O(t,C,0,!0));break;case 24:7>F?z="@("+tj(F)+")+":(C=t.Oa(u,2),z="@#"+O(t,C,0,!0),D=bk(t,C));break;case 32:z="-("+tj(F)+")";break;case 40:z="@-("+tj(F)+")";break;case 48:C=t.Oa(u,2);z=O(t,C,0,!0)+"("+tj(F)+")";7==F&&(z=O(t,C=C+u.K&65535),D=bk(t,C));break;case 56:C=t.Oa(u,2),z="@"+O(t,C)+"("+tj(F)+")",7==F&&(z="@"+O(t,C=C+u.K&65535),D=bk(t,mc(t.f,C)))}D&&(z=[z,D])}t=z;if(!t|| +!t.length){k="INVALID";break}"string"!=typeof t&&(m=t[1],t=t[0]);0=a.f.ib&&b=c.C&&(b=c.Ma[b&Yc])&&(a=b[4]);return a}function ck(a,b){switch(b){case "N":a=pe(a.f);break;case "Z":a=oe(a.f);break;case "V":a=ne(a.f);break;case "C":a=me(a.f);break;default:a=0}return b.charAt(0)+(a?"1":"0")+" "} +function Z(a,b){var c="",d=a.f;if(8>b)c=tj(b),c+="="+O(a,d.g[b]);else if(13>b)c="A"+(b-8)+"="+O(a,d.qa[b-8]);else if(16<=b&&20>b)c="S"+(b-16)+"="+O(a,d.X[b-16]);else switch(b){case uj:c="PS="+O(a,nd(d));break;case vj:c="PI="+O(a,d.bb);break;case wj:c="ER="+O(a,d.R);break;case xj:c="SL="+O(a,d.Ba&65280);break;case yj:c="M0="+O(a,hd(d));break;case zj:c="M1="+O(a,jd(d));break;case Aj:c="M2="+O(a,kd(d));break;case Bj:c="M3="+O(a,d.T);break;case Cj:a.b&&(c="AR="+O(a,a.b.ta,3));break;case Dj:a.b&&(c="DR="+ O(a,a.b.tb));break;case Ej:a.b&&qc(a.b)&&(c="SR="+O(a,a.b.Va,3))}c&&(c+=" ");return c}function dk(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,uj)+Z(a,vj)+Z(a,xj);d+=ck(a,"T")+ck(a,"N")+ck(a,"Z")+ck(a,"V")+ck(a,"C");b&&(b=d,c=""+(Z(a,yj)+Z(a,zj)),c+=Z(a,Aj)+Z(a,Bj)+Z(a,wj),c=c+"\n"+(Z(a,Ej)+Z(a,Cj)+Z(a,Dj)),d=b+("\n"+c));return d}h.dd=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=xa(n,l,a.dd);0>r&&n.splice(-(r+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.C.push({wh:b,K:c,Qd:d,ea:e,ad:f})}function ek(a,b,c){var d=[],e=kj(b)>>>0;for(b=0;b>>0,k=f.Qd;if(e>=g&&e>>0,g],r=xa(n,l,a.dd);0>r&&n.splice(-(r+1),0,l)}m&&(k.a=m.replace(/''/g,'"'))}a.C.push({xh:b,K:c,Qd:d,ea:e,ad:f})}function ek(a,b,c){var d=[],e=kj(b)>>>0;for(b=0;b>>0,k=f.Qd;if(e>=g&&eb)){e.g[b]= -g&65535;break}a.u("unknown register: "+f);return}L(a.I);a.u("updated registers:")}}a.u(dk(a,d));c&&(a.H=W(e.g[7]),Jj(a,rj(a,a.H)))}}function ik(a,b){b=ua(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.u(m)}k[3]&&(g=k[3],f=null);f=Qj(a,b,g,f);a.u(f);a.H=b;e-=b.K-l;c++}}} +g);a.H=W(e.g[7]);break;case "N":e.I=g?32768:0;break;case "Z":e.L=g?0:1;break;case "V":e.H=g?32768:0;break;case "C":e.G=g?65536:0;break;case "PS":od(e,g);break;case "PI":md(e,g);break;case "ER":e.R=g;d=!0;break;case "SL":e.Ba=g|255;break;case "M0":id(e,g);d=!0;break;case "M3":ld(e,g);d=!0;break;case "AR":a.b&&(d=a.b,nc(d,d.ta=g));d=!0;break;case "DR":a.b&&(d=a.b,ic(d,d.tb=g));d=!0;break;case "SR":if(a.b&&qc(a.b)){oc(a.b,g);d=!0;break}default:if("R"==b.charAt(0)&&(b=+b.charAt(1),0<=b&&6>b)){e.g[b]= +g&65535;break}a.u("unknown register: "+f);return}L(a.J);a.u("updated registers:")}}a.u(dk(a,d));c&&(a.H=W(e.g[7]),Jj(a,rj(a,a.H)))}}function ik(a,b){b=ua(b);var c=b.match(/^(['"])(.*?)\1$/);c?1k[0].indexOf("+"))){var m=k[0]+":";k[2]&&(m+=" "+k[2]);a.u(m)}k[3]&&(g=k[3],f=null);f=Qj(a,b,g,f);a.u(f);a.H=b;e-=b.K-l;c++}}} function Pj(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.u(">> "+b):(a.P&&(a.u("ended assemble at "+rj(a,a.O)),a.H=a.O,a.P=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.S=null;if(tb(a)&&0n||"z"Ha.length&&(a.u("note: only "+Ha.length+" available"),ra=Ha.length);wa-=ra;0>wa&&(null==Ha[Ha.length-1].K?(ra=wa+ra,wa=0):wa+=Ha.length);var Oe=[];"call"==ji&&(rc=1E5,Oe=["CALL"]);for(void 0!==ii&&a.u(ra+" instructions earlier:");0=Ha.length&&(wa=0);a.pa=ra;li++;rc--}}li||(a.u("no "+ki+"history available"),a.pa=void 0)}else{var fa=oj(a,Ga);if(fa)if("da"==Ua){var Pe=fa.Ha||65535K.length?(2hb&&(hb=0);65536Te?String.fromCharCode(Te):"."),xd=xd>>8}jb&&(jb+="\n");jb=Qe?jb+(kb+","):jb+(Ga+": "+kb+(0==wd?" "+Se:""))}jb&&a.u(jb);a.za=fa;a.va=Mk}}}}break;case "e":if("else"==g[0])break;var Kb,Ue,Ve,We,Xe=g[0],Ye=g[1];"eb"== -Xe?(Kb=1,Ue=255,Ve=a.Mc,We=a.Nc):"e"==Xe||"ew"==Xe?(Kb=2,Ue=65535,Ve=a.Na,We=a.yd):Ye=null;if(null==Ye)a.u("edit memory commands:"),a.u("\teb [a] [...] edit bytes at address a"),a.u("\tew [a] [...] edit words at address a");else{var yd=oj(a,Ye);if(yd)for(var zd=2;zdaf;){for(var lb=null,Qk=256;65536>xc.K>>>0;){bf.K=a.Na(xc,2);if(null==xc.K||!Qk--)break;if(!(bf.K&1)){for(var Rk=a,Ad=bf,qi=null,yc=Ad.K,ri=yc,cf=1;6>=cf&&yc;cf++){if(2=Ha.length&&(wa=0);a.pa=ra;li++;rc--}}li||(a.u("no "+ki+"history available"),a.pa=void 0)}else{var fa=oj(a,Ga);if(fa)if("da"==Ua){var Pe=fa.Ka||65535K.length?(2hb&&(hb=0);65536Te?String.fromCharCode(Te):"."),xd=xd>>8}jb&&(jb+="\n");jb=Qe?jb+(kb+","):jb+(Ga+": "+kb+(wd?"":" "+Se))}jb&&a.u(jb);a.Ba=fa;a.xa=Mk}}}}break;case "e":if("else"==g[0])break;var Kb,Ue,Ve,We,Xe=g[0],Ye=g[1];"eb"==Xe? +(Kb=1,Ue=255,Ve=a.Mc,We=a.Nc):"e"==Xe||"ew"==Xe?(Kb=2,Ue=65535,Ve=a.Oa,We=a.yd):Ye=null;if(null==Ye)a.u("edit memory commands:"),a.u("\teb [a] [...] edit bytes at address a"),a.u("\tew [a] [...] edit words at address a");else{var yd=oj(a,Ye);if(yd)for(var zd=2;zdaf;){for(var lb=null,Qk=256;65536>xc.K>>>0;){bf.K=a.Oa(xc,2);if(null==xc.K||!Qk--)break;if(!(bf.K&1)){for(var Rk=a,Ad=bf,qi=null,yc=Ad.K,ri=yc,cf=1;6>=cf&&yc;cf++){if(2\nLicense: GPL version 3 or later ");this.u("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bpk){if(rk(d,this.H)){this.v=new le(this,"1.31.1",Ak);rk(this.v)&&(Bk(this,d),a=Ck,Dk(this.v));this.v.set(xk,za());Ek(this.v);var e=this.b&&!this.C;if(a==yk||Ea("Click OK to restore the previous "+xb+" machine state, or CANCEL to reset the machine.")){if(c=wk(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rk(d,g):("error"==f&&"no machine state"!= -g?(this.N("Error: "+g),"unable to verify user"==g&&(Ma(Fk,""),this.g=null)):this.u(f+": "+g),Dk(d),rk(d)?(c=wk(d),e=!0):c=!1))}e&&uk(this,c?d:null)}else a==Ck&&d.clear()}else uk(this);delete this.H;delete this.J}e=nb(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.A.fa=!0;var d=this.B.power;d&&(d.textContent="Shutdown");this.f&&(Gk(this,this.f,b,c,a),L(this),this.f.Sa());this.M&&(Bk(this,b),b.clear());!c&&this.v&&(this.v.clear(),delete this.v);this.j=0}; +function nk(a,b,c){A.call(this,"Computer",a,0,33554432);this.A.fa=!1;this.O=null;ok(this,b);this.L=Sd(this,"autoPower",a,6);this.j=0;this.T=+a.busWidth||+a.buswidth;this.b=pk;this.H=null;this.R=this.w=this.N=this.C=this.S=!1;this.v=null;this.V=Sd(this,"url")||"";(Math.random()+.1).toString(36);this.g=qk(this);if(this.f=pb("CPU",this.id)){this.F=pb("Debugger",this.id);this.D=new Ec({id:this.lb+".bus",busWidth:this.T},this.f,this.F);var d,e=nb(this.id);if((this.i=pb("Panel",this.id))&&this.i.Pa)for(b= +0;b\nLicense: GPL version 3 or later ");this.u("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bpk){if(rk(d,this.H)){this.v=new le(this,"1.31.1",Ak);rk(this.v)&&(Bk(this,d),a=Ck,Dk(this.v));this.v.set(xk,za());Ek(this.v);var e=this.b&&!this.C;if(a==yk||Ea("Click OK to restore the previous "+xb+" machine state, or CANCEL to reset the machine.")){if(c=wk(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?rk(d,g):("error"==f&&"no machine state"!= +g?(this.M("Error: "+g),"unable to verify user"==g&&(Ma(Fk,""),this.g=null)):this.u(f+": "+g),Dk(d),rk(d)?(c=wk(d),e=!0):c=!1))}e&&uk(this,c?d:null)}else a==Ck&&d.clear()}else uk(this);delete this.H;delete this.I}e=nb(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.A.fa=!0;var d=this.B.power;d&&(d.textContent="Shutdown");this.f&&(Gk(this,this.f,b,c,a),L(this),this.f.Ia());this.N&&(Bk(this,b),b.clear());!c&&this.v&&(this.v.clear(),delete this.v);this.j=0}; function Bk(a,b){if(Ea("There may be a problem with your "+xb+" machine.\n\nTo help us diagnose it, click OK to send this "+xb+" machine state to http://www.pcjs.org.")){var c=a.V;a=a.g||"";b=b.toString();var d={};d.app=xb;d.ver="1.31.1";d.url=c;d.user=a;d.type="bug";d.data=b;Aa("http://www.pcjs.org/api/v1/report",d,!0)}} -function kk(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new le(a,"1.31.1"),g=new le(a,"1.31.1",vk),k=za();g.set(xk,k);f.set(xk,k);f.set(Hk,"1.31.1");f.set(Ik,window?window.location.href:null);f.set(Lk,window?window.navigator.userAgent:"");a.f&&a.f.Aa&&(c&&a.f.Y(),d=a.f.Aa(b,c),"object"===typeof d&&f.set(a.f.id,d),c&&(a.f.A.fa=!1,!1===d&&(e=null)));for(var k=nb(a.id),l=0;l=d||30<=(c.oc+=d))&&(e.textContent=c.A.U?c.mb.toFixed(2)+"Mhz":"Stopped",c.oc=0)}if(a.i&&(a=a.i,b=b||0,a.v)){c=a.f.A.U;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;e=d||30<=(c.oc+=d))&&(e.textContent=c.A.U?c.mb.toFixed(2)+"Mhz":"Stopped",c.oc=0)}if(a.i&&(a=a.i,b=b||0,a.v)){c=a.f.A.U;d=!!(a.f.i&8);if(0>=b||60<=(a.j+=b)){for(e=0;e":62,"?":63,"@":64,hc:65,Ef:66,Gf:67,cg:68,E:69,dg:70,eg:71,fg:72,gg:73,hg:74,ig:75,jg:76,kg:77,lg:78,mg:79,ng:80,Q:81,og:82,pg:83,qg:84,rg:85,sg:86,tg:87,ug:88,vg:89,Uc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,wg:97,xg:98,yg:99,d:100,e:101,Ag:102,Bg:103,Cg:104,Dg:105,Gg:106,k:107,Hg:108,Ig:109,n:110,Jg:111,p:112,q:113,r:114,Kg:115,t:116,Lg:117,Mg:118,Ng:119,x:120,y:121,z:122,"{":123, +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]},q={Gf:0,Gc:1,If:2,Jf:3,Kf:4,Lf:5,Mf:6,Nf:7,ic:8,Of:9,Hc:10,Pf:11,Qf:12,Ic:13,Rf:14,Sf:15,Tf:16,Uf:17,Vf:18,Wf:19,Xf:20,Yf:21,Zf:22,$f:23,ag:24,bg:25,cg: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,hc:65,Ff:66,Hf:67,dg:68,E:69,eg:70,fg:71,gg:72,hg:73,ig:74,jg:75,kg:76,lg:77,mg:78,ng:79,og:80,Q:81,pg:82,qg:83,rg:84,sg:85,tg:86,ug:87,vg:88,wg:89,Uc:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,xg:97,yg:98,zg:99,d:100,e:101,Bg:102,Cg:103,Dg:104,Eg:105,Hg:106,k:107,Ig:108,Jg:109,n:110,Kg:111,p:112,q:113,r:114,Lg:115,t:116,Mg:117,Ng:118,Og:119,x:120,y:121,z:122,"{":123, "|":124,"}":125,"~":126,Jc:127}; function r(a){var b=10,c;if(a){b||(b=10);var d=a.charAt(0),e=0>=3;return""+c}function ka(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} @@ -45,8 +45,8 @@ var oa={"&":"&","<":"<",">":">",'"':""","'":"'"},qa={0:"NUL" function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function v(a,b,c,d){c=void 0===c?!1:c;var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var 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="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function ta(a,b){var c,d={N:null,ea:null,ja:null,ia:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.ja=g.load;d.ia=g.exec;if(e=g.bytes)d.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.ea=g.symbols;d.N.length?1==d.N.length&&(y(d.N[0]),d=null):(y("Empty resource: "+a),d=null)}catch(k){y("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.Z=g.load;d.Y=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.ga=g.symbols;d.N.length?1==d.N.length&&(y(d.N[0]),d=null):(y("Empty resource: "+a),d=null)}catch(k){y("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;ca?this.Ga=this.id:(this.Ha=this.id.substr(0,a),this.Ga=this.id.substr(a+1));this.l={ready:!1,Pa:!1,Xb:!1,R:!1,error:!1};this.zb=null;this.l.error=!1;this.j={};this.Kc=d||0;this.C=this.c=this.s=this.A=this.ab=null;B.push(this)}function Oa(a,b,c){Pa[a]&&b&&(Pa[a][b]=c)}function y(a){z&&z(a)} function C(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.a["S"+a]=[0,0,!1,!1,this.od,a];this.C=this.c=this.s=this.A=null}n($a,A);h=$a.prototype;h.reset=function(){this.stop()}; -h.aa=function(a,b,c,d){if(this.A&&this.A.aa(a,b,c,d)||this.c&&this.c.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.m++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.f[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[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(){bb(a, -b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){cb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){bb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){cb(a,b)}}(this,b),!0):A.prototype.aa.call(this,a,b,c,d)}};h.X=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;db(b,this,eb);fb(b,this.reset.bind(this));gb(this);hb(this)};h.Y=function(a,b){b||(ib(),this.reset());return!0};h.ga=function(){return!0}; +function $a(a,b){A.call(this,"Panel",a,0,512);this.i=this.m=0;this.D=b;this.ja=this.g=this.b=this.h=0;this.u=this.v=this.o=!1;this.w=ab;this.f={};this.a={START:[1,1,!0,!1,this.md],STEP:[1,1,!1,!1,this.nd],ENABLE:[1,1,!1,!1,this.hd],CONT:[1,1,!0,!1,this.fd],DEP:[0,0,!0,!1,this.gd],EXAM:[1,1,!0,!1,this.jd],LOAD:[1,1,!0,!1,this.ld],TEST:[0,0,!0,!1,this.kd]};for(a=0;22>a;a++)this.a["S"+a]=[0,0,!1,!1,this.od,a];this.C=this.c=this.s=this.A=null;H(this)}n($a,A);h=$a.prototype;h.reset=function(){this.stop()}; +h.da=function(a,b,c,d){if(this.A&&this.A.da(a,b,c,d)||this.c&&this.c.da(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.m++,!0;default:return"led"==a||"rled"==a?(this.j[b]=c,this.f[b]=d?1:0,this.m++,!0):"switch"==a?(void 0===this.a[b]&&(this.a[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(){bb(a, +b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){cb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){bb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){cb(a,b)}}(this,b),!0):A.prototype.da.call(this,a,b,c,d)}};h.aa=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;db(b,this,eb);fb(b,this.reset.bind(this));gb(this);hb(this)};h.ba=function(a,b){b||(this.D&&ib(),this.reset());return!0};h.ia=function(){return!0}; function jb(a,b,c){if(a=a.j[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function gb(a,b){for(var c in a.f)jb(a,c,null!=b?b:a.f[c])}function kb(a,b,c){if(a=a.j[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function hb(a){for(var b in a.a)kb(a,b,a.a[b][1])}function lb(a,b,c,d){a.j[b]&&(void 0===c&&(Sa(a,"Value for "+b+" is invalid"),I(a.c)),c=8==(a.C&&a.C.h||8)?ja(c,d):ka(c,d),a.j[b].textContent!=c&&(a.j[b].textContent=c))} function bb(a,b){var c=a.a[b];kb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);b!=mb&&(a.u=b==nb,a.v=b==ob)}function cb(a,b){var c=a.a[b];c[2]&&c[3]&&(kb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.md=function(a){a||this.c.l.P||(a=this.c,a.s.reset(),pb(a),this.a[qb]&&this.a[qb][1]&&rb(this.c))};h.nd=function(){};h.hd=function(a){a||I(this.c)}; -h.fd=function(a){if(!a&&!this.c.l.P)if(this.a[qb]&&this.a[qb][1])rb(this.c);else{a=this.C;var b;if(b=a)a.l.Pa&&(a.l.Xb=!0),b=!a.l.Pa;if(b)Ua(a,!0),a.f(0,null),Ua(a,!1);else try{var c=this.c.Qb(1);0a;a++)this.a["S"+a][1]=0&1<a.c.wa?8:16,c=65472<=a.ha&&a.ha<65472+b,b=c?1:2,c=c?15:a.s.v;a.a[mb]&&a.a[mb][1]||(b=-b);Bb(a,a.ha&~c|a.ha+b&c)}function Bb(a,b){a.ha=b&a.s.v;b=a.ha;for(var c=0;22>c;c++)Db(a,"A"+c,b&1<c;c++)Db(a,"D"+c,b&1<>2;this.f=this.g-1;this.u=this.F/this.g|0;this.L=this.u-1;this.Ba=[];this.m=0;this.o=!1;this.G=[];this.Vc=[Hb,Ib,Jb,Kb];this.a=this.b=[];this.D=this.w=this.i=this.H=this.I=0;a=new J(this);Lb(a);this.a=Array(this.u);this.b=Array(this.u);for(b=0;b>>this.h;this.w=0;this.i=this.v;H(this)}n(Fb,A);function Ob(a,b){if(b!=a.w){for(var c=0;c>>a.h,a.b[a.I]=a.a[a.H])}}h=Fb.prototype;h.reset=function(){for(var a=0;aa;a++)this.a["S"+a][1]=0&1<a.c.xa?8:16,c=65472<=a.ja&&a.ja<65472+b,b=c?1:2,c=c?15:a.s.v;a.a[mb]&&a.a[mb][1]||(b=-b);Bb(a,a.ja&~c|a.ja+b&c)}function Bb(a,b){a.ja=b&a.s.v;b=a.ja;for(var c=0;22>c;c++)Db(a,"A"+c,b&1<c;c++)Db(a,"D"+c,b&1<>2;this.f=this.g-1;this.u=this.F/this.g|0;this.L=this.u-1;this.Ca=[];this.m=0;this.o=!1;this.G=[];this.Vc=[Hb,Ib,Jb,Kb];this.a=this.b=[];this.D=this.w=this.i=this.H=this.I=0;a=new J(this);Lb(a);this.a=Array(this.u);this.b=Array(this.u);for(b=0;b>>this.h;this.w=0;this.i=this.v;H(this)}n(Fb,A);function Ob(a,b){if(b!=a.w){for(var c=0;c>>a.h,a.b[a.I]=a.a[a.H])}}h=Fb.prototype;h.reset=function(){for(var a=0;a>>a.h;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Oa)return l.tb+=l.Oa-f,l.Oa=f,!0;if(f>=l.Oa+l.tb){p=l.size-(f-m);p>g&&(p=g);l.tb=f-l.Oa+p;f=m+a.g;g-=p;k++;continue}}return Pb(Qb,f,g)}f=new J(a,f,p,a.g,d,e);Lb(f,l);a.a[k++]=f;f=m+a.g;g-=p}return 0>=g?(a.status((c>>10)+"Kb "+Rb[d]+" at "+ja(b)),!0):Pb(Sb,b,c)}h.Ec=function(a){return this.b[(a&this.i)>>>this.h].fb(a&this.f,a)}; h.vb=function(a){var b=a&this.f,c=(a&this.i)>>>this.h;return Ya||b!=this.f?this.b[c].W(b,a):this.b[c++].fb(b,a)|this.b[c&this.L].fb(0,a+1)<<8};h.Fc=function(a,b){this.b[(a&this.i)>>>this.h].ib(a&this.f,b,a)};h.wb=function(a,b){var c=a&this.f,d=(a&this.i)>>>this.h;Ya||c!=this.f?this.b[d].lb(c,b,a):(this.b[d++].ib(c,b&255,a),this.b[d&this.L].ib(0,b>>8&255,a+1))};function Tb(a,b){return a.a[(b&a.v)>>>a.h]} function Ab(a,b){var c;a.o=!1;a.m++;var d=b&a.f,e=Tb(a,b);Ya||d!=a.f?c=e.C(d,b):c=e.i(d,b)|Tb(a,b+1).i(0,b+1)<<8;a.m--;return c}function Ub(a,b,c){a.o=!1;a.m++;Tb(a,b).j(b&a.f,c&255,b);a.m--}function yb(a,b,c){a.o=!1;a.m++;var d=b&a.f,e=Tb(a,b);Ya||d!=a.f?e.m(d,c&65535,b):(e.j(d,c&255,b),Tb(a,b+1).j(0,c>>8&255,b+1));a.m--} -function Vb(a){for(var b=0,c=[],d=0;da.c.wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var t=g[4],x=g[5]||1,w=0;w>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;K(d,b,16);return 255} -function Ib(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||K(e,c,16)}function Jb(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;K(d,b,16);return 65535} -function Kb(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||K(e,c,16)}function M(a){A.call(this,"Device",a,0,256);this.a={zg:0,bc:-1}}n(M,A);h=M.prototype;h.X=function(a,b,c,d){this.s=b;this.A=a;this.c=c;this.C=d;var e=this;this.a.bc=ac(c,function(){e.a.cb|=128;e.a.cb&64&&bc(e.c,e.a.Da);e.A&&vb(e.A,1);cc(e.c,e.a.bc,1E3/60)});this.a.Da=ec(c,64,6,524288);db(b,this,fc);fb(b,this.reset.bind(this));H(this)}; -h.reset=function(){this.a.cb=128;cc(this.c,this.a.bc,1E3/60,!0)};h.Ad=function(){return this.a.cb};h.Ke=function(a){this.a.cb=a&192;this.a.cb&64||(a=this.a.Da)&&gc(this.c,a)};h.Cd=function(){var a=this.c,b=a.H;b&57344||(b=b&-3199|a.Wa<<5|a.Xa<<1);return b};h.Me=function(a){hc(this.c,a&-129|this.c.H&128)};h.Dd=function(){var a=this.c;a.H&57344||(a.qb=a.F>>16&65535);a=a.qb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ed=function(){var a=this.c;a.H&57344||(a.rb=a.F&65535);return a.rb};h.Fd=function(){return this.c.na}; -h.Ne=function(a){var b=this.c;1170>b.wa&&(a&=-49);b.na!=a&&(b.na=a,b.Ka=a&16?4194303:262143,ic(b))};h.me=function(a){a=a>>1&63;var b=this.c.Na[a>>1];return a&1?b>>16:b&65535};h.wf=function(a,b){b=b>>1&63;var c=b>>1;this.c.Na[c]=b&1?this.c.Na[c]&65535|(a&63)<<16:this.c.Na[c]&-65536|a&65534};h.fe=function(a){return this.c.u[1][a>>1&7]};h.pf=function(a,b){this.c.u[1][b>>1&7]=a&65295};h.de=function(a){return this.c.u[1][(a>>1&7)+8]};h.mf=function(a,b){this.c.u[1][(b>>1&7)+8]=a&65295}; -h.ee=function(a){return this.c.I[1][a>>1&7]};h.nf=function(a,b){b=b>>1&7;this.c.I[1][b]=a;this.c.u[1][b]&=65295};h.ce=function(a){return this.c.I[1][(a>>1&7)+8]};h.lf=function(a,b){b=(b>>1&7)+8;this.c.I[1][b]=a;this.c.u[1][b]&=65295};h.zd=function(a){return this.c.u[0][a>>1&7]};h.Je=function(a,b){this.c.u[0][b>>1&7]=a&65295};h.xd=function(a){return this.c.u[0][(a>>1&7)+8]};h.He=function(a,b){this.c.u[0][(b>>1&7)+8]=a&65295};h.yd=function(a){return this.c.I[0][a>>1&7]}; -h.Ie=function(a,b){b=b>>1&7;this.c.I[0][b]=a;this.c.u[0][b]&=65295};h.wd=function(a){return this.c.I[0][(a>>1&7)+8]};h.Ge=function(a,b){b=(b>>1&7)+8;this.c.I[0][b]=a;this.c.u[0][b]&=65295};h.le=function(a){return this.c.u[3][a>>1&7]};h.vf=function(a,b){this.c.u[3][b>>1&7]=a&65295};h.je=function(a){return this.c.u[3][(a>>1&7)+8]};h.tf=function(a,b){this.c.u[3][(b>>1&7)+8]=a&65295};h.ke=function(a){return this.c.I[3][a>>1&7]};h.uf=function(a,b){b=b>>1&7;this.c.I[3][b]=a;this.c.u[3][b]&=65295}; -h.ie=function(a){return this.c.I[3][(a>>1&7)+8]};h.sf=function(a,b){b=(b>>1&7)+8;this.c.I[3][b]=a;this.c.u[3][b]&=65295};h.gb=function(a){a&=7;return this.c.i&2048?this.c.ta[a]:this.c.b[a]};h.jb=function(a,b){b&=7;this.c.i&2048?this.c.ta[b]=a:this.c.b[b]=a};h.Kd=function(){return this.c.i&49152?this.c.da[0]:this.c.b[6]};h.Se=function(a){this.c.i&49152?this.c.da[0]=a:this.c.b[6]=a};h.Nd=function(){return this.c.b[7]};h.Ve=function(a){this.c.b[7]=a}; -h.hb=function(a){a&=7;return this.c.i&2048?this.c.b[a]:this.c.ta[a]};h.kb=function(a,b){b&=7;this.c.i&2048?this.c.b[b]=a:this.c.ta[b]=a};h.Ld=function(){return 1==(this.c.i&49152)>>14?this.c.b[6]:this.c.da[1]};h.Te=function(a){1==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.da[1]=a};h.Md=function(){return 3==(this.c.i&49152)>>14?this.c.b[6]:this.c.da[3]};h.Ue=function(a){3==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.da[3]=a};h.vd=function(a){return this.c.Nb[a-65504>>1]}; -h.Fe=function(a,b){this.c.Nb[b-65504>>1]=a};h.zc=function(a){return 65520==a?(Wb(this.s)>>6)-1:0};h.Cc=function(){};h.he=function(){return 1};h.rf=function(){};h.ud=function(){return this.c.G};h.Ee=function(){this.c.G=0};h.Bd=function(){return this.c.Mb};h.Le=function(a,b){b&1||(a&=255);this.c.Mb=a};h.Gd=function(a,b){return b?0:this.c.bb};h.Oe=function(a){var b=this.c;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.g|=1}b.bb=a};h.ge=function(a,b){return b?0:this.c.Ma&65280}; -h.qf=function(a){this.c.Ma=a|255};h.Jd=function(){return jc(this.c)};h.Re=function(a){kc(this.c,a)};h.Bc=function(){}; -var N={},fc=(N[61568]=[null,null,M.prototype.me,M.prototype.wf,"UNIMAP",64,1170],N[62592]=[null,null,M.prototype.fe,M.prototype.pf,"SIPDR",8,1145,64],N[62608]=[null,null,M.prototype.de,M.prototype.mf,"SDPDR",8,1145,64],N[62624]=[null,null,M.prototype.ee,M.prototype.nf,"SIPAR",8,1145,64],N[62640]=[null,null,M.prototype.ce,M.prototype.lf,"SDPAR",8,1145,64],N[62656]=[null,null,M.prototype.zd,M.prototype.Je,"KIPDR",8,1145,64],N[62672]=[null,null,M.prototype.xd,M.prototype.He,"KDPDR",8,1145,64],N[62688]= -[null,null,M.prototype.yd,M.prototype.Ie,"KIPAR",8,1145,64],N[62704]=[null,null,M.prototype.wd,M.prototype.Ge,"KDPAR",8,1145,64],N[62798]=[null,null,M.prototype.Fd,M.prototype.Ne,"MMR3",1,1145,64],N[65382]=[null,null,M.prototype.Ad,M.prototype.Ke,"LKS"],N[65402]=[null,null,M.prototype.Cd,M.prototype.Me,"MMR0",1,1145,64],N[65404]=[null,null,M.prototype.Dd,M.prototype.Bc,"MMR1",1,1145,64],N[65406]=[null,null,M.prototype.Ed,M.prototype.Bc,"MMR2",1,1145,64],N[65408]=[null,null,M.prototype.le,M.prototype.vf, -"UIPDR",8,1145,64],N[65424]=[null,null,M.prototype.je,M.prototype.tf,"UDPDR",8,1145,64],N[65440]=[null,null,M.prototype.ke,M.prototype.uf,"UIPAR",8,1145,64],N[65456]=[null,null,M.prototype.ie,M.prototype.sf,"UDPAR",8,1145,64],N[65472]=[null,null,M.prototype.gb,M.prototype.jb,"R0SET0"],N[65473]=[null,null,M.prototype.gb,M.prototype.jb,"R1SET0"],N[65474]=[null,null,M.prototype.gb,M.prototype.jb,"R2SET0"],N[65475]=[null,null,M.prototype.gb,M.prototype.jb,"R3SET0"],N[65476]=[null,null,M.prototype.gb, -M.prototype.jb,"R4SET0"],N[65477]=[null,null,M.prototype.gb,M.prototype.jb,"R5SET0"],N[65478]=[null,null,M.prototype.Kd,M.prototype.Se,"R6KERNEL"],N[65479]=[null,null,M.prototype.Nd,M.prototype.Ve,"R7KERNEL"],N[65480]=[null,null,M.prototype.hb,M.prototype.kb,"R0SET1",1,1145],N[65481]=[null,null,M.prototype.hb,M.prototype.kb,"R1SET1",1,1145],N[65482]=[null,null,M.prototype.hb,M.prototype.kb,"R2SET1",1,1145],N[65483]=[null,null,M.prototype.hb,M.prototype.kb,"R3SET1",1,1145],N[65484]=[null,null,M.prototype.hb, -M.prototype.kb,"R4SET1",1,1145],N[65485]=[null,null,M.prototype.hb,M.prototype.kb,"R5SET1",1,1145],N[65486]=[null,null,M.prototype.Ld,M.prototype.Te,"R6SUPER",1,1145],N[65487]=[null,null,M.prototype.Md,M.prototype.Ue,"R6USER",1,1145],N[65504]=[null,null,M.prototype.vd,M.prototype.Fe,"CTRL",8,1170],N[65520]=[null,null,M.prototype.zc,M.prototype.Cc,"LSIZE",1,1170],N[65522]=[null,null,M.prototype.zc,M.prototype.Cc,"HSIZE",1,1170],N[65524]=[null,null,M.prototype.he,M.prototype.rf,"SYSID",1,1170],N[65526]= -[null,null,M.prototype.ud,M.prototype.Ee,"ERR",1,1170],N[65528]=[null,null,M.prototype.Bd,M.prototype.Le,"MBR",1,1170],N[65530]=[null,null,M.prototype.Gd,M.prototype.Oe,"PIR"],N[65532]=[null,null,M.prototype.ge,M.prototype.qf,"SLR"],N[65534]=[null,null,M.prototype.Jd,M.prototype.Re,"PSW"],N); +function Vb(a){for(var b=0,c=[],d=0;da.c.xa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null;65472<=f&&65487>=f&&(!k&&m&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var t=g[4],x=g[5]||1,w=0;w>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;K(d,b,16);return 255} +function Ib(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||K(e,c,16)}function Jb(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;K(d,b,16);return 65535} +function Kb(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||K(e,c,16)}function M(a){A.call(this,"Device",a,0,256);this.a={Ag:0,bc:-1}}n(M,A);h=M.prototype;h.aa=function(a,b,c,d){this.s=b;this.A=a;this.c=c;this.C=d;var e=this;this.a.bc=ac(c,function(){e.a.cb|=128;e.a.cb&64&&bc(e.c,e.a.Da);e.A&&vb(e.A,1);cc(e.c,e.a.bc,1E3/60)});this.a.Da=ec(c,64,6,524288);db(b,this,fc);fb(b,this.reset.bind(this));H(this)}; +h.reset=function(){this.a.cb=128;cc(this.c,this.a.bc,1E3/60,!0)};h.Ad=function(){return this.a.cb};h.Le=function(a){this.a.cb=a&192;this.a.cb&64||(a=this.a.Da)&&gc(this.c,a)};h.Cd=function(){var a=this.c,b=a.H;b&57344||(b=b&-3199|a.Wa<<5|a.Xa<<1);return b};h.Ne=function(a){hc(this.c,a&-129|this.c.H&128)};h.Dd=function(){var a=this.c;a.H&57344||(a.qb=a.F>>16&65535);a=a.qb;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ed=function(){var a=this.c;a.H&57344||(a.rb=a.F&65535);return a.rb};h.Fd=function(){return this.c.oa}; +h.Oe=function(a){var b=this.c;1170>b.xa&&(a&=-49);b.oa!=a&&(b.oa=a,b.Ka=a&16?4194303:262143,ic(b))};h.me=function(a){a=a>>1&63;var b=this.c.Na[a>>1];return a&1?b>>16:b&65535};h.xf=function(a,b){b=b>>1&63;var c=b>>1;this.c.Na[c]=b&1?this.c.Na[c]&65535|(a&63)<<16:this.c.Na[c]&-65536|a&65534};h.fe=function(a){return this.c.u[1][a>>1&7]};h.qf=function(a,b){this.c.u[1][b>>1&7]=a&65295};h.de=function(a){return this.c.u[1][(a>>1&7)+8]};h.nf=function(a,b){this.c.u[1][(b>>1&7)+8]=a&65295}; +h.ee=function(a){return this.c.I[1][a>>1&7]};h.pf=function(a,b){b=b>>1&7;this.c.I[1][b]=a;this.c.u[1][b]&=65295};h.ce=function(a){return this.c.I[1][(a>>1&7)+8]};h.mf=function(a,b){b=(b>>1&7)+8;this.c.I[1][b]=a;this.c.u[1][b]&=65295};h.zd=function(a){return this.c.u[0][a>>1&7]};h.Ke=function(a,b){this.c.u[0][b>>1&7]=a&65295};h.xd=function(a){return this.c.u[0][(a>>1&7)+8]};h.Ie=function(a,b){this.c.u[0][(b>>1&7)+8]=a&65295};h.yd=function(a){return this.c.I[0][a>>1&7]}; +h.Je=function(a,b){b=b>>1&7;this.c.I[0][b]=a;this.c.u[0][b]&=65295};h.wd=function(a){return this.c.I[0][(a>>1&7)+8]};h.He=function(a,b){b=(b>>1&7)+8;this.c.I[0][b]=a;this.c.u[0][b]&=65295};h.le=function(a){return this.c.u[3][a>>1&7]};h.wf=function(a,b){this.c.u[3][b>>1&7]=a&65295};h.je=function(a){return this.c.u[3][(a>>1&7)+8]};h.uf=function(a,b){this.c.u[3][(b>>1&7)+8]=a&65295};h.ke=function(a){return this.c.I[3][a>>1&7]};h.vf=function(a,b){b=b>>1&7;this.c.I[3][b]=a;this.c.u[3][b]&=65295}; +h.ie=function(a){return this.c.I[3][(a>>1&7)+8]};h.tf=function(a,b){b=(b>>1&7)+8;this.c.I[3][b]=a;this.c.u[3][b]&=65295};h.gb=function(a){a&=7;return this.c.i&2048?this.c.ua[a]:this.c.b[a]};h.jb=function(a,b){b&=7;this.c.i&2048?this.c.ua[b]=a:this.c.b[b]=a};h.Kd=function(){return this.c.i&49152?this.c.fa[0]:this.c.b[6]};h.Te=function(a){this.c.i&49152?this.c.fa[0]=a:this.c.b[6]=a};h.Nd=function(){return this.c.b[7]};h.We=function(a){this.c.b[7]=a}; +h.hb=function(a){a&=7;return this.c.i&2048?this.c.b[a]:this.c.ua[a]};h.kb=function(a,b){b&=7;this.c.i&2048?this.c.b[b]=a:this.c.ua[b]=a};h.Ld=function(){return 1==(this.c.i&49152)>>14?this.c.b[6]:this.c.fa[1]};h.Ue=function(a){1==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.fa[1]=a};h.Md=function(){return 3==(this.c.i&49152)>>14?this.c.b[6]:this.c.fa[3]};h.Ve=function(a){3==(this.c.i&49152)>>14?this.c.b[6]=a:this.c.fa[3]=a};h.vd=function(a){return this.c.Nb[a-65504>>1]}; +h.Ge=function(a,b){this.c.Nb[b-65504>>1]=a};h.zc=function(a){return 65520==a?(Wb(this.s)>>6)-1:0};h.Cc=function(){};h.he=function(){return 1};h.sf=function(){};h.ud=function(){return this.c.G};h.Fe=function(){this.c.G=0};h.Bd=function(){return this.c.Mb};h.Me=function(a,b){b&1||(a&=255);this.c.Mb=a};h.Gd=function(a,b){return b?0:this.c.bb};h.Pe=function(a){var b=this.c;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1);b.g|=1}b.bb=a};h.ge=function(a,b){return b?0:this.c.Ma&65280}; +h.rf=function(a){this.c.Ma=a|255};h.Jd=function(){return jc(this.c)};h.Se=function(a){kc(this.c,a)};h.Bc=function(){}; +var N={},fc=(N[61568]=[null,null,M.prototype.me,M.prototype.xf,"UNIMAP",64,1170],N[62592]=[null,null,M.prototype.fe,M.prototype.qf,"SIPDR",8,1145,64],N[62608]=[null,null,M.prototype.de,M.prototype.nf,"SDPDR",8,1145,64],N[62624]=[null,null,M.prototype.ee,M.prototype.pf,"SIPAR",8,1145,64],N[62640]=[null,null,M.prototype.ce,M.prototype.mf,"SDPAR",8,1145,64],N[62656]=[null,null,M.prototype.zd,M.prototype.Ke,"KIPDR",8,1145,64],N[62672]=[null,null,M.prototype.xd,M.prototype.Ie,"KDPDR",8,1145,64],N[62688]= +[null,null,M.prototype.yd,M.prototype.Je,"KIPAR",8,1145,64],N[62704]=[null,null,M.prototype.wd,M.prototype.He,"KDPAR",8,1145,64],N[62798]=[null,null,M.prototype.Fd,M.prototype.Oe,"MMR3",1,1145,64],N[65382]=[null,null,M.prototype.Ad,M.prototype.Le,"LKS"],N[65402]=[null,null,M.prototype.Cd,M.prototype.Ne,"MMR0",1,1145,64],N[65404]=[null,null,M.prototype.Dd,M.prototype.Bc,"MMR1",1,1145,64],N[65406]=[null,null,M.prototype.Ed,M.prototype.Bc,"MMR2",1,1145,64],N[65408]=[null,null,M.prototype.le,M.prototype.wf, +"UIPDR",8,1145,64],N[65424]=[null,null,M.prototype.je,M.prototype.uf,"UDPDR",8,1145,64],N[65440]=[null,null,M.prototype.ke,M.prototype.vf,"UIPAR",8,1145,64],N[65456]=[null,null,M.prototype.ie,M.prototype.tf,"UDPAR",8,1145,64],N[65472]=[null,null,M.prototype.gb,M.prototype.jb,"R0SET0"],N[65473]=[null,null,M.prototype.gb,M.prototype.jb,"R1SET0"],N[65474]=[null,null,M.prototype.gb,M.prototype.jb,"R2SET0"],N[65475]=[null,null,M.prototype.gb,M.prototype.jb,"R3SET0"],N[65476]=[null,null,M.prototype.gb, +M.prototype.jb,"R4SET0"],N[65477]=[null,null,M.prototype.gb,M.prototype.jb,"R5SET0"],N[65478]=[null,null,M.prototype.Kd,M.prototype.Te,"R6KERNEL"],N[65479]=[null,null,M.prototype.Nd,M.prototype.We,"R7KERNEL"],N[65480]=[null,null,M.prototype.hb,M.prototype.kb,"R0SET1",1,1145],N[65481]=[null,null,M.prototype.hb,M.prototype.kb,"R1SET1",1,1145],N[65482]=[null,null,M.prototype.hb,M.prototype.kb,"R2SET1",1,1145],N[65483]=[null,null,M.prototype.hb,M.prototype.kb,"R3SET1",1,1145],N[65484]=[null,null,M.prototype.hb, +M.prototype.kb,"R4SET1",1,1145],N[65485]=[null,null,M.prototype.hb,M.prototype.kb,"R5SET1",1,1145],N[65486]=[null,null,M.prototype.Ld,M.prototype.Ue,"R6SUPER",1,1145],N[65487]=[null,null,M.prototype.Md,M.prototype.Ve,"R6USER",1,1145],N[65504]=[null,null,M.prototype.vd,M.prototype.Ge,"CTRL",8,1170],N[65520]=[null,null,M.prototype.zc,M.prototype.Cc,"LSIZE",1,1170],N[65522]=[null,null,M.prototype.zc,M.prototype.Cc,"HSIZE",1,1170],N[65524]=[null,null,M.prototype.he,M.prototype.sf,"SYSID",1,1170],N[65526]= +[null,null,M.prototype.ud,M.prototype.Fe,"ERR",1,1170],N[65528]=[null,null,M.prototype.Bd,M.prototype.Me,"MBR",1,1170],N[65530]=[null,null,M.prototype.Gd,M.prototype.Pe,"PIR"],N[65532]=[null,null,M.prototype.ge,M.prototype.rf,"SLR"],N[65534]=[null,null,M.prototype.Jd,M.prototype.Se,"PSW"],N); Ga(function(){for(var a=G(document,F,"device"),b=0;b>1),this.c=new Int32Array(this.f,0,this.size>>2),pc(this,qc?rc:sc);else{a=this.c=Array(this.size>>2);for(f=0;f>2),b=0;b>8,c)};h.sd=function(a){return this.c[a>>2]>>>((a&3)<<3)&255};h.re=function(a,b){Xa&&a&1&&K(this.b,b,64);b=a>>2;a=(a&3)<<3;var c=this.c[b]>>a;return 24>a?c&65535:c&255|(this.c[b+1]&255)<<8}; -h.Ce=function(a,b){var c=a>>2;a=(a&3)<<3;this.c[c]=this.c[c]&~(255<>2;a=(a&3)<<3;24>a?this.c[c]=this.c[c]&~(65535<>8);this.ua=!0};h.qd=function(a,b){return this.i(a,b)};h.oe=function(a,b){return this.C(a,b)};h.Ae=function(a,b,c){this.A?this.ub(0,0,c):this.j(a,b,c)};h.yf=function(a,b,c){this.A?this.ub(0,0,c):this.m(a,b,c)};h.pd=function(a){return this.a[a]}; -h.rd=function(a){return this.a[a]};h.ne=function(a,b){Xa&&a&1&&K(this.b,b,64);return this.h.getUint16(a,!0)};h.qe=function(a,b){Xa&&a&1&&K(this.b,b,64);return!Ya&&a&1?this.a[a]|this.a[a+1]<<8:this.o[a>>1]};h.ze=function(a,b){this.a[a]=b;this.ua=!0};h.Be=function(a,b){this.a[a]=b;this.ua=!0};h.xf=function(a,b,c){Xa&&a&1&&K(this.b,c,64);this.h.setUint16(a,b,!0);this.ua=!0};h.zf=function(a,b,c){Xa&&a&1&&K(this.b,c,64);!Ya&&a&1?(this.a[a]=b,this.a[a+1]=b>>8):this.o[a>>1]=b;this.ua=!0}; -var nc=0,Xb=1,oc=2,Nb=4,Rb=["NONE","RAM","ROM","VID","H/W"],mc=0,uc=[],tc=[J.prototype.sd,J.prototype.Ce,J.prototype.re,J.prototype.Af],yc=[J.prototype.qd,J.prototype.Ae,J.prototype.oe,J.prototype.yf];if(Va)var sc=[J.prototype.pd,J.prototype.ze,J.prototype.ne,J.prototype.xf],rc=[J.prototype.rd,J.prototype.Be,J.prototype.qe,J.prototype.zf];var zc;if(Va){var Ac=new ArrayBuffer(2);(new DataView(Ac)).setUint16(0,256,!0);zc=256===(new Uint16Array(Ac))[0]}else zc=!1;var qc=zc; -function Bc(a,b){A.call(this,"CPU",a,0,1);b=a.cycles||b;var c=a.multiplier||1;this.ec=0;this.Jb=b;this.La=c;this.Tb=Math.round(this.Jb/1E4)/100;this.Va=this.Tb*this.La;this.Ub=this.pb=this.Ya=this.Kb=0;this.l.P=!1;this.l.ac=!1;this.l.Ca=a.autoStart;this.l.xb=!1;this.Fb=this.Ta=0;this.Gb=a.csStart;this.nb=a.csInterval;this.ob=a.csStop;this.pa=[];this.pc=this.ve.bind(this);this.za=this.sa=this.ya=this.a=this.S=this.ra=this.mb=this.xa=this.Za=this.Vb=this.Ia=0;this.la=null;H(this)}n(Bc,A);h=Bc.prototype; -h.X=function(a,b,c,d){this.A=a;this.s=b;this.C=d;this.la=a.f;for(a=0;a=a.Ta&&(a.Ta+=a.nb,c=!0);0<=a.ob&&a.ob<=Gc(a)&&(a.nb=a.ob=-1,Fc(a),I(a),c=!0);c&&a.V(Gc(a)+" cycles: checksum="+ka(a.Fb))}} -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.A)if(a=d.A,a.l.R)a=!0;else{var b=null,c,k=C(a.id);for(c=0;ca.Ia/a.Va&&(b=1);a.La=b;b=a.Tb*a.La;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.V("target speed: "+b)}c&&a.A&&Kc(a.A)}tb(a,a.sa);a.sa=0;a.ra=ra();a.xa=0;Ic(a)}function ac(a,b){var c=a.pa.length;a.pa.push([-1,b]);return c}function cc(a,b,c,d){0<=b&&ba.pa[b][0])&&(c=a.Jb*a.La/1E3*c|0,a.l.P&&(c+=Lc(a)),a.pa[b][0]=c)} -function sb(a,b){for(var c=a.pa.length-1;0<=c;c--){var d=a.pa[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Lc(a,b){var c=a.ya-=a.a;a.a=a.S=0;b&&(a.ya=0);return c} -h.ve=function(){if(this.l.P){this.Kb>=this.Jb&&Ic(this,!0);this.Za=0;this.mb=ra();if(this.xa){var a=this.mb-this.xa;a>this.Ub&&(this.ra+=a,this.ra>this.mb&&(this.ra=this.mb))}try{do{for(var b,c=this.l.xb?1:this.pb,d=this.pa.length-1;0<=d;d--){var e=this.pa[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Qb(b)}catch(f){if("number"!=typeof f)throw f;}b=Lc(this,!0);this.Za+=b;this.sa+=b;ub(this,b);sb(this,b);this.Ya-=b;if(0>=this.Ya){this.Ya+=this.pb;++this.Vb>=Mc&&(this.A&&vb(this.A,void 0),this.Vb=0);break}}while(this.l.P)}catch(f){I(this); -this.A&&this.A.stop(ra(),Gc(this));Sa(this,f.stack||f.message);return}if(this.l.P){a=setTimeout;b=this.pc;this.xa=ra();c=this.Ub;this.Za&&(c=Math.round(c*this.Za/this.pb));c-=this.xa-this.mb;if(d=this.xa-this.ra)this.Ia=Math.round(this.sa/(10*d))/100,864E5<=d&&(this.za=0,Hc(this));if(0>c||this.Iac&&(this.ra-=c),c=0;this.Kb+=this.Za;this.xa+=c;a(b,c)}}}; -function rb(a){var b;a.l.error?(a.V(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.P)a.V(a.toString()+" busy");else{Hc(a);a.l.P=!0;a.l.ac=!0;if(b=a.j.run)b.textContent="Halt";a.A&&a.A.start(a.ra,Gc(a));a.C||a.status("Started");setTimeout(a.pc,0)}}h.Qb=function(){return 0};function I(a){var b=!1;if(a.l.P){Lc(a);tb(a,a.sa);a.sa=0;a.l.P=!1;if(b=a.j.run)b.textContent="Run";a.A&&a.A.stop(ra(),Gc(a));b=!0;a.C||a.status("Stopped")}a.l.complete=void 0;return b}var Jc=30,Mc=15,Cc=["power","reset"]; -function Nc(a){var b=+a.model||1170;Bc.call(this,a,6666667);this.wa=b;this.lc=a.addrReset||0;this.i=this.v=this.m=this.o=this.w=0;this.b=this.ta=this.da=[];this.D=0;this.nc=[];this.u=this.I=this.Na=this.Nb=[];this.Lb=this.Fa=this.F=this.kc=this.Ja=this.Wa=this.Xa=this.Ka=this.G=this.bb=this.Ma=this.H=this.qb=this.rb=this.na=this.Aa=this.h=this.f=this.Eb=this.K=this.L=this.g=this.Mb=0;this.oc=255;1120>=this.wa?(this.jc=Oc.bind(this),this.Ua=this.Zc,this.Lb=8,this.oc=-1,this.rc=255,this.qc=0):(this.jc= -Pc.bind(this),this.Ua=this.$c,this.rc=~(1792|(1145>this.wa?2048:0))&65535,this.qc=1145<=this.wa?2048:0);this.$a=0;this.ca=null;this.Sb=[];this.l.complete=!1;this.Bb=this.fc=this.bd;this.Cb=this.gc=this.dd;this.Ob=this.Pb=this.xe;this.Db=this.Rb=this.ye;this.qa=this.Ab=0;this.ma=this.xc;this.W=this.Ac;this.lb=this.Dc;this.Tc=this.Sc=0}n(Nc,Bc);h=Nc.prototype;h.X=function(a,b,c,d){Bc.prototype.X.call(this,a,b,c,d);this.fc=b.Ec.bind(b);this.gc=b.vb.bind(b);this.Pb=b.Fc.bind(b);this.Rb=b.wb.bind(b)}; -h.Y=function(a,b){for(var c=192,d=0;de.cc&&(e.cc=c,c+=4)}return Bc.prototype.Y.call(this,a,b)}; -h.reset=function(){this.status("Model "+this.wa);this.l.P&&I(this);this.v=65536;this.m=32768;this.o=65535;this.w=32768;this.i=15;this.b=[0,0,0,0,0,0,0,this.lc,-1,-2,-3,-4,-5,-6,-7,-8];this.ta=[0,0,0,0,0,0];this.da=[0,0,0,0];this.D=0;this.nc=[4,2,0,1];this.u=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], -[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Na=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Nb=[0,0,0,0,0,0,0,0];this.h=this.f=this.Eb=this.K=this.L=this.g=this.Mb=0;this.Aa=-1;pb(this);Ec(this);this.l.error=!1;Bc.prototype.reset.call(this)};function pb(a){a.H=0;a.qb=0;a.rb=0;a.na=0;a.G=0;a.bb=0;a.Ma=255;a.Ja=0;a.Wa=0;a.Xa=0;a.Ka=262143;a.Fa=a.b[7];a.F=0;a.ca=null;a.s&&(ic(a),a.kc=Wb(a.s))} -function ic(a){a.Bb=a.fc;a.Cb=a.gc;a.Ob=a.Pb;a.Db=a.Rb;a.Ja?(a.qa=65536,a.Ab=a.na&16?4186112:253952,a.ma=a.xc,a.W=a.Ac,a.lb=a.Dc,Ob(a.s,a.na&16?22:18)):(a.qa=0,a.Ab=57344,a.ma=a.cd,a.W=a.pe,a.lb=a.Bf,Ob(a.s,16))}function hc(a,b){b&=-3073;if(a.H!=b){b&57344&&!(a.H&57344)&&(a.qb=a.F>>16&65535,a.rb=a.F&65535);a.H=b;a.Wa=(b&96)>>5;a.Xa=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Ja!=c&&(a.Ja=c,ic(a))}} -function Qc(a,b,c){a.lc=b;a.s.reset();pb(a);Q(a,b);kc(a,0);if(c){for(b=2;5>=b;b++)a.b[b]=0;a.l.P||rb(a)}else a.C?I(a)||a.C.g():!1===c&&I(a);!a.l.P&&a.la&&a.la.stop()}h.wc=function(){return 0};h.save=function(){var a=new R(this);a.set(0,[this.b,this.ta,this.da,this.Na,this.Nb,this.G,this.Mb,this.bb,this.Ma,jc(this),this.Aa,this.D,this.g,this.H,this.qb,this.rb,this.na,this.Wa,this.Xa,this.u,this.I,this.Ja,this.Ka,this.Fa,this.F]);a.set(1,[this.za,this.La]);a.set(2,Vb(this.s));return a.data()}; -h.restore=function(a){var b=a[1];this.za=b[1];Hc(this,b[3]);a:{b=this.s;a=a[2];var c;for(c=0;c>23)),a.a-=2);a.a-=3}function Q(a,b){a.b[7]=b&65535}function ec(a,b,c,d){c={cc:b,eb:c,message:d||0,next:null};c.name=Za[b];a.Sb.push(c);return c}function gc(a,b){var c=a.ca;if(c==b)a.ca=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.ca&&(a.g|=1)}function bc(a,b){if(b){if(b!=a.ca){var c=a.ca;if(!c||c.eb<=b.eb)b.next=c,a.ca=b;else{do{var d=c.next;if(!d||d.eb<=b.eb){b.next=d;c.next=b;break}c=d}while(c)}}a.g|=1}} -function Uc(a){return a.g&64?(L(a,168,64,-6),!0):a.g&32?(L(a,4,32,-5),!0):a.g&16?(L(a,12,16,-7),!0):!1}function jc(a){return a.i=a.i&63728|Sc(a)|(a.o&65535?0:4)|(a.m&32768?2:0)|Rc(a)}function kc(a,b){b&=a.rc;a.w=b<<12;a.o=~b&4;a.m=b<<14;a.v=b<<16;if((b^a.i)&a.qc)for(var c=a.ta.length;0<=--c;){var d=a.b[c];a.b[c]=a.ta[c];a.ta[c]=d}a.D=b>>14&3;c=a.i>>14&3;a.D!=c&&(a.da[c]=a.b[6],a.b[6]=a.da[a.D]);a.i=b;a.g&=-3;a.g|=a.ca?2:1}h.ba=function(a){this.w=this.o=a;this.m=0}; -h.Ea=function(a,b){this.w=this.o=this.v=a;this.m=b||0};function Vc(a,b){a.w=a.o=a.v=b;a.m=a.w^a.v>>1}function Wc(a,b,c,d){a.w=a.o=a.v=b;a.m=(c^d)&(d^b)}function L(a,b,c,d){if(!a.$a){0>a.Aa?a.Aa=jc(a):a.D||(d=-4);-4==d&&(a.g&256&&(d=-1),a.g|=256,a.G|=4,a.b[6]=b=4);if(-1!=d){a.F=b|4143316992;a.D=0;var e=a.W(b|a.qa),f=a.W(b+2&65535|a.qa);kc(a,f&-12289|a.Aa>>2&12288);Xc(a,a.Aa);Xc(a,a.b[7]);Q(a,e)}a.a-=5;a.g&=~(c|19);a.g|=129;a.Aa=-1;a.Tc=b;a.Sc=d;-1==d&&I(a);if(-4<=d)throw b;}} -function Yc(a){var b=Zc(a),c=Zc(a);a.i&49152&&(c=c&-225|a.i&63712);Q(a,b);kc(a,c);a.g&=-17}function $c(a,b){var c=b>>13&31;31>c&&(b=a.na&32?a.Na[c]+(b&8191)&4194303:b&-3932161);return b} -function zb(a,b,c){var d,e,f;if(!(c&a.Ja))return f=b&65535,57344<=f&&(f|=a.Ab),f;d=b>>13;a.na&a.nc[a.D]||(d&=7);e=a.u[a.D][d];f=(a.I[a.D][d]<<6)+(b&8191)&a.Ka;3932160<=f&&(f=$c(a,f));if(a.$a)return f;f>=a.kc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& -(g|=16384));a.u[a.D][d]=e;if(f!=(4194170&a.Ka)||a.D)a.Wa=a.D,a.Xa=d;g&&(g&57344&&(0<=a.Aa&&(g|=128),a.H&57344||(g|=a.H&4096|a.Wa<<5|a.Xa<<1,hc(a,a.H&-61695|g&61694)),L(a,168,64,-2)),a.H&61440||!(f<(4191360&a.Ka)||f>(4194239&a.Ka))||(a.H|=4096,a.H&512&&(a.g|=64)));return f}function Zc(a){var b=a.W(a.b[6]|a.qa);a.b[6]=a.b[6]+2&65535;return b}function Xc(a,b){var c=a.b[6]-2&65535;a.b[6]=c;a.F=a.F&65535|(a.F&-65536)<<8|16121856;a.g&256||a.Ua(4,-2,c);a.lb(c,b)} -function ad(a,b,c,d){var e,f,g=d&8?0:a.qa;switch(b){case 0:return L(a,4,0,-3),0;case 1:return 6==c&&a.Ua(d,0,a.b[6]),a.a-=3,7==c?a.b[c]:a.b[c]|g;case 2:f=2;e=a.b[c];6==c&&a.Ua(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.b[c];7!=c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.b[c]+f&65535;6==c&&a.Ua(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.b[c]-2&65535;7!=c&&(e|=g);e=a.W(e)|g;a.a-=8;break;case 6:return e=a.W(Tc(a,2)),e=e+a.b[c]&65535,6==c&&a.Ua(d,0, -e),a.a-=6,e|g;case 7:return e=a.W(Tc(a,2)),e=e+a.b[c]&65535,e=a.W(e|a.qa),a.a-=10,e|g}a.b[c]=a.b[c]+f&65535;a.F=a.F&65535|(a.F&-65536)<<8|(f<<3&248|c)<<16;return e}h.Zc=function(a,b,c){!this.D&&0>=b&&c<=this.Ma&&(this.g|=32)};h.$c=function(a,b,c){this.D||(65534<=c&&(c|=-65536),a&4&&c<=this.Ma&&(c<=this.Ma-32?L(this,4,0,-4):(this.G|=8,this.g|=32)))};h.bd=function(a){return this.fc(a)};h.dd=function(a){return this.gc(a)};h.xe=function(a,b){this.Pb(a,b)};h.ye=function(a,b){this.Rb(a,b)}; -h.cd=function(a,b,c){return ad(this,a,b,c)};h.xc=function(a,b,c){return zb(this,ad(this,a,b,c),c)};h.pe=function(a){return this.s.vb(this.Fa=a)};h.Ac=function(a){return this.s.vb(this.Fa=zb(this,a,2))};h.Bf=function(a,b){this.s.wb(this.Fa=a,b)};h.Dc=function(a,b){this.s.wb(this.Fa=zb(this,a,4),b)}; -function bd(a,b,c){var d=a.f=b&7;(b=a.h=(b&56)>>3)?(d=ad(a,b,d,2),c&65536||61440!==(a.i&61440)&&(d&=65535),a.D=a.i>>12&3,c=a.W(d|c&a.qa),a.D=a.i>>14&3):c=6!=d||(a.i>>2&12288)===(a.i&12288)?a.b[d]:a.da[a.i>>12&3];return c}function cd(a,b,c,d){a.F=a.F&65535|1441792;var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=ad(a,b,e,4),c&65536||(e&=65535),a.D=a.i>>12&3,e=zb(a,e|c&65536,4),a.D=a.i>>14&3,a.Db(e,d)):6!=e||(a.i>>2&12288)===(a.i&12288)?a.b[e]=d:a.da[a.i>>12&3]=d} -function dd(a,b){b>>=6;var c=a.L=b&7;return(b=a.K=(b&56)>>3)?a.Bb(a.ma(b,c,3)):a.b[c+a.Lb]&a.oc}function ed(a,b){var c;b>>=6;var d=a.L=b&7;(b=a.K=(b&56)>>3)?c=a.Cb(a.ma(b,d,2)):c=a.b[d+a.Lb];return c}function fd(a,b){var c=a.f=b&7;b=a.h=(b&56)>>3;return ad(a,b,c,8)}function gd(a,b){var c=a.f=b&7;return(b=a.h=(b&56)>>3)?a.Bb(a.ma(b,c,3)):a.b[c]&255}function hd(a,b){var c,d=a.f=b&7;(b=a.h=(b&56)>>3)?c=a.Cb(a.ma(b,d,2)):c=a.b[d];return c} -function T(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.Eb=a.ma(b,e,7),c=0>c?a.b[-c-1]&255:c,a.Ob(e,d.call(a,c,a.Bb(e))),e&1&&a.a--):(b=a.b[e],c=0>c?a.b[-c-1]&255:c,a.b[e]=b&65280|d.call(a,c,b&255))}function U(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.ma(b,e,6),a.Db(e,d.call(a,0>c?a.b[-c-1]:c,a.Cb(e)))):a.b[e]=d.call(a,0>c?a.b[-c-1]:c,a.b[e])} -function id(a,b,c,d,e){var f=a.f=b&7;(b=a.h=(b&56)>>3)?(d=a.ma(b,f,5),e.call(a,(c=0>c?a.b[-c-1]&255:c)<<8),a.Ob(d,c),d&1&&a.a--):(c?(c=0>c?a.b[-c-1]&255:c,a.b[f]=a.b[f]&~d|c<<24>>24&d):a.b[f]&=~d,e.call(a,c<<8))}function jd(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.ma(b,e,4),d.call(a,c=0>c?a.b[-c-1]:c),a.Db(e,c)):(a.b[e]=c=0>c?a.b[-c-1]:c,d.call(a,c))} -h.Qb=function(a){this.l.complete=!0;var b=a?this.l.ac?0:1:-1;this.l.ac=!1;this.ya=this.a=a;this.g=this.g&-5|0;do{if(this.g){if(a=this.g&11)if(a=!1,this.g&2){var c=160,d=(this.bb&224)>>5,e=this.ca&&this.ca.eb>d?this.ca:null;e&&(c=e.cc,d=e.eb);d>(this.i&224)>>5?(this.g&8&&(Tc(this,2),this.g&=-9),L(this,c,0,-10),d=!0):d=!1;d&&(e&&gc(this,e),a=!0);this.ca||this.bb||(this.g&=-3)}else this.g&1&&this.g++;if(a){if(this.g&4&&this.C.b(this.b[7],b)){I(this);break}if(0>b)break}if(this.g&112&&Uc(this)){if(this.g& -4&&this.C.b(this.b[7],b)){I(this);break}if(0>b)break}}this.g=this.g&15|this.i&16;a=this.F=this.b[7];e=this.W(a);this.b[7]=a+2&65535;this.jc(e)}while(0>1|b<<16;Vc(this,a);return a&65535}function pd(a,b){a=b&128|b>>1|b<<8;Vc(this,a<<8);return a&255}function qd(a,b){a=b&~a;this.ba(a);return a}function rd(a,b){a=b&~a;this.ba(a<<8);return a}function sd(a,b){a|=b;this.ba(a);return a}function td(a,b){a|=b;this.ba(a<<8);return a} +h.De=function(a,b){var c=a>>2;a=(a&3)<<3;this.c[c]=this.c[c]&~(255<>2;a=(a&3)<<3;24>a?this.c[c]=this.c[c]&~(65535<>8);this.va=!0};h.qd=function(a,b){return this.i(a,b)};h.oe=function(a,b){return this.C(a,b)};h.Be=function(a,b,c){this.A?this.ub(0,0,c):this.j(a,b,c)};h.zf=function(a,b,c){this.A?this.ub(0,0,c):this.m(a,b,c)};h.pd=function(a){return this.a[a]}; +h.rd=function(a){return this.a[a]};h.ne=function(a,b){Xa&&a&1&&K(this.b,b,64);return this.h.getUint16(a,!0)};h.qe=function(a,b){Xa&&a&1&&K(this.b,b,64);return!Ya&&a&1?this.a[a]|this.a[a+1]<<8:this.o[a>>1]};h.Ae=function(a,b){this.a[a]=b;this.va=!0};h.Ce=function(a,b){this.a[a]=b;this.va=!0};h.yf=function(a,b,c){Xa&&a&1&&K(this.b,c,64);this.h.setUint16(a,b,!0);this.va=!0};h.Af=function(a,b,c){Xa&&a&1&&K(this.b,c,64);!Ya&&a&1?(this.a[a]=b,this.a[a+1]=b>>8):this.o[a>>1]=b;this.va=!0}; +var nc=0,Xb=1,oc=2,Nb=4,Rb=["NONE","RAM","ROM","VID","H/W"],mc=0,uc=[],tc=[J.prototype.sd,J.prototype.De,J.prototype.re,J.prototype.Bf],yc=[J.prototype.qd,J.prototype.Be,J.prototype.oe,J.prototype.zf];if(Va)var sc=[J.prototype.pd,J.prototype.Ae,J.prototype.ne,J.prototype.yf],rc=[J.prototype.rd,J.prototype.Ce,J.prototype.qe,J.prototype.Af];var zc;if(Va){var Ac=new ArrayBuffer(2);(new DataView(Ac)).setUint16(0,256,!0);zc=256===(new Uint16Array(Ac))[0]}else zc=!1;var qc=zc; +function Bc(a,b){A.call(this,"CPU",a,0,1);b=+a.cycles||b;var c=+a.multiplier||1;this.ec=0;this.Jb=b;this.La=c;this.Tb=Math.round(this.Jb/1E4)/100;this.Va=this.Tb*this.La;this.Ub=this.pb=this.Ya=this.Kb=0;this.l.P=!1;this.l.ac=!1;this.l.la=a.autoStart;"string"==typeof this.l.la&&(this.l.la="true"==this.l.la);this.l.xb=!1;this.Fb=this.Ta=0;this.Gb=+a.csStart;this.nb=+a.csInterval;this.ob=+a.csStop;this.qa=[];this.pc=this.ve.bind(this);this.Aa=this.ta=this.za=this.a=this.S=this.sa=this.mb=this.ya=this.Za= +this.Vb=this.Ia=0;this.ka=null;H(this)}n(Bc,A);h=Bc.prototype;h.aa=function(a,b,c,d){this.A=a;this.s=b;this.C=d;this.ka=a.f;for(a=0;a=a.Ta&&(a.Ta+=a.nb,c=!0);0<=a.ob&&a.ob<=Gc(a)&&(a.nb=a.ob=-1,Fc(a),I(a),c=!0);c&&a.V(Gc(a)+" cycles: checksum="+ka(a.Fb))}} +h.da=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.A)if(a=d.A,a.l.R)a=!0;else{var b=null,c,k=C(a.id);for(c=0;ca.Ia/a.Va&&(b=1);a.La=b;b=a.Tb*a.La;if(a.Va!=b){a.Va=b;b=a.Va.toFixed(2)+"Mhz";var d=a.j.setSpeed;d&&(d.textContent=b);a.V("target speed: "+b)}c&&a.A&&Kc(a.A)}tb(a,a.ta);a.ta=0;a.sa=ra();a.ya=0;Ic(a)}function ac(a,b){var c=a.qa.length;a.qa.push([-1,b]);return c}function cc(a,b,c,d){0<=b&&ba.qa[b][0])&&(c=a.Jb*a.La/1E3*c|0,a.l.P&&(c+=Lc(a)),a.qa[b][0]=c)} +function sb(a,b){for(var c=a.qa.length-1;0<=c;c--){var d=a.qa[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function Lc(a,b){var c=a.za-=a.a;a.a=a.S=0;b&&(a.za=0);return c} +h.ve=function(){if(this.l.P){this.Kb>=this.Jb&&Ic(this,!0);this.Za=0;this.mb=ra();if(this.ya){var a=this.mb-this.ya;a>this.Ub&&(this.sa+=a,this.sa>this.mb&&(this.sa=this.mb))}try{do{for(var b,c=this.l.xb?1:this.pb,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.Qb(b)}catch(f){if("number"!=typeof f)throw f;}b=Lc(this,!0);this.Za+=b;this.ta+=b;ub(this,b);sb(this,b);this.Ya-=b;if(0>=this.Ya){this.Ya+=this.pb;++this.Vb>=Mc&&(this.A&&vb(this.A,void 0),this.Vb=0);break}}while(this.l.P)}catch(f){I(this); +this.A&&this.A.stop(ra(),Gc(this));Sa(this,f.stack||f.message);return}if(this.l.P){a=setTimeout;b=this.pc;this.ya=ra();c=this.Ub;this.Za&&(c=Math.round(c*this.Za/this.pb));c-=this.ya-this.mb;if(d=this.ya-this.sa)this.Ia=Math.round(this.ta/(10*d))/100,864E5<=d&&(this.Aa=0,Hc(this));if(0>c||this.Iac&&(this.sa-=c),c=0;this.Kb+=this.Za;this.ya+=c;a(b,c)}}}; +function rb(a){var b;a.l.error?(a.V(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.P)a.V(a.toString()+" busy");else{Hc(a);a.l.P=!0;a.l.ac=!0;if(b=a.j.run)b.textContent="Halt";a.A&&a.A.start(a.sa,Gc(a));a.C||a.status("Started");setTimeout(a.pc,0)}}h.Qb=function(){return 0};function I(a){var b=!1;if(a.l.P){Lc(a);tb(a,a.ta);a.ta=0;a.l.P=!1;if(b=a.j.run)b.textContent="Run";a.A&&a.A.stop(ra(),Gc(a));b=!0;a.C||a.status("Stopped")}a.l.complete=void 0;return b}var Jc=30,Mc=15,Cc=["power","reset"]; +function Nc(a){var b=+a.model||1170;Bc.call(this,a,6666667);this.xa=b;this.lc=+a.addrReset||0;this.i=this.v=this.m=this.o=this.w=0;this.b=this.ua=this.fa=[];this.D=0;this.nc=[];this.u=this.I=this.Na=this.Nb=[];this.Lb=this.Fa=this.F=this.kc=this.Ja=this.Wa=this.Xa=this.Ka=this.G=this.bb=this.Ma=this.H=this.qb=this.rb=this.oa=this.Ba=this.h=this.f=this.Eb=this.K=this.L=this.g=this.Mb=0;this.oc=255;1120>=this.xa?(this.jc=Oc.bind(this),this.Ua=this.Zc,this.Lb=8,this.oc=-1,this.rc=255,this.qc=0):(this.jc= +Pc.bind(this),this.Ua=this.$c,this.rc=~(1792|(1145>this.xa?2048:0))&65535,this.qc=1145<=this.xa?2048:0);this.$a=0;this.X=null;this.Sb=[];this.l.complete=!1;this.Bb=this.fc=this.bd;this.Cb=this.gc=this.dd;this.Ob=this.Pb=this.xe;this.Db=this.Rb=this.ze;this.ra=this.Ab=0;this.na=this.xc;this.W=this.Ac;this.lb=this.Dc;this.Tc=this.Sc=0}n(Nc,Bc);h=Nc.prototype;h.aa=function(a,b,c,d){Bc.prototype.aa.call(this,a,b,c,d);this.fc=b.Ec.bind(b);this.gc=b.vb.bind(b);this.Pb=b.Fc.bind(b);this.Rb=b.wb.bind(b)}; +h.ba=function(a,b){for(var c=192,d=0;de.cc&&(e.cc=c,c+=4)}return Bc.prototype.ba.call(this,a,b)}; +h.reset=function(){this.status("Model "+this.xa);this.l.P&&I(this);this.v=65536;this.m=32768;this.o=65535;this.w=32768;this.i=15;this.b=[0,0,0,0,0,0,0,this.lc,-1,-2,-3,-4,-5,-6,-7,-8];this.ua=[0,0,0,0,0,0];this.fa=[0,0,0,0];this.D=0;this.nc=[4,2,0,1];this.u=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.I=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];this.Na=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Nb=[0,0,0,0,0,0,0,0];this.h=this.f=this.Eb=this.K=this.L=this.g=this.Mb=0;this.Ba=-1;pb(this);Ec(this);this.l.error=!1;Bc.prototype.reset.call(this)};function pb(a){a.H=0;a.qb=0;a.rb=0;a.oa=0;a.G=0;a.bb=0;a.Ma=255;a.Ja=0;a.Wa=0;a.Xa=0;a.Ka=262143;a.Fa=a.b[7];a.F=0;a.X=null;a.s&&(ic(a),a.kc=Wb(a.s))} +function ic(a){a.Bb=a.fc;a.Cb=a.gc;a.Ob=a.Pb;a.Db=a.Rb;a.Ja?(a.ra=65536,a.Ab=a.oa&16?4186112:253952,a.na=a.xc,a.W=a.Ac,a.lb=a.Dc,Ob(a.s,a.oa&16?22:18)):(a.ra=0,a.Ab=57344,a.na=a.cd,a.W=a.pe,a.lb=a.Cf,Ob(a.s,16))}function hc(a,b){b&=-3073;if(a.H!=b){b&57344&&!(a.H&57344)&&(a.qb=a.F>>16&65535,a.rb=a.F&65535);a.H=b;a.Wa=(b&96)>>5;a.Xa=(b&30)>>1;var c=0;b&257&&(c=4,b&1&&(c|=2));a.Ja!=c&&(a.Ja=c,ic(a))}} +function Qc(a,b,c){a.lc=b;a.s.reset();pb(a);Q(a,b);kc(a,0);if(c){for(b=2;5>=b;b++)a.b[b]=0;a.l.P||rb(a)}else a.C?I(a)||a.C.g():!1===c&&I(a);!a.l.P&&a.ka&&a.ka.stop()}h.wc=function(){return 0};h.save=function(){var a=new R(this);a.set(0,[this.b,this.ua,this.fa,this.Na,this.Nb,this.G,this.Mb,this.bb,this.Ma,jc(this),this.Ba,this.D,this.g,this.H,this.qb,this.rb,this.oa,this.Wa,this.Xa,this.u,this.I,this.Ja,this.Ka,this.Fa,this.F]);a.set(1,[this.Aa,this.La]);a.set(2,Vb(this.s));return a.data()}; +h.restore=function(a){var b=a[1];this.Aa=b[1];Hc(this,b[3]);a:{b=this.s;a=a[2];var c;for(c=0;c>23)),a.a-=2);a.a-=3}function Q(a,b){a.b[7]=b&65535}function ec(a,b,c,d){c={cc:b,eb:c,message:d||0,next:null};c.name=Za[b];a.Sb.push(c);return c}function gc(a,b){var c=a.X;if(c==b)a.X=b.next;else for(;c;){var d=c.next;if(d==b){c.next=d.next;break}c=d}a.X&&(a.g|=1)}function bc(a,b){if(b){if(b!=a.X){var c=a.X;if(!c||c.eb<=b.eb)b.next=c,a.X=b;else{do{var d=c.next;if(!d||d.eb<=b.eb){b.next=d;c.next=b;break}c=d}while(c)}}a.g|=1}} +function Uc(a){return a.g&64?(L(a,168,64,-6),!0):a.g&32?(L(a,4,32,-5),!0):a.g&16?(L(a,12,16,-7),!0):!1}function jc(a){return a.i=a.i&63728|Sc(a)|(a.o&65535?0:4)|(a.m&32768?2:0)|Rc(a)}function kc(a,b){b&=a.rc;a.w=b<<12;a.o=~b&4;a.m=b<<14;a.v=b<<16;if((b^a.i)&a.qc)for(var c=a.ua.length;0<=--c;){var d=a.b[c];a.b[c]=a.ua[c];a.ua[c]=d}a.D=b>>14&3;c=a.i>>14&3;a.D!=c&&(a.fa[c]=a.b[6],a.b[6]=a.fa[a.D]);a.i=b;a.g&=-3;a.g|=a.X?2:1}h.ea=function(a){this.w=this.o=a;this.m=0}; +h.Ea=function(a,b){this.w=this.o=this.v=a;this.m=b||0};function Vc(a,b){a.w=a.o=a.v=b;a.m=a.w^a.v>>1}function Wc(a,b,c,d){a.w=a.o=a.v=b;a.m=(c^d)&(d^b)}function L(a,b,c,d){if(!a.$a){0>a.Ba?a.Ba=jc(a):a.D||(d=-4);-4==d&&(a.g&256&&(d=-1),a.g|=256,a.G|=4,a.b[6]=b=4);if(-1!=d){a.F=b|4143316992;a.D=0;var e=a.W(b|a.ra),f=a.W(b+2&65535|a.ra);kc(a,f&-12289|a.Ba>>2&12288);Xc(a,a.Ba);Xc(a,a.b[7]);Q(a,e)}a.a-=5;a.g&=~(c|19);a.g|=129;a.Ba=-1;a.Tc=b;a.Sc=d;-1==d&&I(a);if(-4<=d)throw b;}} +function Yc(a){var b=Zc(a),c=Zc(a);a.i&49152&&(c=c&-225|a.i&63712);Q(a,b);kc(a,c);a.g&=-17}function $c(a,b){var c=b>>13&31;31>c&&(b=a.oa&32?a.Na[c]+(b&8191)&4194303:b&-3932161);return b} +function zb(a,b,c){var d,e,f;if(!(c&a.Ja))return f=b&65535,57344<=f&&(f|=a.Ab),f;d=b>>13;a.oa&a.nc[a.D]||(d&=7);e=a.u[a.D][d];f=(a.I[a.D][d]<<6)+(b&8191)&a.Ka;3932160<=f&&(f=$c(a,f));if(a.$a)return f;f>=a.kc&&f>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&& +(g|=16384));a.u[a.D][d]=e;if(f!=(4194170&a.Ka)||a.D)a.Wa=a.D,a.Xa=d;g&&(g&57344&&(0<=a.Ba&&(g|=128),a.H&57344||(g|=a.H&4096|a.Wa<<5|a.Xa<<1,hc(a,a.H&-61695|g&61694)),L(a,168,64,-2)),a.H&61440||!(f<(4191360&a.Ka)||f>(4194239&a.Ka))||(a.H|=4096,a.H&512&&(a.g|=64)));return f}function Zc(a){var b=a.W(a.b[6]|a.ra);a.b[6]=a.b[6]+2&65535;return b}function Xc(a,b){var c=a.b[6]-2&65535;a.b[6]=c;a.F=a.F&65535|(a.F&-65536)<<8|16121856;a.g&256||a.Ua(4,-2,c);a.lb(c,b)} +function ad(a,b,c,d){var e,f,g=d&8?0:a.ra;switch(b){case 0:return L(a,4,0,-3),0;case 1:return 6==c&&a.Ua(d,0,a.b[6]),a.a-=3,7==c?a.b[c]:a.b[c]|g;case 2:f=2;e=a.b[c];6==c&&a.Ua(d,f,e);7!=c&&(e|=g,6>c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.b[c];7!=c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.b[c]+f&65535;6==c&&a.Ua(d,f,e);7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.b[c]-2&65535;7!=c&&(e|=g);e=a.W(e)|g;a.a-=8;break;case 6:return e=a.W(Tc(a,2)),e=e+a.b[c]&65535,6==c&&a.Ua(d,0, +e),a.a-=6,e|g;case 7:return e=a.W(Tc(a,2)),e=e+a.b[c]&65535,e=a.W(e|a.ra),a.a-=10,e|g}a.b[c]=a.b[c]+f&65535;a.F=a.F&65535|(a.F&-65536)<<8|(f<<3&248|c)<<16;return e}h.Zc=function(a,b,c){!this.D&&0>=b&&c<=this.Ma&&(this.g|=32)};h.$c=function(a,b,c){this.D||(65534<=c&&(c|=-65536),a&4&&c<=this.Ma&&(c<=this.Ma-32?L(this,4,0,-4):(this.G|=8,this.g|=32)))};h.bd=function(a){return this.fc(a)};h.dd=function(a){return this.gc(a)};h.xe=function(a,b){this.Pb(a,b)};h.ze=function(a,b){this.Rb(a,b)}; +h.cd=function(a,b,c){return ad(this,a,b,c)};h.xc=function(a,b,c){return zb(this,ad(this,a,b,c),c)};h.pe=function(a){return this.s.vb(this.Fa=a)};h.Ac=function(a){return this.s.vb(this.Fa=zb(this,a,2))};h.Cf=function(a,b){this.s.wb(this.Fa=a,b)};h.Dc=function(a,b){this.s.wb(this.Fa=zb(this,a,4),b)}; +function bd(a,b,c){var d=a.f=b&7;(b=a.h=(b&56)>>3)?(d=ad(a,b,d,2),c&65536||61440!==(a.i&61440)&&(d&=65535),a.D=a.i>>12&3,c=a.W(d|c&a.ra),a.D=a.i>>14&3):c=6!=d||(a.i>>2&12288)===(a.i&12288)?a.b[d]:a.fa[a.i>>12&3];return c}function cd(a,b,c,d){a.F=a.F&65535|1441792;var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=ad(a,b,e,4),c&65536||(e&=65535),a.D=a.i>>12&3,e=zb(a,e|c&65536,4),a.D=a.i>>14&3,a.Db(e,d)):6!=e||(a.i>>2&12288)===(a.i&12288)?a.b[e]=d:a.fa[a.i>>12&3]=d} +function dd(a,b){b>>=6;var c=a.L=b&7;return(b=a.K=(b&56)>>3)?a.Bb(a.na(b,c,3)):a.b[c+a.Lb]&a.oc}function ed(a,b){var c;b>>=6;var d=a.L=b&7;(b=a.K=(b&56)>>3)?c=a.Cb(a.na(b,d,2)):c=a.b[d+a.Lb];return c}function fd(a,b){var c=a.f=b&7;b=a.h=(b&56)>>3;return ad(a,b,c,8)}function gd(a,b){var c=a.f=b&7;return(b=a.h=(b&56)>>3)?a.Bb(a.na(b,c,3)):a.b[c]&255}function hd(a,b){var c,d=a.f=b&7;(b=a.h=(b&56)>>3)?c=a.Cb(a.na(b,d,2)):c=a.b[d];return c} +function T(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.Eb=a.na(b,e,7),c=0>c?a.b[-c-1]&255:c,a.Ob(e,d.call(a,c,a.Bb(e))),e&1&&a.a--):(b=a.b[e],c=0>c?a.b[-c-1]&255:c,a.b[e]=b&65280|d.call(a,c,b&255))}function U(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.na(b,e,6),a.Db(e,d.call(a,0>c?a.b[-c-1]:c,a.Cb(e)))):a.b[e]=d.call(a,0>c?a.b[-c-1]:c,a.b[e])} +function id(a,b,c,d,e){var f=a.f=b&7;(b=a.h=(b&56)>>3)?(d=a.na(b,f,5),e.call(a,(c=0>c?a.b[-c-1]&255:c)<<8),a.Ob(d,c),d&1&&a.a--):(c?(c=0>c?a.b[-c-1]&255:c,a.b[f]=a.b[f]&~d|c<<24>>24&d):a.b[f]&=~d,e.call(a,c<<8))}function jd(a,b,c,d){var e=a.f=b&7;(b=a.h=(b&56)>>3)?(e=a.na(b,e,4),d.call(a,c=0>c?a.b[-c-1]:c),a.Db(e,c)):(a.b[e]=c=0>c?a.b[-c-1]:c,d.call(a,c))} +h.Qb=function(a){this.l.complete=!0;var b=a?this.l.ac?0:1:-1;this.l.ac=!1;this.za=this.a=a;this.g=this.g&-5|0;do{if(this.g){if(a=this.g&11)if(a=!1,this.g&2){var c=160,d=(this.bb&224)>>5,e=this.X&&this.X.eb>d?this.X:null;e&&(c=e.cc,d=e.eb);d>(this.i&224)>>5?(this.g&8&&(Tc(this,2),this.g&=-9),L(this,c,0,-10),d=!0):d=!1;d&&(e&&gc(this,e),a=!0);this.X||this.bb||(this.g&=-3)}else this.g&1&&this.g++;if(a){if(this.g&4&&this.C.b(this.b[7],b)){I(this);break}if(0>b)break}if(this.g&112&&Uc(this)){if(this.g& +4&&this.C.b(this.b[7],b)){I(this);break}if(0>b)break}}this.g=this.g&15|this.i&16;a=this.F=this.b[7];e=this.W(a);this.b[7]=a+2&65535;this.jc(e)}while(0>1|b<<16;Vc(this,a);return a&65535}function pd(a,b){a=b&128|b>>1|b<<8;Vc(this,a<<8);return a&255}function qd(a,b){a=b&~a;this.ea(a);return a}function rd(a,b){a=b&~a;this.ea(a<<8);return a}function sd(a,b){a|=b;this.ea(a);return a}function td(a,b){a|=b;this.ea(a<<8);return a} function ud(a,b){a=~b|65536;this.Ea(a);return a&65535}function vd(a,b){a=~b|256;this.Ea(a<<8);return a&255}function wd(a,b){this.w=this.o=a=b-a;this.m=b&(b^a);return a&65535}function xd(a,b){a=b-a;var c=a<<8;b<<=8;this.w=this.o=c;this.m=b&(b^c);return a&255}function yd(a,b){this.w=this.o=a=b+a;this.m=a&(b^a);return a&65535}function zd(a,b){a=b+a;var c=a<<8;this.w=this.o=c;this.m=c&(b<<8^c);return a&255}function Ad(a,b){a=-b;this.Ea(a,a&b&32768);return a&65535} function Bd(a,b){a=-b;this.Ea(a<<8,(a&b&128)<<8);return a&255}function Cd(a,b){a=b<<1|this.v>>16&1;Vc(this,a);return a&65535}function Dd(a,b){a=b<<1|this.v>>16&1;Vc(this,a<<8);return a&255}function Ed(a,b){a=(this.v&65536|b)>>1|b<<16;Vc(this,a);return a&65535}function Fd(a,b){a=((this.v&65536)>>8|b)>>1|b<<8;Vc(this,a<<8);return a&255}function Gd(a,b){var c=b-a;Wc(this,c,a,b);return c&65535}function Hd(a,b){var c=b-a;Wc(this,c<<8,a<<8,b<<8);return c&255} -function Id(a,b){this.w=this.o=b&65280;this.m=this.v=0;return(b<<8|b>>8)&65535}function Jd(a,b){a^=b;this.ba(a);return a&65535}function Kd(a){U(this,a,ed(this,a),kd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)} +function Id(a,b){this.w=this.o=b&65280;this.m=this.v=0;return(b<<8|b>>8)&65535}function Jd(a,b){a^=b;this.ea(a);return a&65535}function Kd(a){U(this,a,ed(this,a),kd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)} function Ld(a){var b=hd(this,a);a=a>>6&7;var c=this.b[a];c&32768&&(c|=4294901760);this.v=this.m=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.m=32768)}this.b[a]=c&65535;this.w=this.o=c;this.a-=(this.h?6:7)+b} function Md(a){var b=hd(this,a);a=a>>6&7;var c=this.b[a]<<16|this.b[a|1];this.v=this.m=0;b&=63;if(b&32){b=64-b;32>b-1;this.v=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.b[a|1]=d&65535;this.w=d>>16;this.o=d>>16|d;this.a-=(this.h?6:7)+b}function Nd(a){S(this,a,!Rc(this))}function Od(a){S(this,a,Rc(this))} function Pd(a){U(this,a,ed(this,a),qd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}function Qd(a){T(this,a,dd(this,a),rd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}function Rd(a){U(this,a,ed(this,a),sd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}function Sd(a){T(this,a,dd(this,a),td);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)} -function Td(a){var b=ed(this,a);a=hd(this,a);this.ba((0>b?this.b[-b-1]:b)&a);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)}function Ud(a){var b=dd(this,a);a=gd(this,a);this.ba(((0>b?this.b[-b-1]&255:b)&a)<<8);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)}function Vd(a){S(this,a,this.o&65535?0:4)}function Wd(a){S(this,a,!Sc(this)==!(this.m&32768))}function Xd(a){S(this,a,!!(this.o&65535)&&!Sc(this)==!(this.m&32768))} +function Td(a){var b=ed(this,a);a=hd(this,a);this.ea((0>b?this.b[-b-1]:b)&a);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)}function Ud(a){var b=dd(this,a);a=gd(this,a);this.ea(((0>b?this.b[-b-1]&255:b)&a)<<8);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)}function Vd(a){S(this,a,this.o&65535?0:4)}function Wd(a){S(this,a,!Sc(this)==!(this.m&32768))}function Xd(a){S(this,a,!!(this.o&65535)&&!Sc(this)==!(this.m&32768))} function Yd(a){S(this,a,!Rc(this)&&!!(this.o&65535))}function Zd(a){S(this,a,(this.o&65535?0:4)||!Sc(this)!=!(this.m&32768))}function $d(a){S(this,a,Rc(this)||(this.o&65535?0:4))}function ae(a){S(this,a,!Sc(this)!=!(this.m&32768))}function be(a){S(this,a,Sc(this))}function ce(a){S(this,a,!!(this.o&65535))}function de(a){S(this,a,!Sc(this))}function ee(){L(this,12,0,-9)}function fe(a){S(this,a,!0)}function ge(a){S(this,a,!(this.m&32768))}function he(a){S(this,a,this.m&32768?2:0)} function V(a){a&1&&(this.v=0);a&2&&(this.m=0);a&4&&(this.o=1);a&8&&(this.w=0);this.a-=5}function ie(a){var b=ed(this,a);a=hd(this,a);var c=(b=0>b?this.b[-b-1]:b)-a;Wc(this,c,a,b);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)}function je(a){var b=dd(this,a);a=gd(this,a);var c=(b=(0>b?this.b[-b-1]&255:b)<<8)-(a<<=8);Wc(this,c,a,b);this.a-=this.h?4+(this.L&&6<=this.f?1:0):(this.K?4:3)+(7==this.f?2:0)} function ke(a){var b=hd(this,a);if(b){a=a>>6&7;var c=this.b[a]<<16|this.b[a|1];this.v=this.m=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.b[a]=d&65535,this.b[a|1]=c-d*b&65535,this.o=d>>16|d,this.w=d>>16):(this.m=32768,this.o=d>>15|d,this.w=c>>16,-1===b&&65534===this.b[a]&&(this.b[a]=this.b[a|1]=1));this.a-=53}else this.o=this.w=0,this.m=32768,this.v=65536,this.a-=7}function le(){L(this,24,0,-9);this.a-=20} -function me(){this.i&49152?(this.G|=128,L(this,4,0,-8)):(this.la&&1120==this.wa&&this.la.setData(this.b[0],!0),this.C?this.C.i():I(this));this.a-=7}function ne(){L(this,16,0,-9);this.a-=20}var oe=[0,7,7,10,7,11,9,13];function pe(a){this.S=this.a;Q(this,fd(this,a));this.a=this.S-oe[this.h]}var qe=[0,14,14,17,14,18,16,20];function re(a){this.S=this.a;var b=fd(this,a);a=a>>6&7;Xc(this,this.b[a]);this.b[a]=this.b[7];Q(this,b);this.a=this.S-qe[this.h]}var se=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function te(a){var b=ed(this,a);this.S=this.a;jd(this,a,b,this.ba);this.a=this.S-se[(this.K?8:0)+this.h]+(7!=this.f||this.h?0:2)}function ue(a){var b=dd(this,a);id(this,a,b,65535,this.ba);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}var ve=[7,13,13,17,14,18,17,21]; -function we(a){var b=hd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.b[a];c&32768&&(c|=-65536);b=~~(b*c);this.b[a]=b>>16&65535;this.b[a|1]=b&65535;this.w=b>>16;this.o=this.w|b;this.m=0;this.v=-32768>b||32767>6&7;Xc(this,this.b[a]);this.b[a]=this.b[7];Q(this,b);this.a=this.S-qe[this.h]}var se=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function te(a){var b=ed(this,a);this.S=this.a;jd(this,a,b,this.ea);this.a=this.S-se[(this.K?8:0)+this.h]+(7!=this.f||this.h?0:2)}function ue(a){var b=dd(this,a);id(this,a,b,65535,this.ea);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}var ve=[7,13,13,17,14,18,17,21]; +function we(a){var b=hd(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.b[a];c&32768&&(c|=-65536);b=~~(b*c);this.b[a]=b>>16&65535;this.b[a|1]=b&65535;this.w=b>>16;this.o=this.w|b;this.m=0;this.v=-32768>b||32767>6;if(this.b[b]=this.b[b]-1&65535)Q(this,this.b[7]-((a&63)<<1)),this.a+=1;this.a-=6}function Ce(a){U(this,a,ed(this,a),Gd);this.a-=this.h?9+(this.L&&6<=this.f?1:0):(this.K?5:3)+(7==this.f?2:0)}function De(a){U(this,a,0,Id);this.a-=this.h?9:3+(7==this.f?2:0)}function Ee(){L(this,28,0,-9)} -function Fe(){this.la&&(this.la.ha=this.b[7],this.la.setData(this.b[0],!0));this.g|=8;Tc(this,-2);this.a-=3}function Ge(a){U(this,a,this.b[(a>>6&7)+this.Lb],Jd);this.a-=this.h?9:3+(7==this.f?2:0)}function X(){L(this,8,0,-9)}function Oc(a){He[a>>12].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}function Oe(a){Pe[a&15].call(this,a)}function Qe(a){Re[a&15].call(this,a)}function Se(a){Te[a>>6&3].call(this,a)} +function Fe(){this.ka&&(this.ka.ja=this.b[7],this.ka.setData(this.b[0],!0));this.g|=8;Tc(this,-2);this.a-=3}function Ge(a){U(this,a,this.b[(a>>6&7)+this.Lb],Jd);this.a-=this.h?9:3+(7==this.f?2:0)}function X(){L(this,8,0,-9)}function Oc(a){He[a>>12].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)}function Me(a){Ne[a>>6&3].call(this,a)}function Oe(a){Pe[a&15].call(this,a)}function Qe(a){Re[a&15].call(this,a)}function Se(a){Te[a>>6&3].call(this,a)} function Ue(a){Ve[a>>6&3].call(this,a)}function We(a){Xe[a>>6&3].call(this,a)} var He=[function(a){Ye[a>>8&15].call(this,a)},te,ie,Td,Pd,Rd,Kd,X,function(a){Ze[a>>8&15].call(this,a)},ue,je,Ud,Qd,Sd,Ce,X],Ye=[function(a){$e[a>>4&15].call(this,a)},fe,ce,Vd,Wd,ae,Xd,Zd,re,re,Ie,Ke,Me,X,X,X],Je=[function(a){jd(this,a,0,this.Ea);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,0,ud);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,1,yd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,1,wd);this.a-=this.h?9:3+(7==this.f?2:0)}],Le=[function(a){U(this,a,0,Ad); this.a-=this.h?11:6},function(a){U(this,a,Rc(this)?1:0,kd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,Rc(this)?1:0,Gd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){a=hd(this,a);this.Ea(a);this.a-=this.h?4:3+(7==this.f?2:0)}],Ne=[function(a){U(this,a,0,Ed);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,0,Cd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,0,od);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){U(this,a,0,md);this.a-=this.h?9:3+(7==this.f?2:0)}],$e= [function(a){af[a&15].call(this,a)},X,X,X,pe,pe,pe,pe,ze,X,Oe,Qe,De,De,De,De],af=[me,Fe,Ae,ee,ne,ye,X,X,X,X,X,X,X,X,X,X],Pe=[xe,function(){this.v=0;this.a-=5},function(){this.m=0;this.a-=5},V,function(){this.o=1;this.a-=5},V,V,V,function(){this.w=0;this.a-=5},V,V,V,V,V,V,V],Re=[xe,function(){this.v=65536;this.a-=5},function(){this.m=32768;this.a-=5},W,function(){this.o=0;this.a-=5},W,W,W,function(){this.w=32768;this.a-=5},W,W,W,W,W,W,W],Ze=[de,be,Yd,$d,ge,he,Nd,Od,le,Ee,Se,Ue,We,X,X,X],Te=[function(a){id(this, a,0,255,this.Ea);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){T(this,a,0,vd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){T(this,a,1,zd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){T(this,a,1,xd);this.a-=this.h?9:3+(7==this.f?2:0)}],Ve=[function(a){T(this,a,0,Bd);this.a-=this.h?11:6},function(a){T(this,a,Rc(this)?1:0,ld);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){T(this,a,Rc(this)?1:0,Hd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){a=gd(this,a);this.Ea(a<<8);this.a-=this.h?4:3+ (7==this.f?2:0)}],Xe=[function(a){T(this,a,0,Fd);this.a-=this.h?9+(this.Eb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,Dd);this.a-=this.h?9:3+(7==this.f?2:0)},function(a){T(this,a,0,pd);this.a-=this.h?9+(this.Eb&1):3+(7==this.f?2:0)},function(a){T(this,a,0,nd);this.a-=this.h?9:3+(7==this.f?2:0)}];function Pc(a){bf[a>>12].call(this,a)} -var bf=[function(a){cf[a>>8&15].call(this,a)},te,ie,Td,Pd,Rd,Kd,function(a){df[a>>8&15].call(this,a)},function(a){ef[a>>8&15].call(this,a)},ue,je,Ud,Qd,Sd,Ce,X],cf=[function(a){ff[a>>4&15].call(this,a)},fe,ce,Vd,Wd,ae,Xd,Zd,re,re,Ie,Ke,Me,function(a){gf[a>>6&3].call(this,a)},X,X],gf=[function(a){a=this.b[7]+((a&63)<<1)&65535;var b=this.W(a|this.qa);Q(this,this.b[5]);this.b[6]=a+2&65535;this.b[5]=b;this.a-=8},function(a){a=bd(this,a,0);this.ba(a);Xc(this,a);this.a-=11},function(a){var b=Zc(this);this.S= -this.a;this.ba(b);cd(this,a,0,b);this.a=this.S-ve[this.h]},function(a){jd(this,a,Sc(this)?65535:0,this.ba);this.a-=this.h?9:3+(7==this.f?2:0)}],ff=[function(a){hf[a&15].call(this,a)},X,X,X,pe,pe,pe,pe,ze,function(a){a&8?(this.i&49152||(this.i=this.i&-225|(a&7)<<5,this.g|=1,this.g&=-3),this.a-=5):L(this,8,0,-9)},Oe,Qe,De,De,De,De],hf=[me,Fe,function(){Yc(this);this.g|=this.i&16;this.a-=13},ee,ne,ye,Ae,function(){L(this,8,0,-9)},X,X,X,X,X,X,X,X],df=[we,we,ke,ke,Ld,Ld,Md,Md,Ge,Ge,X,X,X,X,Be,Be],ef=[de, -be,Yd,$d,ge,he,Nd,Od,le,Ee,Se,Ue,We,function(a){jf[a>>6&3].call(this,a)},X,X],jf=[X,function(a){a=bd(this,a,65536);this.ba(a);Xc(this,a);this.a-=11},function(a){var b=Zc(this);this.S=this.a;this.ba(b);cd(this,a,65536,b);this.a=this.S-ve[this.h]},X]; -function kf(a){A.call(this,"ROM",a,0,128);this.ea=this.b=null;this.h=a.addr;this.a=a.size;this.i=!1;this.g=a.alias;this.f=a.file;this.m=u(this.f);if(this.f){a=this.f;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;v(a,null,!0,function(a,b,f){f?(c.B("Unable to load ROM resource (error "+f+": "+a+")"),c.f=null):(Oa(c.Ha,a,b),(a=ta(a,b))?(c.b=a.N,c.ea=a.ea):c.f=null);lf(c)})}}n(kf,A);h=kf.prototype; -h.X=function(a,b,c,d){this.s=b;this.c=c;this.C=d;lf(this)};h.Y=function(){this.ea&&(this.C&&this.C.a(this.id,this.h,this.a,this.ea),delete this.ea);return!0};h.ga=function(){return!0}; -function lf(a){if(!Ta(a)){if(a.f){if(!a.b||!a.s)return;a.a||(a.a=a.b.length);if(a.b.length!=a.a)Sa(a,"ROM size ("+ka(a.b.length,8,!0)+") does not match specified size ("+ka(a.a,8,!0)+")");else{var b;a:{b=a.h;a.status(a.a+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+Gb){var c={};b=(c[b]=[kf.prototype.be,kf.prototype.kf,null,null,null,a.a>>1],c);if(db(a.s,a,b)){b=a.i=!0;break a}}else if(Mb(a.s,b,a.a,oc)){for(c=0;c>>f.h;0>>=f.h;0>>a.h;0>8&15].call(this,a)},te,ie,Td,Pd,Rd,Kd,function(a){df[a>>8&15].call(this,a)},function(a){ef[a>>8&15].call(this,a)},ue,je,Ud,Qd,Sd,Ce,X],cf=[function(a){ff[a>>4&15].call(this,a)},fe,ce,Vd,Wd,ae,Xd,Zd,re,re,Ie,Ke,Me,function(a){gf[a>>6&3].call(this,a)},X,X],gf=[function(a){a=this.b[7]+((a&63)<<1)&65535;var b=this.W(a|this.ra);Q(this,this.b[5]);this.b[6]=a+2&65535;this.b[5]=b;this.a-=8},function(a){a=bd(this,a,0);this.ea(a);Xc(this,a);this.a-=11},function(a){var b=Zc(this);this.S= +this.a;this.ea(b);cd(this,a,0,b);this.a=this.S-ve[this.h]},function(a){jd(this,a,Sc(this)?65535:0,this.ea);this.a-=this.h?9:3+(7==this.f?2:0)}],ff=[function(a){hf[a&15].call(this,a)},X,X,X,pe,pe,pe,pe,ze,function(a){a&8?(this.i&49152||(this.i=this.i&-225|(a&7)<<5,this.g|=1,this.g&=-3),this.a-=5):L(this,8,0,-9)},Oe,Qe,De,De,De,De],hf=[me,Fe,function(){Yc(this);this.g|=this.i&16;this.a-=13},ee,ne,ye,Ae,function(){L(this,8,0,-9)},X,X,X,X,X,X,X,X],df=[we,we,ke,ke,Ld,Ld,Md,Md,Ge,Ge,X,X,X,X,Be,Be],ef=[de, +be,Yd,$d,ge,he,Nd,Od,le,Ee,Se,Ue,We,function(a){jf[a>>6&3].call(this,a)},X,X],jf=[X,function(a){a=bd(this,a,65536);this.ea(a);Xc(this,a);this.a-=11},function(a){var b=Zc(this);this.S=this.a;this.ea(b);cd(this,a,65536,b);this.a=this.S-ve[this.h]},X]; +function kf(a){A.call(this,"ROM",a,0,128);this.ga=this.b=null;this.h=+a.addr;this.a=+a.size;this.i=!1;this.f=a.alias;"string"==typeof this.f&&(this.f=eval(this.f));this.g=a.file;this.m=u(this.g);if(this.g){a=this.g;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.g+"&format=bytes&decimal=true");var c=this;v(a,null,!0,function(a,b,f){f?(c.B("Unable to load ROM resource (error "+f+": "+a+")"),c.g=null):(Oa(c.Ha,a,b),(a=ta(a,b))?(c.b=a.N,c.ga=a.ga):c.g=null);lf(c)})}}n(kf,A); +h=kf.prototype;h.aa=function(a,b,c,d){this.s=b;this.c=c;this.C=d;lf(this)};h.ba=function(){this.ga&&(this.C&&this.C.a(this.id,this.h,this.a,this.ga),delete this.ga);return!0};h.ia=function(){return!0}; +function lf(a){if(!Ta(a)){if(a.g){if(!a.b||!a.s)return;a.a||(a.a=a.b.length);if(a.b.length!=a.a)Sa(a,"ROM size ("+ka(a.b.length,8,!0)+") does not match specified size ("+ka(a.a,8,!0)+")");else{var b;a:{b=a.h;a.status(a.a+"-byte ROM at "+ja(b));if(57344<=b&&b<57344+Gb){var c={};b=(c[b]=[kf.prototype.be,kf.prototype.lf,null,null,null,a.a>>1],c);if(db(a.s,a,b)){b=a.i=!0;break a}}else if(Mb(a.s,b,a.a,oc)){for(c=0;c>>f.h;0>>=f.h;0>>a.h;0=b.length)break;for(var l=l+2,p=b[l++]&255|(b[l++]&255)<<8,t=b[l++]&255|(b[l++]&255)<<8,m=m+((p&255)+(p>>8)+(t&255)+(t>>8)),x=l,w=p-=6;0=b.length)break;m+=b[l++]&255;if(m&255)break;if(w)for(;w--;)Ub(a.s,t++,b[x++]&255);else t&1?g=!0:null==d&&(d=t);k=!0}else l++;else l+=2}if(!k&&(null==c&&(c=e),null!=c)){for(e=0;e< -b.length;e++)Ub(a.s,c+e,b[e]);k=!0}if(k){if(null==d||g)I(a.c),f=!1;null!=d&&Qc(a.c,d,f)}return k}Ga(function(){for(var a=G(document,F,"ram"),b=0;b=q.hc&&c<=q.Uc&&(b=c-(q.hc-q.Gc));b&&(a.preventDefault&&a.preventDefault(),d.Hb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.Ic&&(b=q.Hc);d.Hb(b);a.preventDefault&&a.preventDefault()}return!0},c.onpaste=function(a){a.stopPropagation&&a.stopPropagation(); +b.length;e++)Ub(a.s,c+e,b[e]);k=!0}if(k){if(null==d||g)I(a.c),f=!1;null!=d&&Qc(a.c,d,f)}return k}Ga(function(){for(var a=G(document,F,"ram"),b=0;b=q.hc&&c<=q.Uc&&(b=c-(q.hc-q.Gc));b&&(a.preventDefault&&a.preventDefault(),d.Hb(b));return!0},c.onkeypress=function(a){a=a||window.event;if(!a.metaKey){var b=a.which||a.keyCode;a.altKey&&b==q.Ic&&(b=q.Hc);d.Hb(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.Hb(a.getData("Text"))},c.removeAttribute("readonly"),!0}return!1}; -h.X=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;var e=this;this.G=ec(this.c,this.v?-1:48,4,262144);this.H=ac(this.c,function(){var a;a=-1;e.g.length&&(a=e.g.shift()&255,e.ca&&97<=a&&122>a&&(a-=32),cc(e.c,e.H,1E3/Math.round(e.I/10)));0<=a&&(e.o=a,e.a&128?e.o|=49152:e.a|=128,e.a&64&&bc(c,e.G))});this.w=ec(this.c,this.v?-1:52,4,262144);this.S=ac(this.c,function(){e.b|=128;e.b&64&&bc(c,e.w)});db(b,this,rf,this.v?64832+8*(this.v-1)-65392:0);fb(b,this.reset.bind(this));H(this)}; -h.yc=function(a){if(!this.h){var b=Dc(this.A,"connection");if(b){var c=b.split("->");if(2==c.length){var d=pa(c[0]);if(d!=this.Ga)return;c=pa(c[1]);if(this.h=Qa(c)){var e=this.h.exports;if(e){var f=e.connect;f&&f.call(this.h,this.u);if(this.D=e.receiveData){this.u=a;this.F=e.receiveStatus;this.status(this.Ha+"."+d+" connected to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; -h.Y=function(a,b){if(!b)if(this.yc(this.u),!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(){sf(this)};h.save=function(){var a=new R(this);a.set(0,[]);return a.data()};h.restore=function(){return sf(this)};function sf(a){a.o=0;a.a=8192;a.b=128;a.g=[];return!0} -h.Hb=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.L||8,c=a-this.m%a,this.L&&(b=" ".slice(0,c)));this.K&&!this.m&&c&&(b=String.fromCharCode(this.K)+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))}cc(this.c,this.S,1E3/Math.round(this.da/10));this.b&=-129};var qf="buffer",tf={},rf=(tf[65392]=[null,null,Y.prototype.Pd,Y.prototype.Xe,"RCSR"],tf[65394]=[null,null,Y.prototype.Od,Y.prototype.We,"RBUF"],tf[65396]=[null,null,Y.prototype.te,Y.prototype.Df,"XCSR"],tf[65398]=[null,null,Y.prototype.se,Y.prototype.Cf,"XBUF"],tf); -Ga(function(){for(var a=G(document,F,"serial"),b=0;ba&&(a-=32),cc(e.c,e.I,1E3/Math.round(e.K/10)));0<=a&&(e.o=a,e.a&128?e.o|=49152:e.a|=128,e.a&64&&bc(c,e.H))});this.F=ec(this.c,this.D?-1:52,4,262144);this.X=ac(this.c,function(){e.b|=128;e.b&64&&bc(c,e.F)});db(b,this,rf,this.D?64832+8*(this.D-1)-65392:0);fb(b,this.reset.bind(this));H(this)}; +h.yc=function(a){if(!this.f){var b=Dc(this.A,"connection");if(b){var c=b.split("->");if(2==c.length){var d=pa(c[0]);if(d!=this.Ga)return;c=pa(c[1]);if(this.f=Qa(c)){var e=this.f.exports;if(e){var f=e.connect;f&&f.call(this.f,this.v);if(this.u=e.receiveData){this.v=a;this.G=e.receiveStatus;this.status(this.Ha+"."+d+" connected to "+c);return}}}}this.status("Unable to establish connection: "+b)}}}; +h.ba=function(a,b){if(!b)if(this.yc(this.v),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){sf(this)};h.save=function(){var a=new R(this);a.set(0,[]);return a.data()};h.restore=function(){return sf(this)};function sf(a){a.o=0;a.a=8192;a.b=128;a.h=[];return!0} +h.Hb=function(a){if("number"==typeof a)this.h.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.S||8,c=a-this.m%a,this.S&&(b=" ".slice(0,c)));this.L&&!this.m&&c&&(b=String.fromCharCode(this.L)+b);this.g.value+=b;this.g.scrollTop=this.g.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))}cc(this.c,this.X,1E3/Math.round(this.fa/10));this.b&=-129};var qf="buffer",tf={},rf=(tf[65392]=[null,null,Y.prototype.Pd,Y.prototype.Ye,"RCSR"],tf[65394]=[null,null,Y.prototype.Od,Y.prototype.Xe,"RBUF"],tf[65396]=[null,null,Y.prototype.te,Y.prototype.Ef,"XCSR"],tf[65398]=[null,null,Y.prototype.se,Y.prototype.Df,"XBUF"],tf); +Ga(function(){for(var a=G(document,F,"serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "readTape":e=xf;case "loadTape":return e||(e=yf),this.j[b]=c,c.onclick= +h.da=function(a,b,c){var d=this,e=wf;switch(b){case "listTapes":return this.j[b]=c,c.onchange=function(){var a=d.j.descTape,b=c.options[c.selectedIndex];if(a&&b){var e={};if(b=b.getAttribute("data-value"))try{e=eval("("+b+")")}catch(l){y("PC11 option error: "+l.message)}b=e.desc;void 0===b&&(b="");e=e.href;void 0!==e&&(b=''+b+"");a.innerHTML=b}},!0;case "descTape":return this.j[b]=c,!0;case "readTape":e=xf;case "loadTape":return e||(e=yf),this.j[b]=c,c.onclick= function(){var a=d.j.listTapes;a&&zf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){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;zf(d,u(b,!0),b,yf,a)}return!1};return!0;case Af:return this.j[b]=c,!0}return!1}; -h.X=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;this.v=Bf(a);var e=this;if(a=uf(this,Dc(this.A,"autoMount")))for(var f in a)"PTR"==f&&(this.D[f]=a[f]);this.u=ec(this.c,56,4,4096);this.H=ac(this.c,function(){1==(e.a&32769)&&!(e.a&128)&&e.mc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!v(f,null,!0,function(e,f,g){var k=0>g&&!!a.A&&!a.A.l.R;g?a.B('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Oa(a.Ha,e,f),(e=ta(e,f))&&Mf(a,b,c,d,e.N,e.ja,e.ia)); +h.aa=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;this.v=Bf(a);var e=this;if(a=uf(this,Dc(this.A,"autoMount")))for(var f in a)"PTR"==f&&(this.D[f]=a[f]);this.u=ec(this.c,56,4,4096);this.H=ac(this.c,function(){1==(e.a&32769)&&!(e.a&128)&&e.mc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!v(f,null,!0,function(e,f,g){var k=0>g&&!!a.A&&!a.A.l.R;g?a.B('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Oa(a.Ha,e,f),(e=ta(e,f))&&Mf(a,b,c,d,e.N,e.Z,e.Y)); a.l.Pa=!1;a.b&&(a.b--,a.b||H(a));Jf(a)})}function Ef(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.J);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.yb?"":e)+"&format=json"));return!!v(f, +function Tf(a,b,c,d,e){var f=c;if(a.b)return!0;a.ma=b;a.ca=c;a.Ib=u(c);a.b=e;a.i=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=ia[d];if(e){a.J=e[0];a.O=e[1];a.M=e[2];a.U=e[3]||512;c=a.U>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.J);for(d=0;dc.indexOf("/api/v1/dump")&&(b=la(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ma(c,"/")&&(d="dir"),f=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.yb?"":e)+"&format=json"));return!!v(f, null,!0,function(b,c,d){Uf(a,b,c,d)})} -function Uf(a,b,c,d){var e=null,f=0>d&&!!a.A&&!a.A.l.R;a.g=!1;if(d)a.controller.B('Unable to load disk "'+a.ka+'" (error '+d+": "+b+")",f);else{Oa(a.controller.Ha,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +function Uf(a,b,c,d){var e=null,f=0>d&&!!a.A&&!a.A.l.R;a.g=!1;if(d)a.controller.B('Unable to load disk "'+a.ma+'" (error '+d+": "+b+")",f);else{Oa(a.controller.Ha,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)y(k[0]);else{a.J=k.length;a.O=k[0].length;a.M=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 t=l.data;if(void 0===t){var x=l.bytes;if(void 0!==x&&x.length){for(var w=m<<2,Z=x.length;Z>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.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.fa?f=a.oa+a.fa&&(a.fa+=f-(a.oa+a.fa)+1):(a.oa=f,a.fa=1);d[f]=d[f]&~(255<>2,c=(d>((b&3)<<3)&255;return c};h.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.ha?f=a.pa+a.ha&&(a.ha+=f-(a.pa+a.ha)+1):(a.pa=f,a.ha=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||m>=this.a[k][l].length){c="sector (CHS="+k+":"+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(k=this.a[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.B("Unable to restore disk '"+this.ka+": "+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(k=this.a[k][l][m]){for(l=k.data.length;lb&&-2!=b&&this.controller.B("Unable to restore disk '"+this.ma+": "+c);return b}; h.toJSON=function(){var a;a=0;for(var b;b=Wf(this,a++);)Zf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; function Zf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var Qf=0;function P(a){A.call(this,"RK11",a,0,65536);this.o=$f(this,a.autoMount);this.m=0;this.f=Array(8);this.u=!Aa("Mobi")&&window&&"FileReader"in window;this.Da=null;this.w=this.b=this.a=this.i=this.h=this.g=this.v=0}n(P,A); function $f(a,b){if(b&&"string"==typeof b)try{b=eval("("+b+")")}catch(c){y(a.type+" auto-mount error: "+c.message+" ("+b+")"),b=null}return b||{}}h=P.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.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){y("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=r(c.value);null!=a&&ag(d,a)}, +h.da=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.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){y("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=r(c.value);null!=a&&ag(d,a)}, !0;case "loadDisk":return this.j[b]=c,c.onclick=function(){var a=d.j.listDisks;a&&a.options&&bg(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.j[b]=c,c.onclick=function(){var a,b=d.j.listDrives,b=b&&r(b.value);null==b||0>b||b>=d.f.length||!(a=d.f[b])?d.B("Unable to boot the selected drive"):a.T?(Qc(d.c,0,!0),(a=d.sc(a,0,0,0,512,0,2))&&d.B("Unable to read the boot sector ("+a+")")):d.B("Load a disk into the drive first")},!0;case "saveDisk":if(!this.u){c.parentNode.removeChild(c); break}this.j[b]=c;c.onclick=function(){var a=d.j.listDrives;a&&a.options&&d.f&&((a=d.f[r(a.value)||0])?(a=a.T)?(a=Ea(Yf(a),a.Ib.replace(".json",".img")),z(a)):d.B("No disk loaded in drive."):d.B("No disk drive selected."))};return!0;case "mountDisk":if(this.u)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;bg(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.X=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;if(a=$f(this,Dc(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.o[e]=a[e]);cg(this);this.Da=ec(this.c,144,5,65536);db(b,this,dg);fb(b,this.reset.bind(this));eg(this,"None",fg,!0);this.u&&eg(this,"Local Disk",gg);eg(this,"Remote Disk",hg);ig(this)||H(this)}; -h.Y=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.i){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";ag(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){cg(this)};h.save=function(){return(new R(this)).data()}; +h.aa=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;if(a=$f(this,Dc(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.o[e]=a[e]);cg(this);this.Da=ec(this.c,144,5,65536);db(b,this,dg);fb(b,this.reset.bind(this));eg(this,"None",fg,!0);this.u&&eg(this,"Local Disk",gg);eg(this,"Remote Disk",hg);ig(this)||H(this)}; +h.ba=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.i){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RK"+b;a.appendChild(c)}a.value="0";ag(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){cg(this)};h.save=function(){return(new R(this)).data()}; h.restore=function(a){return cg(this,a[0])};function ig(a,b){b||(a.m=0);for(var c in a.o){var d=a.o[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.f.length)a.B("Unable to load the selected drive");else if(c)if(c==gg)a.B('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==hg){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}kg(a,e,b,c,!1,d)}else jg(a,e)} -function kg(a,b,c,d,e,f){var g=-1,k=a.f[b];k.Z.toLowerCase()!=d.toLowerCase()&&(g++,jg(a,b,!0),k.Ra?a.B("RK11 busy"):(k.Ra=!0,e&&(k.Qa=!0,a.m++),k.va=!!f,Tf(new Pf(a,k,"preload"),c,d,f,a.Mc)&&g++));return g}h.Mc=function(a,b,c,d,e){a.Ra=!1;b&&(b.J>a.J||b.O>a.O)&&(this.B('Disk "'+c+'" too large for drive '+("RK"+a.Sa)),b=null);b?(a.T=b,a.ka=c,a.Z=d,this.B('Loaded disk "'+c+'" in drive '+("RK"+a.Sa),a.Qa||e),this.A&&Kc(this.A)):a.va=!1;a.Qa&&(a.Qa=!1,--this.m||H(this));ag(this,a.Sa)}; +function kg(a,b,c,d,e,f){var g=-1,k=a.f[b];k.ca.toLowerCase()!=d.toLowerCase()&&(g++,jg(a,b,!0),k.Ra?a.B("RK11 busy"):(k.Ra=!0,e&&(k.Qa=!0,a.m++),k.wa=!!f,Tf(new Pf(a,k,"preload"),c,d,f,a.Mc)&&g++));return g}h.Mc=function(a,b,c,d,e){a.Ra=!1;b&&(b.J>a.J||b.O>a.O)&&(this.B('Disk "'+c+'" too large for drive '+("RK"+a.Sa)),b=null);b?(a.T=b,a.ma=c,a.ca=d,this.B('Loaded disk "'+c+'" in drive '+("RK"+a.Sa),a.Qa||e),this.A&&Kc(this.A)):a.wa=!1;a.Qa&&(a.Qa=!1,--this.m||H(this));ag(this,a.Sa)}; function eg(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e=a.J){m=64;break}p=a.seek(b,c,d+1);if(!p){m=4096;break}t=0;++d>=a.M&&(d=0,++c>=a.O&&(c=0,++b))}var x,w;if(0>(x=a.read(p,t++))||0>(w=a.read(p,t++))){m=32;break}if(!k&&(yb(this.s,$c(this.c,f),x|w<<8),$b(this.s))){m=1024;break}t>=a.U&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; h.Nc=function(a,b,c,d,e,f,g,k,l){var m=0;a=a.T;var p=null,t;a||(m=128,e=0);for(;e;){var x=Ab(this.s,$c(this.c,f));if($b(this.s)){m=1024;break}if(!p){if(b>=a.J){m=64;break}p=a.seek(b,c,d+1,!0);if(!p){m=4096;break}t=0;++d>=a.M&&(d=0,++c>=a.O&&(c=0,++b))}if(k){var w,Z;if(0>(w=a.read(p,t++))||0>(Z=a.read(p,t++))){m=32;break}if(x!=(w|Z<<8)){m=1;break}}else if(!a.write(p,t++,x&255)||!a.write(p,t++,x>>8)){m=32;break}t>=a.U&&(p=null);f+=g;e--}return l?l(m,b,c,d,e,f):m}; -h.Lc=function(a,b,c,d,e,f){this.h=f&65535;this.a=this.a&-49|f>>12&48;this.i=65536-e&65535;this.g=this.g&-16|d&15;this.b|=a;lg(this);return!0};function lg(a){a.a&=-32769;a.b&&(a.b|=32768,a.a|=32768,a.b&32736&&(a.a|=16384))}h.Ud=function(){return this.w};h.bf=function(){};h.Vd=function(){return this.b};h.cf=function(){};h.Rd=function(){return this.a&61438}; -h.Ze=function(a){this.a=this.a&-3968|a&3967;if(this.a&1){a=!0;var b,c,d=(this.g&57344)>>13,e=this.f[d],f,g,k,l,m,p;this.a&=-8321;this.b&=-4;switch(c=this.a&14){case 0:this.b=this.g=0;this.a=128;break;case 10:case 4:b=this.sc;case 6:case 2:b||(b=this.Nc);f=(this.g&8160)>>5;g=(this.g&16)>>4;k=this.g&15;l=65536-this.i&65535;m=(this.a&48)<<12|this.h;p=this.a&2048?0:2;if(f>=e.J){this.b|=64;break}if(k>=e.M){this.b|=32;break}a=b.call(this,e,f,g,k,l,m,p,6<=c,this.Lc.bind(this));break;case 8:f=(this.g&8160)>> -5;f>12&48;this.i=65536-e&65535;this.g=this.g&-16|d&15;this.b|=a;lg(this);return!0};function lg(a){a.a&=-32769;a.b&&(a.b|=32768,a.a|=32768,a.b&32736&&(a.a|=16384))}h.Ud=function(){return this.w};h.cf=function(){};h.Vd=function(){return this.b};h.df=function(){};h.Rd=function(){return this.a&61438}; +h.$e=function(a){this.a=this.a&-3968|a&3967;if(this.a&1){a=!0;var b,c,d=(this.g&57344)>>13,e=this.f[d],f,g,k,l,m,p;this.a&=-8321;this.b&=-4;switch(c=this.a&14){case 0:this.b=this.g=0;this.a=128;break;case 10:case 4:b=this.sc;case 6:case 2:b||(b=this.Nc);f=(this.g&8160)>>5;g=(this.g&16)>>4;k=this.g&15;l=65536-this.i&65535;m=(this.a&48)<<12|this.h;p=this.a&2048?0:2;if(f>=e.J){this.b|=64;break}if(k>=e.M){this.b|=32;break}a=b.call(this,e,f,g,k,l,m,p,6<=c,this.Lc.bind(this));break;case 8:f=(this.g&8160)>> +5;f'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.j[b]=c,c.onchange=function(){var a=r(c.value);null!=a&&og(d,a)}, +h.da=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.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){y("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=r(c.value);null!=a&&og(d,a)}, !0;case "loadDisk":return this.j[b]=c,c.onclick=function(){var a=d.j.listDisks;a&&a.options&&pg(d,a.options[a.selectedIndex].text,a.value)},!0;case "bootDisk":return this.j[b]=c,c.onclick=function(){var a,b=d.j.listDrives,b=b&&r(b.value);null==b||0>b||b>=d.b.length||!(a=d.b[b])?d.B("Unable to boot the selected drive"):a.T?(Qc(d.c,0,!0),(a=d.tc(a,0,0,0,512,0))&&d.B("Unable to read the boot sector ("+a+")")):d.B("Load a disk into the drive first")},!0;case "saveDisk":if(!this.v){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[r(a.value)||0])?(a=a.T)?(a=Ea(Yf(a),a.Ib.replace(".json",".img")),z(a)):d.B("No disk loaded in drive."):d.B("No disk drive selected."))};return!0;case "mountDisk":if(this.v)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;pg(d,u(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; -h.X=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;if(a=ng(this,Dc(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.u[e]=a[e]);qg(this);this.Da=ec(this.c,112,5,131072);db(b,this,rg);fb(b,this.reset.bind(this));sg(this,"None",tg,!0);this.v&&sg(this,"Local Disk",ug);sg(this,"Remote Disk",vg);wg(this)||H(this)}; -h.Y=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.i){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";og(this,0)}}return!0};h.ga=function(a){return a?this.save():!0};h.reset=function(){qg(this)};h.save=function(){return(new R(this)).data()}; +h.aa=function(a,b,c,d){this.A=a;this.s=b;this.c=c;this.C=d;if(a=ng(this,Dc(this.A,"autoMount")))for(var e in a)e.substr(0,2)==this.type.substr(0,2)&&(this.u[e]=a[e]);qg(this);this.Da=ec(this.c,112,5,131072);db(b,this,rg);fb(b,this.reset.bind(this));sg(this,"None",tg,!0);this.v&&sg(this,"Local Disk",ug);sg(this,"Remote Disk",vg);wg(this)||H(this)}; +h.ba=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.A.i){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";og(this,0)}}return!0};h.ia=function(a){return a?this.save():!0};h.reset=function(){qg(this)};h.save=function(){return(new R(this)).data()}; h.restore=function(a){return qg(this,a[0])};function wg(a,b){b||(a.o=0);for(var c in a.u){var d=a.u[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.B("Unable to load the selected drive");else if(c)if(c==ug)a.B('Use "Choose File" and "Mount" to select and load a local disk.');else{if(c==vg){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=u(c);a.status("Attempting to load "+c+' as "'+b+'"')}yg(a,e,b,c,!1,d)}else xg(a,e)} -function yg(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Z.toLowerCase()!=d.toLowerCase()&&(g++,xg(a,b,!0),k.Ra?a.B("RL11 busy"):(k.Ra=!0,e&&(k.Qa=!0,a.o++),k.va=!!f,Tf(new Pf(a,k,"preload"),c,d,f,a.Pc)&&g++));return g}h.Pc=function(a,b,c,d,e){a.Ra=!1;b&&(b.J>a.J||b.O>a.O)&&(this.B('Disk "'+c+'" too large for drive '+("RL"+a.Sa)),b=null);b?(a.T=b,a.ka=c,a.Z=d,this.B('Loaded disk "'+c+'" in drive '+("RL"+a.Sa),a.Qa||e),this.A&&Kc(this.A)):a.va=!1;a.Qa&&(a.Qa=!1,--this.o||H(this));og(this,a.Sa)}; +function yg(a,b,c,d,e,f){var g=-1,k=a.b[b];k.ca.toLowerCase()!=d.toLowerCase()&&(g++,xg(a,b,!0),k.Ra?a.B("RL11 busy"):(k.Ra=!0,e&&(k.Qa=!0,a.o++),k.wa=!!f,Tf(new Pf(a,k,"preload"),c,d,f,a.Pc)&&g++));return g}h.Pc=function(a,b,c,d,e){a.Ra=!1;b&&(b.J>a.J||b.O>a.O)&&(this.B('Disk "'+c+'" too large for drive '+("RL"+a.Sa)),b=null);b?(a.T=b,a.ma=c,a.ca=d,this.B('Loaded disk "'+c+'" in drive '+("RL"+a.Sa),a.Qa||e),this.A&&Kc(this.A)):a.wa=!1;a.Qa&&(a.Qa=!1,--this.o||H(this));og(this,a.Sa)}; function sg(a,b,c,d){if((a=a.j.listDisks)&&a.options){for(var e=0;e(p=a.read(l,m++))||0>(t=a.read(l,m++))){k=5120;break}yb(this.s,$c(this.c,f),p|t<<8);if($b(this.s)){k=8192;break}f+=2;e--;if(m>=a.U&&(l=null,++d>=a.M&&(d=0,++c>=a.O&&(c=0,++b>=a.J)))){k=5120;break}}return g?g(k,b,c,d,e,f):k}; h.Qc=function(a,b,c,d,e,f,g){var k=0;a=a.T;var l=null,m;a||(k=5120,e=0);for(;e;){var p=Ab(this.s,$c(this.c,f));if($b(this.s)){k=8192;break}f+=2;e--;if(!l){l=a.seek(b,c,d+1,!0);if(!l){k=5120;break}m=0}if(!a.write(l,m++,p&255)||!a.write(l,m++,p>>8)){k=5120;break}if(m>=a.U&&(l=null,++d>=a.M&&(d=0,++c>=a.O&&(c=0,++b>=a.J)))){k=5120;break}}return g?g(k,b,c,d,e,f):k}; h.Oc=function(a,b,c,d,e,f){this.m=f&65535;this.a=this.a&-49|f>>12&48;this.h=f>>16&63;this.g=this.f=b<<7|(c?64:0)|d&63;this.i=65536-e&65535;a&&(this.a=this.a|a|32768);return!0};h.Zd=function(){return this.a&65535}; -h.gf=function(a){this.a=this.a&-1023|a&1022;this.h=this.h&60|(a&48)>>4;if(!(this.a&128)){a=!0;var b,c=this.b[(this.a&768)>>8],d=c.T,e,f,g;this.a&=-2;switch(this.a&14){case 4:this.i&8&&(this.a&=63);this.i=c.status|this.g&64|(d&&512==d.J?128:0);break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.g=this.f&4?this.g+b:this.g-b,this.f=this.g=this.g&65408|c);break;case 8:this.i=this.g;break;case 12:b=this.tc;case 10:b||(b=this.Qc),e=this.f>>7,f=this.f&64?1:0,g=this.f&63,!d||e>=d.J||g>=d.M? -this.a|=37888:(a=65536-this.i&65535,d=(this.h&63)<<16|this.m,a=b.call(this,c,e,f,g,a,d,this.Oc.bind(this)))}a&&(this.a|=129,this.a&64&&bc(this.c,this.Da))}};h.Xd=function(){return this.m};h.ef=function(a){this.m=a&65534};h.$d=function(){return this.f};h.hf=function(a){this.f=a};h.ae=function(){return this.i};h.jf=function(a){this.i=a};h.Yd=function(){return this.h};h.ff=function(a){this.h=a&63;this.a=this.a&-49|(this.h&3)<<4}; -var tg="",ug="?",vg="??",zg={},rg=(zg[63744]=[null,null,O.prototype.Zd,O.prototype.gf,"RLCS"],zg[63746]=[null,null,O.prototype.Xd,O.prototype.ef,"RLBA"],zg[63748]=[null,null,O.prototype.$d,O.prototype.hf,"RLDA"],zg[63750]=[null,null,O.prototype.ae,O.prototype.jf,"RLMP"],zg[63752]=[null,null,O.prototype.Yd,O.prototype.ff,"RLBE"],zg); -function Ag(a,b,c){A.call(this,"Computer",a,0,33554432);this.l.R=!1;this.F=null;Bg(this,b);this.w=Dc(this,"autoPower",a);this.g=0;this.K=a.busWidth||a.buswidth;this.a=Cg;this.u=null;this.H=this.i=this.D=this.m=this.I=!1;this.h=null;this.L=Dc(this,"url")||"";(Math.random()+.1).toString(36);this.b=Dg(this);if(this.c=Ra("CPU",this.id)){this.C=Ra("Debugger",this.id);this.s=new Fb({id:this.Ha+".bus",busWidth:this.K},this.c,this.C);var d,e=C(this.id);if((this.f=Ra("Panel",this.id))&&this.f.ab)for(b=0;b< -e.length;b++)d=e[b],d.B=this.f.B,d.V=this.f.V,d.ab=this.f.ab;this.V(Wa+" v1.31.1\nCopyright \u00a9 2012-2016 Jeff Parsons \nLicense: GPL version 3 or later ");this.V("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b>4;if(!(this.a&128)){a=!0;var b,c=this.b[(this.a&768)>>8],d=c.T,e,f,g;this.a&=-2;switch(this.a&14){case 4:this.i&8&&(this.a&=63);this.i=c.status|this.g&64|(d&&512==d.J?128:0);break;case 6:1==(this.f&3)&&(b=this.f&65408,c=(this.f&16)<<2,this.g=this.f&4?this.g+b:this.g-b,this.f=this.g=this.g&65408|c);break;case 8:this.i=this.g;break;case 12:b=this.tc;case 10:b||(b=this.Qc),e=this.f>>7,f=this.f&64?1:0,g=this.f&63,!d||e>=d.J||g>=d.M? +this.a|=37888:(a=65536-this.i&65535,d=(this.h&63)<<16|this.m,a=b.call(this,c,e,f,g,a,d,this.Oc.bind(this)))}a&&(this.a|=129,this.a&64&&bc(this.c,this.Da))}};h.Xd=function(){return this.m};h.ff=function(a){this.m=a&65534};h.$d=function(){return this.f};h.jf=function(a){this.f=a};h.ae=function(){return this.i};h.kf=function(a){this.i=a};h.Yd=function(){return this.h};h.gf=function(a){this.h=a&63;this.a=this.a&-49|(this.h&3)<<4}; +var tg="",ug="?",vg="??",zg={},rg=(zg[63744]=[null,null,O.prototype.Zd,O.prototype.hf,"RLCS"],zg[63746]=[null,null,O.prototype.Xd,O.prototype.ff,"RLBA"],zg[63748]=[null,null,O.prototype.$d,O.prototype.jf,"RLDA"],zg[63750]=[null,null,O.prototype.ae,O.prototype.kf,"RLMP"],zg[63752]=[null,null,O.prototype.Yd,O.prototype.gf,"RLBE"],zg); +function Ag(a,b,c){A.call(this,"Computer",a,0,33554432);this.l.R=!1;this.F=null;Bg(this,b);this.w=Dc(this,"autoPower",a,6);this.g=0;this.K=+a.busWidth||+a.buswidth;this.a=Cg;this.u=null;this.H=this.i=this.D=this.m=this.I=!1;this.h=null;this.L=Dc(this,"url")||"";(Math.random()+.1).toString(36);this.b=Dg(this);if(this.c=Ra("CPU",this.id)){this.C=Ra("Debugger",this.id);this.s=new Fb({id:this.Ha+".bus",busWidth:this.K},this.c,this.C);var d,e=C(this.id);if((this.f=Ra("Panel",this.id))&&this.f.ab)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;bCg){if(Eg(d,this.u)){this.h=new R(this,"1.31.1",Ng);Eg(this.h)&&(Og(this,d),a=Pg,Sg(this.h));this.h.set(Kg,sa());Tg(this.h);var e=this.a&&!this.m;if(a==Lg||va("Click OK to restore the previous "+Wa+" machine state, or CANCEL to reset the machine.")){if(c=Jg(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Eg(d,g):("error"==f&&"no machine state"!= g?(this.B("Error: "+g),"unable to verify user"==g&&(za(Ug,""),this.b=null)):this.V(f+": "+g),Sg(d),Eg(d)?(c=Jg(d),e=!0):c=!1))}e&&Hg(this,c?d:null)}else a==Pg&&d.clear()}else Hg(this);delete this.u;delete this.v}e=C(this.id);for(f=0;fa[1];a=a[2];this.H=!0;this.l.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.c&&(Vg(this,this.c,b,c,a),vb(this),this.c.Ca());this.D&&(Og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0}; +function Vg(a,b,c,d,e){if(!b.l.R){b.l.R=!0;if(b.ba){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof f&&(f=null);!b.ba(f,d)&&f&&(y("Unable to restore state for "+b.type),a.G&&!a.I?(c.clear(),a.a=Cg,window&&window.location.reload()):a.D=!0,b.ba(null),e=!1)}if(!d&&b.mc)for(a=b.mc.split("|"),c=0;ca[1];a=a[2];this.H=!0;this.l.R=!0;var d=this.j.power;d&&(d.textContent="Shutdown");this.c&&(Vg(this,this.c,b,c,a),vb(this),this.c.la());this.D&&(Og(this,b),b.clear());!c&&this.h&&(this.h.clear(),delete this.h);this.g=0}; function Og(a,b){if(va("There may be a problem with your "+Wa+" machine.\n\nTo help us diagnose it, click OK to send this "+Wa+" machine state to http://www.pcjs.org.")){var c=a.L;a=a.b||"";b=b.toString();var d={};d.app=Wa;d.ver="1.31.1";d.url=c;d.user=a;d.type="bug";d.data=b;v("http://www.pcjs.org/api/v1/report",d,!0)}} -function Wg(a,b,c){var d,e="none";if(a.g)return null;a.g--;var f=new R(a,"1.31.1"),g=new R(a,"1.31.1",Ig),k=sa();g.set(Kg,k);f.set(Kg,k);f.set(Xg,"1.31.1");f.set(Yg,window?window.location.href:null);f.set(Zg,window?window.navigator.userAgent:"");a.c&&a.c.ga&&(c&&I(a.c),d=a.c.ga(b,c),"object"===typeof d&&f.set(a.c.id,d),c&&(a.c.l.R=!1,!1===d&&(e=null)));for(var k=C(a.id),l=0;l=d||30<=(c.ec+=d))&&(e.textContent=c.l.P?c.Ia.toFixed(2)+"Mhz":"Stopped",c.ec=0)}if(a.f&&(a=a.f,b=b||0,a.m)){c=a.c.l.P;d=!!(a.c.g&8);if(0>=b||60<=(a.i+=b)){for(e=0;e=d||30<=(c.ec+=d))&&(e.textContent=c.l.P?c.Ia.toFixed(2)+"Mhz":"Stopped",c.ec=0)}if(a.f&&(a=a.f,b=b||0,a.m)){c=a.c.l.P;d=!!(a.c.g&8);if(0>=b||60<=(a.i+=b)){for(e=0;e