diff --git a/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.jpg b/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.jpg new file mode 100644 index 000000000..198af9764 Binary files /dev/null and b/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.jpg differ diff --git a/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.json b/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.json new file mode 100644 index 000000000..c1c6041d5 --- /dev/null +++ b/apps/pdp11/tapes/diags/MAINDEC-11-D0MA-PB.json @@ -0,0 +1,45 @@ +{"exec":128,"data":[ +0,0,0,4587521,131072,393216,655360,917504,1179648,1441792,1703936,1966080,2228224,2490368,2752512,3014656, +3276800,3538944,3801088,4063232,12124160,0,1677721856,-1610579967,437634560,34092807,-1610612736,437634560,538375,-1775910912,196864,-973037568, +923212309,-1761607672,17242145,-1610612733,-15351808,437634815,538375,1445844736,33554182,-1610612733,437634560,-737665273,-1610612736,-973037568,1057430037,-469762040, +-1610612736,-1073700864,-973016043,134683157,16777224,385875969,16839200,-1610612733,437634560,236306439,17424385,385875969,16845856,-1610612733,437634560,638959623, +32769,-1610571776,437634560,873840647,-1761574911,17243169,-1610612733,1091958528,-972695998,-1073276395,-2147398123,1092622080,196930,-973037568,1996954133,520, +-973037568,1996954133,-1056964600,16870437,-1610612733,437634560,554759,404854528,196871,-1056923648,-956301547,1996954133,-687865848,-16416723,197119,-973037568, +1594300949,109064,-1610571776,437634560,556807,113152,-1610571776,-904544000,437634561,542983,65792,-937404672,196865,-973037568,-1056499179,61973, +0,23330817,31719902,16845281,542572544,50397666,10485760,119150022,33297857,129,10485920,119150022,34215361,563544193,50399004,10485760, +1111561719,365298944,364971802,8454692,1111564375,769,365297824,146212634,2,365297824,146212634,633470976,50397762,10485760,119150022,2231, +119021975,769,365035680,365363199,146212634,769064960,-64342,769,365297824,144639770,640,10485920,119150022,2239,656,10485920, +44045762,119150022,2186,257,43917463,769,365297824,365037338,165806778,257,45621399,769,365297824,365037338,8520402,10485760, +365297824,365037338,8520416,119284119,769,368509088,69878337,119150022,49944002,546766978,50414145,10485760,119150022,133367,10485760,119150022, +2295,51914179,769,365297824,150406938,563544064,50399000,10485760,-59965,119150022,177,16777216,1006724096,587523,-735193344,33554179, +-1610612733,437634560,1443421959,-1610612733,-973037568,-16311787,1711276040,-1610612733,-1023369216,-972851691,-888727019,16777224,-687865855,17003552,-1610612733,437634560, +-1877622009,17425155,-687865855,17010208,-1610612733,437634560,-1474968825,33539,-1610571776,437634560,-1240087801,-1761574141,17243169,-1610612733,1091958528,-972860350, +-1022944747,-2096902123,1092671232,196930,-973037568,923212309,521,-973037568,923212309,-1006632951,17034789,-1610612733,437634560,603911,404854528,196871, +-1006592000,-956301547,923212309,-687865847,-16581075,197119,-973037568,520559125,273417,-1610571776,437634560,605959,277504,-1610571776,1276494848,437634564, +592903,65792,1243682560,196868,-973037568,-1006167531,-469473771,65801,1679890176,196868,-973037568,-1006167531,-2080080363,-1610612736,-973037568,-1006167531, +-2080076779,471963392,196871,-150953984,-1186840299,0,65536,77201764,365298302,365168410,8651942,1111564567,769,171376800,368509544,39847106, +119150022,2,10485920,119150022,80877047,131658,119415191,769,368509088,37355759,119150022,82843127,11469358,50397186,-2063532032,-2130640896, +-2029977600,10485760,34998839,119150022,85202423,12517898,33619970,-2080309248,-2147418112,-2046754816,10485760,119150022,133623,10485760,119150022,2551, +119021975,769,365297824,167184154,636944384,29754700,769,365297824,368510746,28837236,91362807,368509364,27919728,2526,636944384,27264368, +769,368509088,26477980,119150022,93853175,368509320,25560474,135,563544064,50399004,10485760,365297824,167184154,2,133623,636944384, +22545846,769,118890903,769,365297824,367396634,367396320,8848860,8847360,10485760,365297824,171378458,167182570,200736968,-2130640670,16580608, +0,-402652928,-1610221568,437634560,-1274415353,65792,-973037568,923212309,-150944246,-150951415,16825867,-1610612607,437634560,-1341507833,-1710622976,-1475610880, +8454400,-973037568,923212309,-150955510,16812553,-1610612607,437634560,-2012596473,2114582272,-2146699520,8454400,-1358913536,437634560,1879717639,1711929088,8454400, +131328,8651008,8847616,-1090478080,437634560,1342846727,1175058176,8454400,131328,8651008,8847616,-1224695808,134232074,839530368,-2028609792,-536906240, +-33590133,-905939072,1996523513,-2030036470,-167119104,-150960129,-2013268471,-167119104,-150960129,-2013268471,0,4864,0,524289,1818,214, +16777216,16778752,63488,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,16449536,0, +117440512,-1437226241,689111052,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,605561922,608338242,-2126371816,605561922,13402434,0,0,0,0,0,0,0,0, +0] +} diff --git a/apps/pdp11/tapes/diags/README.md b/apps/pdp11/tapes/diags/README.md index 2bae0b8e5..fc21f7cfc 100644 --- a/apps/pdp11/tapes/diags/README.md +++ b/apps/pdp11/tapes/diags/README.md @@ -7,32 +7,36 @@ permalink: /apps/pdp11/tapes/diags/ Diagnostic Paper Tape Images ---------------------------- -Thanks to the [iamvirtual.ca](http://iamvirtual.ca/collection/systems/mediadoc/mediadoc.html#papertape) website, -we have archived a number of PDP-11 diagnostics: +Thanks to the [iamvirtual.ca](http://iamvirtual.ca/collection/systems/mediadoc/mediadoc.html#papertape) +website, we have archived the PDP-11 diagnostics shown below. The tapes have been added to the +[Default PC11 Configuration](/devices/pdp11/pc11/), so that you can easily load them into any machine with a +[PC11](/modules/pdp11/lib/pc11.js), such as this [PDP-11/20](/devices/pdp11/machine/1120/panel/debugger/). + +As noted for other [DEC PDP-11 Tape Images](/apps/pdp11/tapes/), these "Absolute Format" tapes can be loaded directly +into RAM using the machine's "Load" button instead of "Attach", allowing you to bypass the usual three-step process of +loading the [Bootstrap Loader](/apps/pdp11/boot/bootstrap/) in order to load the [Absolute Loader](/apps/pdp11/tapes/absloader/) +in order to load the desired tape. * ![MAINDEC-11-D0AA-PB (MAR/70): TEST 1 - BRANCH](MAINDEC-11-D0AA-PB.jpg) -* ![MAINDEC-11-D0BA-PB (MAR/70): TEST 2 - COND BRANCH](MAINDEC-11-D0BA-PB.jpg) +* ![MAINDEC-11-D0BA-PB (MAR/70): TEST 2 - CON BRANCH](MAINDEC-11-D0BA-PB.jpg) * ![MAINDEC-11-D0CA-PB (MAR/70): TEST 3 - UNARY](MAINDEC-11-D0CA-PB.jpg) -* ![MAINDEC-11-D0DA-PB (MAR/70): TEST 4 - UNARY+BINARY](MAINDEC-11-D0DA-PB.jpg) -* ![MAINDEC-11-D0EA-PB (MAR/70): TEST 5 - ROTATE+SHIFT](MAINDEC-11-D0EA-PB.jpg) +* ![MAINDEC-11-D0DA-PB (MAR/70): TEST 4 - UNARY + BINARY](MAINDEC-11-D0DA-PB.jpg) +* ![MAINDEC-11-D0EA-PB (MAR/70): TEST 5 - ROTATE SHIFT](MAINDEC-11-D0EA-PB.jpg) * ![MAINDEC-11-D0FA-PB (MAR/70): TEST 6 - COMPARE](MAINDEC-11-D0FA-PB.jpg) * ![MAINDEC-11-D0GA-PB (MAR/70): TEST 7 - COMPARE NOT](MAINDEC-11-D0GA-PB.jpg) * ![MAINDEC-11-D0HA-PB (MAR/70): TEST 8 - MOVE](MAINDEC-11-D0HA-PB.jpg) -* ![MAINDEC-11-D0IA-PB (MAR/70): TEST 9 - BIS+BIC+BIT](MAINDEC-11-D0IA-PB.jpg) +* ![MAINDEC-11-D0IA-PB (MAR/70): TEST 9 - BIS, BIC + BIT](MAINDEC-11-D0IA-PB.jpg) * ![MAINDEC-11-D0JA-PB (MAR/70): TEST 10 - ADD](MAINDEC-11-D0JA-PB.jpg) * ![MAINDEC-11-D0KA-PB (MAR/70): TEST 11 - SUBTRACT](MAINDEC-11-D0KA-PB.jpg) * ![MAINDEC-11-D0LA-PB (MAR/70): TEST 12 - JUMP](MAINDEC-11-D0LA-PB.jpg) - -The above tapes have been added to the [Default PC11 Configuration](/devices/pdp11/pc11/), so that you can load -them in machines such as this [PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/). - -As noted for other [DEC PDP-11 Tape Images](/apps/pdp11/tapes/), any "Absolute Format" tape (which should include -all the tapes listed above) can be loaded directly into RAM using the machine's "Load" button instead of "Attach". -In most cases, this eliminates the first two steps. +* ![MAINDEC-11-D0MA-PB (FEB/70): TEST 13 - JSR, RTS, RTI](MAINDEC-11-D0MA-PB.jpg) +* ![MAINDEC-11-D0NA-PB (APR/70): TEST 14 - TRAP TEST](MAINDEC-11-D0NA-PB.jpg) Instructions for Running Diagnostics ------------------------------------ +### Tests 1-12 + Instructions for running "TEST 1 - BRANCH" through "TEST 12 - JUMP" come from the [MAINDEC USER REFERENCE MANUAL, OCTOBER 1973](http://archive.pcjs.org/pubs/dec/pdp11/diags/MAINDEC_User_Reference_Manual_Oct73.pdf), p. 19: @@ -43,27 +47,29 @@ p. 19: ABSTRACT - This is a group of 12 tests that incrementally test and isolate simple malfunctions of - the PDP-11. The tests should be run in the indicated numerical sequence. The sequence is: + This is a group of 12 tests that incrementally test and isolate simple + malfunctions of the PDP-11. The tests should be run in the indicated + numerical sequence. The sequence is: - 1. Branch - 2. Conditional Branch - 3. Unary - 4. Unary and Binarys - 5. Rotate/Shift - 6. Compare (Equality) - 7. Compare (non equality) - 8. Move - 9. Bit Set, Clear and Test - 10. Add - 11. Subtract - 12. Jump + 1. Branch + 2. Conditional Branch + 3. Unary + 4. Unary and Binarys + 5. Rotate/Shift + 6. Compare (Equality) + 7. Compare (non equality) + 8. Move + 9. Bit Set, Clear and Test + 10. Add + 11. Subtract + 12. Jump REQUIREMENTS PDP-11 - STORAGE - Use all of 4K [words] except 17500 - 17776 (Reserved for boot and absolute loader) + STORAGE - Use all of 4K [words] except 17500 - 17776 (Reserved for boot and + absolute loader) LOADING - Absolute Loader @@ -73,7 +79,7 @@ p. 19: PRINTOUTS - No - SWITCH REGISTER OPTIONS = No + SWITCH REGISTER OPTIONS - No The code for "TEST 1 - BRANCH" is not terribly exciting. Most of its 8Kb length is filled with these three repeated instructions: @@ -97,6 +103,74 @@ character (with bit 7 set; I'm not sure why) to the machine's display terminal, BR instruction fails to branch for some strange reason, then in theory, the machine will fall through to a HALT instruction, and the test will halt. +### Test 13 + + MAINDEC-11-D0MA (NEW NUMBER - DZKAM) + + T13 + + ABSTRACT + + This is a test of the JSR, RTS and RTI instructions. It is also the + first time the Register 6 has been "PUSHED and POPPED". + + REQUIREMENTS + + PDP-11 + + STORAGE - 0 - 5000 + + LOADING - Absolute Loader + + EXECUTION TIME - 2 min - Bell will ring + + STARTING PROCEDURE - Start and Restart at 200 + + PRINTOUTS - No + + SWITCH REGISTER OPTIONS - No + +### Test 14 + +Note that, as the instructions indicate, this test will fail on a PDP-11/45 or newer machine, because +it expects the MUL instruction to trap. + + MAINDEC-11-D0NA (NEW NUMBER - DAKAA) + + T14 TRAPS + + ABSTRACT + + This is a test of all operation and instruction that cause traps. + Also tested are trap overflow conditions, oddities of register 6, + interrupts and the reset instructions. + + REQUIREMENTS + + PDP-11/20, 11/05, 11/10 + + STORAGE - 0 - 17500 + + LOADING - Absolute Loader + + EXECUTION TIME - Function or core size - Bell will ring + + STARTING PROCEDURE + + Start and Restart at 200 for a 4K System + 202 for an 8K System + 204 for a 12K System + 206 for a 16K System + 210 for a 20K System + 212 for a 24K System + 214 for a 28K System + + PRINTOUTS - No + + SWITCH REGISTER OPTIONS - No + + This program should not be used to test 11/40 and 11/45's. + Newer Paper Tape Software (mid-1970s) ------------------------------------- diff --git a/devices/pdp11/machine/1120/README.md b/devices/pdp11/machine/1120/README.md index 6020283d2..dd8ff47b1 100644 --- a/devices/pdp11/machine/1120/README.md +++ b/devices/pdp11/machine/1120/README.md @@ -10,6 +10,7 @@ PDP-11/20 Machine Configurations PDPjs is currently being tested with the following PDP-11/20 machine configurations: * [PDP-11/20 Boot Monitor](/devices/pdp11/machine/1120/monitor/) (with [Debugger](/devices/pdp11/machine/1120/monitor/debugger/)) +* [PDP-11/20 with Front Panel](/devices/pdp11/machine/1120/panel) (with [Debugger](/devices/pdp11/machine/1120/panel/debugger/)) * [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/) (with [Debugger](/devices/pdp11/machine/1120/bootstrap/debugger/)) * [PDP-11/20 BASIC Demo](/devices/pdp11/machine/1120/basic/) (with [Debugger](/devices/pdp11/machine/1120/basic/debugger/)) diff --git a/devices/pdp11/machine/1120/monitor/debugger/machine.xml b/devices/pdp11/machine/1120/monitor/debugger/machine.xml index 68361531b..6757083db 100644 --- a/devices/pdp11/machine/1120/monitor/debugger/machine.xml +++ b/devices/pdp11/machine/1120/monitor/debugger/machine.xml @@ -7,7 +7,7 @@ - + diff --git a/devices/pdp11/machine/1120/monitor/machine.xml b/devices/pdp11/machine/1120/monitor/machine.xml index 4c78fb97b..4f2141ef3 100644 --- a/devices/pdp11/machine/1120/monitor/machine.xml +++ b/devices/pdp11/machine/1120/monitor/machine.xml @@ -7,6 +7,6 @@ - + diff --git a/devices/pdp11/machine/1120/panel/README.md b/devices/pdp11/machine/1120/panel/README.md new file mode 100644 index 000000000..f7d3a6566 --- /dev/null +++ b/devices/pdp11/machine/1120/panel/README.md @@ -0,0 +1,12 @@ +--- +layout: page +title: PDP-11/20 with Front Panel +permalink: /devices/pdp11/machine/1120/panel/ +machines: + - id: test1120 + type: pdp11 +--- + +{% include machine.html id="test1120" %} + +This machine is also available with our built-in [Debugger](debugger/). diff --git a/devices/pdp11/machine/1120/panel/debugger/README.md b/devices/pdp11/machine/1120/panel/debugger/README.md new file mode 100644 index 000000000..995ed394d --- /dev/null +++ b/devices/pdp11/machine/1120/panel/debugger/README.md @@ -0,0 +1,11 @@ +--- +layout: page +title: PDP-11/20 with Front Panel and Debugger +permalink: /devices/pdp11/machine/1120/panel/debugger/ +machines: + - id: test1120 + type: pdp11 + debugger: true +--- + +{% include machine.html id="test1120" %} diff --git a/devices/pdp11/machine/1120/panel/debugger/machine.xml b/devices/pdp11/machine/1120/panel/debugger/machine.xml new file mode 100644 index 000000000..c9cad48af --- /dev/null +++ b/devices/pdp11/machine/1120/panel/debugger/machine.xml @@ -0,0 +1,13 @@ + + + + PDP-11/20 with Front Panel and Debugger + + + + + + + + + diff --git a/devices/pdp11/machine/1120/panel/machine.xml b/devices/pdp11/machine/1120/panel/machine.xml new file mode 100644 index 000000000..3d9a7d697 --- /dev/null +++ b/devices/pdp11/machine/1120/panel/machine.xml @@ -0,0 +1,12 @@ + + + + PDP-11/20 with Front Panel + + + + + + + + diff --git a/devices/pdp11/panel/1120/README.md b/devices/pdp11/panel/1120/README.md new file mode 100644 index 000000000..1ee467a78 --- /dev/null +++ b/devices/pdp11/panel/1120/README.md @@ -0,0 +1,16 @@ +--- +layout: page +title: PDP-11/20 Control Panels +permalink: /devices/pdp11/panel/1120/ +--- + +PDP-11/20 Control Panels +------------------------ + +The following Control Panel configurations are available: + +* [PDP-11/20 Front Panel](front.xml) (with [Debugger](debugger/front.xml)) + +Use this [PDP-11/20](/devices/pdp11/machine/1120/panel/debugger/) to see the [PDP-11/20 Front Panel](debugger/front.xml) in action. + +See [Front Panel Basics](/devices/pdp11/panel/1170/#front-panel-basics) for information on Front Panel operation. diff --git a/devices/pdp11/panel/1120/debugger/README.md b/devices/pdp11/panel/1120/debugger/README.md new file mode 100644 index 000000000..30a3351d2 --- /dev/null +++ b/devices/pdp11/panel/1120/debugger/README.md @@ -0,0 +1,10 @@ +--- +layout: page +title: PDP-11/20 Control Panel with Debugger +permalink: /devices/pdp11/panel/1120/debugger/ +--- + +PDP-11/20 Control Panel with Debugger +------------------------------------- + +* [PDP-11/20 Front Panel with Debugger](front.xml) diff --git a/devices/pdp11/panel/1120/debugger/front.xml b/devices/pdp11/panel/1120/debugger/front.xml new file mode 100644 index 000000000..b90312c32 --- /dev/null +++ b/devices/pdp11/panel/1120/debugger/front.xml @@ -0,0 +1,239 @@ + + + Control Panel + + + 16 + 18 + 22 + + + + + + KRNL + SUPR + USER + + + + + + + ADDRESS + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + LED1 + LED2 + LED3 + + + + + + LED4 + LED5 + LED6 + + + + + + + DATA + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + STRT + STEP + E/H + + + + + + CONT + DEP + EXAM + + + + + + LOAD + TEST + + + + + 0 + 1 + 2 + + + + + + 3 + 4 + 5 + + + + + + 6 + 7 + 8 + + + + + + 9 + 10 + 11 + + + + + + 12 + 13 + 14 + + + + + + 15 + 16 + 17 + + + + + + 18 + 19 + 20 + + + + + + 21 + + + + + + + + Enter + Clear + + + + Registers + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + 000000 + + 0 + 0 + 0 + 0 + + + + Run + Step + Reset + Fast + Stopped + + diff --git a/devices/pdp11/panel/1120/front.xml b/devices/pdp11/panel/1120/front.xml new file mode 100644 index 000000000..5aad69e5e --- /dev/null +++ b/devices/pdp11/panel/1120/front.xml @@ -0,0 +1,215 @@ + + + Control Panel + + + 16 + 18 + 22 + + + + + + KRNL + SUPR + USER + + + + + + + ADDRESS + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + LED1 + LED2 + LED3 + + + + + + LED4 + LED5 + LED6 + + + + + + + DATA + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + . + + + + + + START + STEP + ENABLE + + + + + + CONT + DEP + EXAM + + + + + + LOAD + TEST + + + + + 0 + 1 + 2 + + + + + + 3 + 4 + 5 + + + + + + 6 + 7 + 8 + + + + + + 9 + 10 + 11 + + + + + + 12 + 13 + 14 + + + + + + 15 + 16 + 17 + + + + + + 18 + 19 + 20 + + + + + + 21 + + + + + + + + Run + Reset + Fast + Stopped + + diff --git a/devices/pdp11/panel/README.md b/devices/pdp11/panel/README.md index 7b0b537c7..6b1164795 100644 --- a/devices/pdp11/panel/README.md +++ b/devices/pdp11/panel/README.md @@ -7,5 +7,6 @@ permalink: /devices/pdp11/panel/ PDP-11 Control Panels --------------------- +* [11/20 Front Panels](1120/) * [11/70 Front Panels](1170/) * [Terminal Test Panels](test/) diff --git a/devices/pdp11/pc11/default.xml b/devices/pdp11/pc11/default.xml index 83514481a..e89d228a0 100644 --- a/devices/pdp11/pc11/default.xml +++ b/devices/pdp11/pc11/default.xml @@ -31,17 +31,19 @@ - + - - + + - + + + Attach diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index dce5ea0ad..d291ecaae 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -1398,7 +1398,7 @@ BusPDP11.prototype.fault = function(addr, err, access) this.dbg.printMessage("memory fault (" + access + ") on address " + this.dbg.toStrBase(addr), true, true); } if (err) this.cpu.regErr |= err; - this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr); + this.cpu.trap(PDP11.TRAP.BUS_ERROR, 0, addr); } }; diff --git a/modules/pdp11/lib/cpuops.js b/modules/pdp11/lib/cpuops.js index bffa7785b..d2554e062 100644 --- a/modules/pdp11/lib/cpuops.js +++ b/modules/pdp11/lib/cpuops.js @@ -827,7 +827,7 @@ PDP11.opBPL = function(opCode) */ PDP11.opBPT = function(opCode) { - this.trap(PDP11.TRAP.BPT, PDP11.REASON.BPT); + this.trap(PDP11.TRAP.BPT, 0, PDP11.REASON.BPT); this.nStepCycles -= (4 + 1); }; @@ -1101,7 +1101,7 @@ PDP11.opDIV = function(opCode) */ PDP11.opEMT = function(opCode) { - this.trap(PDP11.TRAP.EMT, PDP11.REASON.EMT); + this.trap(PDP11.TRAP.EMT, 0, PDP11.REASON.EMT); this.nStepCycles -= (22 + 3); }; @@ -1115,8 +1115,11 @@ PDP11.opHALT = function(opCode) { if (this.regPSW & PDP11.PSW.CMODE) { this.regErr |= PDP11.CPUERR.BADHALT; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.HALT); + this.trap(PDP11.TRAP.BUS_ERROR, 0, PDP11.REASON.HALT); } else { + if (this.panel) { + this.panel.setData(this.regsGen[0], true); + } if (!this.dbg) { /* * This will leave the PC exactly where it's supposed to be: at the address of the HALT + 2. @@ -1171,7 +1174,7 @@ PDP11.opINCB = function(opCode) */ PDP11.opIOT = function(opCode) { - this.trap(PDP11.TRAP.IOT, PDP11.REASON.IOT); + this.trap(PDP11.TRAP.IOT, 0, PDP11.REASON.IOT); this.nStepCycles -= (22 + 3); }; @@ -1291,7 +1294,7 @@ PDP11.opMFPT = function(opCode) /* * TODO: Review */ - this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED); + this.trap(PDP11.TRAP.RESERVED, 0, PDP11.REASON.RESERVED); }; PDP11.MOV_CYCLES = [ @@ -1713,7 +1716,7 @@ PDP11.opSXT = function(opCode) */ PDP11.opTRAP = function(opCode) { - this.trap(PDP11.TRAP.TRAP, PDP11.REASON.TRAP); + this.trap(PDP11.TRAP.TRAP, 0, PDP11.REASON.TRAP); this.nStepCycles -= (4 + 1); }; @@ -1823,7 +1826,7 @@ PDP11.opUndefined = function(opCode) if (DEBUGGER && this.dbg) { if (this.dbg.undefinedInstruction(opCode)) return; } - this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED); + this.trap(PDP11.TRAP.RESERVED, 0, PDP11.REASON.RESERVED); }; /** diff --git a/modules/pdp11/lib/cpustate.js b/modules/pdp11/lib/cpustate.js index 081c69096..6ee2ded6f 100644 --- a/modules/pdp11/lib/cpustate.js +++ b/modules/pdp11/lib/cpustate.js @@ -825,7 +825,7 @@ CPUStatePDP11.prototype.dispatchInterrupt = function(vector, priority) this.advancePC(2); this.opFlags &= ~PDP11.OPFLAG.WAIT; } - this.trap(vector, PDP11.REASON.INTERRUPT); + this.trap(vector, 0, PDP11.REASON.INTERRUPT); return true; } return false; @@ -1083,6 +1083,13 @@ CPUStatePDP11.prototype.updateMulFlags = function(result) /* * NOTE: Technically, the MUL instruction doesn't need to worry about NO_FLAGS, because that instruction * doesn't write to the bus, and therefore can't modify the PSW directly. But it doesn't hurt to be consistent. + * + * TODO: Conduct a review of all opcode handlers, because one possible alternative to all this NO_FLAGS nonsense + * would be to pass the appropriate flag update function to the writeDstByte()/writeDstWord() functions, and + * have them update the flags BEFORE the write occurs, thus allowing any subsequent write to the PSW to be honored. + * + * That already happens automatically with the updateDstByte()/updateDstWord() functions, since generally the + * specified modify function also updates the flags BEFORE the write occurs. */ if (!(this.opFlags & PDP11.OPFLAG.NO_FLAGS)) { this.flagN = result >> 16; @@ -1139,7 +1146,7 @@ CPUStatePDP11.prototype.panic = function(reason) }; /** - * trap(vector, reason) + * trap(vector, flag, reason) * * trap() handles all the trap/abort functions. It reads the trap vector from kernel * D space, changes mode to reflect the new PSW and PC, and then pushes the old PSW and @@ -1147,9 +1154,10 @@ CPUStatePDP11.prototype.panic = function(reason) * * @this {CPUStatePDP11} * @param {number} vector + * @param {number} flag * @param {number} [reason] (for diagnostic purposes only) */ -CPUStatePDP11.prototype.trap = function(vector, reason) +CPUStatePDP11.prototype.trap = function(vector, flag, reason) { if (DEBUG && this.dbg) { if (this.messageEnabled(MessagesPDP11.TRAP)) { @@ -1194,8 +1202,15 @@ CPUStatePDP11.prototype.trap = function(vector, reason) this.pushWord(this.regsGen[7]); this.setPC(newPC); - this.opFlags &= ~PDP11.OPFLAG.TRAP_MASK; // lose interest in traps after an abort - this.trapPSW = -1; // reset flag that we have a trap within a trap + /* + * Since DEC's "TRAP TEST" triggers a RESERVED (instruction) trap with the stack deliberately + * set too low, and expects the stack overflow trap to be "sprung" immediately afterward, we only + * want to "lose interest" in TRAP flags that were set on entry. + * + * this.opFlags &= ~PDP11.OPFLAG.TRAP_MASK; // lose interest in traps after an abort + */ + this.opFlags &= ~flag; + this.trapPSW = -1; // reset flag that we have a trap within a trap /* * These next properties are purely an aid for the Debugger; see getTrapStatus() @@ -1435,7 +1450,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl } } if (fTrap) { // don't trap until the end, because it throws an exception - this.trap(PDP11.TRAP.MMU, PDP11.REASON.MAPERROR); + this.trap(PDP11.TRAP.MMU, 0, PDP11.REASON.MAPERROR); } } return physicalAddress; @@ -1494,18 +1509,35 @@ CPUStatePDP11.prototype.pushWord = function(data) if (!(this.regMMR0 & 0xe000)) { this.regMMR1 = (this.regMMR1 << 8) | 0xf6; } + this.checkStackLimit(0, virtualAddress); + this.writeWord(virtualAddress, data); +}; - if ((!this.mmuMode) && virtualAddress <= this.regSL && virtualAddress > 4) { - if (virtualAddress <= this.regSL - 32) { - this.regErr |= PDP11.CPUERR.RED; - this.regsGen[6] = 4; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.PUSHERROR); - } else { - this.regErr |= PDP11.CPUERR.YELLOW; - this.opFlags |= 4; +/** + * checkStackLimit(mode, addr) + * + * @this {CPUStatePDP11} + * @param {number} mode (ie, the addressing mode; 0 if push) + * @param {number} addr + */ +CPUStatePDP11.prototype.checkStackLimit = function(mode, addr) +{ + if (!this.mmuMode && !(this.opFlags & PDP11.OPFLAG.TRAP_SP)) { + if (addr <= this.regSL && (mode || addr > 4) || mode && addr >= 0xfffe) { + if (this.model >= PDP11.MODEL_1145 && (addr <= this.regSL - 32 || mode == 1 && addr >= 0xfffe)) { + this.regErr |= PDP11.CPUERR.RED; + this.regsGen[6] = 4; + this.trap(PDP11.TRAP.BUS_ERROR, 0, PDP11.REASON.STACKMODE1); + } else { + /* + * On older machines (eg, the PDP-11/20), the instruction is always allowed to complete, + * so the trap must always be issued in this fashion. + */ + this.regErr |= PDP11.CPUERR.YELLOW; + this.opFlags |= PDP11.OPFLAG.TRAP_SP; + } } } - this.writeWord(virtualAddress, data); }; /** @@ -1532,6 +1564,15 @@ CPUStatePDP11.prototype.pushWord = function(data) * incremented and decremented so that the OS can reset and restart an instruction * if a page fault occurs. * + * Stack Overflow Traps + * -------------------- + * On the PDP-11/20, stack overflow traps occur when an address below 400 is referenced + * by SP in either mode 4 (auto-decrement) or 5 (auto-decrement deferred). The instruction + * is allowed to complete before the trap is issued. + * + * On the PDP-11/70, the stack limit register (177774) allows a variable boundary for the + * kernel stack. + * * @this {CPUStatePDP11} * @param {number} mode * @param {number} reg @@ -1544,8 +1585,8 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) var addrDSpace = (accessFlags & PDP11.ACCESS.VIRT)? 0 : this.addrDSpace; /* - * Modes that need to auto-increment or auto-decrement will break, in order to perform the - * update; others will return an address immediately. + * Modes that need to auto-increment or auto-decrement will break, in order to perform + * the update; others will return an address immediately. */ switch (mode) { /* @@ -1556,26 +1597,18 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) * "cause an 'illegal' instruction" condition", which presumably means a BUS_ERROR trap. */ case 0: - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.NOREGADDR); + this.trap(PDP11.TRAP.BUS_ERROR, 0, PDP11.REASON.NOREGADDR); return 0; /* * Mode 1: (R) */ case 1: - if (reg === 6 && (!this.mmuMode) && (accessFlags & PDP11.ACCESS.WRITE) && - (this.regsGen[6] <= this.regSL || this.regsGen[6] >= 0xfffe)) { - if (this.regsGen[6] <= this.regSL - 32 || this.regsGen[6] >= 0xfffe) { - this.regErr |= PDP11.CPUERR.RED; - this.regsGen[6] = 4; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.STACKMODE1); - } else { - this.regErr |= PDP11.CPUERR.YELLOW; - this.opFlags |= PDP11.OPFLAG.TRAP_SP; - } + if (reg == 6 && (accessFlags & PDP11.ACCESS.WRITE)) { + this.checkStackLimit(mode, this.regsGen[6]); } this.nStepCycles -= (2 + 1); - return (reg === 7? this.regsGen[reg] : (this.regsGen[reg] | addrDSpace)); + return (reg == 7? this.regsGen[reg] : (this.regsGen[reg] | addrDSpace)); /* * Mode 2: (R)+ @@ -1583,7 +1616,7 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) case 2: stepSize = 2; virtualAddress = this.regsGen[reg]; - if (reg !== 7) { + if (reg != 7) { virtualAddress |= addrDSpace; if (reg < 6 && (accessFlags & PDP11.ACCESS.BYTE)) { stepSize = 1; @@ -1598,7 +1631,7 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) case 3: stepSize = 2; virtualAddress = this.regsGen[reg]; - if (reg !== 7) virtualAddress |= addrDSpace; + if (reg != 7) virtualAddress |= addrDSpace; virtualAddress = this.readWord(virtualAddress); virtualAddress |= addrDSpace; this.nStepCycles -= (5 + 2); @@ -1611,7 +1644,7 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) stepSize = -2; if (reg < 6 && (accessFlags & PDP11.ACCESS.BYTE)) stepSize = -1; virtualAddress = (this.regsGen[reg] + stepSize) & 0xffff; - if (reg !== 7) virtualAddress |= addrDSpace; + if (reg != 7) virtualAddress |= addrDSpace; this.nStepCycles -= (3 + 1); break; @@ -1621,7 +1654,7 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) case 5: stepSize = -2; virtualAddress = (this.regsGen[reg] - 2) & 0xffff; - if (reg !== 7) virtualAddress |= addrDSpace; + if (reg != 7) virtualAddress |= addrDSpace; virtualAddress = this.readWord(virtualAddress) | addrDSpace; this.nStepCycles -= (6 + 2); break; @@ -1652,15 +1685,12 @@ CPUStatePDP11.prototype.getAddrByMode = function(mode, reg, accessFlags) this.regMMR1 = (this.regMMR1 << 8) | ((stepSize << 3) & 0xf8) | reg; } - if (reg == 6 && (!this.mmuMode) && (accessFlags & PDP11.ACCESS.WRITE) && stepSize <= 0 && (this.regsGen[6] <= this.regSL || this.regsGen[6] >= 0xfffe)) { - if (this.regsGen[6] <= this.regSL - 32) { - this.regErr |= PDP11.CPUERR.RED; - this.regsGen[6] = 4; - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.STACKERROR); - } else { - this.regErr |= PDP11.CPUERR.YELLOW; - this.opFlags |= PDP11.OPFLAG.TRAP_SP; - } + /* + * NOTE: We had to eliminate the test for "(accessFlags & PDP11.ACCESS.WRITE)", because DEC's + * "TRAP TEST" expects "TST -(SP)" to trap when SP is 150. + */ + if (reg == 6 && stepSize < 0) { + this.checkStackLimit(mode, this.regsGen[6]); } return virtualAddress; }; @@ -2191,23 +2221,23 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles) /* * Check for any pending traps. * - * I've moved this TRAP_MASK check BEFORE we decode the next instruction instead - * of immediately AFTER, because the last instruction may have thrown an exception, - * kicking us out before we reach the bottom of this loop. + * I've moved this TRAP_MASK check BEFORE we decode the next instruction instead of immediately AFTER, + * just in case the last instruction threw an exception that kicked us out before we reached the bottom + * of the stepCPU() loop. + * + * Note: I've swapped the order (priority) of the TF and SP traps, based on the PDP-11/20 Handbook. + * TODO: Determine if 1) the 11/20 Handbook was wrong, or 2) the 11/70 really has different priorities. */ if (this.opFlags & PDP11.OPFLAG.TRAP_MASK) { if (this.opFlags & PDP11.OPFLAG.TRAP_MMU) { - this.trap(PDP11.TRAP.MMU, PDP11.REASON.TRAPMMU); // MMU trap has priority - } else { - if (this.opFlags & PDP11.OPFLAG.TRAP_SP) { - this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.TRAPSP); // then SP trap - } else { - if (this.opFlags & PDP11.OPFLAG.TRAP_TF) { - this.trap(PDP11.TRAP.BPT, PDP11.REASON.TRAPTF); // and finally a TF trap - } - } + this.trap(PDP11.TRAP.MMU, PDP11.OPFLAG.TRAP_MMU, PDP11.REASON.TRAPMMU); + } + else if (this.opFlags & PDP11.OPFLAG.TRAP_TF) { + this.trap(PDP11.TRAP.BPT, PDP11.OPFLAG.TRAP_TF, PDP11.REASON.TRAPTF); + } + else if (this.opFlags & PDP11.OPFLAG.TRAP_SP) { + this.trap(PDP11.TRAP.BUS_ERROR, PDP11.OPFLAG.TRAP_SP, PDP11.REASON.TRAPSP); } - this.opFlags &= ~PDP11.OPFLAG.TRAP_MASK; } /* * If we're in the INTQ or WAIT state, see if any interrupts can kick us out of that state. diff --git a/modules/pdp11/lib/debugger.js b/modules/pdp11/lib/debugger.js index 977597e3d..043830e4b 100644 --- a/modules/pdp11/lib/debugger.js +++ b/modules/pdp11/lib/debugger.js @@ -1400,7 +1400,7 @@ if (DEBUGGER) { var trapStatus = this.cpu.getTrapStatus(); if (trapStatus) { var trapReason = trapStatus >> 8; - var sReason = trapReason? (" (" + this.toStrBase(trapReason) + ")") : ""; + var sReason = trapReason? (" (" + trapReason + ")") : ""; this.println("trapped to " + this.toStrBase(trapStatus & 0xff, 1) + sReason); } @@ -1724,8 +1724,11 @@ if (DEBUGGER) { */ DebuggerPDP11.prototype.undefinedInstruction = function(opCode) { - this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true); - return this.stopInstruction(); // allow the caller to step over it if they really want a trap generated + if (this.messageEnabled(MessagesPDP11.CPU)) { + this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true); + return this.stopInstruction(); // allow the caller to step over it if they really want a trap generated + } + return false; }; /** diff --git a/modules/pdp11/lib/defines.js b/modules/pdp11/lib/defines.js index 1608b09e3..fc888215b 100644 --- a/modules/pdp11/lib/defines.js +++ b/modules/pdp11/lib/defines.js @@ -203,7 +203,7 @@ var PDP11 = { TRAP: 0x08, // set if last operation was a trap (see trapLast for the vector, and trapReason for the reason) TRAP_TF: 0x10, // aka PDP11.PSW.TF TRAP_MMU: 0x20, - TRAP_SP: 0x40, + TRAP_SP: 0x40, // set for a deferred BUS_ERROR trap (due to a "yellow" stack overflow condition) TRAP_MASK: 0x70, NO_FLAGS: 0x80, // set whenever the PSW is written directly, requiring all updateXXXFlags() functions to leave flags unchanged PRESERVE: 0x07 // OPFLAG bits to preserve prior to the next instruction @@ -264,24 +264,24 @@ var PDP11 = { * PDP-11 trap reasons (for diagnostic purposes only) */ REASON: { - BPT: 1, - EMT: 2, - HALT: 3, - IOT: 4, - TRAP: 5, - RESERVED: 6, - ODDMEMADDR: 10, - NOMEMORY: 12, - ODDMMUADDR: 14, - MAPERROR: 16, - PUSHERROR: 18, - NOREGADDR: 20, - STACKMODE1: 22, - STACKERROR: 24, - INTERRUPT: 26, - TRAPMMU: 28, - TRAPSP: 30, - TRAPTF: 32 + BPT: -1, + EMT: -2, + HALT: -3, + IOT: -4, + TRAP: -5, + RESERVED: -6, + TRAPMMU: -7, + TRAPSP: -8, + TRAPTF: -9, + ODDMEMADDR: -10, + NOMEMORY: -11, + ODDMMUADDR: -12, + MAPERROR: -13, + PUSHERROR: -14, + NOREGADDR: -15, + STACKMODE1: -16, + STACKERROR: -17, + INTERRUPT: -18 }, /* * Internal memory access flags diff --git a/modules/pdp11/lib/device.js b/modules/pdp11/lib/device.js index 1fe7c6fb5..b737eb376 100644 --- a/modules/pdp11/lib/device.js +++ b/modules/pdp11/lib/device.js @@ -1048,7 +1048,16 @@ DevicePDP11.prototype.readPSW = function(addr) */ DevicePDP11.prototype.writePSW = function(data, addr) { - var maskDisallowed = PDP11.PSW.UNUSED | PDP11.PSW.TF; + /* + * pdp11.js disallowed PSW.TF in addition to PSW.UNUSED, but DEC's "TRAP TEST" expects the + * following instruction to trap: + * + * 004174: 052767 000020 173574 BIS #20,177776 + * + * Since that test was written for the PDP-11/20, it's possible that newer machines + * have a different behavior, but for now, we assume that all machines allow setting PSW.TF. + */ + var maskDisallowed = PDP11.PSW.UNUSED; this.cpu.setPSW((data & ~maskDisallowed) | (this.cpu.getPSW() & maskDisallowed)); this.cpu.opFlags |= PDP11.OPFLAG.NO_FLAGS; }; diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 2518ad5e5..c81eaba67 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -40,281 +40,282 @@ function wa(a,b){return(a+" ").slice(0,b) function za(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a>1,h;h=c(b,a[g]);0a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function Da(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var h=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(h.onreadystatechange=function(){4===h.readyState&&(f=h.responseText,200==h.status||!h.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=h.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function Ea(a,b){var c,d={da:null,ha: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.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ha=g.symbols;d.da.length?1==d.da.length&&(q(d.da[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.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.da=e;else if(e=g.words)for(d.da=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.da=Array(4*e.length),f=c=0;c>8&255,d.da[f++]=e[c]>>16&255,d.da[f++]=e[c]>>24&255;else d.da=g;d.ga=g.symbols;d.da.length?1==d.da.length&&(q(d.da[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.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.A={ready:!1,ab:!1,ac:!1,ia:!1,error:!1};this.Sb=null;this.A.error=!1;this.G={};this.i=null;this.oa=d||0;u.push(this)}var cb=void 0,db={}; +function t(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.tc=b.comment;this.Vc=b;b=this.id.indexOf(".");0>b?this.Ya=this.id:(this.Qa=this.id.substr(0,b),this.Ya=this.id.substr(b+1));this[a]=c;this.w={ready:!1,ab:!1,ac:!1,ha:!1,error:!1};this.Rb=null;this.w.error=!1;this.G={};this.i=null;this.ma=d||0;u.push(this)}var cb=void 0,db={}; if(window){cb||(cb=window.location.search.substr(1));for(var eb,fb=/\+/g,gb=/([^&=]+)=?([^&]*)/g;eb=gb.exec(cb);)db[decodeURIComponent(eb[1].replace(fb," "))]=decodeURIComponent(eb[2].replace(fb," "))}function ob(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=t);a.prototype=ob(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var pb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else pb={},u=[];function qb(a,b,c){pb[a]&&b&&(pb[a][b]=c)}function rb(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,0,!1,!1,this.gd,a]}z(Bb);var Cb=7;function Db(a,b){return a.g[b]&&a.g[b][1]}k=Bb.prototype;k.reset=function(){this.stop()}; -k.ta=function(a,b,c,d){if(this.C&&this.C.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.H++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.B[b]=d?1:0,this.H++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, -b){return function(){Eb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Fb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Eb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Fb(a,b)}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Fa=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.i=d;Gb(b,this,Hb);Ib(b,this.reset.bind(this));Jb(this);Kb(this)};k.Ha=function(a,b){b||(Lb(),this.reset());return!0};k.Ga=function(){return!0}; -function Mb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Jb(a,b){for(var c in a.B)Mb(a,c,null!=b?b:a.B[c])}function $b(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Kb(a){for(var b in a.g)$b(a,b,a.g[b][1])}function ac(a,b,c,d){a.G[b]&&(void 0===c&&(yb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?qa(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -function Eb(a,b){var c=a.g[b];$b(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.L="DEP"==b,a.M="EXAM"==b)}function Fb(a,b){var c=a.g[b];c[2]&&c[3]&&($b(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.ed=function(a){a||this.b.A.W||(this.v.reset(),bc(this.b),Db(this,"ENABLE")&&this.b.ib())};k.fd=function(){};k.ad=function(a){a||this.b.ga()}; -k.Zc=function(a){if(!a&&!this.b.A.W)if(Db(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!vb(a,!0))ub(a,!0),a.jb(0),ub(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.v.Ma;Db(a,"STEP")||(b=-b);hc(a,a.f&~c|a.f+b&c)} -function hc(a,b){a.f=b&a.v.Ma;b=a.f;for(var c=0;22>c;c++)jc(a,"A"+c,b&1<c;c++)jc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<a;a++)this.g["S"+a]=[0,0,!1,!1,this.gd,a]}z(Bb);var Cb=7;function Db(a,b){return a.g[b]&&a.g[b][1]}k=Bb.prototype;k.reset=function(){this.stop()}; +k.ra=function(a,b,c,d){if(this.C&&this.C.ra(a,b,c,d)||this.b&&this.b.ra(a,b,c,d)||this.i&&this.i.ra(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.H++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.B[b]=d?1:0,this.H++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0,d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a, +b){return function(){Eb(a,b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){Fb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){Eb(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){Fb(a,b)}}(this,b),!0):this.parent.ra.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.i=d;Gb(b,this,Hb);Ib(b,this.reset.bind(this));Jb(this);Kb(this)};k.Ga=function(a,b){b||(Lb(),this.reset());return!0};k.Fa=function(){return!0}; +function Mb(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Jb(a,b){for(var c in a.B)Mb(a,c,null!=b?b:a.B[c])}function $b(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Kb(a){for(var b in a.g)$b(a,b,a.g[b][1])}function ac(a,b,c,d){a.G[b]&&(void 0===c&&(yb(a,"Value for "+b+" is invalid"),a.b.fa()),c=8==(a.i&&a.i.ca||8)?qa(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} +function Eb(a,b){var c=a.g[b];$b(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.L="DEP"==b,a.M="EXAM"==b)}function Fb(a,b){var c=a.g[b];c[2]&&c[3]&&($b(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}k.ed=function(a){a||this.b.w.W||(this.v.reset(),bc(this.b),Db(this,"ENABLE")&&this.b.ib())};k.fd=function(){};k.ad=function(a){a||this.b.fa()}; +k.Zc=function(a){if(!a&&!this.b.w.W)if(Db(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!vb(a,!0))ub(a,!0),a.jb(0),ub(a,!1);else try{var b=this.b.jb(1);0a.b.cb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.v.Ma;Db(a,"STEP")||(b=-b);hc(a,a.f&~c|a.f+b&c)} +function hc(a,b){a.f=b&a.v.Ma;b=a.f;for(var c=0;22>c;c++)jc(a,"A"+c,b&1<c;c++)jc(a,"D"+c,b&1<c;c++)a.g["S"+c][1]=b&1<>2;this.v=this.za-1;this.D=this.H/this.za|0;this.$a=[];this.ma=0;this.f=!1;this.cc=0;this.w=[];this.Lc=[oc,pc,qc,rc];a=new I(this);sc(a,this.i);this.Y=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));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.Ea(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 pc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);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.Ea(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 qc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.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.Ea(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 rc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.ma):(e.Ea(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 uc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Nb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Nb){n=l.size-(f-m);n>g&&(n=g);l.Nb=f-l.F+n;f=m+a.za;g-=n;h++;continue}}return zc(1,f,g)}f=new I(a,f,n,a.za,d,e);sc(f,a.i,l);a.Y[h++]=f;f=m+a.za;g-=n}return 0>=g?(d==Ac&&(a.cc+=c),a.status((c>>10)+"Kb "+Bc[d]+" at "+qa(b)),!0):zc(2,b,c)} -function wc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Wb(a&this.v,a)};k.Ub=function(a){3932160<=a&&(a=Cc(this.b,a));this.f=!1;this.ma++;a=this.Y[(a&this.Ma)>>>this.ka].hc(a&this.v,a);this.ma--;return a}; -k.pa=function(a){3932160<=a&&(a=Cc(this.b,a));return this.Y[(a&this.Ma)>>>this.ka].sa(a&this.v,a)};k.bb=function(a){3932160<=a&&(a=Cc(this.b,a));var b=a&this.v,c=(a&this.Ma)>>>this.ka;this.f=!1;this.ma++;a=this.Y[c].ic(b,a);this.ma--;return a};k.Xb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.Y[(a&this.Ma)>>>this.ka].Zb(a&this.v,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.f=!1;this.ma++;this.Y[(a&this.Ma)>>>this.ka].$b(a&this.v,b&255,a);this.ma--}; -k.hb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.Y[(a&this.Ma)>>>this.ka].Ob(a&this.v,b&65535,a)};k.Cb=function(a,b){3932160<=a&&(a=Cc(this.b,a));var c=a&this.v,d=(a&this.Ma)>>>this.ka;this.f=!1;this.ma++;this.Y[d].nc(c,b&65535,a);this.ma--}; +function mc(a,b,c){t.call(this,"Bus",a,mc,64);this.b=b;this.i=c;this.J=a.busWidth||16;this.C=0;this.B=[];this.g=null;this.H=1<>2;this.v=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.cc=0;this.A=[];this.Lc=[oc,pc,qc,rc];a=new I(this);sc(a,this.i);this.Y=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.$a[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));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.la),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.la);return c} +function pc(a,b,c){var d=!1,e=this.controller,f=e.$a[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.$a[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(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.la))}function qc(a,b){var c=-1,d=this.controller;a=d.$a[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return this.i&&F(this.i,a[5])&&E(this.i,a[4]+".readWord("+J(this.i,b)+"): "+J(this.i,c),!0,!d.la),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.la);return c} +function rc(a,b,c){var d=!1,e=this.controller;a=e.$a[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d?this.i&&F(this.i,a[5])&&E(this.i,a[4]+".writeWord("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.la):(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.la))} +function uc(a,b){if(b!=a.C){var c;a.C&&(c=(1<>>a.ja;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 zc(1,f,g)}f=new I(a,f,n,a.ya,d,e);sc(f,a.i,l);a.Y[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d==Ac&&(a.cc+=c),a.status((c>>10)+"Kb "+Bc[d]+" at "+qa(b)),!0):zc(2,b,c)} +function wc(a,b,c){var d=[];for(b>>>=a.ja;0>>=a.ja;0>>this.ja].Vb(a&this.v,a)};k.Tb=function(a){3932160<=a&&(a=Cc(this.b,a));this.f=!1;this.la++;a=this.Y[(a&this.Ma)>>>this.ja].hc(a&this.v,a);this.la--;return a}; +k.na=function(a){3932160<=a&&(a=Cc(this.b,a));return this.Y[(a&this.Ma)>>>this.ja].qa(a&this.v,a)};k.bb=function(a){3932160<=a&&(a=Cc(this.b,a));var b=a&this.v,c=(a&this.Ma)>>>this.ja;this.f=!1;this.la++;a=this.Y[c].ic(b,a);this.la--;return a};k.Xb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.Y[(a&this.Ma)>>>this.ja].Zb(a&this.v,b&255,a)};k.qb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.f=!1;this.la++;this.Y[(a&this.Ma)>>>this.ja].$b(a&this.v,b&255,a);this.la--}; +k.hb=function(a,b){3932160<=a&&(a=Cc(this.b,a));this.Y[(a&this.Ma)>>>this.ja].Nb(a&this.v,b&65535,a)};k.Bb=function(a,b){3932160<=a&&(a=Cc(this.b,a));var c=a&this.v,d=(a&this.Ma)>>>this.ja;this.f=!1;this.la++;this.Y[d].nc(c,b&65535,a);this.la--}; function Dc(a){for(var b=0,c=[],d=0;da.b.pb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Za=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Rc(b))}};k.td=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.ud=function(){return this.b.Lb};k.vd=function(){return this.b.qb};k.ne=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Tb=a&16?4194303:262143,Rc(b))};k.Wd=function(a){a=a>>1&63;var b=this.b.Mb[a>>1];return a&1?b>>16:b&65535}; -k.Oe=function(a,b){b=b>>1&63;var c=b>>1;this.b.Mb[c]=b&1?this.b.Mb[c]&65535|(a&63)<<16:this.b.Mb[c]&-65536|a&65534};k.Pd=function(a){return this.b.V[1][a>>1&7]};k.He=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Nd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Od=function(a){return this.b.ya[1][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.ya[1][b]=a;this.b.V[1][b]&=65295};k.Md=function(a){return this.b.ya[1][(a>>1&7)+8]}; -k.Ee=function(a,b){b=(b>>1&7)+8;this.b.ya[1][b]=a;this.b.V[1][b]&=65295};k.pd=function(a){return this.b.V[0][a>>1&7]};k.je=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.nd=function(a){return this.b.V[0][(a>>1&7)+8]};k.he=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.od=function(a){return this.b.ya[0][a>>1&7]};k.ie=function(a,b){b=b>>1&7;this.b.ya[0][b]=a;this.b.V[0][b]&=65295};k.md=function(a){return this.b.ya[0][(a>>1&7)+8]};k.ge=function(a,b){b=(b>>1&7)+8;this.b.ya[0][b]=a;this.b.V[0][b]&=65295}; -k.Vd=function(a){return this.b.V[3][a>>1&7]};k.Ne=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Td=function(a){return this.b.V[3][(a>>1&7)+8]};k.Le=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Ud=function(a){return this.b.ya[3][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.ya[3][b]=a;this.b.V[3][b]&=65295};k.Sd=function(a){return this.b.ya[3][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.ya[3][b]=a;this.b.V[3][b]&=65295};k.Ab=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Db=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.Ad=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.se=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Dd=function(){return this.b.u[7]};k.ve=function(a){this.b.u[7]=a};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.Bd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.te=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Cd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.ue=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.kd=function(a){return this.b.Ec[a-65504>>1]};k.ee=function(a,b){this.b.Ec[b-65504>>1]=a};k.Bc=function(a){if(65520==a){a=0;switch(Ac){case Ac:a=this.v.cc}a=(a>>6)-1}else a=0;return a};k.Ic=function(){};k.Rd=function(){return 1};k.Je=function(){};k.jd=function(){return this.b.fa}; -k.de=function(){this.b.fa=0};k.rd=function(){return this.b.Dc};k.le=function(a,b){b&1||(a&=255);this.b.Dc=a};k.wd=function(a){return a?this.b.kc:0};k.oe=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.I|=2};k.Qd=function(a){return a?this.b.fb&65280:0};k.Ie=function(a){this.b.fb=a|255};k.zd=function(){return Sc(this.b)};k.re=function(a){Tc(this.b,a&-1809|Sc(this.b)&1808);this.b.I|=128};k.Hc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; +function Gb(a,b,c,d,e){for(var f in c){var g=+f,h=c[f];if(!(h[6]&&h[6]>a.b.cb)){var l=h[0]?h[0].bind(b):null,m=h[1]?h[1].bind(b):null,n=h[2]?h[2].bind(b):null,v=h[3]?h[3].bind(b):null,r=h[5]||1;65472<=g&&65487>=g&&(!l&&n&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!m&&v&&(m=function(a){return function(b,c){return a(b,c)}.bind(b)}(v)));for(var w=h[4],y=0;y>5&3;b.Za=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Rc(b))}};k.td=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.ud=function(){return this.b.Kb};k.vd=function(){return this.b.pb};k.ne=function(a){var b=this.b;1170>b.cb&&(a&=-49);b.pb!=a&&(b.pb=a,b.Sb=a&16?4194303:262143,Rc(b))};k.Wd=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Oe=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.Pd=function(a){return this.b.V[1][a>>1&7]};k.He=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Nd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Fe=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Od=function(a){return this.b.xa[1][a>>1&7]};k.Ge=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Md=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.Ee=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.pd=function(a){return this.b.V[0][a>>1&7]};k.je=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.nd=function(a){return this.b.V[0][(a>>1&7)+8]};k.he=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.od=function(a){return this.b.xa[0][a>>1&7]};k.ie=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.md=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ge=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Vd=function(a){return this.b.V[3][a>>1&7]};k.Ne=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Td=function(a){return this.b.V[3][(a>>1&7)+8]};k.Le=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Ud=function(a){return this.b.xa[3][a>>1&7]};k.Me=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Sd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ke=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.zb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Cb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.Ad=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.se=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Dd=function(){return this.b.u[7]};k.ve=function(a){this.b.u[7]=a};k.Ab=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Db=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.Bd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.te=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Cd=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.ue=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.kd=function(a){return this.b.Ec[a-65504>>1]};k.ee=function(a,b){this.b.Ec[b-65504>>1]=a};k.Bc=function(a){if(65520==a){a=0;switch(Ac){case Ac:a=this.v.cc}a=(a>>6)-1}else a=0;return a};k.Ic=function(){};k.Rd=function(){return 1};k.Je=function(){};k.jd=function(){return this.b.Ha}; +k.de=function(){this.b.Ha=0};k.rd=function(){return this.b.Dc};k.le=function(a,b){b&1||(a&=255);this.b.Dc=a};k.wd=function(a){return a?this.b.kc:0};k.oe=function(a){var b=this.b;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.kc=a;b.K|=2};k.Qd=function(a){return a?this.b.Wb&65280:0};k.Ie=function(a){this.b.Wb=a|255};k.zd=function(){return Sc(this.b)};k.re=function(a){Tc(this.b,a&-1793|Sc(this.b)&1792);this.b.K|=128};k.Hc=function(a,b){F(this)&&E(this,"writeIgnored("+qa(b)+"): "+qa(a),!0,!0)}; var L={},Qc=(L[61568]=[null,null,K.prototype.Wd,K.prototype.Oe,"UNIMAP",64,1170],L[62592]=[null,null,K.prototype.Pd,K.prototype.He,"SIPDR",8,1145],L[62608]=[null,null,K.prototype.Nd,K.prototype.Fe,"SDPDR",8,1145],L[62624]=[null,null,K.prototype.Od,K.prototype.Ge,"SIPAR",8,1145],L[62640]=[null,null,K.prototype.Md,K.prototype.Ee,"SDPAR",8,1145],L[62656]=[null,null,K.prototype.pd,K.prototype.je,"KIPDR",8,1145],L[62672]=[null,null,K.prototype.nd,K.prototype.he,"KDPDR",8,1145],L[62688]=[null,null,K.prototype.od, K.prototype.ie,"KIPAR",8,1145],L[62704]=[null,null,K.prototype.md,K.prototype.ge,"KDPAR",8,1145],L[62798]=[null,null,K.prototype.vd,K.prototype.ne,"MMR3",1,1145],L[65382]=[null,null,K.prototype.qd,K.prototype.ke,"LKS"],L[65402]=[null,null,K.prototype.sd,K.prototype.me,"MMR0",1,1145],L[65404]=[null,null,K.prototype.td,K.prototype.Hc,"MMR1",1,1145],L[65406]=[null,null,K.prototype.ud,K.prototype.Hc,"MMR2",1,1145],L[65408]=[null,null,K.prototype.Vd,K.prototype.Ne,"UIPDR",8,1145],L[65424]=[null,null,K.prototype.Td, -K.prototype.Le,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Ud,K.prototype.Me,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Sd,K.prototype.Ke,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET0"],L[65473]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET0"],L[65474]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET0"],L[65475]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET0"],L[65476]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET0"],L[65477]=[null,null,K.prototype.Ab,K.prototype.Db, -"R5SET0"],L[65478]=[null,null,K.prototype.Ad,K.prototype.se,"R6KERNEL"],L[65479]=[null,null,K.prototype.Dd,K.prototype.ve,"R7KERNEL"],L[65480]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Bb, -K.prototype.Eb,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.Bd,K.prototype.te,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Cd,K.prototype.ue,"R6USER",1,1145],L[65504]=[null,null,K.prototype.kd,K.prototype.ee,"CTRL",8,1170],L[65520]=[null,null,K.prototype.Bc,K.prototype.Ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.Bc,K.prototype.Ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Rd,K.prototype.Je,"SYSID",1,1170],L[65526]=[null,null,K.prototype.jd,K.prototype.de,"CPUERR",1,1170],L[65528]= +K.prototype.Le,"UDPDR",8,1145],L[65440]=[null,null,K.prototype.Ud,K.prototype.Me,"UIPAR",8,1145],L[65456]=[null,null,K.prototype.Sd,K.prototype.Ke,"UDPAR",8,1145],L[65472]=[null,null,K.prototype.zb,K.prototype.Cb,"R0SET0"],L[65473]=[null,null,K.prototype.zb,K.prototype.Cb,"R1SET0"],L[65474]=[null,null,K.prototype.zb,K.prototype.Cb,"R2SET0"],L[65475]=[null,null,K.prototype.zb,K.prototype.Cb,"R3SET0"],L[65476]=[null,null,K.prototype.zb,K.prototype.Cb,"R4SET0"],L[65477]=[null,null,K.prototype.zb,K.prototype.Cb, +"R5SET0"],L[65478]=[null,null,K.prototype.Ad,K.prototype.se,"R6KERNEL"],L[65479]=[null,null,K.prototype.Dd,K.prototype.ve,"R7KERNEL"],L[65480]=[null,null,K.prototype.Ab,K.prototype.Db,"R0SET1",1,1145],L[65481]=[null,null,K.prototype.Ab,K.prototype.Db,"R1SET1",1,1145],L[65482]=[null,null,K.prototype.Ab,K.prototype.Db,"R2SET1",1,1145],L[65483]=[null,null,K.prototype.Ab,K.prototype.Db,"R3SET1",1,1145],L[65484]=[null,null,K.prototype.Ab,K.prototype.Db,"R4SET1",1,1145],L[65485]=[null,null,K.prototype.Ab, +K.prototype.Db,"R5SET1",1,1145],L[65486]=[null,null,K.prototype.Bd,K.prototype.te,"R6SUPER",1,1145],L[65487]=[null,null,K.prototype.Cd,K.prototype.ue,"R6USER",1,1145],L[65504]=[null,null,K.prototype.kd,K.prototype.ee,"CTRL",8,1170],L[65520]=[null,null,K.prototype.Bc,K.prototype.Ic,"LSIZE",1,1170],L[65522]=[null,null,K.prototype.Bc,K.prototype.Ic,"HSIZE",1,1170],L[65524]=[null,null,K.prototype.Rd,K.prototype.Je,"SYSID",1,1170],L[65526]=[null,null,K.prototype.jd,K.prototype.de,"CPUERR",1,1170],L[65528]= [null,null,K.prototype.rd,K.prototype.le,"MB",1,1170],L[65530]=[null,null,K.prototype.wd,K.prototype.oe,"PIR"],L[65532]=[null,null,K.prototype.Qd,K.prototype.Ie,"SL"],L[65534]=[null,null,K.prototype.zd,K.prototype.re,"PSW"],L);Za(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.w,0,this.size>>2),ad(this,Xc?bd:cd);else{a=this.b=Array(this.size>> +function I(a,b,c,d,e,f){this.v=a;this.id=Yc+=2;this.b=null;this.F=b;this.Mb=c;this.size=d||0;this.type=e||Zc;this.f=e==$c;this.controller=null;sc(this);this.Sa=this.Rc=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.b=a[0],ad(this,f.Lc);else if(zb)this.A=new ArrayBuffer(this.size),this.D=new DataView(this.A,0,this.size),this.G=new Uint8Array(this.A,0,this.size),this.I=new Uint16Array(this.A,0,this.size>>1),this.b=new Int32Array(this.A,0,this.size>>2),ad(this,Xc?bd:cd);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},ca:function(a,b){a&1&&this.v.Ea(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},ua: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},O:function(a,b){if(this.i&&null!=this.F){var c=this.i;hd(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Qa:function(a,b){if(this.i&&null!=this.F){var c=this.i;hd(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},la:function(a, -b,c){if(this.i&&null!=this.F){var d=this.i;hd(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.B(a,b,c):this.$b(a,b,c)},xa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;hd(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.B(a,b,c):this.nc(a,b,c)},M: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},X:function(a,b){a&1&&this.v.Ea(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.v.Ea(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},ja:function(a,b){this.G[a]=b;this.Sa=!0},Ya: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)},wa:function(a,b,c){a&1&&this.v.Ea(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ba:function(a,b,c){a&1&&this.v.Ea(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 sc(a,b,c){a.i=b;a.g=a.C=0;c&&((a.g=c.g)&&gd(a,fd,!1),(a.C=c.C)&&ed(a,fd,!1))}function id(a,b){b?--a.C||(a.Zb=a.f?a.B:a.$b,a.Ob=a.f?a.H:a.nc):--a.g||(a.Wb=a.hc,a.sa=a.ic)}function ed(a,b,c){c&&a.C||(a.Zb=!a.f&&b[1]||a.B,a.Ob=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.B,a.nc=b[3]||a.H}function gd(a,b,c){c&&a.g||(a.Wb=b[0]||a.K,a.sa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.K,a.ic=b[2]||a.L}function ad(a,b){b||(b=jd);gd(a,b,void 0);ed(a,b,void 0)} -var jd=[],dd=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],fd=[I.prototype.O,I.prototype.la,I.prototype.Qa,I.prototype.xa];if(zb)var cd=[I.prototype.M,I.prototype.ja,I.prototype.X,I.prototype.wa],bd=[I.prototype.R,I.prototype.Ya,I.prototype.$,I.prototype.Ba]; -function kd(a,b){t.call(this,"CPU",a,kd,1);var c=a.multiplier||1;this.kb=a.cycles||b;this.cb=c;this.vb=Math.round(this.kb/1E4)/100;this.ob=this.vb*this.cb;this.A.W=!1;this.A.Yb=!1;this.A.tb=a.autoStart;this.A.wb=!1;this.Ib=this.ua=0;this.Jb=a.csStart;this.xb=a.csInterval;this.yb=a.csStop;this.L=[];this.zc=this.$d.bind(this);H(this)}z(kd);var ld=["power","reset"];k=kd.prototype; -k.Fa=function(a,b,c,d){this.C=a;this.v=b;this.i=d;this.B=a.B;for(b=0;b=a.ua&&(a.ua+=a.xb,c=!0);0<=a.yb&&a.yb<=rd(a)&&(a.xb=a.yb=-1,od(a),a.ga(),c=!0);c&&a.j(rd(a)+" cycles: checksum="+p(a.Ib))}} -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.C)if(a=d.C,a.A.ia)a=!0;else{var b=null,c,h=rb(a.id);for(c=0;ca.$/a.ob?b=1:d=!0;a.cb=b;b=a.vb*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.C&&a.C.sb()}dc(a,a.X);a.X=0;a.S=Aa();a.ca=0;td(a);return d}function Mc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Oc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.kb*a.cb/1E3*c|0,a.A.W&&(c+=ud(a)),a.L[b][0]=c)} -function vd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function cc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ud(a,b){var c=a.ja-=a.b;a.b=a.K=0;b&&(a.ja=0);return c} -k.$d=function(){if(this.A.W){this.Fb>=this.kb&&td(this,!0);this.Ba=0;this.lb=Aa();if(this.ca){var a=this.lb-this.ca;a>this.Vb&&(this.S+=a,this.S>this.lb&&(this.S=this.lb))}try{do{var b=vd(this,this.A.wb?1:this.mb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=ud(this,!0);this.Ba+=b;this.X+=b;ec(this,b);cc(this,b);this.wa-=b;if(0>=this.wa){this.wa+=this.mb;15<=++this.xc&&(this.qa(),this.xc=0);break}}while(this.A.W)}catch(e){this.ga();this.C&&this.C.stop(Aa(),rd(this));yb(this,e.stack||e.message); -return}if(this.A.W){a=setTimeout;b=this.zc;this.ca=Aa();var c=this.Vb;this.Ba&&(c=Math.round(c*this.Ba/this.mb));var c=c-(this.ca-this.lb),d=this.ca-this.S;d&&(this.$=Math.round(this.X/(10*d))/100,864E5<=d&&(this.la=0,sd(this)));if(0>c||this.$c&&(this.S-=c),c=0;this.Fb+=this.Ba;this.ca+=c;a(b,c)}}}; -k.ib=function(a){if(xb(this))return!1;if(this.A.W)return this.j(this.toString()+" busy"),!1;sd(this);this.A.W=!0;this.A.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.sb(!0),this.C.start(this.S,rd(this)));setTimeout(this.zc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.W){ud(this);dc(this,this.X);this.X=0;this.A.W=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Aa(),rd(this));b=!0}this.A.complete=a;return b}; -function wd(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;kd.call(this,a,6666667);this.decode=1120==this.pb?xd.bind(this):yd.bind(this);zd(this);this.M=0;this.O=null;this.A.complete=!1}z(wd,kd);k=wd.prototype;k.reset=function(){this.status("model "+this.pb);this.A.W&&this.ga();zd(this);nd(this);this.A.error=!1;this.parent.reset.call(this)}; -function zd(a){a.T=65536;a.U=32768;a.aa=65535;a.Z=32768;a.N=15;a.u=[0,0,0,0,0,0,0,a.Pb];a.Wa=[0,0,0,0,0,0];a.Ia=[0,0,0,0];a.w=0;a.Za=0;a.Uc=[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.ya=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.Mb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0];a.Ec=[0,0,0,0,0,0,0,0];a.Dc=0;a.I=0;a.H=a.J=0;a.g=a.f=a.ub=0;a.xa=-1;bc(a)}function bc(a){a.fb=255;a.fa=0;a.kc=0;a.D=0;a.eb=0;a.Lb=0;a.qb=0;a.Ua=0;a.Na=0;a.Tb=262143;a.O=null;a.v&&Rc(a)}function Rc(a){a.Ua?(a.R=65536,a.ba=a.Tc,a.sa=a.Xd,a.Ob=a.Pe,uc(a.v,a.qb&16?22:18)):(a.R=0,a.ba=a.Sc,a.sa=a.Cc,a.Ob=a.Jc,uc(a.v,16))}k.uc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.la,this.cb]);a.set(2,Dc(this.v));return a.data()}; -k.restore=function(a){var b=a[1];this.la=b[1];sd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.w!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.w]);a.N=b;a.I|=2}function Q(a,b){a.I&128||(a.Z=a.aa=b,a.U=0)}function Fd(a,b,c){a.I&128||(a.Z=a.aa=a.T=b,a.U=c||0)}function Gd(a,b,c,d){a.I&128||(a.Z=a.aa=a.T=b,a.U=(c^b)&(d^b))}function Hd(a,b){a.I&128||(a.Z=a.aa=a.T=b,a.U=a.Z^a.T>>1)} -function ae(a,b,c,d){a.I&128||(a.Z=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.na=function(a,b){if(!this.M){var c=!1;0>this.xa?this.xa=Sc(this):this.w||(a=4,c=!0);this.D&57344||(this.eb=63222,this.Lb=a);this.w=0;var d=this.sa(a|this.R),e=this.sa(a+2&65535|this.R);Tc(this,e&-12289|this.xa>>2&12288);c&&(this.fa|=4,this.u[6]=4);be(this,this.xa);be(this,this.u[7]);O(this,d);this.I&=-113;this.xa=-1;this.I|=8;this.Yc=a;this.Xc=b;if(26!=b)throw a;}}; -function ce(a){var b=de(a),c=de(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Tc(a,c);a.I&=-17}function Cc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Mb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function ee(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Uc[a.w]||(d&=7);e=a.V[a.w][d];f=(a.ya[a.w][d]<<6)+(b&8191)&a.Tb;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.w][d]=e;if(4194170!==f||a.w)a.Na=a.w,a.Za=d;b=!1;g&&(g&57344&&(0<=a.xa&&(g|=128),a.D&57344||(a.D=a.D|g|a.Na<<5|a.Za<<1), -b=!0),a.D&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(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Ed(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.R)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.w&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.na(4,24)):(a.fa|=8,a.I|=64));return e}k.Ub=function(a){if(!this.Ua)return this.v.Ub(a);this.M++;a=fe(this,ee(this,a,3));this.M--;return a}; -k.bb=function(a){if(!this.Ua)return this.v.bb(a);this.M++;a=this.Cc(ee(this,a,2));this.M--;return a};k.rb=function(a,b){this.Ua?(this.M++,ge(this,ee(this,a,5),b),this.M--):this.v.rb(a,b)};k.Cb=function(a,b){this.Ua?(this.M++,this.Jc(ee(this,a,4),b),this.M--):this.v.Cb(a,b)};k.Sc=function(a,b,c){return he(this,a,b,c)};k.Tc=function(a,b,c){return ee(this,he(this,a,b,c),c)};k.Cc=function(a){return this.v.pa(a)};k.Xd=function(a){return this.v.pa(ee(this,a,2))};k.Jc=function(a,b){this.v.hb(a,b&65535)}; -k.Pe=function(a,b){this.v.hb(ee(this,a,4),b)};function ie(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=he(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.w=a.N>>12&3,c=a.sa(d|c&a.R),a.w=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function je(a,b,c,d){a.D&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=he(a,b,e,4),c&65536||(e&=65535),a.w=a.N>>12&3,e=ee(a,e|c&65536,4),a.w=a.N>>14&3,a.v.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} -function ke(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?fe(a,a.ba(b,c,3)):a.u[c]&255}function le(a,b){b>>=6;var c=a.J=b&7;return(b=a.H=(b&56)>>3)?a.v.pa(a.ba(b,c,2)):a.u[c]}function me(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return he(a,b,c,8)}function ne(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?fe(a,a.ba(b,c,3)):a.u[c]&255}function oe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.pa(a.ba(b,c,2)):a.u[c]} -function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ub=a.ba(b,e,7),ge(a,e,d.call(a,c,fe(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e]&255)}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.v.hb(e,d.call(a,c,a.v.pa(e)))):a.u[e]=d.call(a,c,a.u[e])}function pe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ge(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function qe(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.v.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} +I.prototype={constructor:I,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(zb)for(a=Array(this.size>>2),b=0;b>8,c)},S:function(a){return this.b[a>>2]>>>((a&3)<<3)&255},ca:function(a,b){a&1&&this.v.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},ta: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},O:function(a,b){if(this.i&&null!=this.F){var c=this.i;hd(c,this.F+a,1,c.M)&&c.fa(!0)}return this.hc(a,b)},Qa:function(a,b){if(this.i&&null!=this.F){var c=this.i;hd(c,this.F+a,2,c.M)&&c.fa(!0)}return this.ic(a,b)},ka:function(a, +b,c){if(this.i&&null!=this.F){var d=this.i;hd(d,this.F+a,1,d.D)&&d.fa(!0)}this.f?this.B(a,b,c):this.$b(a,b,c)},wa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;hd(d,this.F+a,2,d.D)&&d.fa(!0)}this.f?this.B(a,b,c):this.nc(a,b,c)},M: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},X:function(a,b){a&1&&this.v.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.v.Da(b,64,2);a= +this.I[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ia:function(a,b){this.G[a]=b;this.Sa=!0},Ya: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)},va:function(a,b,c){a&1&&this.v.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Aa:function(a,b,c){a&1&&this.v.Da(c,64,4);this.I[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 sc(a,b,c){a.i=b;a.g=a.C=0;c&&((a.g=c.g)&&gd(a,fd,!1),(a.C=c.C)&&ed(a,fd,!1))}function id(a,b){b?--a.C||(a.Zb=a.f?a.B:a.$b,a.Nb=a.f?a.H:a.nc):--a.g||(a.Vb=a.hc,a.qa=a.ic)}function ed(a,b,c){c&&a.C||(a.Zb=!a.f&&b[1]||a.B,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.$b=b[1]||a.B,a.nc=b[3]||a.H}function gd(a,b,c){c&&a.g||(a.Vb=b[0]||a.J,a.qa=b[2]||a.L);if(c||void 0===c)a.hc=b[0]||a.J,a.ic=b[2]||a.L}function ad(a,b){b||(b=jd);gd(a,b,void 0);ed(a,b,void 0)} +var jd=[],dd=[I.prototype.S,I.prototype.ta,I.prototype.ca,I.prototype.Na],fd=[I.prototype.O,I.prototype.ka,I.prototype.Qa,I.prototype.wa];if(zb)var cd=[I.prototype.M,I.prototype.ia,I.prototype.X,I.prototype.va],bd=[I.prototype.R,I.prototype.Ya,I.prototype.$,I.prototype.Aa]; +function kd(a,b){t.call(this,"CPU",a,kd,1);var c=a.multiplier||1;this.kb=a.cycles||b;this.eb=c;this.ub=Math.round(this.kb/1E4)/100;this.ob=this.ub*this.eb;this.w.W=!1;this.w.Yb=!1;this.w.sb=a.autoStart;this.w.vb=!1;this.Hb=this.ta=0;this.Ib=a.csStart;this.wb=a.csInterval;this.xb=a.csStop;this.L=[];this.zc=this.$d.bind(this);H(this)}z(kd);var ld=["power","reset"];k=kd.prototype; +k.Ea=function(a,b,c,d){this.C=a;this.v=b;this.i=d;this.B=a.B;for(b=0;b=a.ta&&(a.ta+=a.wb,c=!0);0<=a.xb&&a.xb<=rd(a)&&(a.wb=a.xb=-1,od(a),a.fa(),c=!0);c&&a.j(rd(a)+" cycles: checksum="+p(a.Hb))}} +k.ra=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.C)if(a=d.C,a.w.ha)a=!0;else{var b=null,c,h=rb(a.id);for(c=0;ca.$/a.ob?b=1:d=!0;a.eb=b;b=a.ub*a.eb;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.C&&a.C.rb()}dc(a,a.X);a.X=0;a.S=Aa();a.ca=0;td(a);return d}function Mc(a,b){var c=a.L.length;a.L.push([-1,b]);return c}function Oc(a,b,c,d){0<=b&&ba.L[b][0])&&(c=a.kb*a.eb/1E3*c|0,a.w.W&&(c+=ud(a)),a.L[b][0]=c)} +function vd(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function cc(a,b){for(var c=a.L.length-1;0<=c;c--){var d=a.L[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function ud(a,b){var c=a.ia-=a.b;a.b=a.J=0;b&&(a.ia=0);return c} +k.$d=function(){if(this.w.W){this.Eb>=this.kb&&td(this,!0);this.Aa=0;this.lb=Aa();if(this.ca){var a=this.lb-this.ca;a>this.Ub&&(this.S+=a,this.S>this.lb&&(this.S=this.lb))}try{do{var b=vd(this,this.w.vb?1:this.mb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=ud(this,!0);this.Aa+=b;this.X+=b;ec(this,b);cc(this,b);this.va-=b;if(0>=this.va){this.va+=this.mb;15<=++this.xc&&(this.oa(),this.xc=0);break}}while(this.w.W)}catch(e){this.fa();this.C&&this.C.stop(Aa(),rd(this));yb(this,e.stack||e.message); +return}if(this.w.W){a=setTimeout;b=this.zc;this.ca=Aa();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.mb));var c=c-(this.ca-this.lb),d=this.ca-this.S;d&&(this.$=Math.round(this.X/(10*d))/100,864E5<=d&&(this.ka=0,sd(this)));if(0>c||this.$c&&(this.S-=c),c=0;this.Eb+=this.Aa;this.ca+=c;a(b,c)}}}; +k.ib=function(a){if(xb(this))return!1;if(this.w.W)return this.j(this.toString()+" busy"),!1;sd(this);this.w.W=!0;this.w.Yb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.C&&(a&&this.C.rb(!0),this.C.start(this.S,rd(this)));setTimeout(this.zc,0);return!0};k.jb=function(){return 0};k.fa=function(a){var b=!1;if(this.w.W){ud(this);dc(this,this.X);this.X=0;this.w.W=!1;if(b=this.G.run)b.textContent="Run";this.C&&this.C.stop(Aa(),rd(this));b=!0}this.w.complete=a;return b}; +function wd(a){this.cb=+a.model||1170;this.Ob=a.addrReset||0;kd.call(this,a,6666667);this.decode=1120==this.cb?xd.bind(this):yd.bind(this);zd(this);this.M=0;this.O=null;this.w.complete=!1}z(wd,kd);k=wd.prototype;k.reset=function(){this.status("model "+this.cb);this.w.W&&this.fa();zd(this);nd(this);this.w.error=!1;this.parent.reset.call(this)}; +function zd(a){a.T=65536;a.U=32768;a.aa=65535;a.Z=32768;a.N=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.A=0;a.Za=0;a.Uc=[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.Ec=[0,0,0,0,0,0,0,0];a.Dc=0;a.K=0;a.H=a.I=0;a.g=a.f=a.tb=0;a.wa=-1;bc(a)}function bc(a){a.Wb=255;a.Ha=0;a.kc=0;a.D=0;a.fb=0;a.Kb=0;a.pb=0;a.Ua=0;a.Na=0;a.Sb=262143;a.O=null;a.v&&Rc(a)}function Rc(a){a.Ua?(a.R=65536,a.ba=a.Tc,a.qa=a.Xd,a.Nb=a.Pe,uc(a.v,a.pb&16?22:18)):(a.R=0,a.ba=a.Sc,a.qa=a.Cc,a.Nb=a.Jc,uc(a.v,16))}k.uc=function(){return 0};k.save=function(){var a=new N(this);a.set(0,[]);a.set(1,[this.ka,this.eb]);a.set(2,Dc(this.v));return a.data()}; +k.restore=function(a){var b=a[1];this.ka=b[1];sd(this,b[3]);a:{b=this.v;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.A!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.A]);a.N=b;a.K|=2}function Q(a,b){a.K&128||(a.Z=a.aa=b,a.U=0)}function Fd(a,b,c){a.K&128||(a.Z=a.aa=a.T=b,a.U=c||0)}function Gd(a,b,c,d){a.K&128||(a.Z=a.aa=a.T=b,a.U=(c^b)&(d^b))}function Hd(a,b){a.K&128||(a.Z=a.aa=a.T=b,a.U=a.Z^a.T>>1)} +function Id(a,b,c,d){a.K&128||(a.Z=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.sa=function(a,b,c){if(!this.M){var d=!1;0>this.wa?this.wa=Sc(this):this.A||(a=4,d=!0);this.D&57344||(this.fb=63222,this.Kb=a);this.A=0;var e=this.qa(a|this.R),f=this.qa(a+2&65535|this.R);Tc(this,f&-12289|this.wa>>2&12288);d&&(this.Ha|=4,this.u[6]=4);be(this,this.wa);be(this,this.u[7]);O(this,e);this.K&=~b;this.wa=-1;this.K|=8;this.Yc=a;this.Xc=c;if(-18!=c)throw a;}}; +function ce(a){var b=de(a),c=de(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Tc(a,c);a.K&=-17}function Cc(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 ee(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.pb&a.Uc[a.A]||(d&=7);e=a.V[a.A][d];f=(a.xa[a.A][d]<<6)+(b&8191)&a.Sb;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.A][d]=e;if(4194170!==f||a.A)a.Na=a.A,a.Za=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.D&57344||(a.D=a.D|g|a.Na<<5|a.Za<<1), +b=!0),a.D&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.qa(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.qa(e)|g;a.b-=8;break;case 6:return e=a.qa(Ed(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.qa(Ed(a,2)),e= +e+a.u[c]&65535,e=a.qa(e|a.R)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.D&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&0>f&&he(a,b,a.u[6]);return e}k.Tb=function(a){if(!this.Ua)return this.v.Tb(a);this.M++;a=fe(this,ee(this,a,3));this.M--;return a};k.bb=function(a){if(!this.Ua)return this.v.bb(a);this.M++;a=this.Cc(ee(this,a,2));this.M--;return a};k.qb=function(a,b){this.Ua?(this.M++,ge(this,ee(this,a,5),b),this.M--):this.v.qb(a,b)}; +k.Bb=function(a,b){this.Ua?(this.M++,this.Jc(ee(this,a,4),b),this.M--):this.v.Bb(a,b)};k.Sc=function(a,b,c){return ie(this,a,b,c)};k.Tc=function(a,b,c){return ee(this,ie(this,a,b,c),c)};k.Cc=function(a){return this.v.na(a)};k.Xd=function(a){return this.v.na(ee(this,a,2))};k.Jc=function(a,b){this.v.hb(a,b&65535)};k.Pe=function(a,b){this.v.hb(ee(this,a,4),b)}; +function je(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=ie(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.A=a.N>>12&3,c=a.qa(d|c&a.R),a.A=a.N>>14&3):c=6!=d||(a.N>>2&12288)===(a.N&12288)?a.u[d]:a.Ia[a.N>>12&3];return c}function ke(a,b,c,d){a.D&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=ie(a,b,e,4),c&65536||(e&=65535),a.A=a.N>>12&3,e=ee(a,e|c&65536,4),a.A=a.N>>14&3,a.v.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +function le(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?fe(a,a.ba(b,c,3)):a.u[c]&255}function me(a,b){b>>=6;var c=a.I=b&7;return(b=a.H=(b&56)>>3)?a.v.na(a.ba(b,c,2)):a.u[c]}function ne(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return ie(a,b,c,8)}function oe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?fe(a,a.ba(b,c,3)):a.u[c]&255}function pe(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.v.na(a.ba(b,c,2)):a.u[c]} +function R(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ge(a,e,d.call(a,c,fe(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e]&255)}function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.v.hb(e,d.call(a,c,a.v.na(e)))):a.u[e]=d.call(a,c,a.u[e])}function qe(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ge(a,a.ba(b,e,5),c):a.u[e]=c?a.u[e]&~d|c<<24>>24&d:a.u[e]&~d;return c}function re(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.v.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c} function T(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&&re(this.i)?1:this.A.Yb?-1:0,c=a?this.A.Yb?0:1:-1;this.A.Yb=!1;this.ja=this.b=a;do{if(b){if(this.i&&se(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.na(168,28):this.I&64?this.na(4,30):this.I&16&&this.na(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.O&&this.O.zb>e?this.O:null;f&&(d=f.be,e=f.zb);e>(this.N&224)>>5?(this.I&4&&(Ed(this,2),this.I&=-5),this.na(d, -26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.O,f==a)this.O=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.N&16;this.decode(Dd(this))}while(0>1|b<<16;Hd(this,a);return a&65535}function ye(a,b){a=b&128|b>>1|b<<8;Hd(this,a<<8);return a&255}function ze(a,b){a=b&~a;Q(this,a);return a}function Ae(a,b){a=b&~a;Q(this,a<<8);return a}function Be(a,b){a|=b;Q(this,a);return a}function Ce(a,b){a|=b;Q(this,a<<8);return a} -function De(a,b){a=~b|65536;Fd(this,a);return a&65535}function Ee(a,b){a=~b|256;Fd(this,a<<8);return a&255}function Fe(a,b){a=b-a;this.I&128||(this.Z=this.aa=a,this.U=b&(b^a));return a&65535}function Ge(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.Z=this.aa=c,this.U=b&(b^c));return a&255}function He(a,b){a=b+a;this.I&128||(this.Z=this.aa=a,this.U=a&(b^a));return a&65535}function Ie(a,b){a=b+a;var c=a<<8;this.I&128||(this.Z=this.aa=c,this.U=c&(b<<8^c));return a&255} -function Je(a,b){a=-b;Fd(this,a,a&b&32768);return a&65535}function Ke(a,b){a=-b;Fd(this,a<<8,(a&b&128)<<8);return a&255}function Le(a,b){a=b<<1|this.T>>16&1;Hd(this,a);return a&65535}function Me(a,b){a=b<<1|this.T>>16&1;Hd(this,a<<8);return a&255}function Ne(a,b){a=(this.T&65536|b)>>1|b<<16;Hd(this,a);return a&65535}function Oe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Hd(this,a<<8);return a&255}function Pe(a,b){var c=b-a;ae(this,c,a,b);return c&65535} -function Qe(a,b){var c=b-a;ae(this,c<<8,a<<8,b<<8);return c&255}function Re(a,b){this.I&128||(this.Z=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Se(a,b){a^=b;Q(this,a);return a&65535}function Te(a){S(this,a,le(this,a),te);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function Ue(a){var b=oe(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.Z=this.aa=c;this.b-=(this.g?6:7)+b} -function Ve(a){var b=oe(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.Z=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function We(a){T(this,a,!Ad(this))}function Xe(a){T(this,a,Ad(this))} -function Ye(a){S(this,a,le(this,a),ze);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function Ze(a){R(this,a,ke(this,a),Ae);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function $e(a){S(this,a,le(this,a),Be);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function af(a){R(this,a,ke(this,a),Ce);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function bf(a){Q(this,le(this,a)&oe(this,a));this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function cf(a){Q(this,(ke(this,a)&ne(this,a))<<8);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function df(a){T(this,a,Cd(this))}function ef(a){T(this,a,!this.Ta()==!Bd(this))}function ff(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function gf(a){T(this,a,!Ad(this)&&!Cd(this))}function hf(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} -function jf(a){T(this,a,Ad(this)||Cd(this))}function kf(a){T(this,a,!this.Ta()!=!Bd(this))}function lf(a){T(this,a,this.Ta())}function mf(a){T(this,a,!Cd(this))}function nf(a){T(this,a,!this.Ta())}function of(){this.na(12,1);this.b-=5}function pf(a){T(this,a,!0)}function qf(a){T(this,a,!Bd(this))}function rf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.Z=0);this.b-=5} -function sf(a){var b=le(this,a);a=oe(this,a);ae(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function tf(a){var b=ke(this,a)<<8;a=ne(this,a)<<8;ae(this,b-a,a,b);this.b-=this.g?4+(this.J&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} -function uf(a){var b=oe(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.aa=d>>16|d,this.Z=d>>16):(this.U=32768,this.aa=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.Z=0,this.U=32768,this.T=65536,this.b-=7}function vf(){this.na(24,2);this.b-=25} -function wf(){this.N&49152?(this.fa|=128,this.na(4,3)):this.i?xf(this.i):this.ga();this.b-=7}function yf(){this.na(16,4);this.b-=25}var zf=[0,7,7,10,7,11,9,13];function Af(a){this.K=this.b;O(this,me(this,a));this.b=this.K-zf[this.g]}var Bf=[0,14,14,17,14,18,16,20];function Cf(a){this.K=this.b;var b=me(this,a);a=a>>6&7;be(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.K-Bf[this.g]}var Df=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function Ef(a){var b=le(this,a);this.K=this.b;Q(this,qe(this,a,b));this.b=this.K-Df[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Ff(a){var b=ke(this,a);Q(this,pe(this,a,b,65535)<<8);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var Gf=[7,13,13,17,14,18,17,21]; -function Hf(a){var b=oe(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.Z=b>>16,this.aa=this.Z|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 Nf(a){S(this,a,le(this,a),Pe);this.b-=this.g?9+(this.J&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} -function Of(a){S(this,a,0,Re);this.b-=this.g?9:3+(7==this.f?2:0)}function Pf(){this.na(28,5);this.b-=5}function Qf(){this.B&&(this.B.lc(this.u[7],!0),this.B.setData(this.u[0],!0));this.I|=4;Ed(this,-2);this.b-=3}function Rf(a){S(this,a,le(this,a),Se);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,E(b,"undefined opcode "+J(b,a),!0,!0),b=xf(b);b||this.na(8,6)}function xd(a){Sf[a>>12].call(this,a)}function Tf(a){Uf[a>>6&3].call(this,a)} -function Vf(a){Wf[a>>6&3].call(this,a)}function Xf(a){Yf[a>>6&3].call(this,a)}function Zf(a){$f[a&15].call(this,a)}function ag(a){bg[a&15].call(this,a)}function cg(a){dg[a>>6&3].call(this,a)}function eg(a){fg[a>>6&3].call(this,a)}function gg(a){hg[a>>6&3].call(this,a)} -var Sf=[function(a){ig[a>>8&15].call(this,a)},Ef,sf,bf,Ye,$e,Te,V,function(a){jg[a>>8&15].call(this,a)},Ff,tf,cf,Ze,af,Nf,V],ig=[function(a){kg[a>>4&15].call(this,a)},pf,mf,df,ef,kf,ff,hf,Cf,Cf,Tf,Vf,Xf,V,V,V],Uf=[function(a){Fd(this,qe(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,De);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,He);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Fe);this.b-=this.g?9:3+(7==this.f?2:0)}],Wf=[function(a){S(this,a,0, -Je);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,te);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Pe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=oe(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Yf=[function(a){S(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Le);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,0,ve);this.b-=this.g?9:3+(7==this.f?2:0)}], -kg=[function(a){lg[a&15].call(this,a)},V,V,V,Af,Af,Af,Af,Lf,V,Zf,ag,Of,Of,Of,Of],lg=[wf,Qf,Kf,of,yf,Jf,V,V,V,V,V,V,V,V,V,V],$f=[If,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.Z=0;this.b-=5},U,U,U,U,U,U,U],bg=[If,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.Z=32768;this.b-=5},W,W,W,W,W,W,W],jg=[nf,lf,gf,jf,qf,rf,We,Xe,vf,Pf,cg,eg,gg,V,V,V],dg=[function(a){Fd(this, -pe(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)}],fg=[function(a){R(this,a,0,Ke);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=ne(this,a);Fd(this,a<<8);this.b-=this.g?4:3+ -(7==this.f?2:0)}],hg=[function(a){R(this,a,0,Oe);this.b-=this.g?9+(this.ub&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ye);this.b-=this.g?9+(this.ub&1):3+(7==this.f?2:0)},function(a){R(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)}];function yd(a){mg[a>>12].call(this,a)} -var mg=[function(a){ng[a>>8&15].call(this,a)},Ef,sf,bf,Ye,$e,Te,function(a){og[a>>8&15].call(this,a)},function(a){pg[a>>8&15].call(this,a)},Ff,tf,cf,Ze,af,Nf,V],ng=[function(a){qg[a>>4&15].call(this,a)},pf,mf,df,ef,kf,ff,hf,Cf,Cf,Tf,Vf,Xf,function(a){rg[a>>6&3].call(this,a)},V,V],rg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.R);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ie(this,a,0);be(this,a);Q(this,a);this.b-=11},function(a){var b=de(this);this.K= -this.b;je(this,a,0,b);Q(this,b);this.b=this.K-Gf[this.g]},function(a){Q(this,qe(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],qg=[function(a){sg[a&15].call(this,a)},V,V,V,Af,Af,Af,Af,Lf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):V.call(this,a)},Zf,ag,Of,Of,Of,Of],sg=[wf,Qf,Kf,of,yf,Jf,function(){ce(this);this.b-=13},function(){this.na(8,6)},V,V,V,V,V,V,V,V],og=[Hf,Hf,uf,uf,Ue,Ue,Ve,Ve,Rf,Rf,V,V,V,V,Mf,Mf],pg=[nf,lf,gf,jf,qf,rf,We,Xe,vf,Pf,cg, -eg,gg,function(a){tg[a>>6&3].call(this,a)},V,V],tg=[V,function(a){a=ie(this,a,65536);be(this,a);Q(this,a);this.b-=11},function(a){var b=de(this);this.K=this.b;je(this,a,65536,b);Q(this,b);this.b=this.K-Gf[this.g]},V]; -function ug(a){t.call(this,"ROM",a,ug);this.ha=this.g=null;this.w=a.addr;this.f=a.size;this.D=!1;this.B=a.alias;this.C=a.file;this.H=ra(this.C);if(this.C){a=this.C;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.P("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(qb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ha=a.ha):c.C=null);vg(c)})}}z(ug);k=ug.prototype; -k.Fa=function(a,b,c,d){this.v=b;this.b=c;this.i=d;vg(this)};k.Ha=function(){this.ha&&(this.i&&wg(this.i,this.id,this.w,this.f,this.ha),delete this.ha);return!0};k.Ga=function(){return!0}; -function vg(a){if(!wb(a)){if(a.C){if(!a.g||!a.v)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)yb(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.w;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+nc){var c={};b=(c[b]=[ug.prototype.Ld,ug.prototype.De,null,null,null,a.f>>1],c);if(Gb(a.v,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(xc(a.v,b,a.f,$c)){for(c=0;c>>a.ka;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)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(E(a,"loading "+p(r,4,!0)+" bytes at "+p(n,4,!0)+"-"+p(n+r-1,4,!0),1048576);r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():null==d&& -(d=n),null!=d&&E(a,"starting address: "+p(d,4,!0),1048576);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Nc(e.b,e.ja))});this.la=Pc(52,4);this.$=Mc(this.b,function(){e.g|=128;e.g&64&&Nc(e.b,e.la)});Gb(b,this,Vg);H(this)}; -k.yc=function(){if(!this.J){var a=md(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.J=sb(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.yc(),!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(){Wg(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return Wg(this)};function Wg(a){a.K=0;a.f=0;a.g=128;a.w=[];return!0}k.jc=function(a){if("number"==typeof a)this.w.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=wa("",c)));this.O&&!this.H&&c&&(b=String.fromCharCode(this.O)+b);this.B.value+=b;this.B.scrollTop=this.B.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;Oc(this.b,this.$,1E3/Math.round(this.R/10))}};var Xg={},Vg=(Xg[65392]=[null,null,X.prototype.Fd,X.prototype.xe,"RCSR"],Xg[65394]=[null,null,X.prototype.Ed,X.prototype.we,"RBUF"],Xg[65396]=[null,null,X.prototype.Zd,X.prototype.Re,"XCSR"],Xg[65398]=[null,null,X.prototype.Yd,X.prototype.Qe,"XBUF"],Xg);Za(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&&$g(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){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;$g(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; -k.Fa=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.i=d;this.S=ah(a);var e=this;if((this.g=md(this.C,"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.X=Pc(56,4);this.ca=Mc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.C&&!a.C.A.ia;g?a.P('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(qb(a.Qa,e,f),(e=Ea(e,f))&&jh(a,b,c,d,e.da,e.Ka, -e.Ja));a.A.ab=!1;a.D&&(a.D--,a.D||H(a));gh(a)})}function dh(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.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=sa(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"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Da(f, -null,!0,function(b,c,d){qh(a,b,c,d)})} -function qh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.A.ia;if(d)a.controller.P('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{qb(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.Aa=h[0].length;a.ra=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 v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.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.Ca?f=a.Pa+a.Ca&&(a.Ca+=f-(a.Pa+a.Ca)+1):(a.Pa=f,a.Ca=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.P("Unable to restore disk '"+this.Xa+": "+c);return b}; -k.toJSON=function(){var a;a=0;for(var b;b=sh(this,a++);)uh(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 uh(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 M(a){t.call(this,"RL11",a,M,4194304);this.B=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Ra("Mobi")&&window&&"FileReader"in window}z(M);k=M.prototype; -k.ta=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=pa(c.value,10);null!=a&&vh(d,a)},!0;case "loadDrive":return this.G[b]= -c,c.onclick=function(){var a=d.G.listDisks;a&&wh(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[pa(a.value,10)||0])if(a=a.Da){var b;b="";for(var c=0,h;h=sh(a,c++);)for(var l=0,m=h.length;l>5,f=this.O&&this.O.yb>e?this.O:null;f&&(d=f.be,e=f.yb);e>(this.N&224)>>5?(this.K&4&&(Ed(this,2),this.K&=-5),this.sa(d,0, +-18),e=!0):e=!1;if(e){if(f)if(a=f,f=this.O,f==a)this.O=a.next;else for(;f;){e=f.next;if(e==a){f.next=e.next;break}f=e}a=!0}}else this.K&1&&this.K++;a=a&&0>c}if(a)break}this.K=this.K&7|this.N&16;this.decode(Dd(this))}while(0>1|b<<16;Hd(this,a);return a&65535}function ze(a,b){a=b&128|b>>1|b<<8;Hd(this,a<<8);return a&255}function Ae(a,b){a=b&~a;Q(this,a);return a}function Be(a,b){a=b&~a;Q(this,a<<8);return a}function Ce(a,b){a|=b;Q(this,a);return a}function De(a,b){a|=b;Q(this,a<<8);return a} +function Ee(a,b){a=~b|65536;Fd(this,a);return a&65535}function Fe(a,b){a=~b|256;Fd(this,a<<8);return a&255}function Ge(a,b){a=b-a;this.K&128||(this.Z=this.aa=a,this.U=b&(b^a));return a&65535}function He(a,b){a=b-a;var c=a<<8;b<<=8;this.K&128||(this.Z=this.aa=c,this.U=b&(b^c));return a&255}function Ie(a,b){a=b+a;this.K&128||(this.Z=this.aa=a,this.U=a&(b^a));return a&65535}function Je(a,b){a=b+a;var c=a<<8;this.K&128||(this.Z=this.aa=c,this.U=c&(b<<8^c));return a&255} +function Ke(a,b){a=-b;Fd(this,a,a&b&32768);return a&65535}function Le(a,b){a=-b;Fd(this,a<<8,(a&b&128)<<8);return a&255}function Me(a,b){a=b<<1|this.T>>16&1;Hd(this,a);return a&65535}function Ne(a,b){a=b<<1|this.T>>16&1;Hd(this,a<<8);return a&255}function Oe(a,b){a=(this.T&65536|b)>>1|b<<16;Hd(this,a);return a&65535}function Pe(a,b){a=((this.T&65536)>>8|b)>>1|b<<8;Hd(this,a<<8);return a&255}function Qe(a,b){var c=b-a;Id(this,c,a,b);return c&65535} +function Re(a,b){var c=b-a;Id(this,c<<8,a<<8,b<<8);return c&255}function Se(a,b){this.K&128||(this.Z=this.aa=b&65280,this.U=this.T=0);return(b<<8|b>>8)&65535}function Te(a,b){a^=b;Q(this,a);return a&65535}function Ue(a){S(this,a,me(this,a),ue);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Ve(a){var b=pe(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.Z=this.aa=c;this.b-=(this.g?6:7)+b} +function We(a){var b=pe(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.Z=d>>16;this.aa=d>>16|d;this.b-=(this.g?6:7)+b}function Xe(a){T(this,a,!Ad(this))}function Ye(a){T(this,a,Ad(this))} +function Ze(a){S(this,a,me(this,a),Ae);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function $e(a){R(this,a,le(this,a),Be);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function af(a){S(this,a,me(this,a),Ce);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}function bf(a){R(this,a,le(this,a),De);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function cf(a){Q(this,me(this,a)&pe(this,a));this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function df(a){Q(this,(le(this,a)&oe(this,a))<<8);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function ef(a){T(this,a,Cd(this))}function ff(a){T(this,a,!this.Ta()==!Bd(this))}function gf(a){T(this,a,!Cd(this)&&!this.Ta()==!Bd(this))}function hf(a){T(this,a,!Ad(this)&&!Cd(this))}function jf(a){T(this,a,Cd(this)||!this.Ta()!=!Bd(this))} +function kf(a){T(this,a,Ad(this)||Cd(this))}function lf(a){T(this,a,!this.Ta()!=!Bd(this))}function mf(a){T(this,a,this.Ta())}function nf(a){T(this,a,!Cd(this))}function of(a){T(this,a,!this.Ta())}function pf(){this.sa(12,0,-1);this.b-=5}function qf(a){T(this,a,!0)}function rf(a){T(this,a,!Bd(this))}function sf(a){T(this,a,Bd(this))}function U(a){a&1&&(this.T=0);a&2&&(this.U=0);a&4&&(this.aa=1);a&8&&(this.Z=0);this.b-=5} +function tf(a){var b=me(this,a);a=pe(this,a);Id(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)}function uf(a){var b=le(this,a)<<8;a=oe(this,a)<<8;Id(this,b-a,a,b);this.b-=this.g?4+(this.I&&6<=this.f?1:0):(this.H?4:3)+(7==this.f?2:0)} +function vf(a){var b=pe(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.aa=d>>16|d,this.Z=d>>16):(this.U=32768,this.aa=d>>15|d,this.Z=c>>16,-1===b&&65534===this.u[a]&&(this.u[a]=this.u[a|1]=1));this.b-=53}else this.aa=this.Z=0,this.U=32768,this.T=65536,this.b-=7}function wf(){this.sa(24,0,-2);this.b-=25} +function xf(){this.N&49152?(this.Ha|=128,this.sa(4,0,-3)):(this.B&&this.B.setData(this.u[0],!0),this.i?yf(this.i):this.fa());this.b-=7}function zf(){this.sa(16,0,-4);this.b-=25}var Af=[0,7,7,10,7,11,9,13];function Bf(a){this.J=this.b;O(this,ne(this,a));this.b=this.J-Af[this.g]}var Cf=[0,14,14,17,14,18,16,20];function Df(a){this.J=this.b;var b=ne(this,a);a=a>>6&7;be(this,this.u[a]);this.u[a]=this.u[7];O(this,b);this.b=this.J-Cf[this.g]}var Ef=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function Ff(a){var b=me(this,a);this.J=this.b;Q(this,re(this,a,b));this.b=this.J-Ef[(this.H?8:0)+this.g]+(7!=this.f||this.g?0:2)}function Gf(a){var b=le(this,a);Q(this,qe(this,a,b,65535)<<8);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)}var Hf=[7,13,13,17,14,18,17,21]; +function If(a){var b=pe(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.K&128||(this.Z=b>>16,this.aa=this.Z|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 Of(a){S(this,a,me(this,a),Qe);this.b-=this.g?9+(this.I&&6<=this.f?1:0):(this.H?5:3)+(7==this.f?2:0)} +function Pf(a){S(this,a,0,Se);this.b-=this.g?9:3+(7==this.f?2:0)}function Qf(){this.sa(28,0,-5);this.b-=5}function Rf(){this.B&&(this.B.lc(this.u[7],!0),this.B.setData(this.u[0],!0));this.K|=4;Ed(this,-2);this.b-=3}function Sf(a){S(this,a,me(this,a),Te);this.b-=this.g?9:3+(7==this.f?2:0)}function V(a){var b;if(b=this.i)b=this.i,F(b,1)?(E(b,"undefined opcode "+J(b,a),!0,!0),b=yf(b)):b=!1;b||this.sa(8,0,-6)}function xd(a){Tf[a>>12].call(this,a)}function Uf(a){Vf[a>>6&3].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&15].call(this,a)}function bg(a){cg[a&15].call(this,a)}function dg(a){eg[a>>6&3].call(this,a)}function fg(a){gg[a>>6&3].call(this,a)}function hg(a){ig[a>>6&3].call(this,a)} +var Tf=[function(a){jg[a>>8&15].call(this,a)},Ff,tf,cf,Ze,af,Ue,V,function(a){kg[a>>8&15].call(this,a)},Gf,uf,df,$e,bf,Of,V],jg=[function(a){lg[a>>4&15].call(this,a)},qf,nf,ef,ff,lf,gf,jf,Df,Df,Uf,Wf,Yf,V,V,V],Vf=[function(a){Fd(this,re(this,a,0));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Ee);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ie);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,1,Ge);this.b-=this.g?9:3+(7==this.f?2:0)}],Xf=[function(a){S(this,a,0, +Ke);this.b-=this.g?11:6},function(a){S(this,a,Ad(this)?1:0,ue);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,Ad(this)?1:0,Qe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=pe(this,a);Fd(this,a);this.b-=this.g?4:3+(7==this.f?2:0)}],Zf=[function(a){S(this,a,0,Oe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,Me);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,ye);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){S(this,a,0,we);this.b-=this.g?9:3+(7==this.f?2:0)}], +lg=[function(a){mg[a&15].call(this,a)},V,V,V,Bf,Bf,Bf,Bf,Mf,V,$f,bg,Pf,Pf,Pf,Pf],mg=[xf,Rf,Lf,pf,zf,Kf,V,V,V,V,V,V,V,V,V,V],ag=[Jf,function(){this.T=0;this.b-=5},function(){this.U=0;this.b-=5},U,function(){this.aa=1;this.b-=5},U,U,U,function(){this.Z=0;this.b-=5},U,U,U,U,U,U,U],cg=[Jf,function(){this.T=65536;this.b-=5},function(){this.U=32768;this.b-=5},W,function(){this.aa=0;this.b-=5},W,W,W,function(){this.Z=32768;this.b-=5},W,W,W,W,W,W,W],kg=[of,mf,hf,kf,rf,sf,Xe,Ye,wf,Qf,dg,fg,hg,V,V,V],eg=[function(a){Fd(this, +qe(this,a,0,255));this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,Fe);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,Je);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,1,He);this.b-=this.g?9:3+(7==this.f?2:0)}],gg=[function(a){R(this,a,0,Le);this.b-=this.g?11:6},function(a){R(this,a,Ad(this)?1:0,ve);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,Ad(this)?1:0,Re);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){a=oe(this,a);Fd(this,a<<8);this.b-=this.g?4:3+ +(7==this.f?2:0)}],ig=[function(a){R(this,a,0,Pe);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,Ne);this.b-=this.g?9:3+(7==this.f?2:0)},function(a){R(this,a,0,ze);this.b-=this.g?9+(this.tb&1):3+(7==this.f?2:0)},function(a){R(this,a,0,xe);this.b-=this.g?9:3+(7==this.f?2:0)}];function yd(a){ng[a>>12].call(this,a)} +var ng=[function(a){og[a>>8&15].call(this,a)},Ff,tf,cf,Ze,af,Ue,function(a){pg[a>>8&15].call(this,a)},function(a){qg[a>>8&15].call(this,a)},Gf,uf,df,$e,bf,Of,V],og=[function(a){rg[a>>4&15].call(this,a)},qf,nf,ef,ff,lf,gf,jf,Df,Df,Uf,Wf,Yf,function(a){sg[a>>6&3].call(this,a)},V,V],sg=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.qa(a|this.R);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=je(this,a,0);be(this,a);Q(this,a);this.b-=11},function(a){var b=de(this);this.J= +this.b;ke(this,a,0,b);Q(this,b);this.b=this.J-Hf[this.g]},function(a){Q(this,re(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],rg=[function(a){tg[a&15].call(this,a)},V,V,V,Bf,Bf,Bf,Bf,Mf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.K|=1),this.b-=5):V.call(this,a)},$f,bg,Pf,Pf,Pf,Pf],tg=[xf,Rf,Lf,pf,zf,Kf,function(){ce(this);this.b-=13},function(){this.sa(8,0,-6)},V,V,V,V,V,V,V,V],pg=[If,If,vf,vf,Ve,Ve,We,We,Sf,Sf,V,V,V,V,Nf,Nf],qg=[of,mf,hf,kf,rf,sf,Xe,Ye,wf,Qf, +dg,fg,hg,function(a){ug[a>>6&3].call(this,a)},V,V],ug=[V,function(a){a=je(this,a,65536);be(this,a);Q(this,a);this.b-=11},function(a){var b=de(this);this.J=this.b;ke(this,a,65536,b);Q(this,b);this.b=this.J-Hf[this.g]},V]; +function vg(a){t.call(this,"ROM",a,vg);this.ga=this.g=null;this.A=a.addr;this.f=a.size;this.D=!1;this.B=a.alias;this.C=a.file;this.H=ra(this.C);if(this.C){a=this.C;var b=sa(this.H);"json"!=b&&"hex"!=b&&(a=Fa()+"/api/v1/dump?file="+this.C+"&format=bytes&decimal=true");var c=this;Da(a,null,!0,function(a,b,f){f?(c.P("Unable to load ROM resource (error "+f+": "+a+")"),c.C=null):(qb(c.Qa,a,b),(a=Ea(a,b))?(c.g=a.da,c.ga=a.ga):c.C=null);wg(c)})}}z(vg);k=vg.prototype; +k.Ea=function(a,b,c,d){this.v=b;this.b=c;this.i=d;wg(this)};k.Ga=function(){this.ga&&(this.i&&xg(this.i,this.id,this.A,this.f,this.ga),delete this.ga);return!0};k.Fa=function(){return!0}; +function wg(a){if(!wb(a)){if(a.C){if(!a.g||!a.v)return;a.f||(a.f=a.g.length);if(a.g.length!=a.f)yb(a,"ROM size ("+p(a.g.length,8,!0)+") does not match specified size ("+p(a.f,8,!0)+")");else{var b;a:{b=a.A;a.status(a.f+"-byte ROM at "+qa(b));if(57344<=b&&b<57344+nc){var c={};b=(c[b]=[vg.prototype.Ld,vg.prototype.De,null,null,null,a.f>>1],c);if(Gb(a.v,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(xc(a.v,b,a.f,$c)){for(c=0;c>>a.ja;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)),v=h,r=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(r)for(E(a,"loading "+p(r,4,!0)+" bytes at "+p(n,4,!0)+"-"+p(n+r-1,4,!0),1048576);r--;)a.b.qb(n++,b[v++]&255);else n&1?a.b.fa():null==d&& +(d=n),null!=d&&E(a,"starting address: "+p(d,4,!0),1048576);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.J&&(e.J-=32),e.f|=128,e.f&64&&Nc(e.b,e.ia))});this.ka=Pc(52,4);this.$=Mc(this.b,function(){e.g|=128;e.g&64&&Nc(e.b,e.ka)});Gb(b,this,Wg);H(this)}; +k.yc=function(){if(!this.I){var a=md(this.C,"connection");if(a){var b=a.split("->");if(2==b.length){var c=xa(b[0]);if(c!=this.Ya)return;b=xa(b[1]);if(this.I=sb(b)){var d=this.I.exports;if(d){var e=d.connect;e&&e.call(this.I);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ga=function(a,b){if(!b)if(this.yc(),!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(){Xg(this)};k.save=function(){var a=new N(this);a.set(0,[]);return a.data()};k.restore=function(){return Xg(this)};function Xg(a){a.J=0;a.f=0;a.g=128;a.A=[];return!0}k.jc=function(a){if("number"==typeof a)this.A.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=wa("",c)));this.O&&!this.H&&c&&(b=String.fromCharCode(this.O)+b);this.B.value+=b;this.B.scrollTop=this.B.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;Oc(this.b,this.$,1E3/Math.round(this.R/10))}};var Yg={},Wg=(Yg[65392]=[null,null,X.prototype.Fd,X.prototype.xe,"RCSR"],Yg[65394]=[null,null,X.prototype.Ed,X.prototype.we,"RBUF"],Yg[65396]=[null,null,X.prototype.Zd,X.prototype.Re,"XCSR"],Yg[65398]=[null,null,X.prototype.Yd,X.prototype.Qe,"XBUF"],Yg);Za(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&&ah(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.O){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;ah(d,ra(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.G[b]=c,!0}return!1}; +k.Ea=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.i=d;this.S=bh(a);var e=this;if((this.g=md(this.C,"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.X=Pc(56,4);this.ca=Mc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Jc.indexOf("/api/v1/dump")&&(e=sa(c),f="json"==e||"gz"==e?encodeURI(c):Fa()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Da(f,null,!0,function(e,f,g){var h=0>g&&a.C&&!a.C.w.ha;g?a.P('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(qb(a.Qa,e,f),(e=Ea(e,f))&&kh(a,b,c,d,e.da,e.Ka, +e.Ja));a.w.ab=!1;a.D&&(a.D--,a.D||H(a));hh(a)})}function eh(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=sa(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"):ta(c,"/")&&(d="dir"),f=Fa()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Da(f, +null,!0,function(b,c,d){rh(a,b,c,d)})} +function rh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.C&&!a.C.w.ha;if(d)a.controller.P('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{qb(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.ua=h.length;a.za=h[0].length;a.pa=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 v=l.data;if(void 0===v){var r=l.bytes;if(void 0!==r&&r.length){for(var w=m<<2,y=r.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.P("Unable to restore disk '"+this.Xa+": "+c);return b}; +k.toJSON=function(){var a;a=0;for(var b;b=th(this,a++);)vh(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 vh(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 M(a){t.call(this,"RL11",a,M,4194304);this.B=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Ra("Mobi")&&window&&"FileReader"in window}z(M);k=M.prototype; +k.ra=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=pa(c.value,10);null!=a&&wh(d,a)},!0;case "loadDrive":return this.G[b]= +c,c.onclick=function(){var a=d.G.listDisks;a&&xh(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[pa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=th(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";vh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){xh(this)};k.save=function(){return(new N(this)).data()}; -k.restore=function(a){return xh(this,a[0])};function Ah(a,b){b||(a.H=0);if(a.B)for(var c in a.B){var d=a.B[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.P("Unable to load the selected drive");else if(c)if("?"==c)a.P('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=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Ch(a,e,b,c,!1,d)}else Bh(a,e)} -function Ch(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,Bh(a,b,!0),h.ec?a.P("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,ph(new lh(a,h,"preload"),c,d,f,a.Pc)&&g++));return g} -k.Pc=function(a,b,c,d,e){var f;a.ec=!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.Aa)&&(this.P('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Da=b,a.Xa=c,a.gb=d,this.P('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.C&&this.C.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));vh(this,a.gc)}; -function zh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.w=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.ld=function(a,b,c,d,e,f,g){var h=0,l=a.Da,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Da.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Da.read(m,n++))||0>(r=a.Da.read(m,n++))){h=5120;break}this.v.hb(f,v|r<<8);if(Lc(this.v)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.Aa&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.fe=function(a,b,c,d,e,f,g){var h=0,l=a.Da,m=null,n;l||(h=5120,e=0);for(;e--;){var v=this.v.pa(f);if(Lc(this.v)){h=8192;break}f+=2;if(!m){m=a.Da.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Da.write(m,n++,v&255)||!a.Da.write(m,n++,v>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.ra&&(d=0,++c>=l.Aa&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Id=function(){return this.ea&65535}; -k.Ae=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.w&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.w=this.g&4?this.w+b:this.w-b,this.g=this.w=this.w&65408|c);break;case 8:this.D=this.w;break;case 12:b=this.ld;case 10:b||(b=this.fe),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.va||f>=c.ra?this.ea|=37888: -(g=(this.K&63)<<16|this.J,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Qc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Nc(this.b,this.O))}};k.Gd=function(){return this.J};k.ye=function(a){this.J=a&65534};k.Jd=function(){return this.g};k.Be=function(a){this.g=a};k.Kd=function(){return this.D};k.Ce=function(a){this.D=a};k.Hd=function(){return this.K};k.ze=function(a){this.K=a&63}; -var Dh={},yh=(Dh[63744]=[null,null,M.prototype.Id,M.prototype.Ae,"RLCS"],Dh[63746]=[null,null,M.prototype.Gd,M.prototype.ye,"RLBA"],Dh[63748]=[null,null,M.prototype.Jd,M.prototype.Be,"RLDA"],Dh[63750]=[null,null,M.prototype.Kd,M.prototype.Ce,"RLMP"],Dh[63752]=[null,null,M.prototype.Hd,M.prototype.ze,"RLBE"],Dh);function Eh(a){t.call(this,"Debugger",a,Eh);this.ca=a.base||16;this.Ba=!1;this.K=0;this.R=!1;this.w=-1;this.g=[];this.X={}}z(Eh); -var Fh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Eh.prototype.vc=function(){return-1};Eh.prototype.wc=function(){}; -function Gh(a,b,c,d){if(c)if(b){0>a.w&&a.g.length&&(a.w=0);if(0>a.w||b!=a.g[a.w])a.g.splice(0,0,b),a.w=0;a.w--}else a.R?b="end":b=a.g[a.w+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(xa(b.substring(c,f))),c=f+1}}return a} -function Hh(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; +!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;xh(d,ra(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1}; +k.Ea=function(a,b,c,d){this.C=a;this.v=b;this.b=c;this.i=d;if((this.B=md(this.C,"autoMount")||this.B)&&"string"==typeof this.B)try{this.B=eval("("+this.B+")")}catch(e){q("RL11 auto-mount error: "+e.message+" ("+this.B+")"),this.B=null}yh(this);this.O=Pc(112,5);Gb(b,this,zh,4194304);Ah(this,"None","",!0);this.L&&Ah(this,"Local Disk","?");Ah(this,"Remote Disk","??");Bh(this)||H(this)}; +k.Ga=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.C.sc){for(a=0;ab;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";wh(this,0)}}return!0};k.Fa=function(a){return a?this.save():!0};k.reset=function(){yh(this)};k.save=function(){return(new N(this)).data()}; +k.restore=function(a){return yh(this,a[0])};function Bh(a,b){b||(a.H=0);if(a.B)for(var c in a.B){var d=a.B[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.P("Unable to load the selected drive");else if(c)if("?"==c)a.P('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=ra(c);a.status("Attempting to load "+c+' as "'+b+'"')}Dh(a,e,b,c,!1,d)}else Ch(a,e)} +function Dh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,Ch(a,b,!0),h.ec?a.P("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Pb=!!f,qh(new mh(a,h,"preload"),c,d,f,a.Pc)&&g++));return g} +k.Pc=function(a,b,c,d,e){var f;a.ec=!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.za)&&(this.P('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.P('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.C&&this.C.rb()):a.Pb=!1;a.dc&&(a.dc=!1,--this.H||H(this));wh(this,a.gc)}; +function Ah(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.J=f>>16&63;this.A=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; +k.ld=function(a,b,c,d,e,f,g){var h=0,l=a.Ca,m=null,n;l||(h=5120,e=0);for(;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.v.hb(f,v|r<<8);if(Lc(this.v)){h=8192;break}f+=2;if(n>=l.La&&(m=null,++d>=l.pa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.fe=function(a,b,c,d,e,f,g){var h=0,l=a.Ca,m=null,n;l||(h=5120,e=0);for(;e--;){var v=this.v.na(f);if(Lc(this.v)){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++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.La&&(m=null,++d>=l.pa&&(d=0,++c>=l.za&&(c=0,++b>=l.ua)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Id=function(){return this.ea&65535}; +k.Ae=function(a){this.ea=this.ea&-1023|a&1022;this.M=this.M&-4|(a&48)>>4;if(!(this.ea&128)){var b;a=!0;var c=this.f[(this.ea&768)>>8],d,e,f,g;this.ea&=-2;switch(this.ea&14){case 4:this.g&8&&(this.ea&=63);this.D=c.status|this.A&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.A=this.g&4?this.A+b:this.A-b,this.g=this.A=this.A&65408|c);break;case 8:this.D=this.A;break;case 12:b=this.ld;case 10:b||(b=this.fe),d=this.g>>7,e=this.g&64?1:0,f=this.g&63,d>=c.ua||f>=c.pa?this.ea|=37888: +(g=(this.J&63)<<16|this.I,a=65536-this.D&65535,a=b.call(this,c,d,e,f,a,g,this.Qc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Nc(this.b,this.O))}};k.Gd=function(){return this.I};k.ye=function(a){this.I=a&65534};k.Jd=function(){return this.g};k.Be=function(a){this.g=a};k.Kd=function(){return this.D};k.Ce=function(a){this.D=a};k.Hd=function(){return this.J};k.ze=function(a){this.J=a&63}; +var Eh={},zh=(Eh[63744]=[null,null,M.prototype.Id,M.prototype.Ae,"RLCS"],Eh[63746]=[null,null,M.prototype.Gd,M.prototype.ye,"RLBA"],Eh[63748]=[null,null,M.prototype.Jd,M.prototype.Be,"RLDA"],Eh[63750]=[null,null,M.prototype.Kd,M.prototype.Ce,"RLMP"],Eh[63752]=[null,null,M.prototype.Hd,M.prototype.ze,"RLBE"],Eh);function Fh(a){t.call(this,"Debugger",a,Fh);this.ca=a.base||16;this.Aa=!1;this.J=0;this.R=!1;this.A=-1;this.g=[];this.X={}}z(Fh); +var Gh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Fh.prototype.vc=function(){return-1};Fh.prototype.wc=function(){}; +function Hh(a,b,c,d){if(c)if(b){0>a.A&&a.g.length&&(a.A=0);if(0>a.A||b!=a.g[a.A])a.g.splice(0,0,b),a.A=0;a.A--}else a.R?b="end":b=a.g[a.A+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(xa(b.substring(c,f))),c=f+1}}return a} +function Ih(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 Ih(a,b,c){var d;if(b){b=Jh(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+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Mh(a,b){if(b)return Lh(a,b,a.X[b]);var c=0;for(b in a.X)Lh(a,b,a.X[b]),c++;return 0=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+qa(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Nh(a,b){if(b)return Mh(a,b,a.X[b]);var c=0;for(b in a.X)Mh(a,b,a.X[b]),c++;return 0this.b.pb?Vh:[];Wh(this,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Xh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.v.ka;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=Bc[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.wc=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=Sc(this.b):21==a&&this.B&&kc(this.B)&&(b=this.B.Va));return b}; -k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Lb).F));this.oa&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.oa&-2147483648&&this.b&&this.b.A.W&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,ud(a),a.wa=0,a.qa()))};function Ph(a){var b;if(!re(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?di(a):ei(a)}}function ci(a,b){var c;(c=!a.b||!wb(a.b))||(c=a.b,c.A.ia?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.A.W?(b||a.j("cpu busy or unavailable, command ignored"),!1):!xb(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){Ph(this);this.xa=0;this.ja=null;this.K=0;this.L=Y(this.b.u[7]);this.A.W=!1;fi(this);a||pd(this)};k.save=function(){var a=new N(this);a.set(0,Zh(this.L));a.set(1,Zh(this.O));a.set(2,[this.g,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=$h(a[b++]),this.O=$h(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),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.W=!0;this.Pb=a;this.Tb=b}; -k.stop=function(a,b){if(this.A.W){this.A.W=!1;this.K=b-this.Tb;if(!this.S){b="stopped";if(this.K){a-=this.Pb;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(a.lc(a.H[a.$],b),++a.$==a.H.length&&(a.$=0)));return!1}function xf(a){var b=a.b;if(b.A.W)throw O(b,a.b.Lb),a.ga(),-1;return!1} -function Oh(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.ka],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ka],!0);a.D=["bw"];a.mb=0}k.nb=function(a,b,c){var d=!0;c||gi(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.v;f.Y[e>>>f.ka].nb(e&f.v,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(hi(this,a,a.length-1,"set"),Ph(this)));return d}; -function gi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Ph(a);break}}return f}function ii(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==C)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==C)x=J(w,f&7,1);else if(24576==C)x=J(w,f&63,1);else if(32768==C)x=J(w,f&255,1);else if(C=f&y,y&4032&&(C>>=6,y>>=6), -y&63)switch(y=C&7,C&56){case 0:x=bi(y);break;case 8:x="@"+bi(y);break;case 16:7>y?x="("+bi(y)+")+":(C=w.pa(r,2),x="#"+J(w,C,0,!0));break;case 24:7>y?x="@("+bi(y)+")+":(C=w.pa(r,2),x="@#"+J(w,C,0,!0));break;case 32:x="-("+bi(y)+")";break;case 40:x="@-("+bi(y)+")";break;case 48:C=w.pa(r,2);x=J(w,C,0,!0)+"("+bi(y)+")";7==y&&(x=J(w,C+r.F&65535));break;case 56:C=w.pa(r,2),x="@"+J(w,C)+"("+bi(y)+")",7==y&&(x="@"+J(w,C+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); -0b?(c=bi(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,Sc(d)):21==b&&a.B&&kc(a.B)&&(c="SW="+J(a,a.B.Va,3));c&&(c+=" ");return c}function ni(a){var b,c="";for(b=0;6>b;b++)c+=mi(a,b);c=c+"\n"+(mi(a,6)+mi(a,7));c+=mi(a,20)+mi(a,21);return c+=li(a,"T")+li(a,"N")+li(a,"Z")+li(a,"V")+li(a,"C")}k.qc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.qc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Xe:b,F:c,Wc:d,ha:e,oc:f})}function oi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Wc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.C.qa();a.j("updated registers:")}a.j(ni(a));c&&(a.L=Y(d.u[7]),ei(a,J(a,a.L.F)))}}function si(a,b){b=xa(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=ki(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function ji(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.O.F)),a.L=a.O,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(wb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Kd=[];"call"==Dg&&(Nb=1E5,Kd=["CALL"]);for(void 0!==Cg&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.ub=Z;Fg++;Nb--}}Fg||(a.j("no "+Eg+"history available"),a.ub=void 0)}else{var kb=Xh(a,la);if(kb){var Pb=0,Ld=!1,Md="ds"==La;Ma&&(Ld=!0,"l"==Ma.charAt(0)&&(Ld=!1,Ma=Ma.substr(1)||Mi),Pb=Kh(a,Ma)>>>0,65536Fc?String.fromCharCode(Fc):"."}Na&&(Na+="\n");Na=Md?Na+(Oa+","):Na+(la+" "+Oa+(0==Qb?" "+Ig:""))}Na&&a.j(Na);a.lb=kb}}}}break;case "e":if("else"==g[0])break;var nb,Od,Pd,Qd,Rd=g[0],Sd=g[1];"eb"==Rd?(nb=1,Od=255,Pd=a.Gb,Qd=a.Xb):"e"==Rd||"ew"==Rd?(nb=2,Od=65535,Pd=a.pa,Qd=a.hb):Sd=null;if(null==Sd)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 Gc=Xh(a,Sd);if(Gc)for(var Hc=2;HcVd;){for(var Pa=null,Ri=256;65536>Vb.F>>>0;){Wd.F=a.pa(Vb,2);if(null==Vb.F||!Ri--)break; -if(!(Wd.F&1)){for(var Si=a,Ic=Wd,Kg=null,Wb=Ic.F,Lg=Wb,Xd=1;6>=Xd&&Wb;Xd++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bxi){if(zi(d,this.J)){this.w=new N(this,"1.30.3","failsafe");zi(this.w)&&(Ei(this,d),a=2,Fi(this.w));this.w.set("timestamp",Ba());Gi(this.w);var e=this.f&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Di(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?zi(d,g):("error"== -f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(Qa("user",""),this.g=null)):this.j(f+": "+g),Fi(d),zi(d)?(c=Di(d),e=!0):c=!1))}e&&Ci(this,c?d:null)}else 2==a&&d.clear()}else Ci(this);delete this.J;delete this.K}e=rb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.A.ia=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Hi(this,this.b,b,c,a),this.qa(),this.b.tb());this.O&&(Ei(this,b),b.clear());!c&&this.w&&(this.w.clear(),delete this.w);this.C=0}; -function Ei(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} -function ui(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.3"),g=new N(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Ga&&(c&&a.b.ga(),d=a.b.Ga(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.A.ia=!1,!1===d&&(e=null)));for(var h=rb(a.id),l=0;l(b.K+=a))){for(var e=0;ef.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+"...");Da(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);Yi(a,b,c)}})}else c(a,null)} -function Zi(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=va(a))}function f(a){e("Error: "+a);l&&(--Li||ab(!0));l=!1}var g,h,l=!0;Li++;pb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));n.appendChild(v)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Wi(c,null,null,!1,e,function(d,l){l?(qb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Li||ab(!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),--Li||ab(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Wi(b,a,d,!0,e,m):Xi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return l}window.embedPDP11=function(a,b,c,d){ab(!1);return Zi(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +63],35904:[72,63],35968:[7,63],36032:[5,63],36096:[66,63],36160:[59,63],36224:[64,63],36288:[61,63]},65528:{128:[76,7],152:[108,12288]},65535:{0:[55],1:[99],2:[75],3:[26],4:[109],5:[70],6:[110],7:[111],160:[69],161:[31],162:[41],163:[33],164:[45],165:[36],166:[43],167:[35],168:[38],169:[32],170:[42],171:[34],172:[46],173:[37],174:[44],175:[30],176:[69],177:[80],178:[88],179:[82],180:[92],181:[85],182:[90],183:[84],184:[87],185:[81],186:[89],187:[83],188:[93],189:[86],190:[91],191:[79]}},Vh=[0],Wh= +[58,60,65,96,108,110,100,101,102,103,104,105,59,64];k=Oh.prototype; +k.Ea=function(a,b,c,d){this.v=b;this.C=a;this.b=c;this.B=a.B;(a=md(a,"messages"))&&Rh(this,a);this.ub=Uh;this.Eb=1145>this.b.cb?Wh:[];Xh(this,function(a){a:{var b=d.v.Y,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Yh(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.v.ja;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=Bc[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.wc=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=Sc(this.b):21==a&&this.B&&kc(this.B)&&(b=this.B.Va));return b}; +k.message=function(a,b){b&&(a+=" @"+J(this,Y(this.b.Kb).F));this.ma&1073741824?this.va.push(a):this.ia&&a==this.ia||(this.ia=a,this.ma&-2147483648&&this.b&&this.b.w.W&&(this.fa(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,ud(a),a.va=0,a.oa()))};function Qh(a){var b;if(!se(a))a.H&&a.H.length&&a.j("instruction history buffer freed"),a.$=0,a.H=[];else if(!a.H||!a.H.length){a.H=Array(1E3);for(b=0;b>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+d+")":""))}a.L=Y(a.b.u[7]);b&&1!=a.S?ei(a):fi(a)}}function di(a,b){var c;(c=!a.b||!wb(a.b))||(c=a.b,c.w.ha?c=!0:(c.j(c.toString()+" not powered"),c=!1),c=!c);return c||a.b.w.W?(b||a.j("cpu busy or unavailable, command ignored"),!1):!xb(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){Qh(this);this.wa=0;this.ia=null;this.J=0;this.L=Y(this.b.u[7]);this.w.W=!1;gi(this);a||pd(this)};k.save=function(){var a=new N(this);a.set(0,$h(this.L));a.set(1,$h(this.O));a.set(2,[this.g,this.R,this.ma]);a.set(3,this.I);return a.data()}; +k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=ai(a[b++]),this.O=ai(a[b++]),this.g=a[b][0],"string"==typeof this.g&&(this.g=[this.g]),this.R=a[b][1],this.ma|=a[b][2]);a[3]&&(this.I=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.w.W=!0;this.Ob=a;this.Sb=b}; +k.stop=function(a,b){if(this.w.W){this.w.W=!1;this.J=b-this.Sb;if(!this.S){b="stopped";if(this.J){a-=this.Ob;var c=0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(a.lc(a.H[a.$],b),++a.$==a.H.length&&(a.$=0)));return!1}function yf(a){var b=a.b;if(b.w.W)throw O(b,a.b.Kb),a.fa(),-1;return!1} +function Ph(a){var b,c;a.f=["bp"];if(a.M)for(b=1;b>>d.ja],!1)}a.M=["br"];if(a.D)for(b=1;b>>d.ja],!0);a.D=["bw"];a.mb=0}k.nb=function(a,b,c){var d=!0;c||hi(this,a,b,!1,!0);if(a!=this.f){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.v;f.Y[e>>>f.ja].nb(e&f.v,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(ii(this,a,a.length-1,"set"),Qh(this)));return d}; +function hi(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ja],b==a.D));h.Oa||Qh(a);break}}return f}function ji(a,b){for(var c=1;c>23)&65535,x=J(w,r);else if(8192==C)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==C)x=J(w,f&7,1);else if(24576==C)x=J(w,f&63,1);else if(32768==C)x=J(w,f&255,1);else if(C=f&y,y&4032&&(C>>=6,y>>=6), +y&63)switch(y=C&7,C&56){case 0:x=ci(y);break;case 8:x="@"+ci(y);break;case 16:7>y?x="("+ci(y)+")+":(C=w.na(r,2),x="#"+J(w,C,0,!0));break;case 24:7>y?x="@("+ci(y)+")+":(C=w.na(r,2),x="@#"+J(w,C,0,!0));break;case 32:x="-("+ci(y)+")";break;case 40:x="@-("+ci(y)+")";break;case 48:C=w.na(r,2);x=J(w,C,0,!0)+"("+ci(y)+")";7==y&&(x=J(w,C+r.F&65535));break;case 56:C=w.na(r,2),x="@"+J(w,C)+"("+ci(y)+")",7==y&&(x="@"+J(w,C+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +0b?(c=ci(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,Sc(d)):21==b&&a.B&&kc(a.B)&&(c="SW="+J(a,a.B.Va,3));c&&(c+=" ");return c}function oi(a){var b,c="";for(b=0;6>b;b++)c+=ni(a,b);c=c+"\n"+(ni(a,6)+ni(a,7));c+=ni(a,20)+ni(a,21);return c+=mi(a,"T")+mi(a,"N")+mi(a,"Z")+mi(a,"V")+mi(a,"C")}k.qc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],v=za(n,l,a.qc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.I.push({Xe:b,F:c,Wc:d,ga:e,oc:f})}function pi(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Wc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.C.oa();a.j("updated registers:")}a.j(oi(a));c&&(a.L=Y(d.u[7]),fi(a,J(a,a.L.F)))}}function ti(a,b){b=xa(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=li(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} +function ki(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.O.F)),a.L=a.O,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ia=null;if(wb(a)&&0n||"z"ma.length&&(a.j("note: only "+ma.length+" available"),Z=ma.length);fa-=Z;0>fa&&(null==ma[ma.length-1].F?(Z=fa+Z,fa=0):fa+=ma.length);var Ld=[];"call"==Eg&&(Nb=1E5,Ld=["CALL"]);for(void 0!==Dg&&a.j(Z+" instructions earlier:");0=ma.length&&(fa=0);a.tb=Z;Gg++;Nb--}}Gg||(a.j("no "+Fg+"history available"),a.tb=void 0)}else{var kb=Yh(a,la);if(kb){var Pb=0,Md=!1,Nd="ds"==La;Ma&&(Md=!0,"l"==Ma.charAt(0)&&(Md=!1,Ma=Ma.substr(1)||Ni),Pb=Lh(a,Ma)>>>0,65536Fc?String.fromCharCode(Fc):"."}Na&&(Na+="\n");Na=Nd?Na+(Oa+","):Na+(la+" "+Oa+(0==Qb?" "+Jg:""))}Na&&a.j(Na);a.lb=kb}}}}break;case "e":if("else"==g[0])break;var nb,Pd,Qd,Rd,Sd=g[0],Td=g[1];"eb"==Sd?(nb=1,Pd=255,Qd=a.Fb,Rd=a.Xb):"e"==Sd||"ew"==Sd?(nb=2,Pd=65535,Qd=a.na,Rd=a.hb):Td=null;if(null==Td)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 Gc=Yh(a,Td);if(Gc)for(var Hc=2;HcWd;){for(var Pa=null,Si=256;65536>Vb.F>>>0;){Xd.F=a.na(Vb,2);if(null==Vb.F||!Si--)break; +if(!(Xd.F&1)){for(var Ti=a,Ic=Xd,Lg=null,Wb=Ic.F,Mg=Wb,Yd=1;6>=Yd&&Wb;Yd++){if(2\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;byi){if(Ai(d,this.I)){this.A=new N(this,"1.30.3","failsafe");Ai(this.A)&&(Fi(this,d),a=2,Gi(this.A));this.A.set("timestamp",Ba());Hi(this.A);var e=this.f&&!this.D;if(1==a||Ga("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Ei(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Ai(d,g):("error"== +f&&"no machine state"!=g?(this.P("Error: "+g),"unable to verify user"==g&&(Qa("user",""),this.g=null)):this.j(f+": "+g),Gi(d),Ai(d)?(c=Ei(d),e=!0):c=!1))}e&&Di(this,c?d:null)}else 2==a&&d.clear()}else Di(this);delete this.I;delete this.J}e=rb(this.id);for(f=0;fa[1];a=a[2];this.ca=!0;this.w.ha=!0;var d=this.G.power;d&&(d.textContent="Shutdown");this.b&&(Ii(this,this.b,b,c,a),this.oa(),this.b.sb());this.O&&(Fi(this,b),b.clear());!c&&this.A&&(this.A.clear(),delete this.A);this.C=0}; +function Fi(a,b){if(Ga("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.g||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.$;d.user=c;d.type="bug";d.data=b;Da("http://www.pcjs.org/api/v1/report",d,!0)}} +function vi(a,b,c){var d,e="none";if(a.C)return null;a.C--;var f=new N(a,"1.30.3"),g=new N(a,"1.30.3","validate"),h=Ba();g.set("timestamp",h);f.set("timestamp",h);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.b&&a.b.Fa&&(c&&a.b.fa(),d=a.b.Fa(b,c),"object"===typeof d&&f.set(a.b.id,d),c&&(a.b.w.ha=!1,!1===d&&(e=null)));for(var h=rb(a.id),l=0;l(b.J+=a))){for(var e=0;ef.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+"...");Da(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);Zi(a,b,c)}})}else c(a,null)} +function $i(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=va(a))}function f(a){e("Error: "+a);l&&(--Mi||ab(!0));l=!1}var g,h,l=!0;Mi++;pb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));n.appendChild(v)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");m=function(d,h){h?Xi(c,null,null,!1,e,function(d,l){l?(qb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Mi||ab(!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),--Mi||ab(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Xi(b,a,d,!0,e,m):Yi(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(r){f(r.message)}return l}window.embedPDP11=function(a,b,c,d){ab(!1);return $i(a,b,c,d)};window.enableEvents=ab;window.sendEvent=bb;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map diff --git a/versions/pdpjs/1.30.3/pdp11.js b/versions/pdpjs/1.30.3/pdp11.js index 8ca3f036b..57a21f9bb 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -40,48 +40,48 @@ function pa(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")} function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())} function r(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=resources[a]))return d&&d(a,f,e),[f,e];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),g;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4===k.readyState&&(f=k.responseText,200==k.status||!k.status&&f.length&&"file:"==(window?window.location.protocol:"file:")||(e=k.status||-1),d&&d(a,f,e))});if(b&&"object"== typeof b){var l="",n;for(n in b)b.hasOwnProperty(n)&&(l&&(l+="&"),l+=n+"="+encodeURIComponent(b[n]));l=l.replace(/%20/g,"+");k.open("POST",a,!!c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(l)}else k.open("GET",a,!!c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(f=k.responseText,200!=k.status&&(e=k.status||-1),d&&d(a,f,e),g=[f,e]);return g} -function 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&&(t(d.K[0]),d=null):(t("Empty resource: "+a),d=null)}catch(k){t("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.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.W=g.symbols;d.K.length?1==d.K.length&&(t(d.K[0]),d=null):(t("Empty resource: "+a),d=null)}catch(k){t("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.ya=this.id:(this.oa=this.id.substr(0,b),this.ya=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Fa:!1,rb:!1,P:!1,error:!1};this.lb=null;this.j.error=!1;this.o={};this.D=null;y.push(this)}var Ka=void 0,La={}; +Fa(Aa("Opera")||Aa("iOS")?"onunload":"onbeforeunload",function(){Ha(Ba.exit)});function x(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.Ob=b.comment;this.mc=b;b=this.id.indexOf(".");0>b?this.ya=this.id:(this.oa=this.id.substr(0,b),this.ya=this.id.substr(b+1));this[a]=c;this.j={ready:!1,Ea:!1,rb:!1,O:!1,error:!1};this.kb=null;this.j.error=!1;this.o={};this.F=null;y.push(this)}var Ka=void 0,La={}; if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(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=x);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Qa=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Qa={},y=[];function Ra(a,b,c){Qa[a]&&b&&(Qa[a][b]=c)}function A(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.b["S"+a]=[0,0,!1,!1,this.vc,a]}z(Ya);var Za=7;function $a(a,b){return a.b[b]&&a.b[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; -h.$=function(a,b,c,d){if(this.l&&this.l.$(a,b,c,d)||this.a&&this.a.$(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.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.f[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, -b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; -function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.f)ib(a,c,null!=b?b:a.f[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.b)jb(a,b,a.b[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.D&&a.D.h||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} -function ab(a,b){var c=a.b[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}function bb(a,b){var c=a.b[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.tc=function(a){a||this.a.j.R||(this.h.reset(),lb(this.a),$a(this,"ENABLE")&&mb(this.a))};h.uc=function(){};h.pc=function(a){a||G(this.a)}; -h.nc=function(a){if(!a&&!this.a.j.R)if($a(this,"ENABLE"))mb(this.a);else{a=this.D;var b;if(b=a)a.j.Fa&&(a.j.rb=!0),b=!a.j.Fa;if(b)Ua(a,!0),a.ob(0),Ua(a,!1);else try{var c=this.a.ob(1);0a;a++)this.b["S"+a][1]=0&1<a.a.Ya?8:16,c=65472<=a.ea&&a.ea<65472+b,b=c?1:2,c=c?15:a.h.ma;$a(a,"STEP")||(b=-b);sb(a,a.ea&~c|a.ea+b&c)}function sb(a,b){a.ea=b&a.h.ma;b=a.ea;for(var c=0;22>c;c++)tb(a,"A"+c,b&1<c;c++)tb(a,"D"+c,b&1<a;a++)this.b["S"+a]=[0,0,!1,!1,this.vc,a]}z(Ya);var Za=7;function $a(a,b){return a.b[b]&&a.b[b][1]}h=Ya.prototype;h.reset=function(){this.stop()}; +h.Z=function(a,b,c,d){if(this.l&&this.l.Z(a,b,c,d)||this.a&&this.a.Z(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.o[b]=c,this.s++,!0;default:return"led"==a||"rled"==a?(this.o[b]=c,this.f[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.b[b]&&(this.b[b]=[d?1:0,d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){ab(a,b)}}(this, +b),a.onmouseup=a.onmouseout=function(a,b){return function(){bb(a,b)}}(this,b),a.ontouchstart=function(a,b){return function(c){ab(a,b);c.preventDefault()}}(this,b),a.ontouchend=function(a,b){return function(){bb(a,b)}}(this,b),!0):this.parent.Z.call(this,a,b,c,d)}};h.ia=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.F=d;cb(b,this,db);eb(b,this.reset.bind(this));fb(this);gb(this)};h.ka=function(a,b){b||(hb(),this.reset());return!0};h.ja=function(){return!0}; +function ib(a,b,c){if(a=a.o[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function fb(a,b){for(var c in a.f)ib(a,c,null!=b?b:a.f[c])}function jb(a,b,c){if(a=a.o[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function gb(a){for(var b in a.b)jb(a,b,a.b[b][1])}function kb(a,b,c,d){a.o[b]&&(void 0===c&&(Wa(a,"Value for "+b+" is invalid"),G(a.a)),c=8==(a.F&&a.F.g||8)?ka(c,d):m(c,d),a.o[b].textContent!=c&&(a.o[b].textContent=c))} +function ab(a,b){var c=a.b[b];jb(a,b,c[1]=1-c[1]);c[3]=!0;c[4]&&c[4].call(a,c[1],c[5]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}function bb(a,b){var c=a.b[b];c[2]&&c[3]&&(jb(a,b,c[1]=c[0]),c[4]&&c[4].call(a,c[1],c[5]));c[3]=!1}h.tc=function(a){a||this.a.j.P||(this.g.reset(),lb(this.a),$a(this,"ENABLE")&&mb(this.a))};h.uc=function(){};h.pc=function(a){a||G(this.a)}; +h.nc=function(a){if(!a&&!this.a.j.P)if($a(this,"ENABLE"))mb(this.a);else{a=this.F;var b;if(b=a)a.j.Ea&&(a.j.rb=!0),b=!a.j.Ea;if(b)Ua(a,!0),a.ob(0),Ua(a,!1);else try{var c=this.a.ob(1);0a;a++)this.b["S"+a][1]=0&1<a.a.La?8:16,c=65472<=a.da&&a.da<65472+b,b=c?1:2,c=c?15:a.g.ma;$a(a,"STEP")||(b=-b);sb(a,a.da&~c|a.da+b&c)}function sb(a,b){a.da=b&a.g.ma;b=a.da;for(var c=0;22>c;c++)tb(a,"A"+c,b&1<c;c++)tb(a,"D"+c,b&1<>2;this.l=this.b-1;this.A=this.C/this.b|0;this.za=[];this.f=0;this.m=!1;this.sb=0;this.w=[];this.dc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.D);this.h=Array(this.A);for(b=0;b>2;this.l=this.b-1;this.A=this.C/this.b|0;this.za=[];this.f=0;this.m=!1;this.sb=0;this.w=[];this.dc=[wb,xb,yb,zb];a=new I(this);Ab(a,this.F);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.za[a&-2])&&(e[2]?c=e[2](f&-2)>>8:e[0]&&(c=e[0](f)));if(0<=c)return c;J(d,b,16);return 255} function xb(a,b,c){var d=!1,e=this.controller,f=e.za[a],g=c&65535;if(f)if(f[1])f[1](b,g),d=!0;else{if(f[3]){a=f[2]?f[2](0):0;if(g&1)f[3](a&255|b<<8,g&-2);else f[3](a&-256|b,g);d=!0}}else if(g&1&&(f=e.za[a&-2]))if(f[3])g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0;else if(f[1])f[1](b,g);d||J(e,c,16)}function yb(a,b){var c=-1,d=this.controller;a=d.za[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;J(d,b,16);return 65535} function zb(a,b,c){var d=!1,e=this.controller;a=e.za[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||J(e,c,16)}function Cb(a,b){if(b!=a.s){var c;a.s&&(c=(1<>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.La)return l.pb+=l.La-f,l.La=f,!0;if(f>=l.La+l.pb){p=l.size-(f-n);p>g&&(p=g);l.pb=f-l.La+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.sb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} -function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Ab(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.h[(b&a.ma)>>>a.c].W(b&a.l,b)}h.mb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.ma)>>>this.c;this.m=!1;this.f++;a=this.h[c].Vb(b,a);this.f--;return a}; -h.$a=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ma)>>>this.c].Hb(a&this.l,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.h[(b&a.ma)>>>a.c].qb(b&a.l,c&65535,b)}h.nb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.ma)>>>this.c;this.m=!1;this.f++;this.h[d].bc(c,b&65535,a);this.f--}; -function Ob(a){for(var b=0,c=[],d=0;da.a.Ya)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Xb(b))}};h.Hc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ic=function(){return this.a.Cb};h.Jc=function(){return this.a.Ga}; -h.Cd=function(a){var b=this.a;1170>b.Ya&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Pb=a&16?4194303:262143,Xb(b))};h.kd=function(a){a=a>>1&63;var b=this.a.ab[a>>1];return a&1?b>>16:b&65535};h.ce=function(a,b){b=b>>1&63;var c=b>>1;this.a.ab[c]=b&1?this.a.ab[c]&65535|(a&63)<<16:this.a.ab[c]&-65536|a&65534};h.cd=function(a){return this.a.H[1][a>>1&7]};h.Wd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.ad=function(a){return this.a.H[1][(a>>1&7)+8]};h.Ud=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.bd=function(a){return this.a.Y[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.$c=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Dc=function(a){return this.a.H[0][a>>1&7]};h.yd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Bc=function(a){return this.a.H[0][(a>>1&7)+8]};h.wd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Cc=function(a){return this.a.Y[0][a>>1&7]}; -h.xd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.Ac=function(a){return this.a.Y[0][(a>>1&7)+8]};h.vd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.jd=function(a){return this.a.H[3][a>>1&7]};h.be=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.gd=function(a){return this.a.H[3][(a>>1&7)+8]};h.$d=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.hd=function(a){return this.a.Y[3][a>>1&7]};h.ae=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.fd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Zd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Na=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Oc=function(){return this.a.B&49152?this.a.na[0]:this.a.g[6]};h.Hd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.g[6]=a};h.Rc=function(){return this.a.g[7]};h.Kd=function(a){this.a.g[7]=a}; -h.Oa=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Qa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Pc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[1]};h.Id=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[1]=a};h.Qc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.na[3]};h.Jd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.na[3]=a};h.yc=function(a){return this.a.Yb[a-65504>>1]}; -h.td=function(a,b){this.a.Yb[b-65504>>1]=a};h.Ub=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.h.sb}a=(a>>6)-1}else a=0;return a};h.ac=function(){};h.ed=function(){return 1};h.Yd=function(){};h.xc=function(){return this.a.M};h.sd=function(){this.a.M=0};h.Fc=function(){return this.a.Xb};h.Ad=function(a,b){b&1||(a&=255);this.a.Xb=a};h.Kc=function(a){return a?this.a.Db:0};h.Dd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.u|=2}; -h.dd=function(a){return a?this.a.Da&65280:0};h.Xd=function(a){this.a.Da=a|255};h.Nc=function(){return Yb(this.a)};h.Gd=function(a){Zb(this.a,a&-1809|Yb(this.a)&1808);this.a.u|=128};h.$b=function(){}; +function Fb(a,b,c,d,e){for(var f=b,g=c,k=f>>>a.c;0g&&(p=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.Ka)return l.pb+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.pb){p=l.size-(f-n);p>g&&(p=g);l.pb=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Hb(1,f,g)}f=new I(a,f,p,a.b,d,e);Ab(f,a.F,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d==Ib&&(a.sb+=c),a.status((c>>10)+"Kb "+Jb[d]+" at "+ka(b)),!0):Hb(2,b,c)} +function Eb(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].Ab(b&a.l,b)}function Mb(a,b){3932160<=b&&(b=Lb(a.a,b));return a.g[(b&a.ma)>>>a.c].V(b&a.l,b)}h.lb=function(a){3932160<=a&&(a=Lb(this.a,a));var b=a&this.l,c=(a&this.ma)>>>this.c;this.m=!1;this.f++;a=this.g[c].Vb(b,a);this.f--;return a}; +h.Za=function(a,b){3932160<=a&&(a=Lb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ma)>>>this.c].Hb(a&this.l,b&255,a);this.f--};function Nb(a,b,c){3932160<=b&&(b=Lb(a.a,b));a.g[(b&a.ma)>>>a.c].qb(b&a.l,c&65535,b)}h.nb=function(a,b){3932160<=a&&(a=Lb(this.a,a));var c=a&this.l,d=(a&this.ma)>>>this.c;this.m=!1;this.f++;this.g[d].bc(c,b&65535,a);this.f--}; +function Ob(a){for(var b=0,c=[],d=0;da.a.La)){var l=k[0]?k[0].bind(b):null,n=k[1]?k[1].bind(b):null,p=k[2]?k[2].bind(b):null,u=k[3]?k[3].bind(b):null,w=k[5]||1;65472<=g&&65487>=g&&(!l&&p&&(l=function(a){return function(b){return a(b)&255}.bind(b)}(p)),!n&&u&&(n=function(a){return function(b,c){return a(b,c)}.bind(b)}(u)));for(var D=k[4],U=0;U>5&3;b.ab=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Xb(b))}};h.Hc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Ic=function(){return this.a.Cb};h.Jc=function(){return this.a.Fa}; +h.Cd=function(a){var b=this.a;1170>b.La&&(a&=-49);b.Fa!=a&&(b.Fa=a,b.Pb=a&16?4194303:262143,Xb(b))};h.kd=function(a){a=a>>1&63;var b=this.a.$a[a>>1];return a&1?b>>16:b&65535};h.ce=function(a,b){b=b>>1&63;var c=b>>1;this.a.$a[c]=b&1?this.a.$a[c]&65535|(a&63)<<16:this.a.$a[c]&-65536|a&65534};h.cd=function(a){return this.a.H[1][a>>1&7]};h.Wd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.ad=function(a){return this.a.H[1][(a>>1&7)+8]};h.Ud=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.bd=function(a){return this.a.X[1][a>>1&7]};h.Vd=function(a,b){b=b>>1&7;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.$c=function(a){return this.a.X[1][(a>>1&7)+8]};h.Td=function(a,b){b=(b>>1&7)+8;this.a.X[1][b]=a;this.a.H[1][b]&=65295};h.Dc=function(a){return this.a.H[0][a>>1&7]};h.yd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.Bc=function(a){return this.a.H[0][(a>>1&7)+8]};h.wd=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Cc=function(a){return this.a.X[0][a>>1&7]}; +h.xd=function(a,b){b=b>>1&7;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.Ac=function(a){return this.a.X[0][(a>>1&7)+8]};h.vd=function(a,b){b=(b>>1&7)+8;this.a.X[0][b]=a;this.a.H[0][b]&=65295};h.jd=function(a){return this.a.H[3][a>>1&7]};h.be=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.gd=function(a){return this.a.H[3][(a>>1&7)+8]};h.$d=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.hd=function(a){return this.a.X[3][a>>1&7]};h.ae=function(a,b){b=b>>1&7;this.a.X[3][b]=a;this.a.H[3][b]&=65295}; +h.fd=function(a){return this.a.X[3][(a>>1&7)+8]};h.Zd=function(a,b){b=(b>>1&7)+8;this.a.X[3][b]=a;this.a.H[3][b]&=65295};h.Na=function(a){a&=7;return this.a.B&2048?this.a.Ga[a]:this.a.h[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.Ga[b]=a:this.a.h[b]=a};h.Oc=function(){return this.a.B&49152?this.a.na[0]:this.a.h[6]};h.Hd=function(a){this.a.B&49152?this.a.na[0]=a:this.a.h[6]=a};h.Rc=function(){return this.a.h[7]};h.Kd=function(a){this.a.h[7]=a}; +h.Oa=function(a){a&=7;return this.a.B&2048?this.a.h[a]:this.a.Ga[a]};h.Qa=function(a,b){b&=7;this.a.B&2048?this.a.h[b]=a:this.a.Ga[b]=a};h.Pc=function(){return 1==(this.a.B&49152)>>14?this.a.h[6]:this.a.na[1]};h.Id=function(a){1==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.na[1]=a};h.Qc=function(){return 3==(this.a.B&49152)>>14?this.a.h[6]:this.a.na[3]};h.Jd=function(a){3==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.na[3]=a};h.yc=function(a){return this.a.Yb[a-65504>>1]}; +h.td=function(a,b){this.a.Yb[b-65504>>1]=a};h.Ub=function(a){if(65520==a){a=0;switch(Ib){case Ib:a=this.g.sb}a=(a>>6)-1}else a=0;return a};h.ac=function(){};h.ed=function(){return 1};h.Yd=function(){};h.xc=function(){return this.a.ea};h.sd=function(){this.a.ea=0};h.Fc=function(){return this.a.Xb};h.Ad=function(a,b){b&1||(a&=255);this.a.Xb=a};h.Kc=function(a){return a?this.a.Db:0};h.Dd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Db=a;b.u|=2}; +h.dd=function(a){return a?this.a.mb&65280:0};h.Xd=function(a){this.a.mb=a|255};h.Nc=function(){return Yb(this.a)};h.Gd=function(a){Zb(this.a,a&-1793|Yb(this.a)&1792);this.a.u|=128};h.$b=function(){}; var M={},Wb=(M[61568]=[null,null,L.prototype.kd,L.prototype.ce,"UNIMAP",64,1170],M[62592]=[null,null,L.prototype.cd,L.prototype.Wd,"SIPDR",8,1145],M[62608]=[null,null,L.prototype.ad,L.prototype.Ud,"SDPDR",8,1145],M[62624]=[null,null,L.prototype.bd,L.prototype.Vd,"SIPAR",8,1145],M[62640]=[null,null,L.prototype.$c,L.prototype.Td,"SDPAR",8,1145],M[62656]=[null,null,L.prototype.Dc,L.prototype.yd,"KIPDR",8,1145],M[62672]=[null,null,L.prototype.Bc,L.prototype.wd,"KDPDR",8,1145],M[62688]=[null,null,L.prototype.Cc, L.prototype.xd,"KIPAR",8,1145],M[62704]=[null,null,L.prototype.Ac,L.prototype.vd,"KDPAR",8,1145],M[62798]=[null,null,L.prototype.Jc,L.prototype.Cd,"MMR3",1,1145],M[65382]=[null,null,L.prototype.Ec,L.prototype.zd,"LKS"],M[65402]=[null,null,L.prototype.Gc,L.prototype.Bd,"MMR0",1,1145],M[65404]=[null,null,L.prototype.Hc,L.prototype.$b,"MMR1",1,1145],M[65406]=[null,null,L.prototype.Ic,L.prototype.$b,"MMR2",1,1145],M[65408]=[null,null,L.prototype.jd,L.prototype.be,"UIPDR",8,1145],M[65424]=[null,null,L.prototype.gd, L.prototype.$d,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.hd,L.prototype.ae,"UIPAR",8,1145],M[65456]=[null,null,L.prototype.fd,L.prototype.Zd,"UDPAR",8,1145],M[65472]=[null,null,L.prototype.Na,L.prototype.Pa,"R0SET0"],M[65473]=[null,null,L.prototype.Na,L.prototype.Pa,"R1SET0"],M[65474]=[null,null,L.prototype.Na,L.prototype.Pa,"R2SET0"],M[65475]=[null,null,L.prototype.Na,L.prototype.Pa,"R3SET0"],M[65476]=[null,null,L.prototype.Na,L.prototype.Pa,"R4SET0"],M[65477]=[null,null,L.prototype.Na,L.prototype.Pa, @@ -89,155 +89,155 @@ L.prototype.$d,"UDPDR",8,1145],M[65440]=[null,null,L.prototype.hd,L.prototype.ae L.prototype.Qa,"R5SET1",1,1145],M[65486]=[null,null,L.prototype.Pc,L.prototype.Id,"R6SUPER",1,1145],M[65487]=[null,null,L.prototype.Qc,L.prototype.Jd,"R6USER",1,1145],M[65504]=[null,null,L.prototype.yc,L.prototype.td,"CTRL",8,1170],M[65520]=[null,null,L.prototype.Ub,L.prototype.ac,"LSIZE",1,1170],M[65522]=[null,null,L.prototype.Ub,L.prototype.ac,"HSIZE",1,1170],M[65524]=[null,null,L.prototype.ed,L.prototype.Yd,"SYSID",1,1170],M[65526]=[null,null,L.prototype.xc,L.prototype.sd,"CPUERR",1,1170],M[65528]= [null,null,L.prototype.Fc,L.prototype.Ad,"MB",1,1170],M[65530]=[null,null,L.prototype.Kc,L.prototype.Dd,"PIR"],M[65532]=[null,null,L.prototype.dd,L.prototype.Xd,"SL"],M[65534]=[null,null,L.prototype.Nc,L.prototype.Gd,"PSW"],M);Ga(function(){for(var a=E(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> -2);for(f=0;f>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},ba:function(a,b){a&1&&J(this.h,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},F:function(a,b){return this.I(a,b)},S:function(a,b){return this.Vb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Hb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.bc(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},O:function(a,b){a&1&&J(this.h,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&J(this.h,b,64);return this.s[a>>1]},oa:function(a,b){this.o[a]=b;this.va=!0},qa:function(a,b){this.o[a]=b;this.va=!0},sa:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.va=!0},ua:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.va=!0}};function Ab(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Gb=!a.l&&b[1]||a.f,a.qb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Hb=b[1]||a.f,a.bc=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.Ab=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Vb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} -var oc=[],kc=[I.prototype.N,I.prototype.ra,I.prototype.ba,I.prototype.ya],mc=[I.prototype.F,I.prototype.pa,I.prototype.S,I.prototype.ta];if(Xa)var ic=[I.prototype.C,I.prototype.oa,I.prototype.O,I.prototype.sa],hc=[I.prototype.J,I.prototype.qa,I.prototype.aa,I.prototype.ua]; -function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.ib=a.cycles||b;this.sa=c;this.xb=Math.round(this.ib/1E4)/100;this.Ia=this.xb*this.sa;this.j.R=!1;this.j.Eb=!1;this.j.Va=a.autoStart;this.j.hb=!1;this.fb=this.Ja=0;this.gb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Tb=this.od.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.D=d;this.I=a.I;for(b=0;b=a.Ja&&(a.Ja+=a.Ra,c=!0);0<=a.Sa&&a.Sa<=uc(a)&&(a.Ra=a.Sa=-1,tc(a),G(a),c=!0);c&&a.U(uc(a)+" cycles: checksum="+m(a.fb))}} -h.$=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.P)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.pa/a.Ia&&(b=1);a.sa=b;b=a.xb*a.sa;if(a.Ia!=b){a.Ia=b;b=a.Ia.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.U("target speed: "+b)}c&&a.l&&xc(a.l)}ob(a,a.ba);a.ba=0;a.aa=ra();a.qa=0;wc(a)}function Rb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Tb(a,b,c,d){0<=b&&ba.J[b][0])&&(c=a.ib*a.sa/1E3*c|0,a.j.R&&(c+=yc(a)),a.J[b][0]=c)} -function nb(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function yc(a,b){var c=a.ra-=a.a;a.a=a.F=0;b&&(a.ra=0);return c} -h.od=function(){if(this.j.R){this.yb>=this.ib&&wc(this,!0);this.Ua=0;this.eb=ra();if(this.qa){var a=this.eb-this.qa;a>this.Qb&&(this.aa+=a,this.aa>this.eb&&(this.aa=this.eb))}try{do{for(var b,c=this.j.hb?1:this.jb,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ob(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ua+=b;this.ba+=b;pb(this,b);nb(this,b);this.Ta-=b;if(0>=this.Ta){this.Ta+=this.jb;15<=++this.Rb&&(this.xa(),this.Rb=0);break}}while(this.j.R)}catch(f){G(this); -this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.R){a=setTimeout;b=this.Tb;this.qa=ra();c=this.Qb;this.Ua&&(c=Math.round(c*this.Ua/this.jb));c-=this.qa-this.eb;if(d=this.qa-this.aa)this.pa=Math.round(this.ba/(10*d))/100,864E5<=d&&(this.ua=0,vc(this));if(0>c||this.pac&&(this.aa-=c),c=0;this.yb+=this.Ua;this.qa+=c;a(b,c)}}}; -function mb(a){var b;a.j.error?(a.U(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.R)a.U(a.toString()+" busy");else{vc(a);a.j.R=!0;a.j.Eb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.aa,uc(a));setTimeout(a.Tb,0)}}h.ob=function(){return 0};function G(a){var b=!1;if(a.j.R){yc(a);ob(a,a.ba);a.ba=0;a.j.R=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),uc(a));b=!0}a.j.complete=void 0;return b} -function zc(a){this.Ya=+a.model||1170;this.Mb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.Ya?Ac.bind(this):Bc.bind(this);Cc(this);this.ta=0;this.O=null;this.j.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.Ya);this.j.R&&G(this);Cc(this);sc(this);this.j.error=!1;this.parent.reset.call(this)}; -function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.g=[0,0,0,0,0,0,0,a.Mb];a.Ha=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.bb=0;a.lc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.Y=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.ab=[0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0];a.Xb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.wb=0;a.Ka=-1;lb(a)}function lb(a){a.Da=255;a.M=0;a.Db=0;a.w=0;a.Ca=0;a.Cb=0;a.Ga=0;a.Ba=0;a.cb=0;a.Pb=262143;a.O=null;a.h&&Xb(a)}function Xb(a){a.Ba?(a.S=65536,a.N=a.kc,a.W=a.ld,a.qb=a.de,Cb(a.h,a.Ga&16?22:18)):(a.S=0,a.N=a.jc,a.W=a.Wb,a.qb=a.cc,Cb(a.h,16))}h.Lb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ua,this.sa]);a.set(2,Ob(this.h));return a.data()}; -h.restore=function(a){var b=a[1];this.ua=b[1];vc(this,b[3]);a:{b=this.h;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.g[6],a.g[6]=a.na[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Fc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Hc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ic(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} -function K(a,b,c){if(!a.ta){var d=!1;0>a.Ka?a.Ka=Yb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Cb=b);a.v=0;var e=a.W(b|a.S),f=a.W(b+2&65535|a.S);Zb(a,f&-12289|a.Ka>>2&12288);d&&(a.M|=4,a.g[6]=4);Jc(a,a.Ka);Jc(a,a.g[7]);Q(a,e);a.u&=-113;a.Ka=-1;a.u|=8;if(26!=c)throw b;}}function Kc(a){var b=Lc(a),c=Lc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);Q(a,b);Zb(a,c);a.u&=-17} -function Lb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.ab[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Mc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.lc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Pb;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.H[a.v][d]=e;if(4194170!==f||a.v)a.cb=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ka&&(g|=128),a.w&57344||(a.w=a.w|g|a.cb<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Gb(b&a.l,c&255,b)}function Lc(a){var b=a.W(a.g[6]|a.S);a.g[6]=a.g[6]+2&65535;return b}function Jc(a,b){var c=a.g[6]-2&65535;a.g[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);!a.v&&c<=a.Da&&4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.g[c];7!==c&&(e|=g);e=a.W(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.g[c]+f&65535;7!==c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.g[c]-2&65535;7!==c&&(e|=g);e=a.W(e)|g;a.a-= -8;break;case 6:return e=a.W(Ec(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Ec(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.S)|g,a.a-=10,e}a.g[c]=a.g[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.g[6]<=a.Da||65534<=a.g[6])&&(a.g[6]<=a.Da-32?(a.M|=4,a.g[6]=4,K(a,4,24)):(a.M|=8,a.u|=64));return e}h.mb=function(a){if(!this.Ba)return this.h.mb(a);this.ta++;a=this.Wb(Mc(this,a,2));this.ta--;return a}; -h.$a=function(a,b){this.Ba?(this.ta++,Nc(this,Mc(this,a,5),b),this.ta--):this.h.$a(a,b)};h.nb=function(a,b){this.Ba?(this.ta++,this.cc(Mc(this,a,4),b),this.ta--):this.h.nb(a,b)};h.jc=function(a,b,c){return Oc(this,a,b,c)};h.kc=function(a,b,c){return Mc(this,Oc(this,a,b,c),c)};h.Wb=function(a){return Mb(this.h,a)};h.ld=function(a){return Mb(this.h,Mc(this,a,2))};h.cc=function(a,b){Nb(this.h,a,b&65535)};h.de=function(a,b){Nb(this.h,Mc(this,a,4),b)}; -function Pc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Oc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.S),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.na[a.B>>12&3];return c}function Qc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Oc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Mc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.na[a.B>>12&3]=d} -function Rc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.N(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Sc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Mb(a.h,a.N(b,c,2)):a.g[c]}function Tc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Oc(a,b,c,8)}function Uc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.N(b,c,3),a=Kb(a.h,c)):a=a.g[c]&255;return a}function Vc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.h,a.N(b,c,2)):a.g[c]} -function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.wb=a.N(b,e,7),Nc(a,e,d.call(a,c,Kb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e]&255)}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.N(b,e,6),Nb(a.h,e,d.call(a,c,Mb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Wc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Nc(a,a.N(b,e,5),c):a.g[e]=c?a.g[e]&~d|c<<24>>24&d:a.g[e]&~d;return c}function Xc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.h,a.N(b,d,4),c):a.g[d]=c&65535;return c} -function V(a,b,c){c&&(Q(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.ob=function(a){this.j.complete=!0;var b=a?this.j.Eb?0:1:-1;this.j.Eb=!1;this.ra=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,28):this.u&64?K(this,4,30):this.u&16&&K(this,12,32),this.u&=-113);if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Db&224)>>5,e=this.O&&this.O.Ma>d?this.O:null;e&&(c=e.qd,d=e.Ma);d>(this.B&224)>>5?(this.u&4&&(Ec(this,2),this.u&=-5),K(this,c,26),d=!0):d=!1;if(d){if(e)if(a=e,e=this.O,e==a)this.O=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= -d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Dc(this))}while(0>1|b<<16;Hc(this,a);return a&65535}function cd(a,b){a=b&128|b>>1|b<<8;Hc(this,a<<8);return a&255}function dd(a,b){a=b&~a;R(this,a);return a}function ed(a,b){a=b&~a;R(this,a<<8);return a}function fd(a,b){a|=b;R(this,a);return a}function gd(a,b){a|=b;R(this,a<<8);return a}function hd(a,b){a=~b|65536;Fc(this,a);return a&65535}function id(a,b){a=~b|256;Fc(this,a<<8);return a&255} -function jd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function kd(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function ld(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function md(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function nd(a,b){a=-b;Fc(this,a,a&b&32768);return a&65535}function od(a,b){a=-b;Fc(this,a<<8,(a&b&128)<<8);return a&255} -function pd(a,b){a=b<<1|this.m>>16&1;Hc(this,a);return a&65535}function qd(a,b){a=b<<1|this.m>>16&1;Hc(this,a<<8);return a&255}function rd(a,b){a=(this.m&65536|b)>>1|b<<16;Hc(this,a);return a&65535}function sd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Hc(this,a<<8);return a&255}function td(a,b){var c=b-a;Ic(this,c,a,b);return c&65535}function ud(a,b){var c=b-a;Ic(this,c<<8,a<<8,b<<8);return c&255}function vd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function wd(a,b){a^=b;R(this,a);return a&65535}function xd(a){T(this,a,Sc(this,a),Yc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function yd(a){var b=Vc(this,a);a=a>>6&7;var c=this.g[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.g[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} -function zd(a){var b=Vc(this,a);a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=d<<16;d>>=1;c&2147483648&&(d|=4294967295<<32-b)}else b?(d=c<>15,d<<=1,32>=32-b)&&4294967295!==(c|4294967295<>16&65535;this.g[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Ad(a){V(this,a,!P(this))}function Bd(a){V(this,a,P(this))} -function Cd(a){T(this,a,Sc(this,a),dd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Dd(a){S(this,a,Rc(this,a),ed);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Ed(a){T(this,a,Sc(this,a),fd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Fd(a){S(this,a,Rc(this,a),gd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function Gd(a){R(this,Sc(this,a)&Vc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Hd(a){R(this,(Rc(this,a)&Uc(this,a))<<8);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Id(a){V(this,a,this.i&65535?0:4)}function Jd(a){V(this,a,!this.Aa()==!(this.f&32768))}function Kd(a){V(this,a,!!(this.i&65535)&&!this.Aa()==!(this.f&32768))}function Ld(a){V(this,a,!P(this)&&!!(this.i&65535))} -function Md(a){V(this,a,(this.i&65535?0:4)||!this.Aa()!=!(this.f&32768))}function Nd(a){V(this,a,P(this)||(this.i&65535?0:4))}function Od(a){V(this,a,!this.Aa()!=!(this.f&32768))}function Pd(a){V(this,a,this.Aa())}function Qd(a){V(this,a,!!(this.i&65535))}function Rd(a){V(this,a,!this.Aa())}function Sd(){K(this,12,1);this.a-=5}function Td(a){V(this,a,!0)}function Ud(a){V(this,a,!(this.f&32768))}function Vd(a){V(this,a,this.f&32768?2:0)} -function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Wd(a){var b=Sc(this,a);a=Vc(this,a);Ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Xd(a){var b=Rc(this,a)<<8;a=Uc(this,a)<<8;Ic(this,b-a,a,b);this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)} -function Yd(a){var b=Vc(this,a);if(b){a=a>>6&7;var c=this.g[a]<<16|this.g[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.g[a]=d&65535,this.g[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.g[a]&&(this.g[a]=this.g[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function Zd(){K(this,24,2);this.a-=25} -function $d(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function ae(){K(this,16,4);this.a-=25}var be=[0,7,7,10,7,11,9,13];function ce(a){this.F=this.a;Q(this,Tc(this,a));this.a=this.F-be[this.c]}var de=[0,14,14,17,14,18,16,20];function ee(a){this.F=this.a;var b=Tc(this,a);a=a>>6&7;Jc(this,this.g[a]);this.g[a]=this.g[7];Q(this,b);this.a=this.F-de[this.c]}var fe=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function ge(a){var b=Sc(this,a);this.F=this.a;R(this,Xc(this,a,b));this.a=this.F-fe[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function he(a){var b=Rc(this,a);R(this,Wc(this,a,b,65535)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var ie=[7,13,13,17,14,18,17,21]; -function je(a){var b=Vc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.g[a];c&32768&&(c|=-65536);b=~~(b*c);this.g[a]=b>>16&65535;this.g[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.g[b]=this.g[b]-1&65535)Q(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function pe(a){T(this,a,Sc(this,a),td);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function qe(a){T(this,a,0,vd);this.a-=this.c?9:3+(7==this.b?2:0)}function re(){K(this,28,5);this.a-=5}function se(){this.I&&(this.I.ea=this.g[7],this.I.setData(this.g[0],!0));this.u|=4;Ec(this,-2);this.a-=3}function te(a){T(this,a,Sc(this,a),wd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function Ac(a){ue[a>>12].call(this,a)}function ve(a){we[a>>6&3].call(this,a)}function xe(a){ye[a>>6&3].call(this,a)}function ze(a){Ae[a>>6&3].call(this,a)}function Be(a){Ce[a&15].call(this,a)} -function De(a){Ee[a&15].call(this,a)}function Fe(a){Ge[a>>6&3].call(this,a)}function He(a){Ie[a>>6&3].call(this,a)}function Je(a){Ke[a>>6&3].call(this,a)} -var ue=[function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,xd,Y,function(a){Me[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,pe,Y],Le=[function(a){Oe[a>>4&15].call(this,a)},Td,Qd,Id,Jd,Od,Kd,Md,ee,ee,ve,xe,ze,Y,Y,Y],we=[function(a){Fc(this,Xc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,hd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],ye=[function(a){T(this,a,0, -nd);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Fc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Ae=[function(a){T(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}], -Oe=[function(a){Pe[a&15].call(this,a)},Y,Y,Y,ce,ce,ce,ce,ne,Y,Be,De,qe,qe,qe,qe],Pe=[$d,se,me,Sd,ae,le,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Ce=[ke,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Ee=[ke,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Me=[Rd,Pd,Ld,Nd,Ud,Vd,Ad,Bd,Zd,re,Fe,He,Je,Y,Y,Y],Ge=[function(a){Fc(this, -Wc(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)}],Ie=[function(a){S(this,a,0,od);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Fc(this,a<<8);this.a-=this.c?4:3+(7== -this.b?2:0)}],Ke=[function(a){S(this,a,0,sd);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,cd);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Qe[a>>12].call(this,a)} -var Qe=[function(a){Re[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,xd,function(a){Se[a>>8&15].call(this,a)},function(a){Te[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,pe,Y],Re=[function(a){Ue[a>>4&15].call(this,a)},Td,Qd,Id,Jd,Od,Kd,Md,ee,ee,ve,xe,ze,function(a){Ve[a>>6&3].call(this,a)},Y,Y],Ve=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.S);Q(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Pc(this,a,0);Jc(this,a);R(this,a);this.a-=11},function(a){var b=Lc(this);this.F= -this.a;Qc(this,a,0,b);R(this,b);this.a=this.F-ie[this.c]},function(a){R(this,Xc(this,a,this.Aa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ue=[function(a){We[a&15].call(this,a)},Y,Y,Y,ce,ce,ce,ce,ne,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,6)},Be,De,qe,qe,qe,qe],We=[$d,se,me,Sd,ae,le,function(){Kc(this);this.a-=13},function(){K(this,8,6)},Y,Y,Y,Y,Y,Y,Y,Y],Se=[je,je,Yd,Yd,yd,yd,zd,zd,te,te,Y,Y,Y,Y,oe,oe],Te=[Rd,Pd,Ld,Nd,Ud,Vd,Ad,Bd,Zd,re,Fe,He, -Je,function(a){Xe[a>>6&3].call(this,a)},Y,Y],Xe=[Y,function(a){a=Pc(this,a,65536);Jc(this,a);R(this,a);this.a-=11},function(a){var b=Lc(this);this.F=this.a;Qc(this,a,65536,b);R(this,b);this.a=this.F-ie[this.c]},Y]; -function Ye(a){x.call(this,"ROM",a,Ye);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.oa,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.l=null);Ze(c)})}}z(Ye);h=Ye.prototype; -h.ia=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Ze(this)};h.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.b,this.X),delete this.X);return!0};h.ja=function(){return!0}; -function Ze(a){if(!Va(a)){if(a.l){if(!a.c||!a.h)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[Ye.prototype.Zc,Ye.prototype.Sd,null,null,null,a.b>>1],c);if(cb(a.h,a,b,256,a.ya)){b=a.m=!0;break a}}else if(Fb(a.h,b,a.b,fc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.$a(p++,b[u++]&255);else p&1?G(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Sb(e.a,e.aa))});this.ba=Ub(52,4);this.O=Rb(this.a,function(){e.c|=128;e.c&64&&Sb(e.a,e.ba)});cb(b,this,ef);F(this)}; +function I(a,b,c,d,e,f){this.g=a;this.id=dc+=2;this.a=null;this.Ka=b;this.pb=c;this.size=d||0;this.type=e||ec;this.l=e==fc;this.controller=null;Ab(this);this.va=this.ic=!1;if(this.size)if(f)this.controller=f,a=[null,0],this.a=a[0],gc(this,f.dc);else if(Xa)this.b=new ArrayBuffer(this.size),this.c=new DataView(this.b,0,this.size),this.o=new Uint8Array(this.b,0,this.size),this.s=new Uint16Array(this.b,0,this.size>>1),this.a=new Int32Array(this.b,0,this.size>>2),gc(this,cc?hc:ic);else{a=this.a=Array(this.size>> +2);for(f=0;f>2),b=0;b>8,c)},M:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},aa:function(a,b){a&1&&J(this.g,b,64);b=a>>2;a=(a&3)<<3;var c=this.a[b]>>a;return 24>a?c&65535:c&255|(this.a[b+1]&255)<<8},ra:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.va=!0},D:function(a,b){return this.I(a,b)},R:function(a,b){return this.Vb(a,b)},pa:function(a,b,c){this.l?this.f(a,b,c):this.Hb(a,b,c)},ta:function(a,b,c){this.l?this.f(a,b,c):this.bc(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},N:function(a,b){a&1&&J(this.g,b,64);return this.c.getUint16(a,!0)},$:function(a,b){a&1&&J(this.g,b,64);return this.s[a>>1]},oa:function(a,b){this.o[a]=b;this.va=!0},qa:function(a,b){this.o[a]=b;this.va=!0},sa:function(a,b,c){a&1&&J(this.g, +c,64);this.c.setUint16(a,b,!0);this.va=!0},ua:function(a,b,c){a&1&&J(this.g,c,64);this.s[a>>1]=b;this.va=!0}};function Ab(a,b,c){a.F=b;a.i=a.m=0;c&&((a.i=c.i)&&lc(a,mc,!1),(a.m=c.m)&&nc(a,mc,!1))}function nc(a,b,c){c&&a.m||(a.Gb=!a.l&&b[1]||a.f,a.qb=!a.l&&b[3]||a.A);if(c||void 0===c)a.Hb=b[1]||a.f,a.bc=b[3]||a.A}function lc(a,b,c){c&&a.i||(a.Ab=b[0]||a.v,a.V=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Vb=b[2]||a.w}function gc(a,b){b||(b=oc);lc(a,b,void 0);nc(a,b,void 0)} +var oc=[],jc=[I.prototype.M,I.prototype.ra,I.prototype.aa,I.prototype.ya],mc=[I.prototype.D,I.prototype.pa,I.prototype.R,I.prototype.ta];if(Xa)var ic=[I.prototype.C,I.prototype.oa,I.prototype.N,I.prototype.sa],hc=[I.prototype.J,I.prototype.qa,I.prototype.$,I.prototype.ua]; +function pc(a,b){x.call(this,"CPU",a,pc);var c=a.multiplier||1;this.hb=a.cycles||b;this.sa=c;this.xb=Math.round(this.hb/1E4)/100;this.Ha=this.xb*this.sa;this.j.P=!1;this.j.Eb=!1;this.j.Va=a.autoStart;this.j.gb=!1;this.eb=this.Ia=0;this.fb=a.csStart;this.Ra=a.csInterval;this.Sa=a.csStop;this.J=[];this.Tb=this.od.bind(this);F(this)}z(pc);var qc=["power","reset"];h=pc.prototype; +h.ia=function(a,b,c,d){this.l=a;this.g=b;this.F=d;this.A=a.A;for(b=0;b=a.Ia&&(a.Ia+=a.Ra,c=!0);0<=a.Sa&&a.Sa<=uc(a)&&(a.Ra=a.Sa=-1,tc(a),G(a),c=!0);c&&a.T(uc(a)+" cycles: checksum="+m(a.eb))}} +h.Z=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.o[b]=c,!0;case "run":return this.o[b]=c,c.onclick=function(){var a;if(a=d.l)if(a=d.l,a.j.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.pa/a.Ha&&(b=1);a.sa=b;b=a.xb*a.sa;if(a.Ha!=b){a.Ha=b;b=a.Ha.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.l&&xc(a.l)}ob(a,a.aa);a.aa=0;a.$=ra();a.qa=0;wc(a)}function Rb(a,b){var c=a.J.length;a.J.push([-1,b]);return c}function Tb(a,b,c,d){0<=b&&ba.J[b][0])&&(c=a.hb*a.sa/1E3*c|0,a.j.P&&(c+=yc(a)),a.J[b][0]=c)} +function nb(a,b){for(var c=a.J.length-1;0<=c;c--){var d=a.J[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function yc(a,b){var c=a.ra-=a.a;a.a=a.I=0;b&&(a.ra=0);return c} +h.od=function(){if(this.j.P){this.yb>=this.hb&&wc(this,!0);this.Ua=0;this.cb=ra();if(this.qa){var a=this.cb-this.qa;a>this.Qb&&(this.$+=a,this.$>this.cb&&(this.$=this.cb))}try{do{for(var b,c=this.j.gb?1:this.ib,d=this.J.length-1;0<=d;d--){var e=this.J[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.ob(b)}catch(f){if("number"!=typeof f)throw f;}b=yc(this,!0);this.Ua+=b;this.aa+=b;pb(this,b);nb(this,b);this.Ta-=b;if(0>=this.Ta){this.Ta+=this.ib;15<=++this.Rb&&(this.xa(),this.Rb=0);break}}while(this.j.P)}catch(f){G(this); +this.l&&this.l.stop(ra(),uc(this));Wa(this,f.stack||f.message);return}if(this.j.P){a=setTimeout;b=this.Tb;this.qa=ra();c=this.Qb;this.Ua&&(c=Math.round(c*this.Ua/this.ib));c-=this.qa-this.cb;if(d=this.qa-this.$)this.pa=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.ua=0,vc(this));if(0>c||this.pac&&(this.$-=c),c=0;this.yb+=this.Ua;this.qa+=c;a(b,c)}}}; +function mb(a){var b;a.j.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.j.P)a.T(a.toString()+" busy");else{vc(a);a.j.P=!0;a.j.Eb=!0;if(b=a.o.run)b.textContent="Halt";a.l&&a.l.start(a.$,uc(a));setTimeout(a.Tb,0)}}h.ob=function(){return 0};function G(a){var b=!1;if(a.j.P){yc(a);ob(a,a.aa);a.aa=0;a.j.P=!1;if(b=a.o.run)b.textContent="Run";a.l&&a.l.stop(ra(),uc(a));b=!0}a.j.complete=void 0;return b} +function zc(a){this.La=+a.model||1170;this.Mb=a.addrReset||0;pc.call(this,a,6666667);this.decode=1120==this.La?Ac.bind(this):Bc.bind(this);Cc(this);this.ta=0;this.N=null;this.j.complete=!1}z(zc,pc);h=zc.prototype;h.reset=function(){this.status("model "+this.La);this.j.P&&G(this);Cc(this);sc(this);this.j.error=!1;this.parent.reset.call(this)}; +function Cc(a){a.m=65536;a.f=32768;a.i=65535;a.s=32768;a.B=15;a.h=[0,0,0,0,0,0,0,a.Mb];a.Ga=[0,0,0,0,0,0];a.na=[0,0,0,0];a.v=0;a.ab=0;a.lc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]];a.X=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,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.$a=[0,0,0,0,0,0,0,0,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.Yb=[0,0,0,0,0,0,0,0];a.Xb=0;a.u=0;a.C=a.D=0;a.c=a.b=a.wb=0;a.Ja=-1;lb(a)}function lb(a){a.mb=255;a.ea=0;a.Db=0;a.w=0;a.Ca=0;a.Cb=0;a.Fa=0;a.Ba=0;a.bb=0;a.Pb=262143;a.N=null;a.g&&Xb(a)}function Xb(a){a.Ba?(a.R=65536,a.M=a.kc,a.V=a.ld,a.qb=a.de,Cb(a.g,a.Fa&16?22:18)):(a.R=0,a.M=a.jc,a.V=a.Wb,a.qb=a.cc,Cb(a.g,16))}h.Lb=function(){return 0};h.save=function(){var a=new O(this);a.set(0,[]);a.set(1,[this.ua,this.sa]);a.set(2,Ob(this.g));return a.data()}; +h.restore=function(a){var b=a[1];this.ua=b[1];vc(this,b[3]);a:{b=this.g;a=a[2];var c;for(c=0;c>14&3;c=a.B>>14&3;a.v!=c&&(a.na[c]=a.h[6],a.h[6]=a.na[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Fc(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Gc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Hc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Ic(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function K(a,b,c,d){if(!a.ta){var e=!1;0>a.Ja?a.Ja=Yb(a):a.v||(b=4,e=!0);a.w&57344||(a.Ca=63222,a.Cb=b);a.v=0;var f=a.V(b|a.R),g=a.V(b+2&65535|a.R);Zb(a,g&-12289|a.Ja>>2&12288);e&&(a.ea|=4,a.h[6]=4);Jc(a,a.Ja);Jc(a,a.h[7]);Q(a,f);a.u&=~c;a.Ja=-1;a.u|=8;if(-18!=d)throw b;}}function Kc(a){var b=Lc(a),c=Lc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);Q(a,b);Zb(a,c);a.u&=-17} +function Lb(a,b){var c=b>>13&31;31>c&&a.Fa&32&&(b=a.$a[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} +function Mc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Fa&a.lc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.X[a.v][d]<<6)+(b&8191)&a.Pb;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.H[a.v][d]=e;if(4194170!==f||a.v)a.bb=a.v,a.ab=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.bb<<5|a.ab<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Gb(b&a.l,c&255,b)}function Lc(a){var b=a.V(a.h[6]|a.R);a.h[6]=a.h[6]+2&65535;return b}function Jc(a,b){var c=a.h[6]-2&65535;a.h[6]=c;a.w&57344||(a.Ca=a.Ca<<8|246);Oc(a,0,c);a.qb(c,b)} +function Oc(a,b,c){a.v||a.u&64||!(c<=a.mb&&(b||4c&&d&1&&(f=1));a.a-=3;break;case 3:f=2;e=a.h[c];7!=c&&(e|=g);e=a.V(e);e|=g;a.a-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.h[c]+f&65535;7!=c&&(e|=g);a.a-=4;break;case 5:f=-2;e=a.h[c]-2&65535;7!=c&&(e|=g);e=a.V(e)|g;a.a-=8;break;case 6:return e=a.V(Ec(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.V(Ec(a,2)),e=e+a.h[c]& +65535,e=a.V(e|a.R)|g,a.a-=10,e}a.h[c]=a.h[c]+f&65535;!g||a.w&57344||(a.Ca=a.Ca<<8|f<<3&248|c);6==c&&0>f&&Oc(a,b,a.h[6]);return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ta++;a=this.Wb(Mc(this,a,2));this.ta--;return a};h.Za=function(a,b){this.Ba?(this.ta++,Nc(this,Mc(this,a,5),b),this.ta--):this.g.Za(a,b)};h.nb=function(a,b){this.Ba?(this.ta++,this.cc(Mc(this,a,4),b),this.ta--):this.g.nb(a,b)};h.jc=function(a,b,c){return Pc(this,a,b,c)}; +h.kc=function(a,b,c){return Mc(this,Pc(this,a,b,c),c)};h.Wb=function(a){return Mb(this.g,a)};h.ld=function(a){return Mb(this.g,Mc(this,a,2))};h.cc=function(a,b){Nb(this.g,a,b&65535)};h.de=function(a,b){Nb(this.g,Mc(this,a,4),b)};function Qc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Pc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.V(d|c&a.R),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.na[a.B>>12&3];return c} +function Rc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Pc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Mc(a,e|c&65536,4),a.v=a.B>>14&3,Nb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.na[a.B>>12&3]=d}function Sc(a,b){b>>=6;var c=a.D=b&7;(b=a.C=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Tc(a,b){b>>=6;var c=a.D=b&7;return(b=a.C=(b&56)>>3)?Mb(a.g,a.M(b,c,2)):a.h[c]}function Uc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Pc(a,b,c,8)} +function Vc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.M(b,c,3),a=Kb(a.g,c)):a=a.h[c]&255;return a}function Wc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Mb(a.g,a.M(b,c,2)):a.h[c]}function S(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.wb=a.M(b,e,7),Nc(a,e,d.call(a,c,Kb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e]&255)}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.M(b,e,6),Nb(a.g,e,d.call(a,c,Mb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])} +function Xc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Nc(a,a.M(b,e,5),c):a.h[e]=c?a.h[e]&~d|c<<24>>24&d:a.h[e]&~d;return c}function Yc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Nb(a.g,a.M(b,d,4),c):a.h[d]=c&65535;return c}function V(a,b,c){c&&(Q(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.ob=function(a){this.j.complete=!0;var b=a?this.j.Eb?0:1:-1;this.j.Eb=!1;this.ra=this.a=a;do{if(this.u){this.u&112&&(this.u&32?K(this,168,32,-7):this.u&16?K(this,12,16,-9):this.u&64&&K(this,4,64,-8));if(a=this.u&7){a=!1;if(this.u&2){this.u&=-3;var c=160,d=(this.Db&224)>>5,e=this.N&&this.N.Ma>d?this.N:null;e&&(c=e.qd,d=e.Ma);d>(this.B&224)>>5?(this.u&4&&(Ec(this,2),this.u&=-5),K(this,c,0,-18),d=!0):d=!1;if(d){if(e)if(a=e,e=this.N,e==a)this.N=a.next;else for(;e;){d=e.next;if(d==a){e.next=d.next;break}e= +d}a=!0}}else this.u&1&&this.u++;a=a&&0>b}if(a)break}this.u=this.u&7|this.B&16;this.decode(Dc(this))}while(0>1|b<<16;Hc(this,a);return a&65535}function dd(a,b){a=b&128|b>>1|b<<8;Hc(this,a<<8);return a&255}function ed(a,b){a=b&~a;R(this,a);return a}function fd(a,b){a=b&~a;R(this,a<<8);return a}function gd(a,b){a|=b;R(this,a);return a}function hd(a,b){a|=b;R(this,a<<8);return a}function id(a,b){a=~b|65536;Fc(this,a);return a&65535}function jd(a,b){a=~b|256;Fc(this,a<<8);return a&255} +function kd(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function ld(a,b){a=b-a;var c=a<<8;b<<=8;this.u&128||(this.s=this.i=c,this.f=b&(b^c));return a&255}function md(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function nd(a,b){a=b+a;var c=a<<8;this.u&128||(this.s=this.i=c,this.f=c&(b<<8^c));return a&255}function od(a,b){a=-b;Fc(this,a,a&b&32768);return a&65535}function pd(a,b){a=-b;Fc(this,a<<8,(a&b&128)<<8);return a&255} +function qd(a,b){a=b<<1|this.m>>16&1;Hc(this,a);return a&65535}function rd(a,b){a=b<<1|this.m>>16&1;Hc(this,a<<8);return a&255}function sd(a,b){a=(this.m&65536|b)>>1|b<<16;Hc(this,a);return a&65535}function td(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Hc(this,a<<8);return a&255}function ud(a,b){var c=b-a;Ic(this,c,a,b);return c&65535}function vd(a,b){var c=b-a;Ic(this,c<<8,a<<8,b<<8);return c&255}function wd(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} +function xd(a,b){a^=b;R(this,a);return a&65535}function yd(a){T(this,a,Tc(this,a),Zc);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function zd(a){var b=Wc(this,a);a=a>>6&7;var c=this.h[a];c&32768&&(c|=4294901760);this.m=this.f=0;b&=63;if(b&32)b=64-b,16>=b;else if(b)if(16>15&65535;d&&65535!==d&&(this.f=32768)}this.h[a]=c&65535;this.s=this.i=c;this.a-=(this.c?6:7)+b} +function Ad(a){var b=Wc(this,a);a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&=63;if(b&32){b=64-b;32>b-1;this.m=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.h[a|1]=d&65535;this.s=d>>16;this.i=d>>16|d;this.a-=(this.c?6:7)+b}function Bd(a){V(this,a,!P(this))}function Cd(a){V(this,a,P(this))} +function Dd(a){T(this,a,Tc(this,a),ed);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Ed(a){S(this,a,Sc(this,a),fd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Fd(a){T(this,a,Tc(this,a),gd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}function Gd(a){S(this,a,Sc(this,a),hd);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)} +function Hd(a){R(this,Tc(this,a)&Wc(this,a));this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Id(a){R(this,(Sc(this,a)&Vc(this,a))<<8);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Jd(a){V(this,a,this.i&65535?0:4)}function Kd(a){V(this,a,!this.Aa()==!(this.f&32768))}function Ld(a){V(this,a,!!(this.i&65535)&&!this.Aa()==!(this.f&32768))}function Md(a){V(this,a,!P(this)&&!!(this.i&65535))} +function Nd(a){V(this,a,(this.i&65535?0:4)||!this.Aa()!=!(this.f&32768))}function Od(a){V(this,a,P(this)||(this.i&65535?0:4))}function Pd(a){V(this,a,!this.Aa()!=!(this.f&32768))}function Qd(a){V(this,a,this.Aa())}function Rd(a){V(this,a,!!(this.i&65535))}function Sd(a){V(this,a,!this.Aa())}function Td(){K(this,12,0,-1);this.a-=5}function Ud(a){V(this,a,!0)}function Vd(a){V(this,a,!(this.f&32768))}function Wd(a){V(this,a,this.f&32768?2:0)} +function W(a){a&1&&(this.m=0);a&2&&(this.f=0);a&4&&(this.i=1);a&8&&(this.s=0);this.a-=5}function Xd(a){var b=Tc(this,a);a=Wc(this,a);Ic(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)}function Yd(a){var b=Sc(this,a)<<8;a=Vc(this,a)<<8;Ic(this,b-a,a,b);this.a-=this.c?4+(this.D&&6<=this.b?1:0):(this.C?4:3)+(7==this.b?2:0)} +function Zd(a){var b=Wc(this,a);if(b){a=a>>6&7;var c=this.h[a]<<16|this.h[a|1];this.m=this.f=0;b&32768&&(b|=-65536);var d=~~(c/b);-32768<=d&&32767>=d?(this.h[a]=d&65535,this.h[a|1]=c-d*b&65535,this.i=d>>16|d,this.s=d>>16):(this.f=32768,this.i=d>>15|d,this.s=c>>16,-1===b&&65534===this.h[a]&&(this.h[a]=this.h[a|1]=1));this.a-=53}else this.i=this.s=0,this.f=32768,this.m=65536,this.a-=7}function $d(){K(this,24,0,-2);this.a-=25} +function ae(){this.B&49152?(this.ea|=128,K(this,4,0,-3)):(this.A&&this.A.setData(this.h[0],!0),this.F?this.F.b():G(this));this.a-=7}function be(){K(this,16,0,-4);this.a-=25}var ce=[0,7,7,10,7,11,9,13];function de(a){this.I=this.a;Q(this,Uc(this,a));this.a=this.I-ce[this.c]}var ee=[0,14,14,17,14,18,16,20];function fe(a){this.I=this.a;var b=Uc(this,a);a=a>>6&7;Jc(this,this.h[a]);this.h[a]=this.h[7];Q(this,b);this.a=this.I-ee[this.c]}var ge=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function he(a){var b=Tc(this,a);this.I=this.a;R(this,Yc(this,a,b));this.a=this.I-ge[(this.C?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ie(a){var b=Sc(this,a);R(this,Xc(this,a,b,65535)<<8);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)}var je=[7,13,13,17,14,18,17,21]; +function ke(a){var b=Wc(this,a);a=a>>6&7;b&32768&&(b|=-65536);var c=this.h[a];c&32768&&(c|=-65536);b=~~(b*c);this.h[a]=b>>16&65535;this.h[a|1]=b&65535;this.u&128||(this.s=b>>16,this.i=this.s|b,this.f=0,this.m=-32768>b||32767>6;if(this.h[b]=this.h[b]-1&65535)Q(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function qe(a){T(this,a,Tc(this,a),ud);this.a-=this.c?9+(this.D&&6<=this.b?1:0):(this.C?5:3)+(7==this.b?2:0)} +function re(a){T(this,a,0,wd);this.a-=this.c?9:3+(7==this.b?2:0)}function se(){K(this,28,0,-5);this.a-=5}function te(){this.A&&(this.A.da=this.h[7],this.A.setData(this.h[0],!0));this.u|=4;Ec(this,-2);this.a-=3}function ue(a){T(this,a,Tc(this,a),xd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,0,-6)}function Ac(a){ve[a>>12].call(this,a)}function we(a){xe[a>>6&3].call(this,a)}function ye(a){ze[a>>6&3].call(this,a)}function Ae(a){Be[a>>6&3].call(this,a)} +function Ce(a){De[a&15].call(this,a)}function Ee(a){Fe[a&15].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)}function Ke(a){Le[a>>6&3].call(this,a)} +var ve=[function(a){Me[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,Y,function(a){Ne[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Me=[function(a){Pe[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,Y,Y,Y],xe=[function(a){Fc(this,Yc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,id);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,md);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0, +od);this.a-=this.c?11:6},function(a){T(this,a,P(this)?1:0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,P(this)?1:0,ud);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Wc(this,a);Fc(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],Be=[function(a){T(this,a,0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,cd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)}], +Pe=[function(a){Qe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,Y,Ce,Ee,re,re,re,re],Qe=[ae,te,ne,Td,be,me,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],De=[le,function(){this.m=0;this.a-=5},function(){this.f=0;this.a-=5},W,function(){this.i=1;this.a-=5},W,W,W,function(){this.s=0;this.a-=5},W,W,W,W,W,W,W],Fe=[le,function(){this.m=65536;this.a-=5},function(){this.f=32768;this.a-=5},X,function(){this.i=0;this.a-=5},X,X,X,function(){this.s=32768;this.a-=5},X,X,X,X,X,X,X],Ne=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se,Ge,Ie,Ke,Y,Y,Y],He=[function(a){Fc(this, +Xc(this,a,0,255));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,jd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,nd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,1,ld);this.a-=this.c?9:3+(7==this.b?2:0)}],Je=[function(a){S(this,a,0,pd);this.a-=this.c?11:6},function(a){S(this,a,P(this)?1:0,$c);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,P(this)?1:0,vd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Vc(this,a);Fc(this,a<<8);this.a-=this.c?4:3+(7== +this.b?2:0)}],Le=[function(a){S(this,a,0,td);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,rd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,dd);this.a-=this.c?9+(this.wb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9:3+(7==this.b?2:0)}];function Bc(a){Re[a>>12].call(this,a)} +var Re=[function(a){Se[a>>8&15].call(this,a)},he,Xd,Hd,Dd,Fd,yd,function(a){Te[a>>8&15].call(this,a)},function(a){Ue[a>>8&15].call(this,a)},ie,Yd,Id,Ed,Gd,qe,Y],Se=[function(a){Ve[a>>4&15].call(this,a)},Ud,Rd,Jd,Kd,Pd,Ld,Nd,fe,fe,we,ye,Ae,function(a){We[a>>6&3].call(this,a)},Y,Y],We=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.V(a|this.R);Q(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Qc(this,a,0);Jc(this,a);R(this,a);this.a-=11},function(a){var b=Lc(this);this.I= +this.a;Rc(this,a,0,b);R(this,b);this.a=this.I-je[this.c]},function(a){R(this,Yc(this,a,this.Aa?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Ve=[function(a){Xe[a&15].call(this,a)},Y,Y,Y,de,de,de,de,oe,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):K(this,8,0,-6)},Ce,Ee,re,re,re,re],Xe=[ae,te,ne,Td,be,me,function(){Kc(this);this.a-=13},function(){K(this,8,0,-6)},Y,Y,Y,Y,Y,Y,Y,Y],Te=[ke,ke,Zd,Zd,zd,zd,Ad,Ad,ue,ue,Y,Y,Y,Y,pe,pe],Ue=[Sd,Qd,Md,Od,Vd,Wd,Bd,Cd,$d,se, +Ge,Ie,Ke,function(a){Ye[a>>6&3].call(this,a)},Y,Y],Ye=[Y,function(a){a=Qc(this,a,65536);Jc(this,a);R(this,a);this.a-=11},function(a){var b=Lc(this);this.I=this.a;Rc(this,a,65536,b);R(this,b);this.a=this.I-je[this.c]},Y]; +function Ze(a){x.call(this,"ROM",a,Ze);this.W=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.l=a.file;this.s=q(this.l);if(this.l){a=this.l;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.l+"&format=bytes&decimal=true");var c=this;r(a,null,!0,function(a,b,f){f?(c.G("Unable to load ROM resource (error "+f+": "+a+")"),c.l=null):(Ra(c.oa,a,b),(a=ta(a,b))?(c.c=a.K,c.W=a.W):c.l=null);$e(c)})}}z(Ze);h=Ze.prototype; +h.ia=function(a,b,c,d){this.g=b;this.a=c;this.F=d;$e(this)};h.ka=function(){this.W&&(this.F&&this.F.a(this.id,this.i,this.b,this.W),delete this.W);return!0};h.ja=function(){return!0}; +function $e(a){if(!Va(a)){if(a.l){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Wa(a,"ROM size ("+m(a.c.length,8,!0)+") does not match specified size ("+m(a.b,8,!0)+")");else{var b;a:{b=a.i;a.status(a.b+"-byte ROM at "+ka(b));if(57344<=b&&b<57344+H){var c={};b=(c[b]=[Ze.prototype.Zc,Ze.prototype.Sd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.ya)){b=a.m=!0;break a}}else if(Fb(a.g,b,a.b,fc)){for(c=0;c>>a.c;0=b.length)break;for(var k=k+2,n=b[k++]&255|(b[k++]&255)<<8,p=b[k++]&255|(b[k++]&255)<<8,l=l+((n&255)+(n>>8)+(p&255)+(p>>8)),u=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Za(p++,b[u++]&255);else p&1?G(a.a):null==d&&(d=p);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(g=0;g=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Sb(e.a,e.$))});this.aa=Ub(52,4);this.N=Rb(this.a,function(){e.c|=128;e.c&64&&Sb(e.a,e.aa)});cb(b,this,ff);F(this)}; h.Nb=function(){if(!this.v){var a=rc(this.l,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.ya)return;b=pa(b[1]);if(this.v=Sa(b)){var d=this.v.exports;if(d){var e=d.connect;e&&e.call(this.v);if(this.A=d.receiveData){this.status(this.oa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Nb(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; -h.ja=function(a){return a?this.save():!0};h.reset=function(){ff(this)};h.save=function(){var a=new O(this);a.set(0,[]);return a.data()};h.restore=function(){return ff(this)};function ff(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.Bb=function(a){if("number"==typeof a)this.i.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.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.F&&!this.s&&c&&(b=String.fromCharCode(this.F)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.U(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Tb(this.a,this.O,1E3/Math.round(this.I/10))}};var gf={},ef=(gf[65392]=[null,null,Z.prototype.Tc,Z.prototype.Md,"RCSR"],gf[65394]=[null,null,Z.prototype.Sc,Z.prototype.Ld,"RBUF"],gf[65396]=[null,null,Z.prototype.nd,Z.prototype.fe,"XCSR"],gf[65398]=[null,null,Z.prototype.md,Z.prototype.ee,"XBUF"],gf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= -d.o.listTapes;a&&kf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.F){c.parentNode.removeChild(c);break}this.o[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;kf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ia=function(a,b,c,d){this.l=a;this.h=b;this.a=c;this.D=d;this.J=lf(a);var e=this;if((this.c=rc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Ub(56,4);this.S=Rb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.P;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.oa,e,f),(e=ta(e,f))&&uf(a,b,c,d,e.K,e.ga,e.fa)); -a.j.Fa=!1;a.m&&(a.m--,a.m||F(a));rf(a)})}function of(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var 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.vb?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){Bf(a,b,c,d)})} -function Bf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.P;if(d)a.controller.G('Unable to load disk "'+a.wa+'" (error '+d+": "+b+")",f);else{Ra(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)t(k[0]);else{a.V=k.length;a.Z=k[0].length;a.T=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 u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var D=n<<2,U=w.length;U>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.ca?f=a.la+a.ca&&(a.ca+=f-(a.la+a.ca)+1):(a.la=f,a.ca=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ -b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.wa+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Df(this,a++);)Ff(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; -function Ff(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Aa("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; -h.$=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){t("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Gf(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Hf(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.da){var b;b="";for(var c=0,k;k=Df(a,c++);)for(var l=0,n=k.length;l":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.J||8,c=a-this.s%a,this.J&&(b=" ".slice(0,c)));this.D&&!this.s&&c&&(b=String.fromCharCode(this.D)+b);this.f.value+=b;this.f.scrollTop=this.f.scrollHeight;this.s+=c}else if(null!=this.m){if(10==a||1024<=this.m.length)this.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Tb(this.a,this.N,1E3/Math.round(this.I/10))}};var hf={},ff=(hf[65392]=[null,null,Z.prototype.Tc,Z.prototype.Md,"RCSR"],hf[65394]=[null,null,Z.prototype.Sc,Z.prototype.Ld,"RBUF"],hf[65396]=[null,null,Z.prototype.nd,Z.prototype.fe,"XCSR"],hf[65398]=[null,null,Z.prototype.md,Z.prototype.ee,"XBUF"],hf);Ga(function(){for(var a=E(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.o[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.o[b]=c,c.onclick=function(){var a= +d.o.listTapes;a&&lf(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.D){c.parentNode.removeChild(c);break}this.o[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;lf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ia=function(a,b,c,d){this.l=a;this.g=b;this.a=c;this.F=d;this.J=mf(a);var e=this;if((this.c=rc(this.l,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){t("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.M=Ub(56,4);this.R=Rb(this.a,function(){1==(e.b&32769)&&!(e.b&128)&&e.wc.indexOf("/api/v1/dump")&&(e=la(c),f="json"==e||"gz"==e?encodeURI(c):v()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.l&&!a.l.j.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Ra(a.oa,e,f),(e=ta(e,f))&&vf(a,b,c,d,e.K,e.ga,e.fa)); +a.j.Ea=!1;a.m&&(a.m--,a.m||F(a));sf(a)})}function pf(a,b,c,d){if((a=a.o.listTapes)&&a.options){for(var e=0;e>2;var f=e=0,b=new DataView(b,0,d);a.a=Array(a.U);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.vb?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){Cf(a,b,c,d)})} +function Cf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.l&&!a.l.j.O;if(d)a.controller.G('Unable to load disk "'+a.wa+'" (error '+d+": "+b+")",f);else{Ra(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)t(k[0]);else{a.U=k.length;a.Y=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 u=l.data;if(void 0===u){var w=l.bytes;if(void 0!==w&&w.length){for(var D=n<<2,U=w.length;U>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.la+a.ba&&(a.ba+=f-(a.la+a.ba)+1):(a.la=f,a.ba=1);d[f]=d[f]&~(255<g)break;e|=g<=this.a.length||l>=this.a[k].length||n>=this.a[k][l].length){c="sector (CHS="+k+":"+l+":"+n+") out of range ("+ +b+" changes applied)";b=-1;break}if(this.c){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(k=this.a[k][l][n]){for(l=k.data.length;lb&&-2!=b&&this.controller.G("Unable to restore disk '"+this.wa+": "+c);return b}; +h.toJSON=function(){var a;a=0;for(var b;b=Ef(this,a++);)Gf(b);a=JSON.stringify(this.a,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")}; +function Gf(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){x.call(this,"RL11",a,N);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Aa("Mobi")&&window&&"FileReader"in window}z(N);h=N.prototype; +h.Z=function(a,b,c){var d=this;switch(b){case "listDisks":return this.o[b]=c,c.onchange=function(){var a=d.o.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(k){t("RL11 option error: "+k.message)}b=g.desc;void 0===b&&(b="");g=g.href;void 0!==g&&(b=''+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Hf(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&If(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.A){c.parentNode.removeChild(c);break}this.o[b]=c;c.onclick=function(){var a=d.o.listDrives;if(a&&a.options&&d.b)if(a=d.b[ja(a.value)||0])if(a=a.ca){var b;b="";for(var c=0,k;k=Ef(a,c++);)for(var l=0,n=k.length;lb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Gf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){If(this)};h.save=function(){return(new O(this)).data()}; -h.restore=function(a){return If(this,a[0])};function Lf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('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=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Nf(a,e,b,c,!1,d)}else Mf(a,e)} -function Nf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Mf(a,b,!0),k.ub?a.G("RL11 busy"):(k.ub=!0,e&&(k.tb=!0,a.s++),k.kb=!!f,Af(new wf(a,k,"preload"),c,d,f,a.gc)&&g++));return g} -h.gc=function(a,b,c,d,e){var f;a.ub=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.V||f[1]>a.Z)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.da=b,a.wa=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.tb||e),this.l&&xc(this.l)):a.kb=!1;a.tb&&(a.tb=!1,--this.s||F(this));Gf(this,a.zb)}; -function Kf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;eb;b++){var c=document.createElement("option");c.value=b;c.text="RL"+b;a.appendChild(c)}a.value="0";Hf(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Jf(this)};h.save=function(){return(new O(this)).data()}; +h.restore=function(a){return Jf(this,a[0])};function Mf(a,b){b||(a.s=0);if(a.f)for(var c in a.f){var d=a.f[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.o.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.b.length)a.G("Unable to load the selected drive");else if(c)if("?"==c)a.G('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=q(c);a.status("Attempting to load "+c+' as "'+b+'"')}Of(a,e,b,c,!1,d)}else Nf(a,e)} +function Of(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Da.toLowerCase()!=d.toLowerCase()&&(g++,Nf(a,b,!0),k.ub?a.G("RL11 busy"):(k.ub=!0,e&&(k.tb=!0,a.s++),k.jb=!!f,Bf(new xf(a,k,"preload"),c,d,f,a.gc)&&g++));return g} +h.gc=function(a,b,c,d,e){var f;a.ub=!1;b&&(f=b.a.length?[b.a.length,b.a[0].length,b.a[0][0].length,b.a[0][0][0].length]:[0,0,0,0],b&&f[0]>a.U||f[1]>a.Y)&&(this.G('Disk "'+c+'" too large for drive '+("RL"+a.zb)),b=null);b?(a.ca=b,a.wa=c,a.Da=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.zb),a.tb||e),this.l&&xc(this.l)):a.jb=!1;a.tb&&(a.tb=!1,--this.s||F(this));Hf(this,a.zb)}; +function Lf(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e>12&48;this.w=f>>16&63;this.i=this.c=b<<7|(c?64:0)|d&63;this.m=65536-e&65535;a&&(this.L=this.L|a|32768);return!0}; -h.zc=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){if(!n){n=a.da.seek(b,c,d+1);if(!n){k=5120;break}p=0}var u,w;if(0>(u=a.da.read(n,p++))||0>(w=a.da.read(n,p++))){k=5120;break}Nb(this.h,f,u|w<<8);if(Qb(this.h)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.ud=function(a,b,c,d,e,f,g){var k=0,l=a.da,n=null,p;l||(k=5120,e=0);for(;e--;){var u=Mb(this.h,f);if(Qb(this.h)){k=8192;break}f+=2;if(!n){n=a.da.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.da.write(n,p++,u&255)||!a.da.write(n,p++,u>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.T&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Wc=function(){return this.L&65535}; -h.Pd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.zc;case 10:b||(b=this.ud),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.V||f>=c.T?this.L|=37888:(g=(this.w& -63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.hc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.F))}};h.Uc=function(){return this.v};h.Nd=function(a){this.v=a&65534};h.Xc=function(){return this.c};h.Qd=function(a){this.c=a};h.Yc=function(){return this.m};h.Rd=function(a){this.m=a};h.Vc=function(){return this.w};h.Od=function(a){this.w=a&63}; -var Of={},Jf=(Of[63744]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLCS"],Of[63746]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLBA"],Of[63748]=[null,null,N.prototype.Xc,N.prototype.Qd,"RLDA"],Of[63750]=[null,null,N.prototype.Yc,N.prototype.Rd,"RLMP"],Of[63752]=[null,null,N.prototype.Vc,N.prototype.Od,"RLBE"],Of); -function Pf(a,b,c){x.call(this,"Computer",a,Pf);this.j.P=!1;Qf(this,b);this.w=rc(this,"autoPower",a);this.l=0;this.N=a.busWidth||a.buswidth;this.b=Rf;this.s=null;this.i=this.F=!1;this.O=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Sf(this);if(this.a=Ta("CPU",this.id)){this.D=Ta("Debugger",this.id);this.h=new vb({id:this.oa+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.I=Ta("Panel",this.id))&&this.I.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.U("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bRf){if(Tf(d,this.s)){this.f=new O(this,"1.30.3","failsafe");Tf(this.f)&&(Yf(this,d),a=2,Zf(this.f));this.f.set("timestamp",sa());$f(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Xf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Tf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.U(f+": "+g),Zf(d),Tf(d)?(c=Xf(d),e=!0):c=!1))}e&&Wf(this,c?d:null)}else 2==a&&d.clear()}else Wf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.S=!0;this.j.P=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(ag(this,this.a,b,c,a),this.xa(),this.a.Va());this.C&&(Yf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; -function Yf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.O;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function cg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.P=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Nb(this.g,f,u|w<<8);if(Qb(this.g)){k=8192;break}f+=2;if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.ud=function(a,b,c,d,e,f,g){var k=0,l=a.ca,n=null,p;l||(k=5120,e=0);for(;e--;){var u=Mb(this.g,f);if(Qb(this.g)){k=8192;break}f+=2;if(!n){n=a.ca.seek(b,c,d+1,!0);if(!n){k=5120;break}p=0}if(!a.ca.write(n,p++,u&255)||!a.ca.write(n,p++,u>>8)){k=5120;break}if(p>=l.ha&&(n=null,++d>=l.S&&(d=0,++c>=l.Y&&(c=0,++b>=l.U)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Wc=function(){return this.L&65535}; +h.Pd=function(a){this.L=this.L&-1023|a&1022;this.C=this.C&-4|(a&48)>>4;if(!(this.L&128)){var b;a=!0;var c=this.b[(this.L&768)>>8],d,e,f,g;this.L&=-2;switch(this.L&14){case 4:this.c&8&&(this.L&=63);this.m=c.status|this.i&64;break;case 6:1==(this.c&3)&&(b=this.c&65408,c=(this.c&16)<<2,this.i=this.c&4?this.i+b:this.i-b,this.c=this.i=this.i&65408|c);break;case 8:this.m=this.i;break;case 12:b=this.zc;case 10:b||(b=this.ud),d=this.c>>7,e=this.c&64?1:0,f=this.c&63,d>=c.U||f>=c.S?this.L|=37888:(g=(this.w& +63)<<16|this.v,a=65536-this.m&65535,a=b.call(this,c,d,e,f,a,g,this.hc.bind(this)))}a&&(this.L|=129,this.L&64&&Sb(this.a,this.D))}};h.Uc=function(){return this.v};h.Nd=function(a){this.v=a&65534};h.Xc=function(){return this.c};h.Qd=function(a){this.c=a};h.Yc=function(){return this.m};h.Rd=function(a){this.m=a};h.Vc=function(){return this.w};h.Od=function(a){this.w=a&63}; +var Pf={},Kf=(Pf[63744]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLCS"],Pf[63746]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLBA"],Pf[63748]=[null,null,N.prototype.Xc,N.prototype.Qd,"RLDA"],Pf[63750]=[null,null,N.prototype.Yc,N.prototype.Rd,"RLMP"],Pf[63752]=[null,null,N.prototype.Vc,N.prototype.Od,"RLBE"],Pf); +function Qf(a,b,c){x.call(this,"Computer",a,Qf);this.j.O=!1;Rf(this,b);this.w=rc(this,"autoPower",a);this.l=0;this.M=a.busWidth||a.buswidth;this.b=Sf;this.s=null;this.i=this.I=!1;this.N=rc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Tf(this);if(this.a=Ta("CPU",this.id)){this.F=Ta("Debugger",this.id);this.g=new vb({id:this.oa+".bus",busWidth:this.M},this.a,this.F);var d,e=A(this.id);if((this.A=Ta("Panel",this.id))&&this.A.Wa)for(b=0;b\nLicense: GPL version 3 or later ");this.T("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;bSf){if(Uf(d,this.s)){this.f=new O(this,"1.30.3","failsafe");Uf(this.f)&&(Zf(this,d),a=2,$f(this.f));this.f.set("timestamp",sa());ag(this.f);var e=this.b&&!this.i;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Yf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Uf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(za("user",""),this.c=null)):this.T(f+": "+g),$f(d),Uf(d)?(c=Yf(d),e=!0):c=!1))}e&&Xf(this,c?d:null)}else 2==a&&d.clear()}else Xf(this);delete this.s;delete this.v}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.j.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(bg(this,this.a,b,c,a),this.xa(),this.a.Va());this.D&&(Zf(this,b),b.clear());!c&&this.f&&(this.f.clear(),delete this.f);this.l=0}; +function Zf(a,b){if(ua("There may be a problem with your PDPjs machine.\n\nTo help us diagnose it, click OK to send this PDPjs machine state to http://www.pcjs.org.")){var c=a.c||"";b=b.toString();var d={app:"PDPjs",ver:"1.30.3"};d.url=a.N;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function dg(a,b,c){var d,e="none";if(a.l)return null;a.l--;var f=new O(a,"1.30.3"),g=new O(a,"1.30.3","validate"),k=sa();g.set("timestamp",k);f.set("timestamp",k);f.set("version","1.30.3");f.set("url",window?window.location.href:null);f.set("browser",window?window.navigator.userAgent:"");a.a&&a.a.ja&&(c&&G(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.j.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(var e=0;ef.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/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, -"");a=a.replace(d[0],g);jg(a,b,c)}})}else c(a,null)} -function kg(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--gg||Ia(!0));l=!1}var g,k,l=!0;gg++;Qa[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| -(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?hg(c,null,null,!1,e,function(d,l){l?(Ra(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--gg||Ia(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--gg||Ia(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?hg(b,a,d,!0,e,n):ig(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ia(!1);return kg(a,b,c,d)};window.enableEvents=Ia;window.sendEvent=Ja;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map +h.xa=function(a){if(this.a){var b=this.a,c=b.o.speed;c&&(c.textContent=b.j.P&&b.pa?b.pa.toFixed(2)+"Mhz":"Stopped")}if(this.A&&(b=this.A,b.s)){var c=b.a.j.P,d=!!(b.a.u&4);if(!(0(b.w+=a))){for(var e=0;ef.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/g.exec(a)){var e=d[2];b("Loading "+e+"...");r(e,null,!0,function(f,g,k){if(k||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+k+")");else{if(f=d[3])if(k=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=k[0],n,p=/( [a-z]+=)(['"])(.*?)\2/g;n=p.exec(f);)l=0>l.indexOf(n[1])?l.replace(">",n[0]+">"):l.replace(new RegExp(n[1]+"(['\"])(.*?)\\1"),n[0]);k[0]!=l&&(g=g.replace(k[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, +"");a=a.replace(d[0],g);kg(a,b,c)}})}else c(a,null)} +function lg(a,b,c,d){function e(a){if(void 0===k){var b=g&&E(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--hg||Ia(!0));l=!1}var g,k,l=!0;hg++;Qa[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css";u.styleSheet?u.styleSheet.cssText=n:u.appendChild(document.createTextNode(n));p.appendChild(u)}c|| +(c="/versions/pdpjs/1.30.3/components.xsl");n=function(d,k){k?ig(c,null,null,!1,e,function(d,l){l?(Ra(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--hg||Ia(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(k,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--hg||Ia(!0)):f("invalid machine element: "+ +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?ig(b,a,d,!0,e,n):jg(b,null,a,d,!1,e,n)}else f("missing machine element: "+a)}catch(w){f(w.message)}return l}window.embedPDP11=function(a,b,c,d){Ia(!1);return lg(a,b,c,d)};window.enableEvents=Ia;window.sendEvent=Ja;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map