diff --git a/devices/pdp11/machine/1170/monitor/debugger/machine.xml b/devices/pdp11/machine/1170/monitor/debugger/machine.xml index e7f6b20ec..d6b10230a 100644 --- a/devices/pdp11/machine/1170/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1170/monitor/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 Boot Monitor with Debugger - - + diff --git a/devices/pdp11/machine/1170/monitor/machine.xml b/devices/pdp11/machine/1170/monitor/machine.xml index db64c1f0a..b8773cd16 100644 --- a/devices/pdp11/machine/1170/monitor/machine.xml +++ b/devices/pdp11/machine/1170/monitor/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 Boot Monitor - - + diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 31e2adb6d..10083ceb1 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -13,8 +13,8 @@ machines: Toggle-Ins ---------- -As DEC explains in its [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are listed below. +As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. ### Memory Management @@ -38,31 +38,32 @@ Chapter 4: "There are several useful toggle-ins that are probably not very well Load Address 300 Exam Display = 070707 ... Relocation works -With the PDPjs Debugger, the above "toggle-in" is easily entered with these commands: +With the PDPjs Debugger, the above "toggle-in" is easily entered with the following commands (the semicolons are optional; +they just make it easier to paste an entire set of commands into the Debugger at once): - e 200 012737 000400 177572 012737 070707 000200 000000 - e 300 000300 - e 17772300 077406 - e 17772340 000001 - r pc 200 + e 200 012737 000400 177572 012737 070707 000200 000000; + e 300 000300; + e 17772300 077406; + e 17772340 000001; + r pc 200; g which should produce these results: >> e 200 012737 000400 177572 012737 070707 000200 000000 - changing 000200 from 00000 to 12737 - changing 000202 from 00000 to 00400 - changing 000204 from 00000 to 77572 - changing 000206 from 00000 to 12737 - changing 000210 from 00000 to 70707 - changing 000212 from 00000 to 00200 - changing 000214 from 00000 to 00000 + changing 000200 from 000000 to 012737 + changing 000202 from 000000 to 000400 + changing 000204 from 000000 to 177572 + changing 000206 from 000000 to 012737 + changing 000210 from 000000 to 070707 + changing 000212 from 000000 to 000200 + changing 000214 from 000000 to 000000 >> e 300 000300 - changing 000300 from 00000 to 00300 + changing 000300 from 000000 to 000300 >> e 17772300 077406 - changing 00017772300 from 00000 to 77406 + changing 00017772300 from 000000 to 077406 >> e 17772340 000001 - changing 00017772340 from 00000 to 00001 + changing 00017772340 from 000000 to 000001 >> r pc 200 updated registers: R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 @@ -74,8 +75,12 @@ which should produce these results: R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000 SP=000000 PC=000214 PS=000001 SW=00000000 T0 N0 Z0 V0 C1 000214: 000000 HALT - >> dw 300 l1 - 000300 70707 + >> d 300 l1 + 000300 070707 + +NOTE: By long-standing convention, all PCjs Debuggers use the "e" command to edit memory and the "d" command to dump +memory. Don't confuse those letters with the "EXAM" and "DEP" switches on the PDP-11 Front Panel, because they perform +*opposite* operations. ### Unibus Map Checkout @@ -85,7 +90,7 @@ which should produce these results: Deposit 125252 Known Data Load Address 17000500 - Deposit 125252 Data Path Ok + Examine 125252 Data Path Ok Load Address 17000700 Deposit 070707 Known Data @@ -101,3 +106,190 @@ which should produce these results: Load address 17000500 Relocates to 700 Examine 070707 ... Relocated ok + +The above "toggle-in" can be performed with the PDPjs Debugger as follows: + + e 500 125252; + d 17000500 l1; + e 17000700 070707; + e 17770202 000000; + e 17770200 000200; + e 17772516 40; + d 17000500 l1 + +which should produce these results: + + >> e 500 125252 + changing 000500 from 000000 to 125252 + >> d 17000500 l1 + 00017000500 125252 + >> e 17000700 070707 + changing 00017000700 from 000000 to 070707 + >> e 17770202 000000 + changing 00017770202 from 000000 to 000000 + >> e 17770200 000200 + changing 00017770200 from 000000 to 000200 + >> e 17772516 40 + changing 00017772516 from 000000 to 000040 + >> d 17000500 l1 + 00017000500 070707 + +If you also want to see all the hardware register activity, use the Debugger's "m bus on" command to turn bus messages on: + + >> m bus on + messages on: bus + >> e 500 125252 + changing 000500 to 125252 + >> d 17000500 l1 + 00017000500 125252 + >> e 17000700 070707 + changing 00017000700 to 070707 + >> e 17770202 000000 + changing 00017770202 to 000000 + UNIMAP1.writeWord(00017770202,000000) + >> e 17770200 000200 + changing 00017770200 to 000200 + UNIMAP0.writeWord(00017770200,000200) + >> e 17772516 40 + changing 00017772516 to 000040 + MMR3.writeWord(00017772516,000040) + >> d 17000500 l1 + 00017000500 070707 + +### Memory Clear Program + + Use this toggle-in to clear all of memory from location 0 to system size. + + LOCATION CONTENTS INSTRUCTIONS & NOTES + + 17772300 077406 KIPDR 0 + 17772316 077406 KIPDR 7 = I/O page for program + 17772340 000000 KIPAR 0 ; Load 200 if using trap catchers + 17772356 177600 KIPAR 7 = I/O page for program + 17777700 000000 R0 = Start Virtual Address + 17777701 172340 R1 = KIPAR 0 Address + 17777702 177572 R2 = MMR0 Address + 17777703 177760 R3 = System size register Address + 17777704 172516 R4 = MMR3 Address + 17777705 Pattern R5 = Desired pattern or "0" + 17777706 177676 R6 = Stack pointer + 17777776 000000 PSW = 0 + 17772240 012714 MOV #20,(R4) ; Enable 22-bit Mapping + 17772242 000020 + 17772244 005212 INC (R2) ; Enable Memory Management + 17772246 010520 1$: MOV R5,(R0)+ ; Data to memory + 17772250 020027 CMP R0,#17776 ; Top of Page 0? + 17772252 017776 + 17772254 003774 BLE 1$ + 17772256 062711 ADD #200,(R1) ; Step Page + 17772260 000200 + 17772262 021311 CMP (R3),(R1) ; Top of Memory? + 17772264 003402 BLE 2$ + 17772266 005000 CLR R0 ; Start at Virtual Address 0 + 17772270 000776 BR 1$ + 17772272 005312 2$: DEC (R2) ; Disable Relocation + 17772274 000000 HLT + + Load address 172240 + Start + +The above "toggle-in" can be entered with the PDPjs Debugger as follows: + + e 17772300 077406; + e 17772316 077406; + e 17772340 000000; + e 17772356 177600; + e 17777700 000000; + e 17777701 172340; + e 17777702 177572; + e 17777703 177760; + e 17777704 172516; + e 17777705 123123; + e 17777706 177676; + e 17777776 000000; + e 17772240 012714 000020 005212 010520 020027 017776 003774 062711; + e 17772260 000200 021311 003402 005000 000776 005312 000000; + r pc 172240 + +which should produce the following results when bus messages are turned on ("m bus on"): + + >> m bus on + messages on: bus + >> e 17772300 077406 + changing 00017772300 to 077406 + KISDR0.writeWord(00017772300,077406) + >> e 17772316 077406 + changing 00017772316 to 077406 + KISDR7.writeWord(00017772316,077406) + >> e 17772340 000000 + changing 00017772340 to 000000 + KISAR0.writeWord(00017772340,000000) + >> e 17772356 177600 + changing 00017772356 to 177600 + KISAR7.writeWord(00017772356,177600) + >> e 17777700 000000 + changing 00017777700 to 000000 + R0SET0.writeWord(00017777700,000000) + >> e 17777701 172340 + changing 00017777701 to 172340 + R1SET0.writeWord(00017777701,172340) + >> e 17777702 177572 + changing 00017777702 to 177572 + R2SET0.writeWord(00017777702,177572) + >> e 17777703 177760 + changing 00017777703 to 177760 + R3SET0.writeWord(00017777703,177760) + >> e 17777704 172516 + changing 00017777704 to 172516 + R4SET0.writeWord(00017777704,172516) + >> e 17777705 123123 + changing 00017777705 to 123123 + R5SET0.writeWord(00017777705,123123) + >> e 17777706 177676 + changing 00017777706 to 177676 + R6KERNEL.writeWord(00017777706,177676) + >> e 17777776 000000 + changing 00017777776 to 000000 + PSW.writeWord(00017777776,000000) + >> e 17772240 012714 000020 005212 010520 020027 017776 003774 062711 + changing 00017772240 to 012714 + SISAR0.writeWord(00017772240,012714) + changing 00017772242 to 000020 + SISAR1.writeWord(00017772242,000020) + changing 00017772244 to 005212 + SISAR2.writeWord(00017772244,005212) + changing 00017772246 to 010520 + SISAR3.writeWord(00017772246,010520) + changing 00017772250 to 020027 + SISAR4.writeWord(00017772250,020027) + changing 00017772252 to 017776 + SISAR5.writeWord(00017772252,017776) + changing 00017772254 to 003774 + SISAR6.writeWord(00017772254,003774) + changing 00017772256 to 062711 + SISAR7.writeWord(00017772256,062711) + >> e 17772260 000200 021311 003402 005000 000776 005312 000000 + changing 00017772260 to 000200 + SDSAR0.writeWord(00017772260,000200) + changing 00017772262 to 021311 + SDSAR1.writeWord(00017772262,021311) + changing 00017772264 to 003402 + SDSAR2.writeWord(00017772264,003402) + changing 00017772266 to 005000 + SDSAR3.writeWord(00017772266,005000) + changing 00017772270 to 000776 + SDSAR4.writeWord(00017772270,000776) + changing 00017772272 to 005312 + SDSAR5.writeWord(00017772272,005312) + changing 00017772274 to 000000 + SDSAR6.writeWord(00017772274,000000) + >> r pc 172240 + updated registers: + R0=000000 R1=172340 R2=177572 R3=177760 R4=172516 R5=123123 + SP=177676 PC=172240 PS=000000 SW=00000000 T0 N0 Z0 V0 C0 + SISAR0.readWord(172240): 012714 + SISAR1.readWord(172242): 000020 + SISAR0.readWord(172240): 012714 + SISAR1.readWord(172242): 000020 + 172240: 012714 000020 MOV #20,@R4 + diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 846aab7b4..674d438c7 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel and Debugger - - + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 4d1466a77..e770a5112 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/machine/1170/vt100/debugger/machine.xml b/devices/pdp11/machine/1170/vt100/debugger/machine.xml index a2a5b2d5c..fef987ce4 100644 --- a/devices/pdp11/machine/1170/vt100/debugger/machine.xml +++ b/devices/pdp11/machine/1170/vt100/debugger/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/machine/1170/vt100/machine.xml b/devices/pdp11/machine/1170/vt100/machine.xml index af6436216..6283cd2e5 100644 --- a/devices/pdp11/machine/1170/vt100/machine.xml +++ b/devices/pdp11/machine/1170/vt100/machine.xml @@ -4,8 +4,7 @@ PDP-11/70 with Front Panel - - + diff --git a/devices/pdp11/rl11/default.xml b/devices/pdp11/rl11/default.xml index b70668bc1..6d8b4ddf8 100644 --- a/devices/pdp11/rl11/default.xml +++ b/devices/pdp11/rl11/default.xml @@ -1,10 +1,10 @@ - + Disk Drive Controls - + Load diff --git a/docs/pcx86/examples/pcx86-dbg.js b/docs/pcx86/examples/pcx86-dbg.js index f0585cb0c..5a7c9859f 100644 --- a/docs/pcx86/examples/pcx86-dbg.js +++ b/docs/pcx86/examples/pcx86-dbg.js @@ -709,8 +709,7 @@ case "^":d=f^e;break;case "|":d=f|e;break;case "&&":d=f&&e?1:0;break;case "||":d function pq(a,b,c){var d;if(b){b=qq(a,b);for(var e=0,f=!1,g=b,h=[],k=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } return b; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_BYTE); b = 0xff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } return b; }, @@ -336,13 +336,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, !bus.nDisableFaults); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_BYTE); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true); + this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, !bus.nDisableFaults); } }, @@ -368,14 +368,14 @@ BusPDP11.IOController = { } if (w >= 0) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } return w; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.READ_WORD); w = 0xffff; if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } return w; }, @@ -405,13 +405,13 @@ BusPDP11.IOController = { } if (fWrite) { if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true); + this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, !bus.nDisableFaults); } return; } bus.fault(addr, PDP11.CPUERR.TIMEOUT, PDP11.ACCESS.WRITE_WORD); if (DEBUGGER && this.dbg && this.dbg.messageEnabled(afn[BusPDP11.IOHANDLER.MSG_CATEGORY])) { - this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true); + this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, !bus.nDisableFaults); } } }; @@ -896,6 +896,14 @@ BusPDP11.prototype.getByte = function(addr) */ BusPDP11.prototype.getByteDirect = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } this.fFault = false; this.nDisableFaults++; var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr); @@ -939,6 +947,14 @@ BusPDP11.prototype.getWord = function(addr) */ BusPDP11.prototype.getWordDirect = function(addr) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var w; var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; @@ -985,6 +1001,14 @@ BusPDP11.prototype.setByte = function(addr, b) */ BusPDP11.prototype.setByteDirect = function(addr, b) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } this.fFault = false; this.nDisableFaults++; this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr); @@ -1030,6 +1054,14 @@ BusPDP11.prototype.setWord = function(addr, w) */ BusPDP11.prototype.setWordDirect = function(addr, w) { + /* + * If bits 18-21 of addr are all set (which is implied by addr >= BusPDP11.IOPAGE_UNIBUS aka 0x3C0000), + * then we have a 22-bit address pointing to the top 256Kb range, so we must pass the address through the + * UNIBUS relocation map. + */ + if (addr >= BusPDP11.IOPAGE_UNIBUS) { + addr = this.cpu.mapUnibus(addr); + } var off = addr & this.nBlockLimit; var iBlock = (addr & this.nBusMask) >>> this.nBlockShift; this.fFault = false; diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 74659313a..0def5db5c 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -2867,8 +2867,8 @@ if (DEBUGGER) { /** * doDump(asArgs) * - * The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, and it is - * interpreted using the current base. + * The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, + * and it is interpreted using the current base. * * @this {DebuggerPDP11} * @param {Array.} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes]) @@ -2941,7 +2941,7 @@ if (DEBUGGER) { return; } } - if (!sAddr) sCmd = this.sCmdDumpPrev || "db"; + if (!sAddr) sCmd = this.sCmdDumpPrev || "dw"; } else { this.sCmdDumpPrev = sCmd; } @@ -2963,17 +2963,20 @@ if (DEBUGGER) { if (len > 0x10000) len = 0x10000; // prevent bad user (or variable) input from producing excessive output } - var sDump = ""; - var size = (sCmd == "dd"? 4 : (sCmd == "dw"? 2 : 1)); + /* + * I've changed the code below to effectively make "dw" the default if only "d" is specified, + * since this is primarily a word-oriented machine. + */ + var size = (sCmd == "dd"? 4 : (sCmd == "db"? 1 : 2)); var nBytes = (size * len) || 128; var nLines = ((nBytes + 15) >> 4) || 1; + var sDump = ""; while (nLines-- && nBytes > 0) { - var data = 0, shift = 0, i; var sData = "", sChars = ""; sAddr = this.toStrAddr(dbgAddr); /* - * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords). + * Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16. * * And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've * changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated @@ -2981,8 +2984,10 @@ if (DEBUGGER) { * * Besides, it's nice for "db" and "dw" to generate the same Bus activity that typical byte and word reads do. */ - for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) { - var n = 1; + var i, n; + var data = 0, shift = 0; + for (i = this.nBase; i > 0 && nBytes > 0; i -= n, nBytes -= n) { + n = 1; var v = size == 1? this.getByte(dbgAddr, n) : this.getWord(dbgAddr, (n = 2)); data |= (v << (shift << 3)); shift += n; @@ -2992,7 +2997,6 @@ if (DEBUGGER) { data = shift = 0; } sChars += (v >= 32 && v < 128? String.fromCharCode(v) : '.'); - nBytes -= n; } if (sDump) sDump += '\n'; sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : ""); @@ -3045,8 +3049,7 @@ if (DEBUGGER) { if (vNew & ~mask) { this.println("warning: " + str.toHex(vNew) + " exceeds " + size + "-byte value"); } - var vOld = fnGet.call(this, dbgAddr); - this.println("changing " + this.toStrAddr(dbgAddr) + " from " + this.toStrBase(vOld, size) + " to " + this.toStrBase(vNew, size)); + this.println("changing " + this.toStrAddr(dbgAddr) + (this.messageEnabled(MessagesPDP11.BUS)? "" : (" from " + this.toStrBase(fnGet.call(this, dbgAddr), size))) + " to " + this.toStrBase(vNew, size)); fnSet.call(this, dbgAddr, vNew, size); } }; diff --git a/modules/shared/lib/debugger.js b/modules/shared/lib/debugger.js index cf599d213..42af047e3 100644 --- a/modules/shared/lib/debugger.js +++ b/modules/shared/lib/debugger.js @@ -681,7 +681,7 @@ if (DEBUGGER) { var s; switch(this.nBase) { case 8: - s = str.toOct(n, Math.round((8/3) * nBytes)); + s = str.toOct(n, nBytes * 3 - (nBytes > 2? 1 : 0)); break; case 10: s = n.toString(); diff --git a/modules/shared/lib/weblib.js b/modules/shared/lib/weblib.js index 0c683b730..ad0a42561 100644 --- a/modules/shared/lib/weblib.js +++ b/modules/shared/lib/weblib.js @@ -202,9 +202,9 @@ web.getResource = function(sURL, dataPost, fAsync, done) if (DEBUG) { /* - * The larger resources that we put on archive.pcjs.org should also be available locally... + * The larger resources we put on archive.pcjs.org should also be available locally... */ - sURL = sURL.replace("http://archive.pcjs.org", ""); + sURL = sURL.replace(/^http:\/\/archive.pcjs.org(\/.*)\/([^\/]*)$/, "$1/archive/$2"); } if (NODE) { diff --git a/versions/pc8080/1.30.2/pc8080-dbg.js b/versions/pc8080/1.30.2/pc8080-dbg.js index 1fe231f13..65dde8297 100644 --- a/versions/pc8080/1.30.2/pc8080-dbg.js +++ b/versions/pc8080/1.30.2/pc8080-dbg.js @@ -191,7 +191,7 @@ function Ce(a,b,c){var d;if(b){b=De(a,b);for(var e=0,f=!1,g=b,h=[],k=[],n=b.spli d))}return d}function De(a,b){for(var c,d=/\{(.*?)\}/;(c=b.match(d))&&!(0<=c[1].indexOf("{"));){var e=Ce(a,c[1]);b=b.replace("{"+c[1]+"}",null!=e?Ge(a,e):"undefined")}for(;(c=b.match(/\[(.*?)]/))&&!(0<=c[1].indexOf("["));)b=b.replace("["+c[1]+"]","unimplemented");for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.ba-a.na}if(null==d)break;b=b.replace(c[0],d.toString())}return b} function Ee(a,b,c,d){var e;null!=b?(e=a.Pb(b),0<=e?e=a.Qb(e):(e=a.ea[b],null==e&&(e=aa(b,a.Xa))),null!=e||d||a.g("invalid "+(c?c:"value")+": "+b)):d||a.g("missing "+(c||"value"));return e} function Fe(a,b,c){var d,e=!1;if(void 0!==c){e=!0;d=c;var f=0,g="";if(!f||4>=1;g=p+g;d>>=8}d=t(c,0,!0)+" "+c+". "+ba(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.g((null!=b?b+": ":"")+d);return e}function He(a,b){if(b)return Fe(a,b,a.ea[b]);var c=0;for(b in a.ea)Fe(a,b,a.ea[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);ec&&(d+=" '"+String.fromCharCode(c)+"'"));a.O((null!=b?b+": ":"")+d);return e}function uq(a,b){if(b)return sq(a,b,a.ya[b]);var c=0;for(b in a.ya)sq(a,b,a.ya[b]),c++;return 0>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} function sa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0":">",'"':""","'":"'"};function wa(a){return a.replace(/[&<>"']/g,function(a){return va[a]})} function xa(a,b){return(a+" ").slice(0,b)}function ya(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}var za={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US"}; -function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} +function Aa(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Fa(a,b){var c,d={ea:null,ia:null,Ka:null,Ja: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.Ka=g.load;d.Ja=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=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.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.ea=e;else if(e=g.words)for(d.ea=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.ea=Array(4*e.length),f=c=0;c>8&255,d.ea[f++]=e[c]>>16&255,d.ea[f++]=e[c]>>24&255;else d.ea=g;d.ia=g.symbols;d.ea.length?1==d.ea.length&&(q(d.ea[0]),d=null):(q("Empty resource: "+a),d=null)}catch(h){q("Resource data error ("+a+"): "+h.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.kb=this.id:(this.Pa=this.id.substr(0,b),this.kb=this.id.substr(b+1));this[a]=c;this.B={ready:!1,Za:!1,$b:!1,ja:!1,error:!1};this.Rb=null;this.B.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,kb=/([^&=]+)=?([^&]*)/g;cb=kb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} +function u(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.qc=b.comment;this.Sc=b;b=this.id.indexOf(".");0>b?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,ac:!1,ja:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;v.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.cd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; -k.sa=function(a,b,c,d){if(this.A&&this.A.sa(a,b,c,d)||this.b&&this.b.sa(a,b,c,d)||this.i&&this.i.sa(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.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= -a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.sa.call(this,a,b,c,d)}};k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ga=function(a,b){b||(Hb(),this.reset());return!0};k.Fa=function(){return!0}; -function Vb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Vb(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Wb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.ad=function(a){a||this.b.B.Z||(this.w.reset(),Xb(this.b),Ab(this,"ENABLE")&&this.b.hb())};k.bd=function(){};k.Xc=function(a){a||this.b.ha()};k.Vc=function(a){if(!a&&!this.b.B.Z)if(Ab(this,"ENABLE"))this.b.hb();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.ib(0),rb(a,!1);else try{var b=this.b.ib(1);0a;a++)this.g["S"+a]=[0,!1,!1,this.dd,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(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.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= +a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.J="DEP"==b,a.K="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; +function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Xb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ha()),c=8==(a.i&&a.i.da||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +k.bd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.cd=function(){};k.Yc=function(a){a||this.b.ha()};k.Wc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0>2;this.w=this.xa-1;this.C=this.H/this.xa|0;this.Ya=[];this.f=0;this.g=!1;this.v=[];this.Hc=[jc,kc,lc,mc];a=new I(this);nc(a,this.i);this.W=Array(this.C);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Ya[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function kc(a,b,c){var d=!1,e=this.controller,f=e.Ya[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Ya[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function lc(a,b){var c=-1,d=this.controller;(a=d.Ya[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!0),c;d.Ca(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!0);return c} -function mc(a,b,c){var d=!1,e=this.controller;if(a=e.Ya[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!0):(e.Ca(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!0))} -function pc(a,b){if(b!=a.A){var c;a.A&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Lb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Lb){n=l.size-(f-m);n>g&&(n=g);l.Lb=f-l.F+n;f=m+a.xa;g-=n;h++;continue}}return uc(1,f,g)}f=new I(a,f,n,a.xa,d,e);nc(f,a.i,l);a.W[h++]=f;f=m+a.xa;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Vb(a&this.w,a)};k.Tb=function(a){this.g=!1;this.f++;a=this.W[(a&this.Ea)>>>this.la].fc(a&this.w,a);this.f--;return a}; -k.oa=function(a){3932160<=a&&(a=wc(this.b,a));return this.W[(a&this.Ea)>>>this.la].ra(a&this.w,a)};k.$a=function(a){var b=a&this.w,c=(a&this.Ea)>>>this.la;this.g=!1;this.f++;a=this.W[c].gc(b,a);this.f--;return a};k.Wb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Yb(a&this.w,b&255,a)};k.pb=function(a,b){this.g=!1;this.f++;this.W[(a&this.Ea)>>>this.la].Zb(a&this.w,b&255,a);this.f--}; -k.gb=function(a,b){3932160<=a&&(a=wc(this.b,a));this.W[(a&this.Ea)>>>this.la].Mb(a&this.w,b&65535,a)};k.Cb=function(a,b){var c=a&this.w,d=(a&this.Ea)>>>this.la;this.g=!1;this.f++;this.W[d].kc(c,b&65535,a);this.f--};function xc(a){for(var b=0,c=[],d=0;da.b.wb)){var h=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,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=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 t=g[4],w=0;w>5&3;b.Ma=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ta!=c&&(b.Ta=c,Nc(b))}};k.pd=function(){var a=this.b.cb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.qd=function(){return this.b.Jb};k.rd=function(){return this.b.ob};k.ie=function(a){var b=this.b;1170>b.wb&&(a&=-49);b.ob!=a&&(b.ob=a,b.Qb=a&16?4194303:262143,Nc(b))};k.Rd=function(a){a=a>>1&63;var b=this.b.Kb[a>>1];return a&1?b>>16:b&65535}; -k.Ie=function(a,b){b=b>>1&63;var c=b>>1;this.b.Kb[c]=b&1?this.b.Kb[c]&65535|(a&63)<<16:this.b.Kb[c]&-65536|a&65534};k.Kd=function(a){return this.b.V[1][a>>1&7]};k.Be=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Id=function(a){return this.b.V[1][(a>>1&7)+8]};k.ze=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Jd=function(a){return this.b.wa[1][a>>1&7]};k.Ae=function(a,b){b=b>>1&7;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.Hd=function(a){return this.b.wa[1][(a>>1&7)+8]}; -k.ye=function(a,b){b=(b>>1&7)+8;this.b.wa[1][b]=a;this.b.V[1][b]&=65295};k.ld=function(a){return this.b.V[0][a>>1&7]};k.ee=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.jd=function(a){return this.b.V[0][(a>>1&7)+8]};k.ce=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.kd=function(a){return this.b.wa[0][a>>1&7]};k.de=function(a,b){b=b>>1&7;this.b.wa[0][b]=a;this.b.V[0][b]&=65295};k.hd=function(a){return this.b.wa[0][(a>>1&7)+8]};k.be=function(a,b){b=(b>>1&7)+8;this.b.wa[0][b]=a;this.b.V[0][b]&=65295}; -k.Qd=function(a){return this.b.V[3][a>>1&7]};k.He=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Od=function(a){return this.b.V[3][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Pd=function(a){return this.b.wa[3][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Nd=function(a){return this.b.wa[3][(a>>1&7)+8]};k.Ee=function(a,b){b=(b>>1&7)+8;this.b.wa[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.M&2048?this.b.Va[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.M&2048?this.b.Va[b]=a:this.b.u[b]=a};k.wd=function(){return this.b.M&49152?this.b.Ha[0]:this.b.u[6]};k.ne=function(a){this.b.M&49152?this.b.Ha[0]=a:this.b.u[6]=a};k.zd=function(){return this.b.u[7]};k.qe=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Va[a]};k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Va[b]=a};k.xd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[1]}; -k.oe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[1]=a};k.yd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ha[3]};k.pe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ha[3]=a};k.fd=function(a){return this.b.Ac[a-65504>>1]};k.$d=function(a,b){this.b.Ac[b-65504>>1]=a};k.xc=function(a){return 65520==a?61183:0};k.Ec=function(){};k.Md=function(){return 1};k.De=function(){};k.ed=function(){return this.b.ga};k.Zd=function(){this.b.ga=0};k.nd=function(){return this.b.zc}; -k.ge=function(a,b){b&1||(a&=255);this.b.zc=a};k.sd=function(a){return a?this.b.ic:0};k.je=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.ic=a;b.I|=2};k.Ld=function(a){return a?this.b.eb&65280:0};k.Ce=function(a){this.b.eb=a|255};k.vd=function(){return fc(this.b)};k.me=function(a){Oc(this.b,a&-1809|fc(this.b)&1808);this.b.I|=128};k.Dc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Rd,K.prototype.Ie,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Kd,K.prototype.Be,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Id,K.prototype.ze,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Jd,K.prototype.Ae,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Hd,K.prototype.ye,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.ld,K.prototype.ee,"KISDR",8,1145],M[62672]=[null,null,K.prototype.jd,K.prototype.ce,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.kd, -K.prototype.de,"KISAR",8,1145],M[62704]=[null,null,K.prototype.hd,K.prototype.be,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.rd,K.prototype.ie,"MMR3",1,1145],M[65382]=[null,null,K.prototype.md,K.prototype.fe,"LKS"],M[65402]=[null,null,K.prototype.od,K.prototype.he,"MMR0",1,1145],M[65404]=[null,null,K.prototype.pd,K.prototype.Dc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.qd,K.prototype.Dc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Qd,K.prototype.He,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Od, -K.prototype.Fe,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Pd,K.prototype.Ge,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Nd,K.prototype.Ee,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],M[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],M[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],M[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],M[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],M[65477]=[null,null,K.prototype.Ab,K.prototype.Db, -"R5SET0"],M[65478]=[null,null,K.prototype.wd,K.prototype.ne,"R6KERNEL"],M[65479]=[null,null,K.prototype.zd,K.prototype.qe,"R7KERNEL"],M[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Bb, -K.prototype.Eb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.xd,K.prototype.oe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.yd,K.prototype.pe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.fd,K.prototype.$d,"CTRL",1,1170],M[65520]=[null,null,K.prototype.xc,K.prototype.Ec,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.xc,K.prototype.Ec,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Md,K.prototype.De,"SYSID",1,1170],M[65526]=[null,null,K.prototype.ed,K.prototype.Zd,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.nd,K.prototype.ge,"MB",1,1170],M[65530]=[null,null,K.prototype.sd,K.prototype.je,"PIR"],M[65532]=[null,null,K.prototype.Ld,K.prototype.Ce,"SL"],M[65534]=[null,null,K.prototype.vd,K.prototype.me,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +function ic(a,b,c){u.call(this,"Bus",a,ic,64);this.b=b;this.i=c;this.K=a.busWidth||16;this.g=0;this.J=[];this.C=null;this.D=1<>2;this.w=this.ya-1;this.v=this.D/this.ya|0;this.Za=[];this.ma=0;this.f=!1;this.B=[];this.Ic=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.v);for(b=0;b>8:e[2](b)&255):b&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](b&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,3);c=255;this.i&&F(this.i,e[5])&&E(this.i,"warning: unconverted read access to byte @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function lc(a,b,c){var d=!1,e=this.controller,f=e.Za[a];if(f)if(f[1])f[1](b,c),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(c&1)f[3](a&255|b<<8,c&-2);else f[3](a&-256|b,c);d=!0}}else c&1&&(f=e.Za[a&-2])&&f[3]&&(c&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,c),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,5),this.i&&F(this.i,f[5])&&E(this.i,"warning: unconverted write access to byte @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function mc(a,b){var c=-1,d=this.controller;(a=d.Za[a])&&(a[2]?c=a[2](b):a[0]&&(c=a[0](b)|a[0](b+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.ma),c;d.Da(b,16,2);c=65535;this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted read access to word @"+J(this.i,b)+": "+J(this.i,c),!0,!d.ma);return c} +function nc(a,b,c){var d=!1,e=this.controller;if(a=e.Za[a])a[3]?(a[3](b,c),d=!0):a[1]&&(a[1](b&255,c),a[1](b>>8,c+1),d=!0);d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Da(c,16,4),this.i&&F(this.i,a[5])&&E(this.i,"warning: unconverted write access to word @"+J(this.i,c)+": "+J(this.i,b),!0,!e.ma))} +function qc(a,b){if(b!=a.g){var c;a.g&&(c=(1<>>a.la;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){c/=1024;var r;e="";r?10>>=a.la;0>>=a.la;0>>this.la].Wb(a&this.w,a)};k.Ub=function(a){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;a=this.W[(a&this.Fa)>>>this.la].gc(a&this.w,a);this.ma--;return a}; +k.pa=function(a){3932160<=a&&(a=xc(this.b,a));return this.W[(a&this.Fa)>>>this.la].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=xc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;a=this.W[c].hc(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Zb(a&this.w,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.f=!1;this.ma++;this.W[(a&this.Fa)>>>this.la].$b(a&this.w,b&255,a);this.ma--}; +k.hb=function(a,b){3932160<=a&&(a=xc(this.b,a));this.W[(a&this.Fa)>>>this.la].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=xc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.la;this.f=!1;this.ma++;this.W[d].lc(c,b&65535,a);this.ma--}; +function yc(a){for(var b=0,c=[],d=0;da.b.xb)){var h=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,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=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 t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Nc(b))}};k.qd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.rd=function(){return this.b.Kb};k.sd=function(){return this.b.pb};k.je=function(a){var b=this.b;1170>b.xb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Rb=a&16?4194303:262143,Nc(b))};k.Sd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Je=function(a,b){b=b>>1&63;var c=b>>1;this.b.Lb[c]=b&1?this.b.Lb[c]&65535|(a&63)<<16:this.b.Lb[c]&-65536|a&65534};k.Ld=function(a){return this.b.V[1][a>>1&7]};k.Ce=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Jd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Ae=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Kd=function(a){return this.b.xa[1][a>>1&7]};k.Be=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Id=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.ze=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.md=function(a){return this.b.V[0][a>>1&7]};k.fe=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.kd=function(a){return this.b.V[0][(a>>1&7)+8]};k.de=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.ld=function(a){return this.b.xa[0][a>>1&7]};k.ee=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.jd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ce=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Rd=function(a){return this.b.V[3][a>>1&7]};k.Ie=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Pd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Ge=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Qd=function(a){return this.b.xa[3][a>>1&7]};k.He=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Od=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Fe=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.M&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.M&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.xd=function(){return this.b.M&49152?this.b.Ia[0]:this.b.u[6]};k.oe=function(a){this.b.M&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Ad=function(){return this.b.u[7]};k.re=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.M&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.M&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.yd=function(){return 1==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.pe=function(a){1==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.zd=function(){return 3==(this.b.M&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.qe=function(a){3==(this.b.M&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.gd=function(a){return this.b.Bc[a-65504>>1]};k.ae=function(a,b){this.b.Bc[b-65504>>1]=a};k.yc=function(a){return 65520==a?61183:0};k.Fc=function(){};k.Nd=function(){return 1};k.Ee=function(){};k.fd=function(){return this.b.ga};k.$d=function(){this.b.ga=0};k.od=function(){return this.b.Ac}; +k.he=function(a,b){b&1||(a&=255);this.b.Ac=a};k.td=function(a){return a?this.b.jc:0};k.ke=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.jc=a;b.I|=2};k.Md=function(a){return a?this.b.fb&65280:0};k.De=function(a){this.b.fb=a|255};k.wd=function(){return gc(this.b)};k.ne=function(a){Oc(this.b,a&-1809|gc(this.b)&1808);this.b.I|=128};k.Ec=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Sd,K.prototype.Je,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Ld,K.prototype.Ce,"SISDR",8,1145],M[62608]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDSDR",8,1145],M[62624]=[null,null,K.prototype.Kd,K.prototype.Be,"SISAR",8,1145],M[62640]=[null,null,K.prototype.Id,K.prototype.ze,"SDSAR",8,1145],M[62656]=[null,null,K.prototype.md,K.prototype.fe,"KISDR",8,1145],M[62672]=[null,null,K.prototype.kd,K.prototype.de,"KDSDR",8,1145],M[62688]=[null,null,K.prototype.ld, +K.prototype.ee,"KISAR",8,1145],M[62704]=[null,null,K.prototype.jd,K.prototype.ce,"KDSAR",8,1145],M[62798]=[null,null,K.prototype.sd,K.prototype.je,"MMR3",1,1145],M[65382]=[null,null,K.prototype.nd,K.prototype.ge,"LKS"],M[65402]=[null,null,K.prototype.pd,K.prototype.ie,"MMR0",1,1145],M[65404]=[null,null,K.prototype.qd,K.prototype.Ec,"MMR1",1,1145],M[65406]=[null,null,K.prototype.rd,K.prototype.Ec,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Rd,K.prototype.Ie,"UISDR",8,1145],M[65424]=[null,null,K.prototype.Pd, +K.prototype.Ge,"UDSDR",8,1145],M[65440]=[null,null,K.prototype.Qd,K.prototype.He,"UISAR",8,1145],M[65456]=[null,null,K.prototype.Od,K.prototype.Fe,"UDSAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.xd,K.prototype.oe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Ad,K.prototype.re,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.yd,K.prototype.pe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.zd,K.prototype.qe,"R6USER",1,1145],M[65504]=[null,null,K.prototype.gd,K.prototype.ae,"CTRL",1,1170],M[65520]=[null,null,K.prototype.yc,K.prototype.Fc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.yc,K.prototype.Fc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Nd,K.prototype.Ee,"SYSID",1,1170],M[65526]=[null,null,K.prototype.fd,K.prototype.$d,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.od,K.prototype.he,"MB",1,1170],M[65530]=[null,null,K.prototype.td,K.prototype.ke,"PIR"],M[65532]=[null,null,K.prototype.Md,K.prototype.De,"SL"],M[65534]=[null,null,K.prototype.wd,K.prototype.ne,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Ca(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},va: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.Ra=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.fc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.gc(a,b)},ma:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.Zb(a,b,c)},za:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.kc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Pa:function(a,b){a&1&&this.w.Ca(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Ca(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Ra=!0},ta:function(a,b,c){this.G[a]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},kb:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.D.setUint16(a,b,!0);this.Ra=!0},Ia:function(a,b,c){a&1&&this.w.Ca(c,64,4);this.J[a>>1]=b;this.Ra=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, -b)+")",!0)}};function nc(a,b,c){a.i=b;a.g=a.A=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.A=c.A)&&$c(a,ad,!1))}function dd(a,b){b?--a.A||(a.Yb=a.f?a.v:a.Zb,a.Mb=a.f?a.H:a.kc):--a.g||(a.Vb=a.fc,a.ra=a.gc)}function $c(a,b,c){c&&a.A||(a.Yb=!a.f&&b[1]||a.v,a.Mb=!a.f&&b[3]||a.H);if(c||void 0===c)a.Zb=b[1]||a.v,a.kc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Vb=b[0]||a.K,a.ra=b[2]||a.L);if(c||void 0===c)a.fc=b[0]||a.K,a.gc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} -var ed=[],Zc=[I.prototype.S,I.prototype.va,I.prototype.da,I.prototype.Ma],ad=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.za];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Pa,I.prototype.kb],Xc=[I.prototype.R,I.prototype.ta,I.prototype.aa,I.prototype.Ia]; -function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.lb=a.cycles||b;this.bb=c;this.tb=Math.round(this.lb/1E4)/100;this.nb=this.tb*this.bb;this.B.Z=!1;this.B.Xb=!1;this.B.sb=a.autoStart;this.B.vb=!1;this.Gb=this.ma=0;this.Hb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.K=[];this.uc=this.Vd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.xb,c=!0);0<=a.yb&&a.yb<=ld(a)&&(a.xb=a.yb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Gb))}} -k.sa=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.A)if(a=d.A,a.B.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.nb?b=1:d=!0;a.bb=b;b=a.tb*a.bb;if(a.nb!=b){a.nb=b;b=a.nb.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.A&&a.A.qb()}Zb(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.lb*a.bb/1E3*c|0,a.K[b][0]=c+od(a))} -function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Yb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} -k.Vd=function(){if(this.B.Z){this.ub>=this.lb&&nd(this,!0);this.za=0;this.Xa=Ba();if(this.aa){var a=this.Xa-this.aa;a>this.Sb&&(this.R+=a,this.R>this.Xa&&(this.R=this.Xa))}try{do{var b=pd(this,this.B.vb?1:this.jb);try{this.ib(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.za+=b;this.S+=b;$b(this,b);Yb(this,b);this.ta-=b;if(0>=this.ta){this.ta+=this.jb;15<=++this.Ub&&(this.A&&this.A.$(void 0),this.Ub=0);break}}while(this.B.Z)}catch(e){this.ha();this.A&&this.A.stop(Ba(),ld(this));vb(this, -e.stack||e.message);return}if(this.B.Z){a=setTimeout;b=this.uc;this.aa=Ba();var c=this.Sb;this.za&&(c=Math.round(c*this.za/this.jb));var c=c-(this.aa-this.Xa),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.ub+=this.za;this.aa+=c;a(b,c)}}}; -k.hb=function(a){if(ub(this))return!1;if(this.B.Z)return this.j(this.toString()+" busy"),!1;md(this);this.B.Z=!0;this.B.Xb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.A&&(a&&this.A.qb(!0),this.A.start(this.R,ld(this)));setTimeout(this.uc,0);return!0};k.ib=function(){return 0};k.ha=function(a){var b=!1;if(this.B.Z){od(this);Zb(this,this.S);this.S=0;this.B.Z=!1;if(b=this.G.run)b.textContent="Run";this.A&&this.A.stop(Ba(),ld(this));b=!0}this.B.complete=a;return b}; -function qd(a){this.wb=+a.model||1170;this.Nb=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.wb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.B.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.wb);this.B.Z&&this.ha();td(this);id(this);this.B.error=!1;this.parent.reset.call(this)}; -function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Nb];a.Va=[0,0,0,0,0,0];a.Ha=[0,0,0,0];a.v=0;a.Ma=0;a.Qc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,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],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.wa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Kb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ac=[0,0,0,0,0,0,0,0];a.zc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.rb=0;a.va=-1;Xb(a)}function Xb(a){a.eb=255;a.ga=0;a.ic=0;a.C=0;a.cb=0;a.Jb=0;a.ob=0;a.Ta=0;a.Ia=0;a.Qb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ta?(a.P=65536,a.ca=a.Pc,a.ra=a.Sd,a.Mb=a.Je,pc(a.w,a.ob&16?22:18)):(a.P=0,a.ca=a.Oc,a.ra=a.yc,a.Mb=a.Fc,pc(a.w,16))}function ud(a,b,c){a.Nb=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.rc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.bb]);a.set(2,xc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ha[c]=a.u[6],a.u[6]=a.Ha[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} -function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.va?this.va=fc(this):this.v||(a=4,c=!0);this.C&57344||(this.cb=63222,this.Jb=a);this.v=0;var d=this.ra(a|this.P),e=this.ra(a+2&65535|this.P);Oc(this,e&-12289|this.va>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.va);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.va=-1;this.I|=8;this.Uc=a;this.Sc=b;if(26!=b)throw a;}}; -function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function wc(a,b){var c=b>>13&31;31>c&&a.ob&32&&(b=a.Kb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Yd(a,b,c){var d,e,f;if(!(c&a.Ta))return b;d=b>>13;a.ob&a.Qc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.wa[a.v][d]<<6)+(b&8191)&a.Qb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ia=a.v,a.Ma=d;b=!1;g&&(g&57344&&(0<=a.va&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ia<<5|a.Ma<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.ra(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.ra(e)| -g;a.b-=8;break;case 6:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.ra(zd(a,2)),e=e+a.u[c]&65535,e=a.ra(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.cb=a.cb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.eb||65534<=a.u[6])&&(a.u[6]<=a.eb-32?(a.ga|=4,a.u[6]=4,a.pa(4,24)):(a.ga|=8,a.I|=64));return e}k.Tb=function(a){if(!this.Ta)return this.w.Tb(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; -k.$a=function(a){if(!this.Ta)return this.w.$a(a);this.L++;a=this.yc(Yd(this,a,2));this.L--;return a};k.pb=function(a,b){this.Ta?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.pb(a,b)};k.Cb=function(a,b){this.Ta?(this.L++,this.Fc(Yd(this,a,4),b),this.L--):this.w.Cb(a,b)};k.Oc=function(a,b,c){return ae(this,a,b,c)};k.Pc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.yc=function(a){return this.w.oa(a)};k.Sd=function(a){return this.w.oa(Yd(this,a,2))};k.Fc=function(a,b){this.w.gb(a,b&65535)}; -k.Je=function(a,b){this.w.gb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.ra(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ha[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.cb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.gb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ha[a.M>>12&3]=d} -function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ca(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.rb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.gb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.gb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.ib=function(a){this.B.complete=!0;var b=this.i&&ke(this.i)?1:this.B.Xb?-1:0,c=a?this.B.Xb?0:1:-1;this.B.Xb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.ic&224)>>5,f=this.N&&this.N.zb>e?this.N:null;f&&(d=f.Xd,e=f.zb);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.pa(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1),this.b=new Int32Array(this.C,0,this.size>>2),Wc(this,Sc?Xc:Yc);else{a=this.b=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},da:function(a,b){a&1&&this.w.Da(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},wa: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.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,1,c.N)&&c.ha(!0)}return this.gc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;cd(c,this.F+a,2,c.N)&&c.ha(!0)}return this.hc(a,b)},na:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,1,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.$b(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;cd(d,this.F+a,2,d.D)&&d.ha(!0)}this.f?this.v(a,b,c):this.lc(a,b,c)},N:function(a){return this.G[a]},R:function(a,b){a=this.G[a];this.i&&F(this.i,128)&&E(this.i,"Memory.readByte("+J(this.i,b)+"): "+J(this.i,a),!0);return a},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},aa:function(a,b){a&1&&this.w.Da(b,64,2); +a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ka:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&bd(a,ad,!1),(a.B=c.B)&&$c(a,ad,!1))}function dd(a,b){b?--a.B||(a.Zb=a.f?a.v:a.$b,a.Nb=a.f?a.H:a.lc):--a.g||(a.Wb=a.gc,a.sa=a.hc)}function $c(a,b,c){c&&a.B||(a.Zb=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.v,a.lc=b[3]||a.H}function bd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.gc=b[0]||a.K,a.hc=b[2]||a.L}function Wc(a,b){b||(b=ed);bd(a,b,void 0);$c(a,b,void 0)} +var ed=[],Zc=[I.prototype.S,I.prototype.wa,I.prototype.da,I.prototype.Na],ad=[I.prototype.P,I.prototype.na,I.prototype.Y,I.prototype.Aa];if(wb)var Yc=[I.prototype.N,I.prototype.ka,I.prototype.Qa,I.prototype.lb],Xc=[I.prototype.R,I.prototype.ua,I.prototype.aa,I.prototype.Ja]; +function fd(a,b){u.call(this,"CPU",a,fd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.ub=Math.round(this.mb/1E4)/100;this.ob=this.ub*this.cb;this.A.Z=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Hb=this.na=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.vc=this.Wd.bind(this);H(this)}z(fd);var gd=["power","reset"];k=fd.prototype; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.na&&(a.na+=a.yb,c=!0);0<=a.zb&&a.zb<=ld(a)&&(a.yb=a.zb=-1,jd(a),a.ha(),c=!0);c&&a.j(ld(a)+" cycles: checksum="+p(a.Hb))}} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ja)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.ub*a.cb;if(a.ob!=b){a.ob=b;b=a.ob.toFixed(2)+"Mhz";var e=a.G.setSpeed;e&&(e.textContent=b);a.j("target speed: "+b)}c&&a.B&&a.B.rb()}$b(a,a.S);a.S=0;a.R=Ba();a.aa=0;nd(a);return d}function Jc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Lc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+od(a))} +function pd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function od(a,b){var c=a.da-=a.b;a.b=a.J=0;b&&(a.da=0);return c} +k.Wd=function(){if(this.A.Z){this.vb>=this.mb&&nd(this,!0);this.Aa=0;this.Ya=Ba();if(this.aa){var a=this.Ya-this.aa;a>this.Tb&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=pd(this,this.A.wb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=od(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Vb&&(this.B&&this.B.$(void 0),this.Vb=0);break}}while(this.A.Z)}catch(e){this.ha();this.B&&this.B.stop(Ba(),ld(this));vb(this, +e.stack||e.message);return}if(this.A.Z){a=setTimeout;b=this.vc;this.aa=Ba();var c=this.Tb;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.aa-this.Ya),d=this.aa-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ka=0,md(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.vb+=this.Aa;this.aa+=c;a(b,c)}}}; +k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;md(this);this.A.Z=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.rb(!0),this.B.start(this.R,ld(this)));setTimeout(this.vc,0);return!0};k.jb=function(){return 0};k.ha=function(a){var b=!1;if(this.A.Z){od(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),ld(this));b=!0}this.A.complete=a;return b}; +function qd(a){this.xb=+a.model||1170;this.Ob=a.addrReset||0;fd.call(this,a,6666667);this.decode=1120==this.xb?rd.bind(this):sd.bind(this);td(this);this.L=0;this.N=null;this.A.complete=!1}z(qd,fd);k=qd.prototype;k.reset=function(){this.status("model "+this.xb);this.A.Z&&this.ha();td(this);id(this);this.A.error=!1;this.parent.reset.call(this)}; +function td(a){a.T=65536;a.U=32768;a.ba=65535;a.X=32768;a.M=15;a.u=[0,0,0,0,0,0,0,a.Ob];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.v=0;a.Na=0;a.Rc=[4,2,0,1];a.V=[[0,0,0,0,0,0,0,0,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],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.xa=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Lb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0];a.Bc=[0,0,0,0,0,0,0,0];a.Ac=0;a.I=0;a.D=a.H=0;a.g=a.f=a.sb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.ga=0;a.jc=0;a.C=0;a.eb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Ja=0;a.Rb=262143;a.N=null;a.w&&Nc(a)}function Nc(a){a.Ua?(a.P=65536,a.ca=a.Qc,a.sa=a.Td,a.Nb=a.Ke,qc(a.w,a.pb&16?22:18)):(a.P=0,a.ca=a.Pc,a.sa=a.zc,a.Nb=a.Gc,qc(a.w,16))}function ud(a,b,c){a.Ob=b;O(a,b);!c&&a.i&&(a.ha()||a.i.$())}k.sc=function(){return 0}; +k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ka,this.cb]);a.set(2,yc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ka=b[1];md(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.M>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.M=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.ba=b,a.U=0)}function Ad(a,b,c){a.I&128||(a.X=a.ba=a.T=b,a.U=c||0)}function Bd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^b)&(d^b))} +function Cd(a,b){a.I&128||(a.X=a.ba=a.T=b,a.U=a.X^a.T>>1)}function Dd(a,b,c,d){a.I&128||(a.X=a.ba=a.T=b,a.U=(c^d)&(d^b))}k.qa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=gc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Oc(this,e&-12289|this.wa>>2&12288);c&&(this.ga|=4,this.u[6]=4);Ed(this,this.wa);Ed(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Vc=a;this.Tc=b;if(26!=b)throw a;}}; +function Wd(a){var b=Xd(a),c=Xd(a)&-1793;a.M&49152&&(c=c&-225|a.M&63712);O(a,b);Oc(a,c);a.I&=-17}function xc(a,b){var c=b>>13&31;31>c&&a.pb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Yd(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Rc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][d]<<6)+(b&8191)&a.Rb;var g=0;switch(e&7){case 1:g=4096;case 2:e|=128;c&4&&(g=8192);break;case 4:g=4096;case 5:c&4&&(g=4096);case 6:e|=c&4?192:128;break;default:g=32768}32512!==(e&32520)&&(e&8?e&32512&&(b&8128)<(e>>2&8128)&&(g|=16384):(b&8128)>(e>>2&8128)&&(g|=16384));a.V[a.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(zd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.ga|=4,a.u[6]=4,a.qa(4,24)):(a.ga|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.w.Ub(a);this.L++;a=Zd(this,Yd(this,a,3));this.L--;return a}; +k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.zc(Yd(this,a,2));this.L--;return a};k.qb=function(a,b){this.Ua?(this.L++,$d(this,Yd(this,a,5),b),this.L--):this.w.qb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Gc(Yd(this,a,4),b),this.L--):this.w.Db(a,b)};k.Pc=function(a,b,c){return ae(this,a,b,c)};k.Qc=function(a,b,c){return Yd(this,ae(this,a,b,c),c)};k.zc=function(a){return this.w.pa(a)};k.Td=function(a){return this.w.pa(Yd(this,a,2))};k.Gc=function(a,b){this.w.hb(a,b&65535)}; +k.Ke=function(a,b){this.w.hb(Yd(this,a,4),b)};function be(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ae(a,b,d,2),c&65536||61440!==(a.M&61440)&&(d&=65535),a.v=a.M>>12&3,c=a.sa(d|c&a.P),a.v=a.M>>14&3):c=6!=d||(a.M>>2&12288)===(a.M&12288)?a.u[d]:a.Ia[a.M>>12&3];return c}function ce(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ae(a,b,e,4),c&65536||(e&=65535),a.v=a.M>>12&3,e=Yd(a,e|c&65536,4),a.v=a.M>>14&3,a.w.hb(e,d)):6!=e||(a.M>>2&12288)===(a.M&12288)?a.u[e]=d:a.Ia[a.M>>12&3]=d} +function de(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function ee(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]}function fe(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ae(a,b,c,8)}function ge(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?Zd(a,a.ca(b,c,3)):a.u[c]&255}function he(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.pa(a.ca(b,c,2)):a.u[c]} +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.sb=a.ca(b,e,7),$d(a,e,d.call(a,c,Zd(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ca(b,e,6),a.w.hb(e,d.call(a,c,a.w.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function ie(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?$d(a,a.ca(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ca(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.jb=function(a){this.A.complete=!0;var b=this.i&&ke(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.da=this.b=a;do{if(b){if(this.i&&le(this.i,this.u[7],c)){this.ha();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.qa(168,28):this.I&64?this.qa(4,30):this.I&16&&this.qa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.jc&224)>>5,f=this.N&&this.N.Ab>e?this.N:null;f&&(d=f.Yd,e=f.Ab);e>(this.M&224)>>5?(this.I&4&&(zd(this,2),this.I&=-5),this.qa(d, +26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.N,f==a)this.N=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.I&1&&this.I++;a=a&&0>c}if(a)break}this.I=this.I&7|this.M&16;this.decode(yd(this))}while(0>1|b<<16;Cd(this,a);return a&65535}function re(a,b){a=b&2048|b>>1|b<<8;Cd(this,a<<8);return a&255}function se(a,b){a=b&~a;R(this,a);return a}function te(a,b){a=b&~a;R(this,a<<8);return a}function ue(a,b){a|=b;R(this,a);return a}function ve(a,b){a|=b;R(this,a<<8);return a} function we(a,b){a=~b|65536;Ad(this,a);return a&65535}function xe(a,b){a=~b|256;Ad(this,a<<8);return a&255}function ye(a,b){a=b-a;this.I&128||(this.X=this.ba=a,this.U=b&(b^a));return a&65535}function ze(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.ba=c,this.U=b&(b^c));return a&255}function Ae(a,b){a=b+a;this.I&128||(this.X=this.ba=a,this.U=a&(b^a));return a&65535}function Be(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.ba=c,this.U=c&(b<<8^c));return a&255} function Ce(a,b){a=-b;Ad(this,a,a&b&32768);return a&65535}function De(a,b){a=-b;Ad(this,a<<8,(a&b&128)<<8);return a&255}function Ee(a,b){a=b<<1|this.T>>16&1;Cd(this,a);return a&65535}function Fe(a,b){a=b<<1|this.T>>16&1;Cd(this,a<<8);return a&255}function Ge(a,b){a=(this.T&65536|b)>>1|b<<16;Cd(this,a);return a&65535}function He(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Cd(this,a<<8);return a&255}function Ie(a,b){var c=b-a;Dd(this,c,a,b);return c&65535} @@ -141,178 +141,178 @@ function Je(a,b){var c=b-a;Dd(this,c<<8,a<<8,b<<8);return c&255}function Ke(a,b) function Ne(a){var b=he(this,a);a=a>>6&7;var c=this.u[a];c&32768&&(c|=4294901760);this.T=this.U=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.U=32768)}this.u[a]=c&65535;this.X=this.ba=c;this.b-=(this.g?6:7)+b} function Oe(a){var b=he(this,a);a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&=63;if(b&32){b=64-b;32>b-1;this.T=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.u[a|1]=d&65535;this.X=d>>16;this.ba=d>>16|d;this.b-=(this.g?6:7)+b}function Pe(a){U(this,a,!vd(this))}function Qe(a){U(this,a,vd(this))} function Re(a){T(this,a,ee(this,a),se);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Se(a){S(this,a,de(this,a),te);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Te(a){T(this,a,ee(this,a),ue);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}function Ue(a){S(this,a,de(this,a),ve);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Sa()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Sa()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Sa()!=!wd(this))} -function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Sa()!=!wd(this))}function df(a){U(this,a,this.Sa())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Sa())}function gf(){this.pa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} +function Ve(a){R(this,ee(this,a)&he(this,a));this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function We(a){R(this,(de(this,a)&ge(this,a))<<8);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function Xe(a){U(this,a,xd(this))}function Ye(a){U(this,a,!this.Ta()==!wd(this))}function Ze(a){U(this,a,!xd(this)&&!this.Ta()==!wd(this))}function $e(a){U(this,a,!vd(this)&&!xd(this))}function af(a){U(this,a,xd(this)||!this.Ta()!=!wd(this))} +function bf(a){U(this,a,vd(this)||xd(this))}function cf(a){U(this,a,!this.Ta()!=!wd(this))}function df(a){U(this,a,this.Ta())}function ef(a){U(this,a,!xd(this))}function ff(a){U(this,a,!this.Ta())}function gf(){this.qa(12,1);this.b-=5}function hf(a){U(this,a,!0)}function jf(a){U(this,a,!wd(this))}function kf(a){U(this,a,wd(this))}function V(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.ba=1);a&8&&(this.X=0);this.b-=5} function lf(a){var b=ee(this,a);a=he(this,a);Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)}function mf(a){var b=de(this,a)<<8;a=ge(this,a)<<8;Dd(this,b-a,a,b);this.b-=this.g?4+(this.H&&6<=this.f?1:0):(this.D?4:3)+(7==this.f?2:0)} -function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.pa(24,2);this.b-=25} -function pf(){this.M&49152?(this.ga|=128,this.pa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.pa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function nf(a){var b=he(this,a);if(b){a=a>>6&7;var c=this.u[a]<<16|this.u[a|1];this.T=this.U=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.u[a]=d&65535,this.u[a|1]=c-d*b&65535,this.ba=d>>16|d,this.X=d>>16):(this.U=32768,this.ba=d>>15|d,this.X=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.ba=this.X=0,this.U=32768,this.T=65536,this.b-=7}function of(){this.qa(24,2);this.b-=25} +function pf(){this.M&49152?(this.ga|=128,this.qa(4,3)):this.i?qf(this.i):this.ha();this.b-=7}function rf(){this.qa(16,4);this.b-=25}var sf=[0,7,7,10,7,11,9,13];function tf(a){this.J=this.b;O(this,fe(this,a));this.b=this.J-sf[this.g]}var uf=[0,14,14,17,14,18,16,20];function vf(a){this.J=this.b;var b=fe(this,a);a=a>>6&7;Ed(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-uf[this.g]}var wf=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; function xf(a){var b=ee(this,a);this.J=this.b;R(this,je(this,a,b));this.b=this.J-wf[(this.D?8:0)+this.g]+(7!=this.f||this.g?0:2)}function yf(a){var b=de(this,a);R(this,ie(this,a,b,1)<<8);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)}var zf=[7,13,13,17,14,18,17,21]; -function Af(a){var b=he(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6&7;b&32768&&(b|=-65536);var c=this.u[a];c&32768&&(c|=-65536);b=~~(b*c);this.u[a]=b>>16&65535;this.u[a|1]=b&65535;this.I&128||(this.X=b>>16,this.ba=this.X|b,this.U=0,this.T=-32768>b||32767>6;if(this.u[b]=this.u[b]-1&65535)O(this,this.u[7]-((a&63)<<1)),this.b+=1;this.b-=6}function Gf(a){T(this,a,ee(this,a),Ie);this.b-=this.g?9+(this.H&&6<=this.f?1:0):(this.D?5:3)+(7==this.f?2:0)} -function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.pa(28,5);this.b-=5}function Jf(){this.I&4||this.A&&this.A.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.pa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} +function Hf(a){T(this,a,0,Ke);this.b-=this.g?9:3+(7==this.f?2:0)}function If(){this.qa(28,5);this.b-=5}function Jf(){this.I&4||this.B&&this.B.$();this.I|=4;zd(this,-2);this.b-=3}function Kf(a){T(this,a,ee(this,a),Le);this.b-=this.g?9:3+(7==this.f?2:0)}function W(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=qf(b);b||this.qa(8,6)}function rd(a){Lf[a>>12].call(this,a)}function Mf(a){Nf[a>>6&3].call(this,a)}function Of(a){Pf[a>>6&3].call(this,a)} function Qf(a){Rf[a>>6&3].call(this,a)}function Sf(a){Tf[a&15].call(this,a)}function Uf(a){Vf[a&15].call(this,a)}function Wf(a){Xf[a>>6&3].call(this,a)}function Yf(a){Zf[a>>6&3].call(this,a)}function $f(a){ag[a>>6&3].call(this,a)} var Lf=[function(a){bg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,W,function(a){cg[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],bg=[function(a){dg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,W,W,W],Nf=[function(a){Ad(this,je(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,Ae);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,1,ye);this.b-=this.g?9:3+(7==this.f?2:0)}],Pf=[function(a){T(this,a,0, Ce);this.b-=this.g?11:6},function(a){T(this,a,vd(this)?1:0,me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,vd(this)?1:0,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=he(this,a);Ad(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Rf=[function(a){T(this,a,0,Ge);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){T(this,a,0,oe);this.b-=this.g?9:3+(7==this.f?2:0)}], dg=[function(a){eg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,W,Sf,Uf,Hf,Hf,Hf,Hf],eg=[pf,Jf,Df,gf,rf,Cf,W,W,W,W,W,W,W,W,W,W],Tf=[Bf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},V,function(){this.ba=1;this.b-=5},V,V,V,function(){this.X=0;this.b-=5},V,V,V,V,V,V,V],Vf=[Bf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},X,function(){this.ba=0;this.b-=5},X,X,X,function(){this.X=32768;this.b-=5},X,X,X,X,X,X,X],cg=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,W,W,W],Xf=[function(a){Ad(this, ie(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Be);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,ze);this.b-=this.g?9:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,De);this.b-=this.g?11:6},function(a){S(this,a,vd(this)?1:0,ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,vd(this)?1:0,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ge(this,a);Ad(this,a<<8);this.b-=this.g?4:3+(7== -this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.rb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} -var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.ra(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= -this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Sa?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> +this.f?2:0)}],ag=[function(a){S(this,a,0,He);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,re);this.b-=this.g?9+(this.sb&1):3+(7==this.f?2:0)},function(a){S(this,a,0,pe);this.b-=this.g?9:3+(7==this.f?2:0)}];function sd(a){fg[a>>12].call(this,a)} +var fg=[function(a){gg[a>>8&15].call(this,a)},xf,lf,Ve,Re,Te,Me,function(a){hg[a>>8&15].call(this,a)},function(a){ig[a>>8&15].call(this,a)},yf,mf,We,Se,Ue,Gf,W],gg=[function(a){jg[a>>4&15].call(this,a)},hf,ef,Xe,Ye,cf,Ze,af,vf,vf,Mf,Of,Qf,function(a){kg[a>>6&3].call(this,a)},W,W],kg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=be(this,a,0);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J= +this.b;ce(this,a,0,b);R(this,b);this.b=this.J-zf[this.g]},function(a){R(this,je(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],jg=[function(a){lg[a&15].call(this,a)},W,W,W,tf,tf,tf,tf,Ef,function(a){a&8?(this.M&49152||(this.M=this.M&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Sf,Uf,Hf,Hf,Hf,Hf],lg=[pf,Jf,Df,gf,rf,Cf,function(){Wd(this);this.b-=13},W,W,W,W,W,W,W,W,W],hg=[Af,Af,nf,nf,Ne,Ne,Oe,Oe,Kf,Kf,W,W,W,W,Ff,Ff],ig=[ff,df,$e,bf,jf,kf,Pe,Qe,of,If,Wf,Yf,$f,function(a){mg[a>> 6&3].call(this,a)},W,W],mg=[W,function(a){a=be(this,a,65536);Ed(this,a);R(this,a);this.b-=11},function(a){var b=Xd(this);this.J=this.b;ce(this,a,65536,b);R(this,b);this.b=this.J-zf[this.g]},W]; -function ng(a){u.call(this,"ROM",a,ng);this.ia=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.A=a.file;this.D=sa(this.A);if(this.A){a=this.A;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.A+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.A=null):(nb(c.Pa,a,b),(a=Fa(a,b))?(c.f=a.ea,c.ia=a.ia):c.A=null);og(c)})}}z(ng);ng.prototype.Da=function(a,b,c,d){this.w=b;this.b=c;this.i=d;og(this)}; -ng.prototype.Ga=function(){this.ia&&(this.i&&pg(this.i,this.id,this.C,this.g,this.ia),delete this.ia);return!0};ng.prototype.Fa=function(){return!0}; -function og(a){if(!tb(a)){if(a.A){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(sc(a.w,b,a.g,Vc)){var c;for(c=0;c>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.pb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.ma=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.ma)});Cb(b,this,Og);H(this)}; -k.vc=function(){if(!this.J){var a=hd(this.A,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.kb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Pa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.vc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -k.Fa=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.hc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Bd,Y.prototype.se,"RCSR"],Qg[65394]=[null,null,Y.prototype.Ad,Y.prototype.re,"RBUF"],Qg[65396]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XCSR"],Qg[65398]=[null,null,Y.prototype.Td,Y.prototype.Ke,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= +function qg(a){u.call(this,"RAM",a,qg);this.ia=this.g=null;this.B=a.addr;this.C=a.size;this.La=a.load;this.Ka=a.exec;this.v=!1;this.f=a.file;this.D=sa(this.f);if(this.f){a=this.f;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.f+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load RAM resource (error "+f+": "+a+")"),c.f=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.g=a.ea,c.ia=a.ia,null==c.La&&(c.La=a.La),null==c.Ka&&(c.Ka=a.Ka)):c.f=null);rg(c)})}} +z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)};qg.prototype.Ha=function(){this.ia&&(this.i&&pg(this.i,this.id,this.B,this.C,this.ia),delete this.ia);return!0};qg.prototype.Ga=function(){return!0};function rg(a){if(a.w&&(!a.v&&a.C&&tc(a.w,a.B,a.C,1)&&(a.v=!0),!tb(a))){if(!a.v)q("No RAM allocated");else if(a.f){if(!a.g||!a.w)return;Lg(a,a.g,a.La,a.Ka,a.B)}H(a)}} +qg.prototype.reset=function(){if(this.v){for(var a=this.w,b=this.B,c=this.C,d=b&a.w,b=b>>>a.la;0=b.length)break;for(var h=h+2,m=b[h++]&255|(b[h++]&255)<<8,n=b[h++]&255|(b[h++]&255)<<8,l=l+((m&255)+(m>>8)+(n&255)+(n>>8)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.qb(n++,b[r++]&255);else n&1?a.b.ha():ud(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Kc(e.b,e.ka))});this.na=Mc(52,4);this.aa=Jc(this.b,function(){e.g|=128;e.g&64&&Kc(e.b,e.na)});Cb(b,this,Og);H(this)}; +k.wc=function(){if(!this.J){var a=hd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.wc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.Ga=function(a){return a?this.save():!0};k.reset=function(){Pg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Pg(this)};function Pg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.ic=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Lc(this.b,this.aa,1E3/Math.round(this.R/10))}};var Qg={},Og=(Qg[65392]=[null,null,Y.prototype.Cd,Y.prototype.te,"RCSR"],Qg[65394]=[null,null,Y.prototype.Bd,Y.prototype.se,"RBUF"],Qg[65396]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XCSR"],Qg[65398]=[null,null,Y.prototype.Ud,Y.prototype.Le,"XBUF"],Qg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&Tg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[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;Tg(d,sa(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Da=function(a,b,c,d){this.A=a;this.w=b;this.b=c;this.i=d;this.S=Ug(a);var e=this;if((this.g=hd(this.A,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Mc(56,4);this.da=Jc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.A&&!a.A.B.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Pa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.Ka, -e.Ja));a.B.Za=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;ec.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ja;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&ch(a,b,c,d,e.ea,e.La, +e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));$g(a)})}function Xg(a,b,c,d){if((a=a.G.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.ua);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(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"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.dc?"":e)+"&format=json"));return!!Ea(f, +function ch(a,b,c,d,e,f,g){a.N=b;a.C=c;a.v=d;a.ea=e;a.La=f;a.Ka=g;2==d?a.S&&Lg(a.S,e,f,g)?a.status("tape loaded: "+b):(a.N="",a.C="",a.H=Rg,a.v=Sg,a.O("No load address available for tape: "+b)):(a.K=0,a.J=e,a.status("tape attached: "+b),Vg(a,0))}function ah(a,b){if(a.C||!1===b)a.N="",a.C="",b||(a.v&&a.status(1==a.v?"tape detached":"tape unloaded"),a.H=Rg,a.v=Sg,$g(a))}k.save=function(){return(new P(this)).data()};k.restore=function(){return!0};k.vd=function(){return this.f&65534}; +k.me=function(a){a&1&&(this.f&32768?(a&=-2,this.f&64&&Kc(this.b,this.Y)):(this.f&=-129,this.f|=2048,this.L=0,Lc(this.b,this.da,1E3/Math.round(this.aa/10))));this.f=this.f&-66|a&65};k.ud=function(){this.f&=-129;this.f|=2048;return this.L};k.le=function(){};var dh={},Wg=(dh[65384]=[null,null,Pc.prototype.vd,Pc.prototype.me,"PRS"],dh[65386]=[null,null,Pc.prototype.ud,Pc.prototype.le,"PRB"],dh); +function eh(a,b,c){u.call(this,"Disk",{id:a.Qa+".disk"+p(++fh,4)},eh,2097152);this.controller=a;this.B=a.B;this.i=a.i;this.v=b;this.Xa=b.name;this.ec=b.ec;gh(this,c,b.va,b.za,b.ra,b.Ma);H(this)}var fh=0;z(eh);k=eh.prototype;k.Ea=function(a,b,c,d){this.i=d}; +function gh(a,b,c,d,e,f){a.mode=b;a.va=c;a.za=d;a.ra=e;a.Ma=f;a.b=[];if("preload"!=a.mode){b=Array(a.va);for(c=0;c>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(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"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ec?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){jh(a,b,c,d)})} -function jh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.A&&!a.A.B.ja;if(d)a.controller.O('Unable to load disk "'+a.Wa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Pa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.ua=h.length;a.ya=h[0].length;a.qa=h[0][0].length;var l=h[0][0][0];a.La=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 t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Aa?f=a.Oa+a.Aa&&(a.Aa+=f-(a.Oa+a.Aa)+1):(a.Oa=f,a.Aa=1);d[f]=d[f]&~(255<g)break;e|=g<d&&a.B&&!a.B.A.ja;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ +c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=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 t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};k.write=function(a,b,c){if(this.g)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Ba?f=a.Pa+a.Ba&&(a.Ba+=f-(a.Pa+a.Ba)+1):(a.Pa=f,a.Ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.b.length||l>=this.b[h].length||m>=this.b[h][l].length){c="sector (CHS="+h+":"+l+":"+m+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Wa+": "+c);return b}; +b+" changes applied)";b=-1;break}if(this.g){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.b[h][l][m]){for(l=h.data.length;lb&&-2!=b&&this.controller.O("Unable to restore disk '"+this.Xa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=lh(this,a++);)nh(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 nh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; -k.sa=function(a,b,c){var d=this;switch(b){case "listDisks":return this.G[b]=c,c.onchange=function(){var a=d.G.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){q("RL11 option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ba){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;l'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.G[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&oh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&ph(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=lh(a,c++);)for(var l=0,m=h.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; +k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;if((this.v=hd(this.B,"autoMount")||this.v)&&"string"==typeof this.v)try{this.v=eval("("+this.v+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.v+")"),this.v=null}qh(this);this.P=Mc(112,5);Cb(b,this,rh,2097152);sh(this,"None","",!0);this.L&&sh(this,"Local Disk","?");sh(this,"Remote Disk","??");th(this)||H(this)}; +k.Ha=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.B.rc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";oh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){qh(this)};k.save=function(){return(new P(this)).data()}; k.restore=function(a){return qh(this,a[0])};function th(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}vh(a,e,b,c,!1,d)}else uh(a,e)} -function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.fb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.cc?a.O("RL11 busy"):(h.cc=!0,e&&(h.bc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Ob=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Lc)&&g++));return g} -k.Lc=function(a,b,c,d,e){var f;a.cc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.ua||f[1]>a.ya)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.ec)),b=null);b?(a.Ba=b,a.Wa=c,a.fb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.ec),a.bc||e),this.A&&this.A.qb()):a.Ob=!1;a.bc&&(a.bc=!1,--this.H||H(this));oh(this,a.ec)}; +function vh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,uh(a,b,!0),h.dc?a.O("RL11 busy"):(h.dc=!0,e&&(h.cc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,ih(new eh(a,h,"preload"),c,d,f,a.Mc)&&g++));return g} +k.Mc=function(a,b,c,d,e){var f;a.dc=!1;b&&(f=b.b.length?[b.b.length,b.b[0].length,b.b[0][0].length,b.b[0][0][0].length]:[0,0,0,0],b&&f[0]>a.va||f[1]>a.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.fc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.fc),a.cc||e),this.B&&this.B.rb()):a.Pb=!1;a.cc&&(a.cc=!1,--this.H||H(this));oh(this,a.fc)}; function sh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; -k.gd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){if(!m){m=a.Ba.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ba.read(m,n++))||0>(t=a.Ba.read(m,n++))){h=5120;break}this.w.gb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ae=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ba,m=null,n;e--;){var r=this.w.oa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ba.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ba.write(m,n++,r&255)||!a.Ba.write(m,n++,r>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.qa&&(d=0,++c>=l.ya&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Ed=function(){return this.fa&65535}; -k.ve=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.gd;case 10:b||(b=this.ae),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.ua||f>=c.qa?this.fa|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Mc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Cd=function(){return this.J};k.te=function(a){this.J=a&65534};k.Fd=function(){return this.g};k.we=function(a){this.g=a};k.Gd=function(){return this.D};k.xe=function(a){this.D=a};k.Dd=function(){return this.K};k.ue=function(a){this.K=a&63}; -var wh={},rh=(wh[63744]=[null,null,N.prototype.Ed,N.prototype.ve,"RLCS"],wh[63746]=[null,null,N.prototype.Cd,N.prototype.te,"RLBA"],wh[65284]=[null,null,N.prototype.Fd,N.prototype.we,"RLDA"],wh[65286]=[null,null,N.prototype.Gd,N.prototype.xe,"RLMP"],wh[65288]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ia=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); -var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.sc=function(){return-1};xh.prototype.tc=function(){}; +function oh(a,b){if(0<=b&&b>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.fa=this.fa|a|32768);return!0}; +k.hd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Ic(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.be=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.pa(f);if(Ic(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Fd=function(){return this.fa&65535}; +k.we=function(a){this.fa=this.fa&-1023|a&1022;this.N=this.N&-4|(a&48)>>4;if(!(this.fa&128)){var b;a=!0;var c=this.f[(this.fa&768)>>8],d,e,f,g;this.fa&=-2;switch(this.fa&14){case 4:this.g&8&&(this.fa&=63);this.D=c.status|this.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.hd;case 10:b||(b=this.be),d=this.g>>7,e=this.g&64?0:1,f=this.g&63,d>=c.va||f>=c.ra?this.fa|=37888: +(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Nc.bind(this)))}a&&(this.fa|=129,this.fa&64&&Kc(this.b,this.P))}};k.Dd=function(){return this.J};k.ue=function(a){this.J=a&65534};k.Gd=function(){return this.g};k.xe=function(a){this.g=a};k.Hd=function(){return this.D};k.ye=function(a){this.D=a};k.Ed=function(){return this.K};k.ve=function(a){this.K=a&63}; +var wh={},rh=(wh[63744]=[null,null,N.prototype.Fd,N.prototype.we,"RLCS"],wh[63746]=[null,null,N.prototype.Dd,N.prototype.ue,"RLBA"],wh[65284]=[null,null,N.prototype.Gd,N.prototype.xe,"RLDA"],wh[65286]=[null,null,N.prototype.Hd,N.prototype.ye,"RLMP"],wh[65288]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBE"],wh);function xh(a){u.call(this,"Debugger",a,xh);this.da=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(xh); +var yh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};xh.prototype.tc=function(){return-1};xh.prototype.uc=function(){}; function zh(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function Ah(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 Bh(a,b,c){var d;if(b){b=Ch(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Fh(a,b){if(b)return Eh(a,b,a.Y[b]);var c=0;for(b in a.Y)Eh(a,b,a.Y[b]),c++;return 0this.b.wb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=vc[c],n&&d.j(p(n.id,8)+" %"+ -p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.tc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Va[a-8]:20>a?b=this.b.Ha[a-16]:20==a?b=fc(this.b):21==a&&this.f&&ec(this.f)&&(b=this.f.Ua));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Jb).F));this.na&1073741824?this.va.push(a):this.ka&&a==this.ka||(this.ka=a,this.na&-2147483648&&this.b&&this.b.B.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ta=0,a.A&&a.A.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.B.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.B.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ga=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; -k.Fa=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.za=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.B.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; -k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.B.Z=!0;this.Qb=a;this.Sb=b}; -k.stop=function(a,b){if(this.B.Z){this.B.Z=!1;this.K=b-this.Sb;if(!this.S){b="stopped";if(this.K){a-=this.Qb;var c=0d&&(d=a.b.$a(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Na=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.B.Z)throw O(b,a.b.Jb),a.ha(),-1;return!1} -function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.rb=0}k.mb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].mb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Na=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; -function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Na||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Va[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ha[b-16]):20==b?c="PS="+J(a,fc(d)):21==b&&a.f&&ec(a.f)&&(c="SW="+J(a,a.f.Ua,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.nc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.nc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Re:b,F:c,Tc:d,ia:e,lc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Tc;if(e>=g&&ethis.b.xb?Oh:[];Ph(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ca(Qh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.la;l=1}d.j("blockid physical blockaddr used size type");d.j("-------- --------- ---------- ------ ------ ----");for(var c=-1,m=0;l--;){var n=b[e];n.type==c?m++||d.j("..."):(c=n.type,m=wc[c],n&&d.j(p(n.id,8)+" %"+ +p(e<d&&(d+=b.length);0>d&&(d=0);for(var e=b.length;db||7a?"R"+a:6==a?"SP":"PC"}k.uc=function(a){var b;0<=a&&(8>a?b=this.b.u[a]:16>a?b=this.b.Wa[a-8]:20>a?b=this.b.Ia[a-16]:20==a?b=gc(this.b):21==a&&this.f&&fc(this.f)&&(b=this.f.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.oa&1073741824?this.wa.push(a):this.ka&&a==this.ka||(this.ka=a,this.oa&-2147483648&&this.b&&this.b.A.Z&&(this.ha(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,od(a),a.ua=0,a.B&&a.B.$(void 0)))};function Ih(a){var b;if(!ke(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.aa=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;this.j("trapped to "+J(this,b&255,1)+(c?" ("+J(this,c)+")":""))}this.L=Z(this.b.u[7]);a&&1!=this.S?Xh(this):Yh(this)}};function Wh(a,b){var c;(c=!a.b||!tb(a.b))||(c=a.b,c.A.ja?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Ih(this);this.Aa=0;this.ka=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;Zh(this);a||this.$()};k.save=function(){var a=new P(this);a.set(0,Sh(this.L));a.set(1,Sh(this.P));a.set(2,[this.v,this.R,this.oa]);a.set(3,this.J);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Th(a[b++]),this.P=Th(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.oa|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Rb=a;this.Tb=b}; +k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Rb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.aa],c.F=b,c.Oa=!1,++a.aa==a.H.length&&(a.aa=0)));return!1}function qf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ha(),-1;return!1} +function Hh(a){var b,c;a.g=["bp"];if(a.N)for(b=1;b>>d.la],!1)}a.N=["br"];if(a.D)for(b=1;b>>d.la],!0);a.D=["bw"];a.sb=0}k.nb=function(a,b,c){var d=!0;c||$h(this,a,b,!1,!0);if(a!=this.g){var e=this.ca(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.la].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ai(this,a,a.length-1,"set"),Ih(this)));return d}; +function $h(a,b,c,d,e){var f=!1;c=a.ca(c);for(var g=1;g>>d.la],b==a.D));h.Oa||Ih(a);break}}return f}function bi(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Vh(y);break;case 8:x="@"+Vh(y);break;case 16:7>y?x="("+Vh(y)+")+":(A=w.pa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Vh(y)+")+":(A=w.pa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Vh(y)+")";break;case 40:x="@-("+Vh(y)+")";break;case 48:A=w.pa(t,2);x=J(w,A,0,!0)+"("+Vh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.pa(t,2),x="@"+J(w,A)+"("+Vh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=Vh(b),c+="="+J(a,d.u[b])):13>b?c="A"+(b-8)+"="+J(a,d.Wa[b-8]):16<=b&&20>b?c="S"+(b-16)+"="+J(a,d.Ia[b-16]):20==b?c="PS="+J(a,gc(d)):21==b&&a.f&&fc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function gi(a){var b,c="";for(b=0;6>b;b++)c+=fi(a,b);c=c+"\n"+(fi(a,6)+fi(a,7));c+=fi(a,20)+fi(a,21);return c+=ei(a,"T")+ei(a,"N")+ei(a,"Z")+ei(a,"V")+ei(a,"C")}k.oc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.oc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Se:b,F:c,Uc:d,ia:e,mc:f})}function hi(a,b,c){var d=[],e=a.ca(b)>>>0;for(b=0;b>>0,h=f.Uc;if(e>=g&&eb;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.A.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1b;b++)e.g["S"+b][0]=f&1<b)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.$();a.j("updated registers:")}a.j(gi(a));c&&(a.L=Z(d.u[7]),Yh(a,J(a,a.L.F)))}}function li(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=di(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} function ci(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ka=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Ib=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.tb=aa;zg++;Ib--}}zg||(a.j("no "+yg+"history available"),a.tb=void 0)}else{var Kb=Qh(a,ma);if(Kb){var zc=0;Ka&&("l"==Ka.charAt(0)&&(Ka=Ka.substr(1)||Fi),zc=Dh(a,Ka)>>>0,65536>4||1;Hi--&&0Dc?String.fromCharCode(Dc):".";Ac-=Cc}Lb&&(Lb+="\n");Lb+=ma+" "+Id+(0==Nb?" "+Cg:"")}Lb&&a.j(Lb);a.lb=Kb}}}}break;case "e":if("else"==g[0])break;var jb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(jb=1,Jd=255,Kd=a.Fb,Ld=a.Wb):"e"==Md||"ew"==Md?(jb=2,Jd=65535,Kd=a.oa,Ld=a.gb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= -2;FcQd;){for(var La=null,Li=256;65536>Qb.F>>>0;){Rd.F=a.oa(Qb,2);if(null==Qb.F||!Li--)break;if(!(Rd.F&1)){for(var Mi=a,Gc=Rd,Eg=null,Rb=Gc.F,Fg=Rb,Sd=1;6>=Sd&&Rb;Sd++){if(2< -Sd){Gc.F=Rb;var Hc=di(Mi,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Rb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Rb-=2}Gc.F=Fg;if(La=Eg)break}}if(!La||null==La)break;var Hg=null;if("ks"==Ki){var Ig=La.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}La=xa(La,50)+" ;"+(Hg||"stack="+J(a,Qb.F));a.j(La);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Ca=0;if("all"== -G)Ca=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Ca=xb[oa];pa=!!(a.na&Ca);break}if(!Ca){a.j("unknown message category: "+G);break a}}if(Ca)if("on"==g[2])a.na|=Ca,pa=!0;else if("off"==g[2]&&(a.na&=~Ca,pa=!1,1073741824==Ca)){for(var Td=0;Tdna.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Hd=[];"call"==xg&&(Jb=1E5,Hd=["CALL"]);for(void 0!==wg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.ub=aa;zg++;Jb--}}zg||(a.j("no "+yg+"history available"),a.ub=void 0)}else{var Lb=Qh(a,ma);if(Lb){var Ac=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Fi),Ac=Dh(a,La)>>>0,65536>4||1,Nb="";Hi--&&0Dc?String.fromCharCode(Dc):"."}Nb&&(Nb+="\n");Nb+=ma+" "+Id+(0==Ob?" "+Cg:"")}Nb&&a.j(Nb);a.mb=Lb}}}}break;case "e":if("else"==g[0])break;var kb,Jd,Kd,Ld,Md=g[0],Nd=g[1];"eb"==Md?(kb=1,Jd=255,Kd=a.Gb,Ld=a.Xb):"e"==Md||"ew"==Md?(kb=2,Jd=65535,Kd=a.pa,Ld=a.hb):Nd=null;if(null==Nd)a.j("edit memory commands:"),a.j("\teb [a] [...] edit bytes at address a"),a.j("\tew [a] [...] edit words at address a");else{var Ec=Qh(a,Nd);if(Ec)for(var Fc= +2;FcQd;){for(var Ma=null,Ki=256;65536>Sb.F>>>0;){Rd.F=a.pa(Sb,2);if(null==Sb.F||!Ki--)break;if(!(Rd.F&1)){for(var Li=a,Gc=Rd,Eg=null,Tb=Gc.F,Fg=Tb,Sd=1;6>=Sd&&Tb;Sd++){if(2< +Sd){Gc.F=Tb;var Hc=di(Li,Gc);if(0<=Hc.indexOf("JSR")){var Gg=Hc.indexOf(" ");if(Tb+(Hc.indexOf(" ",Gg+1)-Gg-1)/2==Fg){Eg=Hc;break}}}Tb-=2}Gc.F=Fg;if(Ma=Eg)break}}if(!Ma||null==Ma)break;var Hg=null;if("ks"==Ji){var Ig=Ma.match(/[0-9A-F]+$/);Ig&&(Hg=ki(a,Ig[0]))}Ma=xa(Ma,50)+" ;"+(Hg||"stack="+J(a,Sb.F));a.j(Ma);Qd++}Qd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ki(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.oa&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.oa|=Da,pa=!0;else if("off"==g[2]&&(a.oa&=~Da,pa=!1,1073741824==Da)){for(var Td=0;Td\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Da());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== -f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.A=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.B.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.sb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; -function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.A||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} -function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Da();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.ha(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.B.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lqi){if(si(d,this.J)){this.C=new P(this,"1.30.2","failsafe");si(this.C)&&(xi(this,d),a=2,yi(this.C));this.C.set("timestamp",Ca());zi(this.C);var e=this.g&&!this.D;if(1==a||Ha("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=wi(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?si(d,g):("error"== +f&&"no machine state"!=g?(this.O("Error: "+g),"unable to verify user"==g&&(Oa("user",""),this.B=null)):this.j(f+": "+g),yi(d),si(d)?(c=wi(d),e=!0):c=!1))}e&&vi(this,c?d:null)}else 2==a&&d.clear()}else vi(this);delete this.J;delete this.K}e=ob(this.id);for(f=0;fa[1];a=a[2];this.da=!0;this.A.ja=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ai(this,this.b,b,c,a),this.$(),this.b.tb());this.P&&(xi(this,b),b.clear());!c&&this.C&&(this.C.clear(),delete this.C);this.v=0}; +function xi(a,b){if(Ha("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.2"};d.url=a.aa;d.user=c;d.type="bug";d.data=b;Ea("http://www.pcjs.org/api/v1/report",d,!0)}} +function ni(a,b,c){var d,e="none";if(a.v)return null;a.v--;var f=new P(a,"1.30.2"),g=new P(a,"1.30.2","validate"),h=Ca();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.2");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ha(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ja=!1,!1===d&&(e=null)));for(var h=ob(a.id),l=0;lf.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), -a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);Si(a,b,c)}})}else c(a,null)} -function Ti(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| -(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Qi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ei||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Qi(b,a,d,!0,e,m):Ri(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Ti(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map +1);c=0}}};function yi(a,b){a[a.id]={};b&&a.set("parms",b);a.b=!1}function zi(a){var b=!0;if(Ka()){var c=JSON.stringify(a[a.id]);Oa(a.key,c)||(q("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}function wi(a){var b=!0;try{a[a.id]=JSON.parse(a[a.id])}catch(c){q(c.message||c),b=!1}return b}function si(a,b){return b?(a[a.id]=b,a.b=!0):a.b?!0:Ka()&&(b=Na(a.key))?(a[a.id]=b,a.b=!0):!1}var Ei=0; +function Pi(a,b,c,d,e,f){e("Loading "+a+"...");Ea(a,null,!0,function(g,h,l){l?(h||(h="unable to load "+a+" ("+l+")"),f(h,null)):Qi(h,a,b,c,d,e,f)})} +function Qi(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(nb(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), +a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);Ri(a,b,c)}})}else c(a,null)} +function Si(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Ei||Za(!0));l=!1}var g,h,l=!0;Ei++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +(c="/versions/pdpjs/1.30.2/components.xsl");m=function(d,h){h?Pi(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Ei||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Ei||Za(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Pi(b,a,d,!0,e,m):Qi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Si(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.2/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.2/pdp11.js b/versions/pdpjs/1.30.2/pdp11.js index 4e17efc5a..9d7f5bc21 100644 --- a/versions/pdpjs/1.30.2/pdp11.js +++ b/versions/pdpjs/1.30.2/pdp11.js @@ -42,7 +42,7 @@ function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=reso typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} function ta(a,b){var c,d={K:null,X:null,ga:null,fa: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.ga=g.load;d.fa=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.oa=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,pb:!1,O:!1,error:!1};this.jb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; @@ -70,7 +70,7 @@ function xb(a,b){var c=-1,d=this.controller;(a=d.ya[a])&&(a[2]?c=a[2](b):a[0]&&( h.reset=function(){for(var a=0;a>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ja)return l.nb+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.nb){p=l.size-(f-n);p>g&&(p=g);l.nb=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].xb(b&a.l,b)}function Kb(a,b){3932160<=b&&(b=Jb(a.a,b));return a.h[(b&a.ja)>>>a.c].W(b&a.l,b)} -h.kb=function(a){var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; +h.kb=function(a){3932160<=a&&(a=Jb(this.a,a));var b=a&this.l,c=(a&this.ja)>>>this.c;this.i=!1;this.f++;a=this.h[c].Sb(b,a);this.f--;return a};h.Xa=function(a,b){3932160<=a&&(a=Jb(this.a,a));this.i=!1;this.f++;this.h[(a&this.ja)>>>this.c].Eb(a&this.l,b&255,a);this.f--};function Lb(a,b,c){3932160<=b&&(b=Jb(a.a,b));a.h[(b&a.ja)>>>a.c].ob(b&a.l,c&65535,b)}h.lb=function(a,b){3932160<=a&&(a=Jb(this.a,a));var c=a&this.l,d=(a&this.ja)>>>this.c;this.i=!1;this.f++;this.h[d].Zb(c,b&65535,a);this.f--}; function Mb(a){for(var b=0,c=[],d=0;da.a.Za)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);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=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, +function wf(a,b,c,d,e){var f=c;if(a.h)return!0;a.va=b;a.Ea=c;a.Wb=q(c);a.h=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.V=e[0];a.Z=e[1];a.S=e[2];a.ha=e[3]||512;c=a.ha>>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.V);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=v()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.sb?"":e)+"&format=json"));return!!r(f, null,!0,function(b,c,d){xf(a,b,c,d)})} function xf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.F('Unable to load disk "'+a.va+'" (error '+d+": "+b+")",f);else{Sa(a.controller.oa,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)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ha=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 w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,wa=w.length;wa>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>2,c=(d>((b&3)<<3)&255;return c};h.write=function(a,b,c){if(this.c)return!1;if(b>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.ba?f=a.ma+a.ba&&(a.ba+=f-(a.ma+a.ba)+1):(a.ma=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(p){f=null,a=p.message}else a="unrecognized XML: "+(255