From c67176eab0018720c4a620972fd03968495259cc Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 5 Nov 2016 12:01:56 -0700 Subject: [PATCH] Added the ability to install external ROMs (eg, M9312 ROM images) into the IOPAGE --- ...{BOOTSTRAP-16KB.lst => BOOTSTRAP-16KB.txt} | 0 apps/pdp11/boot/bootstrap/README.md | 4 +- .../monitor/{PDPJSMON.lst => PDPJSMON.txt} | 0 apps/pdp11/boot/monitor/README.md | 2 +- apps/pdp11/boot/monitor/makefile | 8 +- apps/pdp11/diags/cpu/{XCPA.lst => XCPA.txt} | 0 apps/pdp11/diags/cpu/makefile | 8 +- devices/pc8080/rom/vt100/README.md | 6 +- .../pc8080/rom/vt100/{VT100.lst => VT100.txt} | 0 devices/pdp11/machine/1170/panel/README.md | 80 ++++ .../machine/1170/panel/debugger/README.md | 16 +- .../machine/1170/panel/debugger/machine.xml | 1 + devices/pdp11/machine/1170/panel/machine.xml | 1 + devices/pdp11/rom/M9312/23-616F1.json | 35 ++ devices/pdp11/rom/M9312/23-616F1.mac | 259 +++++++++++++ devices/pdp11/rom/M9312/23-616F1.txt | 282 ++++++++++++++ devices/pdp11/rom/M9312/M9312.json | 34 ++ devices/pdp11/rom/M9312/README.md | 41 ++ devices/pdp11/rom/README.md | 2 +- modules/filedump/lib/filedump.js | 8 +- modules/pdp11/lib/bus.js | 21 +- modules/pdp11/lib/messages.js | 4 +- modules/pdp11/lib/rom.js | 71 +++- versions/pdpjs/1.30.3/pdp11-dbg.js | 252 ++++++------- versions/pdpjs/1.30.3/pdp11.js | 354 +++++++++--------- 25 files changed, 1143 insertions(+), 346 deletions(-) rename apps/pdp11/boot/bootstrap/{BOOTSTRAP-16KB.lst => BOOTSTRAP-16KB.txt} (100%) rename apps/pdp11/boot/monitor/{PDPJSMON.lst => PDPJSMON.txt} (100%) rename apps/pdp11/diags/cpu/{XCPA.lst => XCPA.txt} (100%) rename devices/pc8080/rom/vt100/{VT100.lst => VT100.txt} (100%) create mode 100644 devices/pdp11/rom/M9312/23-616F1.json create mode 100644 devices/pdp11/rom/M9312/23-616F1.mac create mode 100644 devices/pdp11/rom/M9312/23-616F1.txt create mode 100644 devices/pdp11/rom/M9312/M9312.json create mode 100644 devices/pdp11/rom/M9312/README.md diff --git a/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst b/apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.txt similarity index 100% rename from apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.lst rename to apps/pdp11/boot/bootstrap/BOOTSTRAP-16KB.txt diff --git a/apps/pdp11/boot/bootstrap/README.md b/apps/pdp11/boot/bootstrap/README.md index 1c951bb5b..dd00f6199 100644 --- a/apps/pdp11/boot/bootstrap/README.md +++ b/apps/pdp11/boot/bootstrap/README.md @@ -54,11 +54,11 @@ To run the above code, set the PC to 037744 and start the machine: Pre-loading DEC's Bootstrap Loader ---------------------------------- -I pasted the disassembled code (above) into a listing file, [BOOTSTRAP-16KB.lst](BOOTSTRAP-16KB.lst), +I pasted the disassembled code (above) into a listing file, [BOOTSTRAP-16KB.txt](BOOTSTRAP-16KB.txt), and then ran [FileDump](/modules/filedump) to produce a [BOOTSTRAP-16KB.json](BOOTSTRAP-16KB.json) that can be automatically pre-loaded into any machine: - filedump --file=BOOTSTRAP-16KB.lst --format=octal --output=BOOTSTRAP-16KB.json + filedump --file=BOOTSTRAP-16KB.txt --format=octal --output=BOOTSTRAP-16KB.json For example, this [PDP-11/20 Bootstrap Loader Demo](/devices/pdp11/machine/1120/bootstrap/debugger/) pre-loads the **Bootstrap Loader** using the `` component's optional *file* attribute: diff --git a/apps/pdp11/boot/monitor/PDPJSMON.lst b/apps/pdp11/boot/monitor/PDPJSMON.txt similarity index 100% rename from apps/pdp11/boot/monitor/PDPJSMON.lst rename to apps/pdp11/boot/monitor/PDPJSMON.txt diff --git a/apps/pdp11/boot/monitor/README.md b/apps/pdp11/boot/monitor/README.md index eb8d34ad5..363fd4d25 100644 --- a/apps/pdp11/boot/monitor/README.md +++ b/apps/pdp11/boot/monitor/README.md @@ -13,7 +13,7 @@ PDP-11 Boot Monitor [Paul Nankervis](mailto:paulnank@hotmail.com). It is used with all our PDP-11 test machines. [PDPJSMON.mac](PDPJSMON.mac) was cross-assembled with [MACRO11](https://github.com/shattered/macro11) to produce -[PDPJSMON.lst](PDPJSMON.lst), which was then processed by [FileDump](/modules/filedump/) to produce +[PDPJSMON.txt](PDPJSMON.txt), which was then processed by [FileDump](/modules/filedump/) to produce [PDPJSMON.json](PDPJSMON.json). To see the Boot Monitor in action, try the [PDP-11/70 Boot Monitor (with Debugger)](/devices/pdp11/machine/1170/monitor/debugger/). diff --git a/apps/pdp11/boot/monitor/makefile b/apps/pdp11/boot/monitor/makefile index de120c409..5a9085304 100644 --- a/apps/pdp11/boot/monitor/makefile +++ b/apps/pdp11/boot/monitor/makefile @@ -4,8 +4,8 @@ all: PDPJSMON.json -PDPJSMON.lst: PDPJSMON.mac - macro11 PDPJSMON.mac -l PDPJSMON.lst +PDPJSMON.txt: PDPJSMON.mac + macro11 PDPJSMON.mac -l PDPJSMON.txt -PDPJSMON.json: PDPJSMON.lst - node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.lst --format=octal --output=PDPJSMON.json --overwrite +PDPJSMON.json: PDPJSMON.txt + node ../../../../modules/filedump/bin/filedump --file=PDPJSMON.txt --format=octal --output=PDPJSMON.json --overwrite diff --git a/apps/pdp11/diags/cpu/XCPA.lst b/apps/pdp11/diags/cpu/XCPA.txt similarity index 100% rename from apps/pdp11/diags/cpu/XCPA.lst rename to apps/pdp11/diags/cpu/XCPA.txt diff --git a/apps/pdp11/diags/cpu/makefile b/apps/pdp11/diags/cpu/makefile index 407cdd6bb..005d13958 100644 --- a/apps/pdp11/diags/cpu/makefile +++ b/apps/pdp11/diags/cpu/makefile @@ -4,8 +4,8 @@ all: XCPA.json -XCPA.lst: XCPA.mac - macro11 XCPA.mac -l XCPA.lst +XCPA.txt: XCPA.mac + macro11 XCPA.mac -l XCPA.txt -XCPA.json: XCPA.lst - node ../../../../modules/filedump/bin/filedump --file=XCPA.lst --format=octal --output=XCPA.json --overwrite +XCPA.json: XCPA.txt + node ../../../../modules/filedump/bin/filedump --file=XCPA.txt --format=octal --output=XCPA.json --overwrite diff --git a/devices/pc8080/rom/vt100/README.md b/devices/pc8080/rom/vt100/README.md index 3d3e21055..e8191e935 100644 --- a/devices/pc8080/rom/vt100/README.md +++ b/devices/pc8080/rom/vt100/README.md @@ -60,12 +60,12 @@ screensaver-related mods to the ROM. Finally, I verified that reassembling [VT100.asm](VT100.asm) with [asm8080](https://github.com/begoon/asm8080) produced the original VT100.bin; after adding the correct number of `nop` instructions to the end to the source file, the binaries matched. -The other advantage of reassembling the code is that the resulting [VT100.lst](VT100.lst) makes it easy to export comments +The other advantage of reassembling the code is that the resulting [VT100.txt](VT100.txt) makes it easy to export comments and other symbolic information to [VT100.map](VT100.map), which can then be included in the [VT100.json](VT100.json) ROM dump and passed on to the PC8080 Debugger. Here are the rebuild steps: - asm8080 -lVT100.lst VT100.asm - grep -E "[0-9]+ [0-9A-D]+.*;;" VT100.lst | sed -E "s/ *[0-9]+ ([0-9A-F]+).*;(;.*)/ \1 . \2/" > VT100.map + asm8080 -lVT100.txt VT100.asm + grep -E "[0-9]+ [0-9A-D]+.*;;" VT100.txt | sed -E "s/ *[0-9]+ ([0-9A-F]+).*;(;.*)/ \1 . \2/" > VT100.map filedump --file=VT100.bin --format=bytes --output=VT100.json --comments --overwrite You can omit `--comments` from the filedump command to reduce the size of the [VT100.json](VT100.json) file. diff --git a/devices/pc8080/rom/vt100/VT100.lst b/devices/pc8080/rom/vt100/VT100.txt similarity index 100% rename from devices/pc8080/rom/vt100/VT100.lst rename to devices/pc8080/rom/vt100/VT100.txt diff --git a/devices/pdp11/machine/1170/panel/README.md b/devices/pdp11/machine/1170/panel/README.md index 279007e60..0861e4ec5 100644 --- a/devices/pdp11/machine/1170/panel/README.md +++ b/devices/pdp11/machine/1170/panel/README.md @@ -10,3 +10,83 @@ machines: {% include machine.html id="test1170" %} This machine is also available with our built-in [Debugger](debugger/). + +Front Panel Basics +------------------ + +From the [PDP-11/70 Handbook (1979)](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Handbook_1979.pdf), Chapter 10, p. 325: + +> ### CONSOLE OPERATION + +> The PDP-11/70 console allows direct control of the computer system. It contains a power switch for the CPU, +which is also usually used as the Master Switch for the system. The console is used for starting, stopping, resetting, +and debugging. Lights and switches provide the facilities for monitoring operation, system control, and maintenance. +Debugging and detailed tracing of operations can be accomplished by having the computer execute single instructions or +single cycles. Contents of all locations can be examined, and data can be entered manually from the console switches. + +The PDPjs Front Panel replicates most (but not all) the features of a real PDP-11/70 Front Panel. The switches, which +PDPjs displays as green to make them stand out from the rest of the pink-and-magenta controls, are summarized below. + +### 0-21 + +These control bits 0 to 21 of the SWITCH register. The UP position represents a ONE, and the DOWN position +represents a ZERO. Once all the bits have been set, you can choose to load the contents of the SWITCH register into the +ADDRESS register (as displayed by the top row of LEDs), or directly into the memory location referenced by the ADDRESS +register (where it will become the DATA displayed by the second row of LEDs). + +The SWITCH, ADDRESS, and DATA (aka DISPLAY) registers are all internal to the Front Panel hardware, and should not be +confused with CPU registers. + +### TEST + +This is a momentary switch that is normally in the DOWN position. When held in the UP position, it turns on all LEDs. +This "lamp test" was more important in the days when the lights were produced by bulbs with filaments that could burn out, +and if you didn't realize that a particular light was "burned out", you could mistake it for a zero. + +While the TEST switch is more "cute" than useful on a virtual Front Panel, we have added one "innovation" to the switch: +pressing it also returns all the SWITCH register switches (0-21) to their DOWN position. + +### LOAD + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it copies the SWITCH register to the +ADDRESS register. + +### EXAM + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it reads the memory location referenced +by the ADDRESS register and displays it in the DATA register. If pressed repeatedly, each repetition also automatically +adds 2 to the ADDRESS register, making it easier to examine a series of words. Note that if the CPU registers are being +examined (starting at address 177700), the ADDRESS register will advance by 1 instead of 2. + +Another "innovation" unique to PDPjs: if the STEP switch is toggled from the UP to the DOWN position, repeated EXAM operations +will decrease the ADDRESS register instead of increasing it. + +### DEP + +This is a momentary switch that is normally in the DOWN position. When pressed UP, it writes the contents of the SWITCH +register to the memory location referenced by the ADDRESS register, and displays the result in the DATA register. Like the +EXAM switch, if DEP is pressed repeatedly, each repetition also automatically adds 2 to the ADDRESS register, making it easier +to deposit the same value to a series of words. + +### CONT + +This is a momentary switch that is normally in the UP position. When pressed DOWN, it will start the CPU if it's currently +halted. If the CPU is already running, CONT has no effect. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, +then the CPU will continue for only ONE instruction and then stop again. + +### ENABLE/HALT + +This switch is a toggle that is normally in the UP (ENABLE) position. If it pressed DOWN while the CPU is running, the CPU will +stop. Once the CPU is stopped, this switch has no effect, other than determining what CONT will do when pressed. + +### STEP + +On a real PDP-11, this would select between cycle-stepping vs. instruction-stepping. Since PDPjs doesn't support cycle-stepping, +this switch has no effect (except as described above when the EXAM or DEP switches are pressed repeatedly). + +### START + +The START switch is similar to CONT, but it also performs the equivalent a RESET instruction before starting the CPU, so +unless you're starting execution at the beginning of a program, using START instead of CONT to continue execution is probably +not a good idea. Also, if the ENABLE/HALT switch is in the DOWN (HALT) position, START will still reset the machine but not +execute anything. diff --git a/devices/pdp11/machine/1170/panel/debugger/README.md b/devices/pdp11/machine/1170/panel/debugger/README.md index 91dfa2d21..754690852 100644 --- a/devices/pdp11/machine/1170/panel/debugger/README.md +++ b/devices/pdp11/machine/1170/panel/debugger/README.md @@ -10,11 +10,19 @@ machines: {% include machine.html id="test1170" %} +Other interesting things to know about this machine: + +* It includes an [M9312 ROM](/devices/pdp11/rom/M9312/) at address 165000. The exact ROM is [23-616F1](/devices/pdp11/rom/M9312/23-616F1.txt). + Toggle-Ins ---------- As DEC notes in the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf), -Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. +Chapter 4: "There are several useful toggle-ins that are probably not very well known." Excerpts are provided below. If you're +not sure how "toggle in" code using a Front Panel, check out [Front Panel Basics](/devices/pdp11/machine/1170/panel/#front-panel-basics). + +However, since the above machine also includes the PDPjs Debugger, you'll find that it's much easier to use the Debugger commands +described below to load and execute these "toggle-ins". ### Memory Management @@ -186,7 +194,7 @@ If you also want to see all the hardware register activity, use the Debugger's " 17772262 021311 CMP (R3),(R1) ; Top of Memory? 17772264 003402 BLE 2$ 17772266 005000 CLR R0 ; Start at Virtual Address 0 - 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --@jeffpar] + 17772270 000766 BR 1$ ; [NOTE: DEC's guide incorrecly lists this opcode as 000776 --JP] 17772272 005312 2$: DEC (R2) ; Disable Relocation 17772274 000000 HLT @@ -310,8 +318,8 @@ As the **Maintenance Service Guide** goes on to say: Before running the above code, you should turn Bus messages off (ie, "m bus off"); otherwise, the quantity of messages will slow execution to a crawl. -If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address, -not one of the physical (22-bit) addresses shown above. For example, to break on this instruction: +If you want to set an execution breakpoint in the above code, make sure you use the appropriate virtual (16-bit) address. +For example, to break on this instruction: 17772256 062711 ADD #200,(R1) ; Step Page diff --git a/devices/pdp11/machine/1170/panel/debugger/machine.xml b/devices/pdp11/machine/1170/panel/debugger/machine.xml index 52716d8e7..e5fbe66fa 100644 --- a/devices/pdp11/machine/1170/panel/debugger/machine.xml +++ b/devices/pdp11/machine/1170/panel/debugger/machine.xml @@ -5,6 +5,7 @@ + diff --git a/devices/pdp11/machine/1170/panel/machine.xml b/devices/pdp11/machine/1170/panel/machine.xml index 778713152..35304c3f4 100644 --- a/devices/pdp11/machine/1170/panel/machine.xml +++ b/devices/pdp11/machine/1170/panel/machine.xml @@ -5,6 +5,7 @@ + diff --git a/devices/pdp11/rom/M9312/23-616F1.json b/devices/pdp11/rom/M9312/23-616F1.json new file mode 100644 index 000000000..00304625e --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.json @@ -0,0 +1,35 @@ +{"load":0xEA00/*165000*/,"exec":0xEA00/*165000*/, +"words":[ +0x101F/*010037*/,0x01C0/*000700*/,0x105F/*010137*/,0x01C2/*000702*/,0x111F/*010437*/,0x01C4/*000704*/,0x0A1F/*005037*/,0x01C6/*000706*/, +0x55DF/*052737*/,0x8000/*100000*/,0xFFFE/*177776*/,0x35DF/*032737*/,0x4000/*040000*/,0xFFFE/*177776*/,0x0302/*001402*/,0x0A9F/*005237*/, +0x01C6/*000706*/,0x0A1F/*005037*/,0xFFFE/*177776*/,0x0101/*000401*/,0x0000/*000000*/,0x0A06/*005006*/,0x8104/*100404*/,0x8503/*102403*/, +0x8202/*101002*/,0x0501/*002401*/,0x8301/*101401*/,0x0000/*000000*/,0x0AC6/*005306*/,0x8003/*100003*/,0x0302/*001402*/,0x0401/*002001*/, +0x0701/*003401*/,0x0000/*000000*/,0x0C06/*006006*/,0x8402/*102002*/,0x8601/*103001*/,0x0201/*001001*/,0x0000/*000000*/,0x15C6/*012706*/, +0xAAAA/*125252*/,0x1180/*010600*/,0x1001/*010001*/,0x1042/*010102*/,0x1083/*010203*/,0x10C4/*010304*/,0x1105/*010405*/,0xE141/*160501*/, +0x0501/*002401*/,0x0301/*001401*/,0x0000/*000000*/,0x0C42/*006102*/,0x8601/*103001*/,0x0501/*002401*/,0x0000/*000000*/,0x6083/*060203*/, +0x0A83/*005203*/,0x0A43/*005103*/,0x60C1/*060301*/,0x8701/*103401*/,0x0701/*003401*/,0x0000/*000000*/,0x0C04/*006004*/,0x5103/*050403*/, +0x6143/*060503*/,0x0A83/*005203*/,0x8702/*103402*/,0x0AC1/*005301*/,0x0501/*002401*/,0x0000/*000000*/,0x0A40/*005100*/,0x8301/*101401*/, +0x0000/*000000*/,0x4001/*040001*/,0x6041/*060101*/,0x0601/*003001*/,0x0701/*003401*/,0x0000/*000000*/,0x00C1/*000301*/,0x2057/*020127*/, +0x5455/*052125*/,0x0204/*001004*/,0x3105/*030405*/,0x0602/*003002*/,0x0A45/*005105*/,0x0201/*001001*/,0x0000/*000000*/,0x95C0/*112700*/, +0xFF01/*177401*/,0x8001/*100001*/,0x0000/*000000*/,0x7E02/*077002*/,0x0A01/*005001*/,0x0A81/*005201*/,0x7E02/*077002*/,0x0BC0/*005700*/, +0x0202/*001002*/,0x0BC1/*005701*/,0x0301/*001401*/,0x0000/*000000*/,0x15C6/*012706*/,0x01FE/*000776*/,0x09F7/*004767*/,0x0002/*000002*/, +0x0000/*000000*/,0x25CE/*022716*/,0xEAD0/*165320*/,0x0301/*001401*/,0x0000/*000000*/,0x15CE/*012716*/,0xEAE2/*165342*/,0x0087/*000207*/, +0x0000/*000000*/,0x0A26/*005046*/,0x15E6/*012746*/,0xEAEC/*165354*/,0x0002/*000002*/,0x0000/*000000*/,0x005F/*000137*/,0xEAF2/*165362*/, +0x0000/*000000*/,0x15C5/*012705*/,0xE000/*160000*/,0x0A1F/*005037*/,0x0006/*000006*/,0x15DF/*012737*/,0xEB00/*165400*/,0x0004/*000004*/, +0x15C6/*012706*/,0x01FE/*000776*/,0x0BE5/*005745*/,0x15DF/*012737*/,0xEBCC/*165714*/,0x004C/*000114*/,0x0A1F/*005037*/,0x004E/*000116*/, +0x15C3/*012703*/,0xFFE6/*177746*/,0x15CB/*012713*/,0x000C/*000014*/,0x15C2/*012702*/,0x0200/*001000*/,0x1080/*010200*/,0x1008/*010010*/, +0x0BD0/*005720*/,0x2005/*020005*/,0x83FC/*101774*/,0x1080/*010200*/,0x1201/*011001*/,0x2001/*020001*/,0x0301/*001401*/,0x0000/*000000*/, +0x0A50/*005120*/,0x2005/*020005*/,0x83F9/*101771*/,0x1801/*014001*/,0x0A41/*005101*/,0x2001/*020001*/,0x0301/*001401*/,0x0000/*000000*/, +0x2002/*020002*/,0x02F9/*001371*/,0x0A0E/*005016*/,0x15C4/*012704*/,0xAAAA/*125252*/,0x15CB/*012713*/,0x0018/*000030*/,0x15C0/*012700*/, +0x0800/*004000*/,0x15C2/*012702*/,0x0200/*001000*/,0x0A44/*005104*/,0x1108/*010410*/,0x0A48/*005110*/,0x0A48/*005110*/,0x2204/*021004*/, +0x0301/*001401*/,0x0000/*000000*/,0x0C1F/*006037*/,0xFFEA/*177752*/,0x8702/*103402*/,0x0000/*000000*/,0x0131/*000461*/,0x8A4E/*105116*/, +0x02F2/*001362*/,0x0102/*000402*/,0x0077/*000167*/,0xFE88/*177210*/,0x0BD0/*005720*/,0x7E93/*077223*/,0x15CB/*012713*/,0x0024/*000044*/, +0x15C0/*012700*/,0x0C00/*006000*/,0x8A76/*105166*/,0x0001/*000001*/,0x02E4/*001344*/,0x15C2/*012702*/,0x0200/*001000*/,0x1080/*010200*/, +0x1008/*010010*/,0x0BD0/*005720*/,0x2005/*020005*/,0x83FC/*101774*/,0x15C1/*012701*/,0x0003/*000003*/,0x0A0E/*005016*/,0x0BDF/*005737*/, +0x01C6/*000706*/,0x0210/*001020*/,0x15CE/*012716*/,0x0018/*000030*/,0x1080/*010200*/,0x0A48/*005110*/,0x0A48/*005110*/,0x2008/*020010*/, +0x0301/*001401*/,0x0000/*000000*/,0x0BD0/*005720*/,0x0C1F/*006037*/,0xFFEA/*177752*/,0x8702/*103402*/,0x0000/*000000*/,0x0108/*000410*/, +0x2005/*020005*/,0x83F3/*101763*/,0x138B/*011613*/,0x0A0E/*005016*/,0x7E51/*077121*/,0x0104/*000404*/,0x0000/*000000*/,0x0102/*000402*/, +0x15CB/*012713*/,0x000C/*000014*/,0x17C0/*013700*/,0x01C0/*000700*/,0x17C1/*013701*/,0x01C2/*000702*/,0x17C4/*013704*/,0x01C4/*000704*/, +0x0074/*000164*/,0x0002/*000002*/,0x17C4/*013704*/,0xFF78/*177570*/,0x45C4/*042704*/,0xFE00/*177000*/,0x55C4/*052704*/,0xF600/*173000*/, +0x97C0/*113700*/,0xFF79/*177571*/,0x0C80/*006200*/,0x00A1/*000241*/,0x004C/*000114*/,0x0000/*000000*/,0x4230/*041060*/,0x2A2D/*025055*/] +} \ No newline at end of file diff --git a/devices/pdp11/rom/M9312/23-616F1.mac b/devices/pdp11/rom/M9312/23-616F1.mac new file mode 100644 index 000000000..cfe5cce2c --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.mac @@ -0,0 +1,259 @@ + .title M9312 11/60-70 Diagnostic/Console ROM + + ; This source code is an exact copy of the DEC M9312 23-616F1 console PROM. + ; + ; This console/diagnostic PROM is for 11/60-70 CPUs. + ; + ; Standard devices are 82S137, 74S573 or other compatible bipolar PROMs + ; with a 1024x4 TriState 18pin DIP architecture. + + .asect + .=165000 + +base =. + +START: mov r0,@#700 ; + mov r1,@#702 ; + mov r4,@#704 ; + clr @#706 ; + + .=base+20 +DIAG: bis #100000,@#177776 ; + bit #040000,@#177776 ; + beq L1 ; + inc @#706 ; +L1: clr @#177776 ; + br L2 ; + halt ; + +L2: clr sp ; + bmi L3 ; + bvs L3 ; + bhi L3 ; + blt L3 ; + blos L4 ; +L3: halt ; + +L4: dec sp ; + bpl L5 ; + beq L5 ; + bge L5 ; + ble L6 ; +L5: halt ; + +L6: ror sp ; + bvc L7 ; + bcc L7 ; + bne L8 ; +L7: halt ; + +L8: mov #125252,sp ; + mov sp,r0 ; + mov r0,r1 ; + mov r1,r2 ; + mov r2,r3 ; + mov r3,r4 ; + mov r4,r5 ; + sub r5,r1 ; + blt NODIAG ; + beq L9 ; + + .=base+144 +NODIAG: halt ; + +L9: rol r2 ; + bcc L10 ; + blt L11 ; +L10: halt ; + +L11: add r2,r3 ; + inc r3 ; + com r3 ; + add r3,r1 ; + bcs L12 ; + ble L13 ; +L12: halt ; + +L13: ror r4 ; + bis r4,r3 ; + add r5,r3 ; + inc r3 ; + bcs L14 ; + dec r1 ; + blt L15 ; +L14: halt ; + +L15: com r0 ; + blos L16 ; + halt ; + +L16: bic r0,r1 ; + add r1,r1 ; + bgt L17 ; + ble L18 ; +L17: halt ; + +L18: swab r1 ; + cmp r1,#052125 ; + bne L19 ; + bit r4,r5 ; + bgt L19 ; + com r5 ; + bne L20 ; +L19: halt ; + +L20: movb #177401,r0 ; + bpl L21 ; +L22: halt ; + +L21: sob r0,L22 ; + clr r1 ; +L23: inc r1 ; + sob r0,L23 ; + tst r0 ; + bne L24 ; + tst r1 ; + beq L25 ; +L24: halt ; + +L25: mov #776,sp ; + jsr pc,L26 ; +N2: halt ; + +L26: cmp #N2,(sp) ; + beq L27 ; + halt ; + +L27: mov #N3,(sp) ; + rts pc ; + halt ; + +N3: clr -(sp) ; + mov #N4,-(sp) ; + rti ; + halt ; + +N4: jmp @#N5 ; + halt ; + +N5: mov #160000,r5 ; + clr @#6 ; + mov #N6,@#4 ; +N6: mov #776,sp ; + tst -(r5) ; + mov #N12,@#114 ; + clr @#116 ; + mov #177746,r3 ; + mov #14,(r3) ; + mov #1000,r2 ; + mov r2,r0 ; +L28: mov r0,(r0) ; + tst (r0)+ ; + cmp r0,r5 ; + blos L28 ; + mov r2,r0 ; +L30: mov (r0),r1 ; + cmp r0,r1 ; + beq L29 ; + halt ; + +L29: com (r0)+ ; + cmp r0,r5 ; + blos L30 ; +L32: mov -(r0),r1 ; + com r1 ; + cmp r0,r1 ; + beq L31 ; + halt ; + +L31: cmp r0,r2 ; + bne L32 ; + clr (sp) ; + mov #125252,r4 ; + mov #30,(r3) ; + mov #4000,r0 ; +L39: mov #1000,r2 ; +L36: com r4 ; + mov r4,(r0) ; + com (r0) ; + com (r0) ; + cmp (r0),r4 ; + beq L33 ; + halt ; + +L33: ror @#177752 ; + bcs L34 ; + halt ; + br L35 ; + +L34: comb (sp) ; + bne L36 ; + br L37 ; + + .=base+564 +RESTRT: jmp START ; + +L37: tst (r0)+ ; + sob r2,L36 ; + mov #44,(r3) ; + mov #6000,r0 ; + comb 1(sp) ; + bne L39 ; + mov #1000,r2 ; + mov r2,r0 ; +L40: mov r0,(r0) ; + tst (r0)+ ; + cmp r0,r5 ; + blos L40 ; + mov #3,r1 ; + clr (sp) ; + tst @#706 ; + bne L41 ; + mov #30,(sp) ; +L45: mov r2,r0 ; +L44: com (r0) ; + com (r0) ; + cmp r0,(r0) ; + beq L42 ; + halt ; + +L42: tst (r0)+ ; + ror @#177752 ; + bcs L43 ; + halt ; + br L35 ; + +L43: cmp r0,r5 ; + blos L44 ; +L41: mov (sp),(r3) ; + clr (sp) ; + sob r1,L45 ; + br L46 ; + +N12: halt ; + br L46 ; + +L35: mov #14,(r3) ; +L46: mov @#700,r0 ; + mov @#702,r1 ; + mov @#704,r4 ; + jmp 2(r4) ; + + mov @#177570,r4 ; + bic #177000,r4 ; + bis #173000,r4 ; + movb @#177571,r0 ; + asr r0 ; + clc ; + jmp (r4) ; + halt ; + + ; ------------------------------------------------------------ + + .=base+774 +verson: .ascii "0B" ; version ID + + .=base+776 +crc16: .word <025055> ; CRC-16 will go here + + .end diff --git a/devices/pdp11/rom/M9312/23-616F1.txt b/devices/pdp11/rom/M9312/23-616F1.txt new file mode 100644 index 000000000..0c4968ad4 --- /dev/null +++ b/devices/pdp11/rom/M9312/23-616F1.txt @@ -0,0 +1,282 @@ + 1 .title M9312 11/60-70 Diagnostic/Console ROM + 2 + 3 ; This source code is an exact copy of the DEC M9312 23-616F1 console PROM. + 4 ; + 5 ; This console/diagnostic PROM is for 11/60-70 CPUs. + 6 ; + 7 ; Standard devices are 82S137, 74S573 or other compatible bipolar PROMs + 8 ; with a 1024x4 TriState 18pin DIP architecture. + 9 + 10 000000 .asect + 11 165000 .=165000 + 12 + 13 165000 base =. + 14 + 15 165000 010037 000700 START: mov r0,@#700 ; + 16 165004 010137 000702 mov r1,@#702 ; + 17 165010 010437 000704 mov r4,@#704 ; + 18 165014 005037 000706 clr @#706 ; + 19 + 20 165020 .=base+20 + 21 165020 052737 100000 177776 DIAG: bis #100000,@#177776 ; + 22 165026 032737 040000 177776 bit #040000,@#177776 ; + 23 165034 001402 beq L1 ; + 24 165036 005237 000706 inc @#706 ; + 25 165042 005037 177776 L1: clr @#177776 ; + 26 165046 000401 br L2 ; + 27 165050 000000 halt ; + 28 + 29 165052 005006 L2: clr sp ; + 30 165054 100404 bmi L3 ; + 31 165056 102403 bvs L3 ; + 32 165060 101002 bhi L3 ; + 33 165062 002401 blt L3 ; + 34 165064 101401 blos L4 ; + 35 165066 000000 L3: halt ; + 36 + 37 165070 005306 L4: dec sp ; + 38 165072 100003 bpl L5 ; + 39 165074 001402 beq L5 ; + 40 165076 002001 bge L5 ; + 41 165100 003401 ble L6 ; + 42 165102 000000 L5: halt ; + 43 + 44 165104 006006 L6: ror sp ; + 45 165106 102002 bvc L7 ; + 46 165110 103001 bcc L7 ; + 47 165112 001001 bne L8 ; + 48 165114 000000 L7: halt ; + 49 + 50 165116 012706 125252 L8: mov #125252,sp ; + 51 165122 010600 mov sp,r0 ; + 52 165124 010001 mov r0,r1 ; + 53 165126 010102 mov r1,r2 ; + 54 165130 010203 mov r2,r3 ; + 55 165132 010304 mov r3,r4 ; + 56 165134 010405 mov r4,r5 ; + 57 165136 160501 sub r5,r1 ; + 58 165140 002401 blt NODIAG ; + 59 165142 001401 beq L9 ; + 60 + 61 165144 .=base+144 + 62 165144 000000 NODIAG: halt ; + 63 + 64 165146 006102 L9: rol r2 ; + 65 165150 103001 bcc L10 ; + 66 165152 002401 blt L11 ; + 67 165154 000000 L10: halt ; + 68 + 69 165156 060203 L11: add r2,r3 ; + 70 165160 005203 inc r3 ; + 71 165162 005103 com r3 ; + 72 165164 060301 add r3,r1 ; + 73 165166 103401 bcs L12 ; + 74 165170 003401 ble L13 ; + 75 165172 000000 L12: halt ; + 76 + 77 165174 006004 L13: ror r4 ; + 78 165176 050403 bis r4,r3 ; + 79 165200 060503 add r5,r3 ; + 80 165202 005203 inc r3 ; + 81 165204 103402 bcs L14 ; + 82 165206 005301 dec r1 ; + 83 165210 002401 blt L15 ; + 84 165212 000000 L14: halt ; + 85 + 86 165214 005100 L15: com r0 ; + 87 165216 101401 blos L16 ; + 88 165220 000000 halt ; + 89 + 90 165222 040001 L16: bic r0,r1 ; + 91 165224 060101 add r1,r1 ; + 92 165226 003001 bgt L17 ; + 93 165230 003401 ble L18 ; + 94 165232 000000 L17: halt ; + 95 + 96 165234 000301 L18: swab r1 ; + 97 165236 020127 052125 cmp r1,#052125 ; + 98 165242 001004 bne L19 ; + 99 165244 030405 bit r4,r5 ; + 100 165246 003002 bgt L19 ; + 101 165250 005105 com r5 ; + 102 165252 001001 bne L20 ; + 103 165254 000000 L19: halt ; + 104 + 105 165256 112700 177401 L20: movb #177401,r0 ; + 106 165262 100001 bpl L21 ; + 107 165264 000000 L22: halt ; + 108 + 109 165266 077002 L21: sob r0,L22 ; + 110 165270 005001 clr r1 ; + 111 165272 005201 L23: inc r1 ; + 112 165274 077002 sob r0,L23 ; + 113 165276 005700 tst r0 ; + 114 165300 001002 bne L24 ; + 115 165302 005701 tst r1 ; + 116 165304 001401 beq L25 ; + 117 165306 000000 L24: halt ; + 118 + 119 165310 012706 000776 L25: mov #776,sp ; + 120 165314 004767 165322' jsr pc,L26 ; + 121 165320 000000 N2: halt ; + 122 + 123 165322 022716 165320 L26: cmp #N2,(sp) ; + 124 165326 001401 beq L27 ; + 125 165330 000000 halt ; + 126 + 127 165332 012716 165342 L27: mov #N3,(sp) ; + 128 165336 000207 rts pc ; + 129 165340 000000 halt ; + 130 + 131 165342 005046 N3: clr -(sp) ; + 132 165344 012746 165354 mov #N4,-(sp) ; + 133 165350 000002 rti ; + 134 165352 000000 halt ; + 135 + 136 165354 000137 165362 N4: jmp @#N5 ; + 137 165360 000000 halt ; + 138 + 139 165362 012705 160000 N5: mov #160000,r5 ; + 140 165366 005037 000006 clr @#6 ; + 141 165372 012737 165400 000004 mov #N6,@#4 ; + 142 165400 012706 000776 N6: mov #776,sp ; + 143 165404 005745 tst -(r5) ; + 144 165406 012737 165714 000114 mov #N12,@#114 ; + 145 165414 005037 000116 clr @#116 ; + 146 165420 012703 177746 mov #177746,r3 ; + 147 165424 012713 000014 mov #14,(r3) ; + 148 165430 012702 001000 mov #1000,r2 ; + 149 165434 010200 mov r2,r0 ; + 150 165436 010010 L28: mov r0,(r0) ; + 151 165440 005720 tst (r0)+ ; + 152 165442 020005 cmp r0,r5 ; + 153 165444 101774 blos L28 ; + 154 165446 010200 mov r2,r0 ; + 155 165450 011001 L30: mov (r0),r1 ; + 156 165452 020001 cmp r0,r1 ; + 157 165454 001401 beq L29 ; + 158 165456 000000 halt ; + 159 + 160 165460 005120 L29: com (r0)+ ; + 161 165462 020005 cmp r0,r5 ; + 162 165464 101771 blos L30 ; + 163 165466 014001 L32: mov -(r0),r1 ; + 164 165470 005101 com r1 ; + 165 165472 020001 cmp r0,r1 ; + 166 165474 001401 beq L31 ; + 167 165476 000000 halt ; + 168 + 169 165500 020002 L31: cmp r0,r2 ; + 170 165502 001371 bne L32 ; + 171 165504 005016 clr (sp) ; + 172 165506 012704 125252 mov #125252,r4 ; + 173 165512 012713 000030 mov #30,(r3) ; + 174 165516 012700 004000 mov #4000,r0 ; + 175 165522 012702 001000 L39: mov #1000,r2 ; + 176 165526 005104 L36: com r4 ; + 177 165530 010410 mov r4,(r0) ; + 178 165532 005110 com (r0) ; + 179 165534 005110 com (r0) ; + 180 165536 021004 cmp (r0),r4 ; + 181 165540 001401 beq L33 ; + 182 165542 000000 halt ; + 183 + 184 165544 006037 177752 L33: ror @#177752 ; + 185 165550 103402 bcs L34 ; + 186 165552 000000 halt ; + 187 165554 000461 br L35 ; + 188 + 189 165556 105116 L34: comb (sp) ; + 190 165560 001362 bne L36 ; + 191 165562 000402 br L37 ; + 192 + 193 165564 .=base+564 + 194 165564 000167 165000' RESTRT: jmp START ; + 195 + 196 165570 005720 L37: tst (r0)+ ; + 197 165572 077223 sob r2,L36 ; + 198 165574 012713 000044 mov #44,(r3) ; + 199 165600 012700 006000 mov #6000,r0 ; + 200 165604 105166 000001 comb 1(sp) ; + 201 165610 001344 bne L39 ; + 202 165612 012702 001000 mov #1000,r2 ; + 203 165616 010200 mov r2,r0 ; + 204 165620 010010 L40: mov r0,(r0) ; + 205 165622 005720 tst (r0)+ ; + 206 165624 020005 cmp r0,r5 ; + 207 165626 101774 blos L40 ; + 208 165630 012701 000003 mov #3,r1 ; + 209 165634 005016 clr (sp) ; + 210 165636 005737 000706 tst @#706 ; + 211 165642 001020 bne L41 ; + 212 165644 012716 000030 mov #30,(sp) ; + 213 165650 010200 L45: mov r2,r0 ; + 214 165652 005110 L44: com (r0) ; + 215 165654 005110 com (r0) ; + 216 165656 020010 cmp r0,(r0) ; + 217 165660 001401 beq L42 ; + 218 165662 000000 halt ; + 219 + 220 165664 005720 L42: tst (r0)+ ; + 221 165666 006037 177752 ror @#177752 ; + 222 165672 103402 bcs L43 ; + 223 165674 000000 halt ; + 224 165676 000410 br L35 ; + 225 + 226 165700 020005 L43: cmp r0,r5 ; + 227 165702 101763 blos L44 ; + 228 165704 011613 L41: mov (sp),(r3) ; + 229 165706 005016 clr (sp) ; + 230 165710 077121 sob r1,L45 ; + 231 165712 000404 br L46 ; + 232 + 233 165714 000000 N12: halt ; + 234 165716 000402 br L46 ; + 235 + 236 165720 012713 000014 L35: mov #14,(r3) ; + 237 165724 013700 000700 L46: mov @#700,r0 ; + 238 165730 013701 000702 mov @#702,r1 ; + 239 165734 013704 000704 mov @#704,r4 ; + 240 165740 000164 000002 jmp 2(r4) ; + 241 + 242 165744 013704 177570 mov @#177570,r4 ; + 243 165750 042704 177000 bic #177000,r4 ; + 244 165754 052704 173000 bis #173000,r4 ; + 245 165760 113700 177571 movb @#177571,r0 ; + 246 165764 006200 asr r0 ; + 247 165766 000241 clc ; + 248 165770 000114 jmp (r4) ; + 249 165772 000000 halt ; + 250 + 251 ; ------------------------------------------------------------ + 252 + 253 165774 .=base+774 + 254 165774 060 102 verson: .ascii "0B" ; version ID + 255 + 256 165776 .=base+776 + 257 165776 025055 crc16: .word <025055> ; CRC-16 will go here + 258 + 259 .end + 259 + + +Symbol table + +. =****** L17 =165232 L28 =165436 L4 =165070 L9 =165146 +BASE =165000 L18 =165234 L29 =165460 L40 =165620 N12 =165714 +CRC16 =165776 L19 =165254 L3 =165066 L41 =165704 N2 =165320 +DIAG =165020 L2 =165052 L30 =165450 L42 =165664 N3 =165342 +L1 =165042 L20 =165256 L31 =165500 L43 =165700 N4 =165354 +L10 =165154 L21 =165266 L32 =165466 L44 =165652 N5 =165362 +L11 =165156 L22 =165264 L33 =165544 L45 =165650 N6 =165400 +L12 =165172 L23 =165272 L34 =165556 L46 =165724 NODIAG=165144 +L13 =165174 L24 =165306 L35 =165720 L5 =165102 RESTRT=165564 +L14 =165212 L25 =165310 L36 =165526 L6 =165104 START =165000 +L15 =165214 L26 =165322 L37 =165570 L7 =165114 VERSON=165774 +L16 =165222 L27 =165332 L39 =165522 L8 =165116 + + +Program sections: + +. ABS. 166000 000 (RW,I,GBL,ABS,OVR,NOSAV) + 000000 001 (RW,I,LCL,REL,CON,NOSAV) diff --git a/devices/pdp11/rom/M9312/M9312.json b/devices/pdp11/rom/M9312/M9312.json new file mode 100644 index 000000000..e5d526038 --- /dev/null +++ b/devices/pdp11/rom/M9312/M9312.json @@ -0,0 +1,34 @@ +{"words":[ +0x101F /*0010037*/,0x01C0 /*0000700*/,0x105F /*0010137*/,0x01C2 /*0000702*/,0x111F /*0010437*/,0x01C4 /*0000704*/,0x0A1F /*0005037*/,0x01C6 /*0000706*/, +0x55DF /*0052737*/,0x8000 /*0100000*/,0xFFFE /*0177776*/,0x35DF /*0032737*/,0x4000 /*0040000*/,0xFFFE /*0177776*/,0x0302 /*0001402*/,0x0A9F /*0005237*/, +0x01C6 /*0000706*/,0x0A1F /*0005037*/,0xFFFE /*0177776*/,0x0101 /*0000401*/,0x0000 /*0000000*/,0x0A06 /*0005006*/,0x8104 /*0100404*/,0x8503 /*0102403*/, +0x8202 /*0101002*/,0x0501 /*0002401*/,0x8301 /*0101401*/,0x0000 /*0000000*/,0x0AC6 /*0005306*/,0x8003 /*0100003*/,0x0302 /*0001402*/,0x0401 /*0002001*/, +0x0701 /*0003401*/,0x0000 /*0000000*/,0x0C06 /*0006006*/,0x8402 /*0102002*/,0x8601 /*0103001*/,0x0201 /*0001001*/,0x0000 /*0000000*/,0x15C6 /*0012706*/, +0xAAAA /*0125252*/,0x1180 /*0010600*/,0x1001 /*0010001*/,0x1042 /*0010102*/,0x1083 /*0010203*/,0x10C4 /*0010304*/,0x1105 /*0010405*/,0xE141 /*0160501*/, +0x0501 /*0002401*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x0C42 /*0006102*/,0x8601 /*0103001*/,0x0501 /*0002401*/,0x0000 /*0000000*/,0x6083 /*0060203*/, +0x0A83 /*0005203*/,0x0A43 /*0005103*/,0x60C1 /*0060301*/,0x8701 /*0103401*/,0x0701 /*0003401*/,0x0000 /*0000000*/,0x0C04 /*0006004*/,0x5103 /*0050403*/, +0x6143 /*0060503*/,0x0A83 /*0005203*/,0x8702 /*0103402*/,0x0AC1 /*0005301*/,0x0501 /*0002401*/,0x0000 /*0000000*/,0x0A40 /*0005100*/,0x8301 /*0101401*/, +0x0000 /*0000000*/,0x4001 /*0040001*/,0x6041 /*0060101*/,0x0601 /*0003001*/,0x0701 /*0003401*/,0x0000 /*0000000*/,0x00C1 /*0000301*/,0x2057 /*0020127*/, +0x5455 /*0052125*/,0x0204 /*0001004*/,0x3105 /*0030405*/,0x0602 /*0003002*/,0x0A45 /*0005105*/,0x0201 /*0001001*/,0x0000 /*0000000*/,0x95C0 /*0112700*/, +0xFF01 /*0177401*/,0x8001 /*0100001*/,0x0000 /*0000000*/,0x7E02 /*0077002*/,0x0A01 /*0005001*/,0x0A81 /*0005201*/,0x7E02 /*0077002*/,0x0BC0 /*0005700*/, +0x0202 /*0001002*/,0x0BC1 /*0005701*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x15C6 /*0012706*/,0x01FE /*0000776*/,0x09F7 /*0004767*/,0x0002 /*0000002*/, +0x0000 /*0000000*/,0x25CE /*0022716*/,0x00D0 /*0000320*/,0x0301 /*0001401*/,0x0000 /*0000000*/,0x15CE /*0012716*/,0x00E2 /*0000342*/,0x0087 /*0000207*/, +0x0000 /*0000000*/,0x0A26 /*0005046*/,0x15E6 /*0012746*/,0x00EC /*0000354*/,0x0002 /*0000002*/,0x0000 /*0000000*/,0x005F /*0000137*/,0x00F2 /*0000362*/, +0x0080 /*0000200*/,0x15C5 /*0012705*/,0xE000 /*0160000*/,0x0A1F /*0005037*/,0x0006 /*0000006*/,0x15DF /*0012737*/,0x0100 /*0000400*/,0x0004 /*0000004*/, +0x15C6 /*0012706*/,0x01FE /*0000776*/,0x0BE5 /*0005745*/,0x15DF /*0012737*/,0x01CC /*0000714*/,0x004C /*0000114*/,0x0A1F /*0005037*/,0x004E /*0000116*/, +0x15C3 /*0012703*/,0xFFE6 /*0177746*/,0x15CB /*0012713*/,0x000C /*0000014*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x1080 /*0010200*/,0x1008 /*0010010*/, +0x0BD0 /*0005720*/,0x2005 /*0020005*/,0x83FC /*0101774*/,0x1080 /*0010200*/,0x1201 /*0011001*/,0x2001 /*0020001*/,0x0301 /*0001401*/,0x0000 /*0000000*/, +0x0A50 /*0005120*/,0x2005 /*0020005*/,0x83F9 /*0101771*/,0x1801 /*0014001*/,0x0A41 /*0005101*/,0x2001 /*0020001*/,0x0301 /*0001401*/,0x0000 /*0000000*/, +0x2002 /*0020002*/,0x02F9 /*0001371*/,0x0A0E /*0005016*/,0x15C4 /*0012704*/,0xAAAA /*0125252*/,0x15CB /*0012713*/,0x0018 /*0000030*/,0x15C0 /*0012700*/, +0x0800 /*0004000*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x0A44 /*0005104*/,0x1108 /*0010410*/,0x0A48 /*0005110*/,0x0A48 /*0005110*/,0x2204 /*0021004*/, +0x0301 /*0001401*/,0x0000 /*0000000*/,0x0C1F /*0006037*/,0xFFEA /*0177752*/,0x8702 /*0103402*/,0x0000 /*0000000*/,0x0131 /*0000461*/,0x8A4E /*0105116*/, +0x02F2 /*0001362*/,0x0102 /*0000402*/,0x0077 /*0000167*/,0xFE88 /*0177210*/,0x0BD0 /*0005720*/,0x7E93 /*0077223*/,0x15CB /*0012713*/,0x0024 /*0000044*/, +0x15C0 /*0012700*/,0x0C00 /*0006000*/,0x8A76 /*0105166*/,0x0001 /*0000001*/,0x02E4 /*0001344*/,0x15C2 /*0012702*/,0x0200 /*0001000*/,0x1080 /*0010200*/, +0x1008 /*0010010*/,0x0BD0 /*0005720*/,0x2005 /*0020005*/,0x83FC /*0101774*/,0x15C1 /*0012701*/,0x0003 /*0000003*/,0x0A0E /*0005016*/,0x0BDF /*0005737*/, +0x01C6 /*0000706*/,0x0210 /*0001020*/,0x15CE /*0012716*/,0x0018 /*0000030*/,0x1080 /*0010200*/,0x0A48 /*0005110*/,0x0A48 /*0005110*/,0x2008 /*0020010*/, +0x0301 /*0001401*/,0x0000 /*0000000*/,0x0BD0 /*0005720*/,0x0C1F /*0006037*/,0xFFEA /*0177752*/,0x8702 /*0103402*/,0x0000 /*0000000*/,0x0108 /*0000410*/, +0x2005 /*0020005*/,0x83F3 /*0101763*/,0x138B /*0011613*/,0x0A0E /*0005016*/,0x7E51 /*0077121*/,0x0104 /*0000404*/,0x0000 /*0000000*/,0x0102 /*0000402*/, +0x15CB /*0012713*/,0x000C /*0000014*/,0x17C0 /*0013700*/,0x01C0 /*0000700*/,0x17C1 /*0013701*/,0x01C2 /*0000702*/,0x17C4 /*0013704*/,0x01C4 /*0000704*/, +0x0074 /*0000164*/,0x0002 /*0000002*/,0x17C4 /*0013704*/,0xFF78 /*0177570*/,0x45C4 /*0042704*/,0xFE00 /*0177000*/,0x55C4 /*0052704*/,0xF600 /*0173000*/, +0x97C0 /*0113700*/,0xFF79 /*0177571*/,0x0C80 /*0006200*/,0x00A1 /*0000241*/,0x004C /*0000114*/,0x0000 /*0000000*/,0x4230 /*0041060*/,0x2A2D /*0025055*/] +} diff --git a/devices/pdp11/rom/M9312/README.md b/devices/pdp11/rom/M9312/README.md new file mode 100644 index 000000000..3fdd85ec4 --- /dev/null +++ b/devices/pdp11/rom/M9312/README.md @@ -0,0 +1,41 @@ +--- +layout: page +title: PDP-11 M9312 ROM Images +permalink: /devices/pdp11/rom/M9312/ +--- + +PDP-11 M9312 ROM Images +----------------------- + +An assortment of M9312 ROM images, source listings, etc, are available from Don North's [website](http://www.ak6dn.com/PDP-11/M9312/), +some of which we have reproduced here. + +Initially, all we had was this [256-word ROM](M9312.json) obtained from Paul Nankervis' [website](http://skn.noip.me/pdp11/iopage.js). +Cross-referencing that ROM with Don North's [M9312 PROM Files](http://www.ak6dn.com/PDP-11/M9312/) revealed that it came from +DEC P/N [23-616F1](23-616F1.txt): "11/60,70 Diagnostic/Console", albeit with some unexpected changes: + + 165322 022716 165320 L26: cmp #N2,(sp) ; 165320 changed to 000320 + ... + 165332 012716 165342 L27: mov #N3,(sp) ; 165342 changed to 000342 + ... + 165344 012746 165354 mov #N4,-(sp) ; 165354 changed to 000354 + ... + 165354 000137 165362 N4: jmp @#N5 ; 165362 changed to 000362 + 165360 000000 halt ; 000000 changed to 000200 + ... + 165372 012737 165400 000004 mov #N6,@#4 ; 165400 changed to 000400 + ... + 165406 012737 165714 000114 mov #N12,@#114 ; 165714 changed to 000714 + +The unmodified [23-616F1](23-616F1.json) ROM can be seen at address 165000 when configured in a +[PDP-11/70](/devices/pdp11/machine/1170/panel/debugger/) like so: + + + +As this [PDP-11 website](http://www.pdp-11.nl/pdp11-34a/cpu/options/bootstrap-info.html) explains: + +> The M9312 Bootstrap/terminator module contains a complete set of UNIBUS termination resistors and 512 words of ROM that can +be used for diagnostic routines, the console emulation routine and bootstrap programs. The module has 12 jumpers, W1 thu W12, +and five sockets to put ROMs in. One socket is used for a diagnostic ROM for the PDP-11/60 or PDP-11/70, or for a ROM that +contains the console emulation routine and diagnostics for all other PDP-11s. The other four sockets accept ROMs that contain +bootstrap programs. diff --git a/devices/pdp11/rom/README.md b/devices/pdp11/rom/README.md index d43e62260..9269fb592 100644 --- a/devices/pdp11/rom/README.md +++ b/devices/pdp11/rom/README.md @@ -7,4 +7,4 @@ permalink: /devices/pdp11/rom/ PDP-11 ROM Images ----------------- -Any ROM images added to the project will be stored here. +* [M9312](M9312/) diff --git a/modules/filedump/lib/filedump.js b/modules/filedump/lib/filedump.js index eae364503..1749455a7 100644 --- a/modules/filedump/lib/filedump.js +++ b/modules/filedump/lib/filedump.js @@ -252,7 +252,7 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done) var encoding = null; var sExt = str.getExtension(sFile); - if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst") { + if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst" || sExt == "txt") { encoding = "utf8"; } var options = {encoding: encoding}; @@ -343,7 +343,7 @@ FileDump.prototype.setData = function(buf, iStart, nSkip, sExt) var b, i, j, s; if (typeof buf == "string") { var ab = []; - if (sExt == "lst") { + if (sExt == "lst" || sExt == "txt") { ab = this.parseListing(buf); } else if (buf.indexOf('{') >= 0) { @@ -488,7 +488,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth * correct load (and exec) addresses. For now, we're simply inferring that the first address parsed * in parseListing() is both the load and exec address. */ - var sAddr = str.toHexWord(this.addrLoad) + (nBase == 8? " /*" + str.toOct(this.addrLoad, 6) + "*/" : ""); + var sAddr = str.toHexWord(this.addrLoad) + (nBase == 8? "/*" + str.toOct(this.addrLoad, 6) + "*/" : ""); sDump += this.dumpLine(2, '"load":' + sAddr + ',"exec":' + sAddr + ','); } sDump += this.dumpLine(2, (sKey? '"' + sKey + '":' : "") + this.sJSONWhitespace + chOpen); @@ -520,7 +520,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth if (cbItem > 2) { sLine += v; } else { - sLine += str.toHexWord(v) + (nBase == 8? " /*" + str.toOct(v & 0xffff, 6) + "*/" : ""); + sLine += str.toHexWord(v) + (nBase == 8? "/*" + str.toOct(v & 0xffff, 6) + "*/" : ""); } } else { diff --git a/modules/pdp11/lib/bus.js b/modules/pdp11/lib/bus.js index a72eb5dca..fdc2e32d9 100644 --- a/modules/pdp11/lib/bus.js +++ b/modules/pdp11/lib/bus.js @@ -665,7 +665,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller) if (type == MemoryPDP11.TYPE.RAM && !this.cbRAM) { this.cbRAM += size; } - this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); + this.status((size >> 10) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr)); return true; } @@ -1270,24 +1270,26 @@ BusPDP11.prototype.getMemorySize = function(type) * @param {function(number,number)|null|undefined} fnWriteByte * @param {function(number)|null|undefined} fnReadWord * @param {function(number,number)|null|undefined} fnWriteWord - * @param {string} [sName] * @param {number} [msgCategory] + * @param {string} [sName] + * @return {boolean} (true if entire range successfully registered, false if any conflicts) */ -BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName, msgCategory) +BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, msgCategory, sName) { for (var addr = start; addr <= end; addr += 2) { var off = addr & BusPDP11.IOPAGE_MASK; if (this.aIOHandlers[off] !== undefined) { Component.warning("I/O address already registered: " + str.toHexLong(addr)); - continue; + return false; } this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", msgCategory, false]; if (MAXDEBUG) this.log("addIOHandlers(" + str.toHexLong(addr) + ")"); } + return true; }; /** - * addIOTable(component, table, msgCategory) + * addIOTable(component, table, msgCategory, sName) * * Add I/O notification handlers from the specified table (a batch version of addIOHandlers). * @@ -1295,8 +1297,10 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte, * @param {Component} component * @param {Object} table * @param {number} [msgCategory] (default is BUS) + * @param {string} [sName] + * @return {boolean} (true if entire range successfully registered, false if any conflicts) */ -BusPDP11.prototype.addIOTable = function(component, table, msgCategory) +BusPDP11.prototype.addIOTable = function(component, table, msgCategory, sName) { for (var port in table) { var addr = +port; @@ -1338,9 +1342,12 @@ BusPDP11.prototype.addIOTable = function(component, table, msgCategory) var sReg = afn[4]; for (var iReg = 0; iReg < nRegs; iReg++, addr += 2) { if (sReg && nRegs > 1) sReg = afn[4] + iReg; - this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sReg, msgCategory || MessagesPDP11.BUS); + if (!this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, msgCategory || MessagesPDP11.BUS, sReg || sName)) { + return false; + } } } + return true; }; /** diff --git a/modules/pdp11/lib/messages.js b/modules/pdp11/lib/messages.js index cde75534d..3982a6985 100644 --- a/modules/pdp11/lib/messages.js +++ b/modules/pdp11/lib/messages.js @@ -38,7 +38,8 @@ var MessagesPDP11 = { FAULT: 0x00000020, BUS: 0x00000040, MEMORY: 0x00000080, - DEVICE: 0x00000100, + ROM: 0x00000100, + DEVICE: 0x00000200, KEYBOARD: 0x00010000, KEYS: 0x00020000, DISK: 0x00200000, @@ -71,6 +72,7 @@ MessagesPDP11.CATEGORIES = { "fault": MessagesPDP11.FAULT, "bus": MessagesPDP11.BUS, "memory": MessagesPDP11.MEMORY, + "rom": MessagesPDP11.ROM, "device": MessagesPDP11.DEVICE, "keyboard": MessagesPDP11.KEYBOARD, // "kbd" is also allowed as shorthand for "keyboard"; see doMessages() "key": MessagesPDP11.KEYS, // using "key" instead of "keys", since the latter is a method on JavasScript objects diff --git a/modules/pdp11/lib/rom.js b/modules/pdp11/lib/rom.js index 1d9204e18..49ee4eb12 100644 --- a/modules/pdp11/lib/rom.js +++ b/modules/pdp11/lib/rom.js @@ -33,12 +33,14 @@ "use strict"; if (NODE) { - var str = require("../../shared/lib/strlib"); - var web = require("../../shared/lib/weblib"); - var DumpAPI = require("../../shared/lib/dumpapi"); - var Component = require("../../shared/lib/component"); - var PDP11 = require("./defines"); - var MemoryPDP11 = require("./memory"); + var str = require("../../shared/lib/strlib"); + var web = require("../../shared/lib/weblib"); + var DumpAPI = require("../../shared/lib/dumpapi"); + var Component = require("../../shared/lib/component"); + var PDP11 = require("./defines"); + var BusPDP11 = require("./bus"); + var MemoryPDP11 = require("./memory"); + var MessagesPDP11 = require("./messages"); } /** @@ -51,11 +53,11 @@ if (NODE) { * alias: physical alias address (null if none) * file: name of ROM data file * - * NOTE: The ROM data will not be copied into place until the Bus is ready (see initBus()) AND the - * ROM data file has finished loading (see doneLoad()). + * NOTE: The ROM data will not be copied into place until the Bus is ready (see initBus()) AND + * the ROM data file has finished loading (see doneLoad()). * - * Also, while the size parameter may seem redundant, I consider it useful to confirm that the ROM you received - * is the ROM you expected. + * Also, while the size parameter may seem redundant, I consider it useful to confirm that the ROM + * you received is the ROM you expected. * * @constructor * @extends Component @@ -70,6 +72,7 @@ function ROMPDP11(parmsROM) this.addrROM = parmsROM['addr']; this.sizeROM = parmsROM['size']; + this.fRetainROM = false; /* * The new 'alias' property can now be EITHER a single physical address (like 'addr') OR an array of @@ -260,7 +263,9 @@ ROMPDP11.prototype.initROM = function() * whether they're ROM or RAM. However, the only way to modify a machine's ROM is with the Debugger, * and Debugger users should know better. */ - delete this.abInit; + if (!this.fRetainROM) { + delete this.abInit; + } } } this.setReady(); @@ -276,7 +281,24 @@ ROMPDP11.prototype.initROM = function() */ ROMPDP11.prototype.addROM = function(addr) { - if (this.bus.addMemory(addr, this.sizeROM, MemoryPDP11.TYPE.ROM)) { + this.status(this.sizeROM + "-byte ROM at " + str.toOct(addr)); + + if (addr >= BusPDP11.IOPAGE_16BIT && addr < BusPDP11.IOPAGE_16BIT + BusPDP11.IOPAGE_LENGTH) { + /* + * This code has been added as a work-around to effectively allow us to install small ROMs into portions + * of the IOPAGE address space, by installing I/O handlers for the entire range that return the corresponding + * bytes of the current ROM image on reads, and ignore any writes (which I'm only assuming is how a typical + * ROM "device" deals with writes; if we remove the write handler, then writes will cause a fault). + */ + var IOTable = { + [addr]: [ROMPDP11.prototype.readROMByte, ROMPDP11.prototype.writeROMByte, null, null, null, this.sizeROM >> 1] + }; + if (this.bus.addIOTable(this, IOTable, MessagesPDP11.ROM, this.idComponent)) { + this.fRetainROM = true; + return true; + } + } + else if (this.bus.addMemory(addr, this.sizeROM, MemoryPDP11.TYPE.ROM)) { if (DEBUG) this.log("addROM(): copying ROM to " + str.toHexLong(addr) + " (" + str.toHexLong(this.abInit.length) + " bytes)"); var i; for (i = 0; i < this.abInit.length; i++) { @@ -284,6 +306,7 @@ ROMPDP11.prototype.addROM = function(addr) } return true; } + /* * We don't need to report an error here, because addMemory() already takes care of that. */ @@ -309,6 +332,30 @@ ROMPDP11.prototype.cloneROM = function(addr) this.bus.setMemoryBlocks(addr, this.sizeROM, aBlocks); }; +/** + * readROMByte(addr) + * + * @this {ROMPDP11} + * @param {number} addr + * @return {number} + */ +ROMPDP11.prototype.readROMByte = function(addr) +{ + var i = (addr - this.addrROM); + return this.abInit[i]; +}; + +/** + * writeROMByte(data, addr) + * + * @this {ROMPDP11} + * @param {number} data + * @param {number} addr + */ +ROMPDP11.prototype.writeROMByte = function(data, addr) +{ +}; + /** * ROMPDP11.init() * diff --git a/versions/pdpjs/1.30.3/pdp11-dbg.js b/versions/pdpjs/1.30.3/pdp11-dbg.js index 18f9d0a96..2a6a5ccec 100644 --- a/versions/pdpjs/1.30.3/pdp11-dbg.js +++ b/versions/pdpjs/1.30.3/pdp11-dbg.js @@ -31,7 +31,7 @@ http://pcjs.org/modules/pdp11/lib/computer.js (C) Jeff Parsons 2012-2016 http://pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2016 */ -for(var k,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global?global:this,da=["Math","log2"],ea=0;ea>=3;return(c?"0o":"")+d}function p(a,b,c){var d="";b?8=e?48:55),d=String.fromCharCode(e)+d;a>>=4}return(c?"0x":"")+d} @@ -42,96 +42,96 @@ function Ea(a,b,c,d){var e=0,f=null,g=null;if("object"==typeof resources&&(f=res typeof b){var l="",m;for(m in b)b.hasOwnProperty(m)&&(l&&(l+="&"),l+=m+"="+encodeURIComponent(b[m]));l=l.replace(/%20/g,"+");h.open("POST",a,!!c);h.setRequestHeader("Content-type","application/x-www-form-urlencoded");h.send(l)}else h.open("GET",a,!!c),"bytes"==b&&h.overrideMimeType("text/plain; charset=x-user-defined"),h.send();c||(f=h.responseText,200!=h.status&&(e=h.status||-1),d&&d(a,f,e),g=[f,e]);return g} function Fa(a,b){var c,d={da:null,ha:null,La:null,Ka:null};if("["==b.charAt(0)||"{"==b.charAt(0))try{var e,f,g;if("<"==b.substr(0,1))throw Error(b);g=0>b.indexOf("0x")&&'["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");d.La=g.load;d.Ka=g.exec;if(e=g.bytes)d.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?this.lb=this.id:(this.Qa=this.id.substr(0,b),this.lb=this.id.substr(b+1));this[a]=c;this.A={ready:!1,$a:!1,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;v.push(this)}var ab=void 0,bb={}; -if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function lb(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b} -function z(a,b){b||(b=u);a.prototype=lb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),v=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},v=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;bb?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,bc:!1,ia:!1,error:!1};this.Tb=null;this.A.error=!1;this.G={};this.i=null;this.na=d||0;u.push(this)}var ab=void 0,bb={}; +if(window){ab||(ab=window.location.search.substr(1));for(var cb,db=/\+/g,eb=/([^&=]+)=?([^&]*)/g;cb=eb.exec(ab);)bb[decodeURIComponent(cb[1].replace(db," "))]=decodeURIComponent(cb[2].replace(db," "))}function fb(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=fb(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var mb=window.PCjs.Machines||(window.PCjs.Machines={}),u=window.PCjs.Components||(window.PCjs.Components=[])}else mb={},u=[];function nb(a,b,c){mb[a]&&b&&(mb[a][b]=c)}function ob(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;ba;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; +var wb="undefined"!==typeof ArrayBuffer,xb={cpu:1,trap:16,fault:32,bus:64,memory:128,rom:256,device:512,keyboard:65536,key:131072,disk:2097152,serial:8388608,speaker:33554432,computer:67108864,log:268435456,warn:536870912,buffer:1073741824,halt:-2147483648}; +function yb(a){t.call(this,"Panel",a,yb);this.f=this.v=this.Va=this.J=this.D=0;this.K=this.L=this.H=!1;this.M=zb;this.C={};this.g={START:[1,!0,!1,this.cd],STEP:[1,!1,!1,this.dd],ENABLE:[1,!1,!1,this.Zc],CONT:[1,!0,!1,this.Xc],DEP:[0,!0,!1,this.Yc],EXAM:[1,!0,!1,this.$c],LOAD:[1,!0,!1,this.bd],TEST:[0,!0,!1,this.ad]};for(a=0;22>a;a++)this.g["S"+a]=[0,!1,!1,this.ed,a]}z(yb);var zb=7;function Ab(a,b){return a.g[b]&&a.g[b][0]}k=yb.prototype;k.reset=function(){this.stop()}; k.ta=function(a,b,c,d){if(this.B&&this.B.ta(a,b,c,d)||this.b&&this.b.ta(a,b,c,d)||this.i&&this.i.ta(a,b,c,d))return!0;switch(b){case "R0":case "R1":case "R2":case "R3":case "R4":case "R5":case "R6":case "R7":case "NF":case "ZF":case "VF":case "CF":case "PS":return this.G[b]=c,this.D++,!0;default:return"led"==a||"rled"==a?(this.G[b]=c,this.C[b]=d?1:0,this.D++,!0):"switch"==a?(void 0===this.g[b]&&(this.g[b]=[d?1:0]),this.G[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c= a.g[b];Bb(a,b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.K="DEP"==b,a.L="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.g[b];c[1]&&c[2]&&(Bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.ta.call(this,a,b,c,d)}};k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.b=c;this.i=d;Cb(b,this,Db);Eb(b,this.reset.bind(this));Fb(this);Gb(this)};k.Ha=function(a,b){b||(Hb(),this.reset());return!0};k.Ga=function(){return!0}; function Ib(a,b,c){if(a=a.G[b])a.style.backgroundColor=c?"#ff0000":"#000000"}function Fb(a,b){for(var c in a.C)Ib(a,c,null!=b?b:a.C[c])}function Bb(a,b,c){if(a=a.G[b])a.style.marginTop=c?"0px":"20px",a.style.backgroundColor=c?"#00ff00":"#228B22"}function Gb(a){for(var b in a.g)Bb(a,b,a.g[b][0])}function Jb(a,b,c,d){a.G[b]&&(void 0===c&&(vb(a,"Value for "+b+" is invalid"),a.b.ga()),c=8==(a.i&&a.i.ca||8)?ra(c,d):p(c,d),a.G[b].textContent!=c&&(a.G[b].textContent=c))} -k.cd=function(a){a||this.b.A.Z||(this.w.reset(),Yb(this.b),Ab(this,"ENABLE")&&this.b.ib())};k.dd=function(){};k.Zc=function(a){a||this.b.ga()};k.Xc=function(a){if(!a&&!this.b.A.Z)if(Ab(this,"ENABLE"))this.b.ib();else{if((a=this.i)&&!sb(a,!0))rb(a,!0),a.jb(0),rb(a,!1);else try{var b=this.b.jb(1);0a.b.pb?8:16,c=65472<=a.f&&a.f<65472+b,b=c?1:2,c=c?15:a.w.Fa;Ab(a,"STEP")||(b=-b);a.f=a.f&~c|a.f+b&c;dc(a,"A",a.f,22)}function cc(a,b){a.v=b&65535;dc(a,"D",a.v,16);return a.v}function fc(a,b,c){a.C[b]=c;a.H||Ib(a,b,c)}function dc(a,b,c,d){for(var e=0;ec;c++)a.g["S"+c][0]=b&1<>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.Za=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=Array(this.D);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.Za[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return this.i&&F(this.i,e[5])&&E(this.i,e[4]+".readByte("+J(this.i,b)+"): "+J(this.i,c),!0,!d.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 lc(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 g&1&&(f=e.Za[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.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 mc(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 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 nc(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?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))} +k.fd=function(a){return(a?this.Va:this.v)&65535};k.ae=function(a){this.v=a};var hc={},Db=(hc[65400]=[null,null,yb.prototype.fd,yb.prototype.ae,"CNSW"],hc);function Hb(){for(var a=!1,b=D(document,"pdp11","panel"),c=0;c>2;this.w=this.ya-1;this.D=this.H/this.ya|0;this.$a=[];this.la=0;this.f=!1;this.Ob=0;this.C=[];this.Jc=[kc,lc,mc,nc];a=new I(this);oc(a,this.i);this.W=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);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 lc(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 g&1&&(f=e.$a[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d?this.i&&F(this.i,f[5])&&E(this.i,f[4]+".writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0,!e.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 mc(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 nc(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 qc(a,b){if(b!=a.B){var c;a.B&&(c=(1<>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}if(0>=g){d!=wc||a.Ob||(a.Ob+=c);c/=1024;var r;e="";r?10>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)}; -k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a};k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.ab=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)}; -k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--};k.hb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; -function zc(a){for(var b=0,c=[],d=0;da.b.pb)){var h=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,m=g[2]?g[2].bind(b):null,n=g[3]?g[3].bind(b):null,r=g[5]||1;65472<=f&&65487>=f&&(!h&&m&&(h=function(a){return function(b){return a(b)&255}.bind(b)}(m)),!l&&n&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(n)));for(var t=g[4],w=0;w>5&3;b.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.eb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.ke=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Td=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; -k.Ke=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.Md=function(a){return this.b.V[1][a>>1&7]};k.De=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Kd=function(a){return this.b.V[1][(a>>1&7)+8]};k.Be=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Ld=function(a){return this.b.xa[1][a>>1&7]};k.Ce=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Jd=function(a){return this.b.xa[1][(a>>1&7)+8]}; -k.Ae=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.ge=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.ee=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.fe=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.de=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; -k.Sd=function(a){return this.b.V[3][a>>1&7]};k.Je=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Qd=function(a){return this.b.V[3][(a>>1&7)+8]};k.He=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Rd=function(a){return this.b.xa[3][a>>1&7]};k.Ie=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Pd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ge=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; -k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.pe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.se=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; -k.qe=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.re=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.be=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Od=function(){return 1};k.Fe=function(){};k.gd=function(){return this.b.fa}; -k.ae=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.ie=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.le=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.Nd=function(a){return a?this.b.fb&65280:0};k.Ee=function(a){this.b.fb=a|255};k.xd=function(){return Pc(this.b)};k.oe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; -var M={},L=(M[61568]=[null,null,K.prototype.Td,K.prototype.Ke,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Md,K.prototype.De,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Kd,K.prototype.Be,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Ld,K.prototype.Ce,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Jd,K.prototype.Ae,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.ge,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.ee,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, -K.prototype.fe,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.de,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.ke,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.he,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.je,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Sd,K.prototype.Je,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Qd, -K.prototype.He,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Rd,K.prototype.Ie,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Pd,K.prototype.Ge,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, -"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.pe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.se,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, -K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.qe,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.re,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.be,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Od,K.prototype.Fe,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.ae,"CPUERR",1,1170],M[65528]= -[null,null,K.prototype.pd,K.prototype.ie,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.le,"PIR"],M[65532]=[null,null,K.prototype.Nd,K.prototype.Ee,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.oe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +function tc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.ka;0g&&(n=g);if(!e&&l&&l.size){if(l.type==d){if(f+g<=l.F)return l.Mb+=l.F-f,l.F=f,!0;if(f>=l.F+l.Mb){n=l.size-(f-m);n>g&&(n=g);l.Mb=f-l.F+n;f=m+a.ya;g-=n;h++;continue}}return vc(1,f,g)}f=new I(a,f,n,a.ya,d,e);oc(f,a.i,l);a.W[h++]=f;f=m+a.ya;g-=n}return 0>=g?(d!=wc||a.Ob||(a.Ob+=c),a.status((c>>10)+"Kb "+xc[d]+" at "+ra(b)),!0):vc(2,b,c)} +function sc(a,b,c){var d=[];for(b>>>=a.ka;0>>=a.ka;0>>this.ka].Xb(a&this.w,a)};k.Vb=function(a){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;a=this.W[(a&this.Fa)>>>this.ka].hc(a&this.w,a);this.la--;return a}; +k.oa=function(a){3932160<=a&&(a=yc(this.b,a));return this.W[(a&this.Fa)>>>this.ka].sa(a&this.w,a)};k.bb=function(a){3932160<=a&&(a=yc(this.b,a));var b=a&this.w,c=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;a=this.W[c].ic(b,a);this.la--;return a};k.Yb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].$b(a&this.w,b&255,a)};k.rb=function(a,b){3932160<=a&&(a=yc(this.b,a));this.f=!1;this.la++;this.W[(a&this.Fa)>>>this.ka].ac(a&this.w,b&255,a);this.la--}; +k.ib=function(a,b){3932160<=a&&(a=yc(this.b,a));this.W[(a&this.Fa)>>>this.ka].Nb(a&this.w,b&65535,a)};k.Db=function(a,b){3932160<=a&&(a=yc(this.b,a));var c=a&this.w,d=(a&this.Fa)>>>this.ka;this.f=!1;this.la++;this.W[d].mc(c,b&65535,a);this.la--}; +function zc(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.Na=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ua!=c&&(b.Ua=c,Oc(b))}};k.rd=function(){var a=this.b.fb;a&65280&&(a=(a<<8|a>>8)&65535);return a};k.sd=function(){return this.b.Kb};k.td=function(){return this.b.qb};k.le=function(a){var b=this.b;1170>b.pb&&(a&=-49);b.qb!=a&&(b.qb=a,b.Sb=a&16?4194303:262143,Oc(b))};k.Ud=function(a){a=a>>1&63;var b=this.b.Lb[a>>1];return a&1?b>>16:b&65535}; +k.Me=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.Nd=function(a){return this.b.V[1][a>>1&7]};k.Fe=function(a,b){this.b.V[1][b>>1&7]=a&65295};k.Ld=function(a){return this.b.V[1][(a>>1&7)+8]};k.De=function(a,b){this.b.V[1][(b>>1&7)+8]=a&65295};k.Md=function(a){return this.b.xa[1][a>>1&7]};k.Ee=function(a,b){b=b>>1&7;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.Kd=function(a){return this.b.xa[1][(a>>1&7)+8]}; +k.Ce=function(a,b){b=(b>>1&7)+8;this.b.xa[1][b]=a;this.b.V[1][b]&=65295};k.nd=function(a){return this.b.V[0][a>>1&7]};k.he=function(a,b){this.b.V[0][b>>1&7]=a&65295};k.ld=function(a){return this.b.V[0][(a>>1&7)+8]};k.fe=function(a,b){this.b.V[0][(b>>1&7)+8]=a&65295};k.md=function(a){return this.b.xa[0][a>>1&7]};k.ge=function(a,b){b=b>>1&7;this.b.xa[0][b]=a;this.b.V[0][b]&=65295};k.kd=function(a){return this.b.xa[0][(a>>1&7)+8]};k.ee=function(a,b){b=(b>>1&7)+8;this.b.xa[0][b]=a;this.b.V[0][b]&=65295}; +k.Td=function(a){return this.b.V[3][a>>1&7]};k.Le=function(a,b){this.b.V[3][b>>1&7]=a&65295};k.Rd=function(a){return this.b.V[3][(a>>1&7)+8]};k.Je=function(a,b){this.b.V[3][(b>>1&7)+8]=a&65295};k.Sd=function(a){return this.b.xa[3][a>>1&7]};k.Ke=function(a,b){b=b>>1&7;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Qd=function(a){return this.b.xa[3][(a>>1&7)+8]};k.Ie=function(a,b){b=(b>>1&7)+8;this.b.xa[3][b]=a;this.b.V[3][b]&=65295};k.Bb=function(a){a&=7;return this.b.N&2048?this.b.Wa[a]:this.b.u[a]}; +k.Eb=function(a,b){b&=7;this.b.N&2048?this.b.Wa[b]=a:this.b.u[b]=a};k.yd=function(){return this.b.N&49152?this.b.Ia[0]:this.b.u[6]};k.qe=function(a){this.b.N&49152?this.b.Ia[0]=a:this.b.u[6]=a};k.Bd=function(){return this.b.u[7]};k.te=function(a){this.b.u[7]=a};k.Cb=function(a){a&=7;return this.b.N&2048?this.b.u[a]:this.b.Wa[a]};k.Fb=function(a,b){b&=7;this.b.N&2048?this.b.u[b]=a:this.b.Wa[b]=a};k.zd=function(){return 1==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[1]}; +k.re=function(a){1==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[1]=a};k.Ad=function(){return 3==(this.b.N&49152)>>14?this.b.u[6]:this.b.Ia[3]};k.se=function(a){3==(this.b.N&49152)>>14?this.b.u[6]=a:this.b.Ia[3]=a};k.hd=function(a){return this.b.Cc[a-65504>>1]};k.ce=function(a,b){this.b.Cc[b-65504>>1]=a};k.zc=function(a){if(65520==a){a=0;switch(wc){case wc:a=this.w.Ob}a=(a>>6)-1}else a=0;return a};k.Gc=function(){};k.Pd=function(){return 1};k.He=function(){};k.gd=function(){return this.b.fa}; +k.be=function(){this.b.fa=0};k.pd=function(){return this.b.Bc};k.je=function(a,b){b&1||(a&=255);this.b.Bc=a};k.ud=function(a){return a?this.b.kc:0};k.me=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.Od=function(a){return a?this.b.gb&65280:0};k.Ge=function(a){this.b.gb=a|255};k.xd=function(){return Pc(this.b)};k.pe=function(a){Qc(this.b,a&-1809|Pc(this.b)&1808);this.b.I|=128};k.Fc=function(a,b){F(this)&&E(this,"writeIgnored("+ra(b)+"): "+ra(a),!0,!0)}; +var M={},L=(M[61568]=[null,null,K.prototype.Ud,K.prototype.Me,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.Nd,K.prototype.Fe,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Ld,K.prototype.De,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.Md,K.prototype.Ee,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Kd,K.prototype.Ce,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.nd,K.prototype.he,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.ld,K.prototype.fe,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.md, +K.prototype.ge,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.kd,K.prototype.ee,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.td,K.prototype.le,"MMR3",1,1145],M[65382]=[null,null,K.prototype.od,K.prototype.ie,"LKS"],M[65402]=[null,null,K.prototype.qd,K.prototype.ke,"MMR0",1,1145],M[65404]=[null,null,K.prototype.rd,K.prototype.Fc,"MMR1",1,1145],M[65406]=[null,null,K.prototype.sd,K.prototype.Fc,"MMR2",1,1145],M[65408]=[null,null,K.prototype.Td,K.prototype.Le,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.Rd, +K.prototype.Je,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.Sd,K.prototype.Ke,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.Qd,K.prototype.Ie,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Bb,K.prototype.Eb,"R0SET0"],M[65473]=[null,null,K.prototype.Bb,K.prototype.Eb,"R1SET0"],M[65474]=[null,null,K.prototype.Bb,K.prototype.Eb,"R2SET0"],M[65475]=[null,null,K.prototype.Bb,K.prototype.Eb,"R3SET0"],M[65476]=[null,null,K.prototype.Bb,K.prototype.Eb,"R4SET0"],M[65477]=[null,null,K.prototype.Bb,K.prototype.Eb, +"R5SET0"],M[65478]=[null,null,K.prototype.yd,K.prototype.qe,"R6KERNEL"],M[65479]=[null,null,K.prototype.Bd,K.prototype.te,"R7KERNEL"],M[65480]=[null,null,K.prototype.Cb,K.prototype.Fb,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Cb,K.prototype.Fb,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Cb,K.prototype.Fb,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Cb,K.prototype.Fb,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Cb,K.prototype.Fb,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Cb, +K.prototype.Fb,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.zd,K.prototype.re,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Ad,K.prototype.se,"R6USER",1,1145],M[65504]=[null,null,K.prototype.hd,K.prototype.ce,"CTRL",1,1170],M[65520]=[null,null,K.prototype.zc,K.prototype.Gc,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.zc,K.prototype.Gc,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.Pd,K.prototype.He,"SYSID",1,1170],M[65526]=[null,null,K.prototype.gd,K.prototype.be,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.pd,K.prototype.je,"MB",1,1170],M[65530]=[null,null,K.prototype.ud,K.prototype.me,"PIR"],M[65532]=[null,null,K.prototype.Od,K.prototype.Ge,"SL"],M[65534]=[null,null,K.prototype.xd,K.prototype.pe,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; Xa(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.b=new Int32Array(this.C,0,this.size>>2),Yc(this,Uc?Zc:$c);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.w.Da(b,64,2);b=a>>2;a=(a&3)<<3;var c=this.b[b]>>a;return 24>a?c&65535:c&255|(this.b[b+ -1]&255)<<8},wa:function(a,b){var c=a>>2;a=(a&3)<<3;this.b[c]=this.b[c]&~(255<>2;a=(a&3)<<3;24>a?this.b[c]=this.b[c]&~(65535<>8);this.Sa=!0},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},ma:function(a, +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},P:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,1,c.M)&&c.ga(!0)}return this.hc(a,b)},Y:function(a,b){if(this.i&&null!=this.F){var c=this.i;ed(c,this.F+a,2,c.M)&&c.ga(!0)}return this.ic(a,b)},Ya:function(a, b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,1,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.ac(a,b,c)},Aa:function(a,b,c){if(this.i&&null!=this.F){var d=this.i;ed(d,this.F+a,2,d.D)&&d.ga(!0)}this.f?this.v(a,b,c):this.mc(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},Qa:function(a,b){a&1&&this.w.Da(b,64,2);return this.D.getUint16(a,!0)},$:function(a,b){a&1&&this.w.Da(b,64,2); -a=this.J[a>>1];this.i&&F(this.i,128)&&E(this.i,"Memory.readWord("+J(this.i,b)+"): "+J(this.i,a),!0);return a},ja:function(a,b){this.G[a]=b;this.Sa=!0},ua:function(a,b,c){this.G[a]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeByte("+J(this.i,c)+","+J(this.i,b)+")",!0)},lb:function(a,b,c){a&1&&this.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, +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},ma: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.w.Da(c,64,4);this.D.setUint16(a,b,!0);this.Sa=!0},Ja:function(a,b,c){a&1&&this.w.Da(c,64,4);this.J[a>>1]=b;this.Sa=!0;this.i&&F(this.i,128)&&E(this.i,"Memory.writeWord("+J(this.i,c)+","+J(this.i, b)+")",!0)}};function oc(a,b,c){a.i=b;a.g=a.B=0;c&&((a.g=c.g)&&dd(a,cd,!1),(a.B=c.B)&&bd(a,cd,!1))}function fd(a,b){b?--a.B||(a.$b=a.f?a.v:a.ac,a.Nb=a.f?a.H:a.mc):--a.g||(a.Xb=a.hc,a.sa=a.ic)}function bd(a,b,c){c&&a.B||(a.$b=!a.f&&b[1]||a.v,a.Nb=!a.f&&b[3]||a.H);if(c||void 0===c)a.ac=b[1]||a.v,a.mc=b[3]||a.H}function dd(a,b,c){c&&a.g||(a.Xb=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 Yc(a,b){b||(b=gd);dd(a,b,void 0);bd(a,b,void 0)} -var gd=[],ad=[I.prototype.S,I.prototype.wa,I.prototype.ca,I.prototype.Na],cd=[I.prototype.P,I.prototype.ma,I.prototype.Y,I.prototype.Aa];if(wb)var $c=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.lb],Zc=[I.prototype.R,I.prototype.ua,I.prototype.$,I.prototype.Ja]; -function hd(a,b){u.call(this,"CPU",a,hd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.cb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.cb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Xd.bind(this);H(this)}z(hd);var id=["power","reset"];k=hd.prototype; +var gd=[],ad=[I.prototype.S,I.prototype.ua,I.prototype.ca,I.prototype.Na],cd=[I.prototype.P,I.prototype.Ya,I.prototype.Y,I.prototype.Aa];if(wb)var $c=[I.prototype.M,I.prototype.ja,I.prototype.Qa,I.prototype.wa],Zc=[I.prototype.R,I.prototype.ma,I.prototype.$,I.prototype.Ja]; +function hd(a,b){t.call(this,"CPU",a,hd,1);var c=a.multiplier||1;this.mb=a.cycles||b;this.eb=c;this.vb=Math.round(this.mb/1E4)/100;this.ob=this.vb*this.eb;this.A.Z=!1;this.A.Zb=!1;this.A.ub=a.autoStart;this.A.xb=!1;this.Hb=this.ma=0;this.Ib=a.csStart;this.yb=a.csInterval;this.zb=a.csStop;this.K=[];this.wc=this.Yd.bind(this);H(this)}z(hd);var id=["power","reset"];k=hd.prototype; k.Ea=function(a,b,c,d){this.B=a;this.w=b;this.i=d;for(b=0;b=a.ma&&(a.ma+=a.yb,c=!0);0<=a.zb&&a.zb<=od(a)&&(a.yb=a.zb=-1,ld(a),a.ga(),c=!0);c&&a.j(od(a)+" cycles: checksum="+p(a.Hb))}} -k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.cb=b;b=a.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.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.cb/1E3*c|0,a.K[b][0]=c+rd(a))} +k.ta=function(a,b,c){var d=this;switch(b){case "power":case "reset":return this.G[b]=c,!0;case "run":return this.G[b]=c,c.onclick=function(){var a;if(a=d.B)if(a=d.B,a.A.ia)a=!0;else{var b=null,c,h=ob(a.id);for(c=0;ca.Y/a.ob?b=1:d=!0;a.eb=b;b=a.vb*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.B&&a.B.sb()}$b(a,a.S);a.S=0;a.R=Ba();a.$=0;qd(a);return d}function Kc(a,b){var c=a.K.length;a.K.push([-1,b]);return c}function Mc(a,b,c){0<=b&&ba.K[b][0]&&(c=a.mb*a.eb/1E3*c|0,a.K[b][0]=c+rd(a))} function sd(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||b>d[0]&&(b=d[0])}return b}function Zb(a,b){for(var c=a.K.length-1;0<=c;c--){var d=a.K[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}}function rd(a,b){var c=a.ca-=a.b;a.b=a.J=0;b&&(a.ca=0);return c} -k.Xd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Ya=Ba();if(this.$){var a=this.Ya-this.$;a>this.Ub&&(this.R+=a,this.R>this.Ya&&(this.R=this.Ya))}try{do{var b=sd(this,this.A.xb?1:this.kb);try{this.jb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.kb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); -return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.kb));var c=c-(this.$-this.Ya),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; -k.ib=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.jb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; +k.Yd=function(){if(this.A.Z){this.wb>=this.mb&&qd(this,!0);this.Aa=0;this.Za=Ba();if(this.$){var a=this.Za-this.$;a>this.Ub&&(this.R+=a,this.R>this.Za&&(this.R=this.Za))}try{do{var b=sd(this,this.A.xb?1:this.lb);try{this.kb(b)}catch(e){if("number"!=typeof e)throw e;}b=rd(this,!0);this.Aa+=b;this.S+=b;ac(this,b);Zb(this,b);this.ua-=b;if(0>=this.ua){this.ua+=this.lb;15<=++this.Wb&&(this.qa(),this.Wb=0);break}}while(this.A.Z)}catch(e){this.ga();this.B&&this.B.stop(Ba(),od(this));vb(this,e.stack||e.message); +return}if(this.A.Z){a=setTimeout;b=this.wc;this.$=Ba();var c=this.Ub;this.Aa&&(c=Math.round(c*this.Aa/this.lb));var c=c-(this.$-this.Za),d=this.$-this.R;d&&(this.Y=Math.round(this.S/(10*d))/100,864E5<=d&&(this.ja=0,pd(this)));if(0>c||this.Yc&&(this.R-=c),c=0;this.wb+=this.Aa;this.$+=c;a(b,c)}}}; +k.jb=function(a){if(ub(this))return!1;if(this.A.Z)return this.j(this.toString()+" busy"),!1;pd(this);this.A.Z=!0;this.A.Zb=!0;var b=this.G.run;b&&(b.textContent="Halt");this.B&&(a&&this.B.sb(!0),this.B.start(this.R,od(this)));setTimeout(this.wc,0);return!0};k.kb=function(){return 0};k.ga=function(a){var b=!1;if(this.A.Z){rd(this);$b(this,this.S);this.S=0;this.A.Z=!1;if(b=this.G.run)b.textContent="Run";this.B&&this.B.stop(Ba(),od(this));b=!0}this.A.complete=a;return b}; function td(a){this.pb=+a.model||1170;this.Pb=a.addrReset||0;hd.call(this,a,6666667);this.decode=1120==this.pb?ud.bind(this):vd.bind(this);wd(this);this.L=0;this.M=null;this.A.complete=!1}z(td,hd);k=td.prototype;k.reset=function(){this.status("model "+this.pb);this.A.Z&&this.ga();wd(this);kd(this);this.A.error=!1;this.parent.reset.call(this)}; function wd(a){a.T=65536;a.U=32768;a.aa=65535;a.X=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.v=0;a.Na=0;a.Sc=[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.Cc=[0,0,0,0,0,0,0,0];a.Bc=0;a.I=0;a.D=a.H=0;a.g=a.f=a.tb=0;a.wa=-1;Yb(a)}function Yb(a){a.fb=255;a.fa=0;a.kc=0;a.C=0;a.eb=0;a.Kb=0;a.qb=0;a.Ua=0;a.Ja=0;a.Sb=262143;a.M=null;a.w&&Oc(a)}function Oc(a){a.Ua?(a.P=65536,a.ba=a.Rc,a.sa=a.Ud,a.Nb=a.Le,qc(a.w,a.qb&16?22:18)):(a.P=0,a.ba=a.Qc,a.sa=a.Ac,a.Nb=a.Hc,qc(a.w,16))}function xd(a,b,c){a.Pb=b;O(a,b);!c&&a.i&&(a.ga()||md(a.i))}k.tc=function(){return 0}; -k.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.ja,this.cb]);a.set(2,zc(this.w));return a.data()};k.restore=function(a){var b=a[1];this.ja=b[1];pd(this,b[3]);a:{b=this.w;a=a[2];var c;for(c=0;c>14&3;c=a.N>>14&3;a.v!=c&&(a.Ia[c]=a.u[6],a.u[6]=a.Ia[a.v]);a.N=b;a.I|=2}function R(a,b){a.I&128||(a.X=a.aa=b,a.U=0)}function Dd(a,b,c){a.I&128||(a.X=a.aa=a.T=b,a.U=c||0)}function Ed(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^b)&(d^b))} -function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.eb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; +function Fd(a,b){a.I&128||(a.X=a.aa=a.T=b,a.U=a.X^a.T>>1)}function Gd(a,b,c,d){a.I&128||(a.X=a.aa=a.T=b,a.U=(c^d)&(d^b))}k.pa=function(a,b){if(!this.L){var c=!1;0>this.wa?this.wa=Pc(this):this.v||(a=4,c=!0);this.C&57344||(this.fb=63222,this.Kb=a);this.v=0;var d=this.sa(a|this.P),e=this.sa(a+2&65535|this.P);Qc(this,e&-12289|this.wa>>2&12288);c&&(this.fa|=4,this.u[6]=4);Yd(this,this.wa);Yd(this,this.u[7]);O(this,d);this.I&=-113;this.wa=-1;this.I|=8;this.Wc=a;this.Uc=b;if(26!=b)throw a;}}; function Zd(a){var b=$d(a),c=$d(a)&-1793;a.N&49152&&(c=c&-225|a.N&63712);O(a,b);Qc(a,c);a.I&=-17}function yc(a,b){var c=b>>13&31;31>c&&a.qb&32&&(b=a.Lb[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} function ae(a,b,c){var d,e,f;if(!(c&a.Ua))return b;d=b>>13;a.qb&a.Sc[a.v]||(d&=7);e=a.V[a.v][d];f=(a.xa[a.v][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.v][d]=e;if(4194170!==f||a.v)a.Ja=a.v,a.Na=d;b=!1;g&&(g&57344&&(0<=a.wa&&(g|=128),a.C&57344||(a.C=a.C|g|a.Ja<<5|a.Na<<1), -b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| -g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.eb=a.eb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.fb||65534<=a.u[6])&&(a.u[6]<=a.fb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; -k.ab=function(a){if(!this.Ua)return this.w.ab(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Ud=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.hb(a,b&65535)}; -k.Le=function(a,b){this.w.hb(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=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 fe(a,b,c,d){a.C&57344||(a.eb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.hb(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} +b=!0),a.C&61440||!(4191360>f||4194239c&&d&1&&(f=1));a.b-=3;break;case 3:f=2;e=a.u[c];7!==c&&(e|=g);e=a.sa(e);e|=g;a.b-=7;break;case 4:f=-2;6>c&&d&1&&(f=-1);e=a.u[c]+f&65535;7!==c&&(e|=g);a.b-=4;break;case 5:f=-2;e=a.u[c]-2&65535;7!==c&&(e|=g);e=a.sa(e)| +g;a.b-=8;break;case 6:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535|g,a.b-=6,e;case 7:return e=a.sa(Cd(a,2)),e=e+a.u[c]&65535,e=a.sa(e|a.P)|g,a.b-=10,e}a.u[c]=a.u[c]+f&65535;!g||a.C&57344||(a.fb=a.fb<<8|f<<3&248|c);6==c&&!a.v&&d&4&&0>=f&&(a.u[6]<=a.gb||65534<=a.u[6])&&(a.u[6]<=a.gb-32?(a.fa|=4,a.u[6]=4,a.pa(4,24)):(a.fa|=8,a.I|=64));return e}k.Vb=function(a){if(!this.Ua)return this.w.Vb(a);this.L++;a=be(this,ae(this,a,3));this.L--;return a}; +k.bb=function(a){if(!this.Ua)return this.w.bb(a);this.L++;a=this.Ac(ae(this,a,2));this.L--;return a};k.rb=function(a,b){this.Ua?(this.L++,ce(this,ae(this,a,5),b),this.L--):this.w.rb(a,b)};k.Db=function(a,b){this.Ua?(this.L++,this.Hc(ae(this,a,4),b),this.L--):this.w.Db(a,b)};k.Qc=function(a,b,c){return de(this,a,b,c)};k.Rc=function(a,b,c){return ae(this,de(this,a,b,c),c)};k.Ac=function(a){return this.w.oa(a)};k.Vd=function(a){return this.w.oa(ae(this,a,2))};k.Hc=function(a,b){this.w.ib(a,b&65535)}; +k.Ne=function(a,b){this.w.ib(ae(this,a,4),b)};function ee(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?(d=de(a,b,d,2),c&65536||61440!==(a.N&61440)&&(d&=65535),a.v=a.N>>12&3,c=a.sa(d|c&a.P),a.v=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 fe(a,b,c,d){a.C&57344||(a.fb=22);var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=de(a,b,e,4),c&65536||(e&=65535),a.v=a.N>>12&3,e=ae(a,e|c&65536,4),a.v=a.N>>14&3,a.w.ib(e,d)):6!=e||(a.N>>2&12288)===(a.N&12288)?a.u[e]=d:a.Ia[a.N>>12&3]=d} function ge(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function he(a,b){b>>=6;var c=a.H=b&7;return(b=a.D=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]}function ie(a,b){var c=a.f=b&7;b=a.g=(b&56)>>3;return de(a,b,c,8)}function je(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?be(a,a.ba(b,c,3)):a.u[c]&255}function ke(a,b){var c=a.f=b&7;return(b=a.g=(b&56)>>3)?a.w.oa(a.ba(b,c,2)):a.u[c]} -function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.hb(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} -function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.hb(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} -k.jb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.Zd,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, +function S(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.tb=a.ba(b,e,7),ce(a,e,d.call(a,c,be(a,e)))):a.u[e]=a.u[e]&65280|d.call(a,c,a.u[e])}function T(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?(e=a.ba(b,e,6),a.w.ib(e,d.call(a,c,a.w.oa(e)))):a.u[e]=d.call(a,c,a.u[e])}function le(a,b,c,d){var e=a.f=b&7;(b=a.g=(b&56)>>3)?ce(a,a.ba(b,e,5),c):a.u[e]=c?d&1?c<<24>>24&65535:a.u[e]&-256|c&255:a.u[e]&-256;return c} +function me(a,b,c){var d=a.f=b&7;(b=a.g=(b&56)>>3)?a.w.ib(a.ba(b,d,4),c):a.u[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.u[7]+(b<<24>>23)),a.b-=2);a.b-=3} +k.kb=function(a){this.A.complete=!0;var b=this.i&&ne(this.i)?1:this.A.Zb?-1:0,c=a?this.A.Zb?0:1:-1;this.A.Zb=!1;this.ca=this.b=a;do{if(b){if(this.i&&oe(this.i,this.u[7],c)){this.ga();break}c||c++;b++}if(this.I){this.I&112&&(this.I&32?this.pa(168,28):this.I&64?this.pa(4,30):this.I&16&&this.pa(12,32),this.I&=-113);if(a=this.I&7){a=!1;if(this.I&2){this.I&=-3;var d=160,e=(this.kc&224)>>5,f=this.M&&this.M.Ab>e?this.M:null;f&&(d=f.$d,e=f.Ab);e>(this.N&224)>>5?(this.I&4&&(Cd(this,2),this.I&=-5),this.pa(d, 26),e=!0):e=!1;if(e){if(f)if(a=f,f=this.M,f==a)this.M=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(Bd(this))}while(0>1|b<<16;Fd(this,a);return a&65535}function ue(a,b){a=b&2048|b>>1|b<<8;Fd(this,a<<8);return a&255}function ve(a,b){a=b&~a;R(this,a);return a}function we(a,b){a=b&~a;R(this,a<<8);return a}function xe(a,b){a|=b;R(this,a);return a}function ye(a,b){a|=b;R(this,a<<8);return a} function ze(a,b){a=~b|65536;Dd(this,a);return a&65535}function Ae(a,b){a=~b|256;Dd(this,a<<8);return a&255}function Be(a,b){a=b-a;this.I&128||(this.X=this.aa=a,this.U=b&(b^a));return a&65535}function Ce(a,b){a=b-a;var c=a<<8;b<<=8;this.I&128||(this.X=this.aa=c,this.U=b&(b^c));return a&255}function De(a,b){a=b+a;this.I&128||(this.X=this.aa=a,this.U=a&(b^a));return a&65535}function Ee(a,b){a=b+a;var c=a<<8;this.I&128||(this.X=this.aa=c,this.U=c&(b<<8^c));return a&255} @@ -158,51 +158,51 @@ this.f?2:0)}],dg=[function(a){S(this,a,0,Ke);this.b-=this.g?9+(this.tb&1):3+(7== var ig=[function(a){jg[a>>8&15].call(this,a)},Af,of,Ye,Ue,We,Pe,function(a){kg[a>>8&15].call(this,a)},function(a){lg[a>>8&15].call(this,a)},Bf,pf,Ze,Ve,Xe,Jf,W],jg=[function(a){mg[a>>4&15].call(this,a)},lf,hf,$e,af,ff,bf,df,yf,yf,Pf,Rf,Tf,function(a){ng[a>>6&3].call(this,a)},W,W],ng=[function(a){a=this.u[7]+((a&63)<<1)&65535;var b=this.sa(a|this.P);O(this,this.u[5]);this.u[6]=a+2&65535;this.u[5]=b;this.b-=8},function(a){a=ee(this,a,0);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J= this.b;fe(this,a,0,b);R(this,b);this.b=this.J-Cf[this.g]},function(a){R(this,me(this,a,this.Ta?65535:0));this.b-=this.g?9:3+(7==this.f?2:0)}],mg=[function(a){og[a&15].call(this,a)},W,W,W,wf,wf,wf,wf,Hf,function(a){a&8?(this.N&49152||(this.N=this.N&-2017|(a&7)<<5,this.I|=1),this.b-=5):W.call(this,a)},Vf,Xf,Kf,Kf,Kf,Kf],og=[sf,Mf,Gf,kf,uf,Ff,function(){Zd(this);this.b-=13},W,W,W,W,W,W,W,W,W],kg=[Df,Df,qf,qf,Qe,Qe,Re,Re,Nf,Nf,W,W,W,W,If,If],lg=[jf,gf,cf,ef,mf,nf,Se,Te,rf,Lf,Zf,ag,cg,function(a){pg[a>> 6&3].call(this,a)},W,W],pg=[W,function(a){a=ee(this,a,65536);Yd(this,a);R(this,a);this.b-=11},function(a){var b=$d(this);this.J=this.b;fe(this,a,65536,b);R(this,b);this.b=this.J-Cf[this.g]},W]; -function qg(a){u.call(this,"ROM",a,qg);this.ha=this.f=null;this.C=a.addr;this.g=a.size;this.v=a.alias;this.B=a.file;this.D=sa(this.B);if(this.B){a=this.B;var b=ta(this.D);"json"!=b&&"hex"!=b&&(a=Ga()+"/api/v1/dump?file="+this.B+"&format=bytes&decimal=true");var c=this;Ea(a,null,!0,function(a,b,f){f?(c.O("Unable to load ROM resource (error "+f+": "+a+")"),c.B=null):(nb(c.Qa,a,b),(a=Fa(a,b))?(c.f=a.da,c.ha=a.ha):c.B=null);rg(c)})}}z(qg);qg.prototype.Ea=function(a,b,c,d){this.w=b;this.b=c;this.i=d;rg(this)}; -qg.prototype.Ha=function(){this.ha&&(this.i&&sg(this.i,this.id,this.C,this.g,this.ha),delete this.ha);return!0};qg.prototype.Ga=function(){return!0}; -function rg(a){if(!tb(a)){if(a.B){if(!a.f||!a.w)return;a.g||(a.g=a.f.length);if(a.f.length!=a.g)vb(a,"ROM size ("+p(a.f.length,8,!0)+") does not match specified size ("+p(a.g,8,!0)+")");else{var b;b=a.C;if(tc(a.w,b,a.g,Xc)){var c;for(c=0;c>1],c);if(Cb(a.w,a,b,256,a.Ya)){b=a.D=!0;break a}}else if(tc(a.w,b,a.f,Xc)){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)),r=h,t=m-=6;0=b.length)break;l+=b[h++]&255;if(l&255)break;if(t)for(;t--;)a.b.rb(n++,b[r++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=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(;r--;)a.b.rb(n++,b[v++]&255);else n&1?a.b.ga():xd(a.b,n,f);g=!0}else h++;else h+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.K&&(e.K-=32),e.f|=128,e.f&64&&Lc(e.b,e.ja))});this.ma=Nc(52,4);this.$=Kc(this.b,function(){e.g|=128;e.g&64&&Lc(e.b,e.ma)});Cb(b,this,Rg);H(this)}; -k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.lb)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0}; +k.xc=function(){if(!this.J){var a=jd(this.B,"connection");if(a){var b=a.split("->");if(2==b.length){var c=ya(b[0]);if(c!=this.Ya)return;b=ya(b[1]);if(this.J=pb(b)){var d=this.J.exports;if(d){var e=d.connect;e&&e.call(this.J);if(this.L=d.receiveData){this.status(this.Qa+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};k.Ha=function(a,b){if(!b)if(this.xc(),!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(){Sg(this)};k.save=function(){var a=new P(this);a.set(0,[]);return a.data()};k.restore=function(){return Sg(this)};function Sg(a){a.K=0;a.f=0;a.g=128;a.C=[];return!0}k.jc=function(a){if("number"==typeof a)this.C.push(a);else if("string"==typeof a)for(var b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), -this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ue,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.te,"RBUF"],Tg[65396]=[null,null,Y.prototype.Wd,Y.prototype.Ne,"XCSR"],Tg[65398]=[null,null,Y.prototype.Vd,Y.prototype.Me,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b":String.fromCharCode(a);var c=b.length;32>a&&1==c&&(c=0);9==a&&(a=this.S||8,c=a-this.H%a,this.S&&(b=xa("",c)));this.P&&!this.H&&c&&(b=String.fromCharCode(this.P)+b);this.v.value+=b;this.v.scrollTop=this.v.scrollHeight;this.H+=c}else if(null!=this.D){if(10==a||1024<=this.D.length)this.j(this.D), +this.D="";10!=a&&(this.D+=String.fromCharCode(a))}this.g&=-129;Mc(this.b,this.$,1E3/Math.round(this.R/10))}};var Tg={},Rg=(Tg[65392]=[null,null,Y.prototype.Dd,Y.prototype.ve,"RCSR"],Tg[65394]=[null,null,Y.prototype.Cd,Y.prototype.ue,"RBUF"],Tg[65396]=[null,null,Y.prototype.Xd,Y.prototype.Pe,"XCSR"],Tg[65398]=[null,null,Y.prototype.Wd,Y.prototype.Oe,"XBUF"],Tg);Xa(function(){for(var a=D(document,"pdp11","serial"),b=0;b'+b+"");a.innerHTML=b}},!0;case "descTape":return this.G[b]=c,!0;case "loadTape":e=2;case "attachTape":return e||(e=1),this.G[b]=c,c.onclick= function(){var a=d.G.listTapes;a&&Wg(d,a.options[a.selectedIndex].text,a.value,e)},!0;case "mountTape":if(!this.P){c.parentNode.removeChild(c);break}this.G[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;Wg(d,sa(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.B=a;this.w=b;this.b=c;this.i=d;this.S=Xg(a);var e=this;if((this.g=jd(this.B,"autoMount")||this.g)&&"string"==typeof this.g)try{this.g=eval("("+this.g+")")}catch(f){q("PC11 auto-mount error: "+f.message+" ("+this.g+")"),this.g=null}this.Y=Nc(56,4);this.ca=Kc(this.b,function(){1==(e.f&32769)&&!(e.f&128)&&e.Kc.indexOf("/api/v1/dump")&&(e=ta(c),f="json"==e||"gz"==e?encodeURI(c):Ga()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!Ea(f,null,!0,function(e,f,g){var h=0>g&&a.B&&!a.B.A.ia;g?a.O('Unable to load tape "'+b+'" (error '+g+": "+e+")",h):(nb(a.Qa,e,f),(e=Fa(e,f))&&fh(a,b,c,d,e.da,e.La, -e.Ka));a.A.$a=!1;a.D&&(a.D--,a.D||H(a));ch(a)})}function $g(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=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, +function lh(a,b,c,d,e){var f=c;if(a.w)return!0;a.Xa=b;a.hb=c;a.Ec=sa(c);a.w=e;a.C=a.controller;if(d){var g=new FileReader;g.onload=function(){var b=g.result,c,d=b?b.byteLength:0,e=la[d];if(e){a.va=e[0];a.za=e[1];a.ra=e[2];a.Ma=e[3]||512;c=a.Ma>>2;var f=e=0,b=new DataView(b,0,d);a.b=Array(a.va);for(d=0;dc.indexOf("/api/v1/dump")&&(b=ta(c),"json"==b||"gz"==b?f=encodeURI(c):(d="path",e="&mbhd=10",!c.indexOf("http:")||!c.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(b)?(d="disk",e="&mbhd=0"):ua(c,"/")&&(d="dir"),f=Ga()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.fc?"":e)+"&format=json"));return!!Ea(f, null,!0,function(b,c,d){mh(a,b,c,d)})} function mh(a,b,c,d){var e=null;a.g=!1;var f=0>d&&a.B&&!a.B.A.ia;if(d)a.controller.O('Unable to load disk "'+a.Xa+'" (error '+d+": "+b+")",f);else{nb(a.controller.Qa,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(h.length)if(1==h.length)q(h[0]);else{a.va=h.length;a.za=h[0].length;a.ra=h[0][0].length;var l=h[0][0][0];a.Ma=l&&l.length||512;for(d=c=0;d>2,n=l.pattern;void 0===n&&(n=l.pattern=0);var r=l.data;if(void 0===r){var t=l.bytes;if(void 0!==t&&t.length){for(var w=m<<2,y=t.length;y>2,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.O("Unable to restore disk '"+this.Xa+": "+c);return b}; k.toJSON=function(){var a;a=0;for(var b;b=oh(this,a++);)qh(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 qh(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function N(a){u.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; +function qh(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){t.call(this,"RL11",a,N,2097152);this.v=a.autoMount||null;this.H=0;this.f=Array(4);this.L=!Pa("Mobi")&&window&&"FileReader"in window}z(N);k=N.prototype; k.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=qa(c.value,10);null!=a&&rh(d,a)},!0;case "loadDrive":return this.G[b]= c,c.onclick=function(){var a=d.G.listDisks;a&&sh(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.L){c.parentNode.removeChild(c);break}this.G[b]=c;c.onclick=function(){var a=d.G.listDrives;if(a&&a.options&&d.f)if(a=d.f[qa(a.value,10)||0])if(a=a.Ca){var b;b="";for(var c=0,h;h=oh(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";rh(this,0)}}return!0};k.Ga=function(a){return a?this.save():!0};k.reset=function(){th(this)};k.save=function(){return(new P(this)).data()}; k.restore=function(a){return th(this,a[0])};function wh(a,b){b||(a.H=0);if(a.v)for(var c in a.v){var d=a.v[c],e=d.path||"",f;if(!(f=d.name))a:{if((f=a.G.listDisks)&&f.options)for(var g=0;gg||9e||e>=a.f.length)a.O("Unable to load the selected drive");else if(c)if("?"==c)a.O('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=sa(c);a.status("Attempting to load "+c+' as "'+b+'"')}yh(a,e,b,c,!1,d)}else xh(a,e)} -function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.gb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} -k.Nc=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.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.gb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; +function yh(a,b,c,d,e,f){var g=-1,h=a.f[b];h.hb.toLowerCase()!=d.toLowerCase()&&(g++,xh(a,b,!0),h.ec?a.O("RL11 busy"):(h.ec=!0,e&&(h.dc=!0,a.H++,F(a)&&E(a,"auto-loading disk: "+c)),h.Qb=!!f,lh(new hh(a,h,"preload"),c,d,f,a.Nc)&&g++));return g} +k.Nc=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.za)&&(this.O('Disk "'+c+'" too large for drive '+("RL"+a.gc)),b=null);b?(a.Ca=b,a.Xa=c,a.hb=d,this.O('Mounted disk "'+c+'" in drive '+("RL"+a.gc),a.dc||e),this.B&&this.B.sb()):a.Qb=!1;a.dc&&(a.dc=!1,--this.H||H(this));rh(this,a.gc)}; function vh(a,b,c,d){if((a=a.G.listDisks)&&a.options){for(var e=0;e>12&48;this.K=f>>16&63;this.C=this.g=b<<7|(c?64:0)|d&63;this.D=65536-e&65535;a&&(this.ea=this.ea|a|32768);return!0}; -k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var r,t;if(0>(r=a.Ca.read(m,n++))||0>(t=a.Ca.read(m,n++))){h=5120;break}this.w.hb(f,r|t<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; -k.ce=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var r=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,r&255)||!a.Ca.write(m,n++,r>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; -k.xe=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.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.ce),d=this.g>>7,e=this.g&64?0:1,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.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.ve=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ye=function(a){this.g=a};k.Id=function(){return this.D};k.ze=function(a){this.D=a};k.Fd=function(){return this.K};k.we=function(a){this.K=a&63}; -var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.xe,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.ve,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ye,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.ze,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.we,"RLBE"],zh);function Ah(a){u.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); +k.jd=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){if(!m){m=a.Ca.seek(b,c,d+1);if(!m){h=5120;break}n=0}var v,r;if(0>(v=a.Ca.read(m,n++))||0>(r=a.Ca.read(m,n++))){h=5120;break}this.w.ib(f,v|r<<8);if(Bc(this.w)){h=8192;break}f+=2;if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)}; +k.de=function(a,b,c,d,e,f,g){for(var h=0,l=a.Ca,m=null,n;e--;){var v=this.w.oa(f);if(Bc(this.w)){h=8192;break}f+=2;if(!m){m=a.Ca.seek(b,c,d+1,!0);if(!m){h=5120;break}n=0}if(!a.Ca.write(m,n++,v&255)||!a.Ca.write(m,n++,v>>8)){h=5120;break}if(n>=l.Ma&&(m=null,++d>=l.ra&&(d=0,++c>=l.za&&(c=0,++b>=l.va)))){h=5120;break}}return g(h,b,c,d,e,f)};k.Gd=function(){return this.ea&65535}; +k.ye=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.C&64;break;case 6:1==(this.g&3)&&(b=this.g&65408,c=(this.g&16)<<2,this.C=this.g&4?this.C+b:this.C-b,this.g=this.C=this.C&65408|c);break;case 8:this.D=this.C;break;case 12:b=this.jd;case 10:b||(b=this.de),d=this.g>>7,e=this.g&64?0:1,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.Oc.bind(this)))}a&&(this.ea|=129,this.ea&64&&Lc(this.b,this.P))}};k.Ed=function(){return this.J};k.we=function(a){this.J=a&65534};k.Hd=function(){return this.g};k.ze=function(a){this.g=a};k.Id=function(){return this.D};k.Ae=function(a){this.D=a};k.Fd=function(){return this.K};k.xe=function(a){this.K=a&63}; +var zh={},uh=(zh[63744]=[null,null,N.prototype.Gd,N.prototype.ye,"RLCS"],zh[63746]=[null,null,N.prototype.Ed,N.prototype.we,"RLBA"],zh[65284]=[null,null,N.prototype.Hd,N.prototype.ze,"RLDA"],zh[65286]=[null,null,N.prototype.Id,N.prototype.Ae,"RLMP"],zh[65288]=[null,null,N.prototype.Fd,N.prototype.xe,"RLBE"],zh);function Ah(a){t.call(this,"Debugger",a,Ah);this.ca=a.base||16;this.Ja=!1;this.K=0;this.R=!1;this.C=-1;this.v=[];this.Y={}}z(Ah); var Bh={"||":0,"&&":1,"|":2,"^":3,"&":4,"!=":5,"==":5,">=":6,">":6,"<=":6,"<":6,">>>":7,">>":7,"<<":7,"-":8,"+":8,"%":9,"/":9,"*":9};Ah.prototype.uc=function(){return-1};Ah.prototype.vc=function(){}; function Ch(a,b,c,d){if(c)if(b){0>a.C&&a.v.length&&(a.C=0);if(0>a.C||b!=a.v[a.C])a.v.splice(0,0,b),a.C=0;a.C--}else a.R?b="end":b=a.v[a.C+1];a=[];if(b){b=b.replace(/""/g,"'");c=0;var e=null;d=d||";";for(var f=0;f<=b.length;f++){var g=b.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==d&&!e||!g)a.push(ya(b.substring(c,f))),c=f+1}}return a} function Dh(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 Eh(a,b,c){var d;if(b){b=Fh(a,b);for(var e=0,f=!1,g=b,h=[],l=[],m=b.split(/(\|\||&&|\||^|&|!=|==|>=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e=|>>>|>>|>|<=|<<|<|-|\+|%|\/|\*)/);e>=1;g=n+g;d>>=8}d=p(c,0,!0)+" "+c+". "+ra(c,0,!0)+" "+("0b"+g);32<=c&&127>c&&(d+=" '"+String.fromCharCode(c)+"'")}a.j((null!=b?b+": ":"")+d);return e}function Ih(a,b){if(b)return Hh(a,b,a.Y[b]);var c=0;for(b in a.Y)Hh(a,b,a.Y[b]),c++;return 0this.b.pb?Rh:[];Sh(this,function(a){a:{var b=d.w.W,c=a[0],e=a=0,l=b.length;if(c){a=d.ba(Th(d,c));if(-1===a){d.j("invalid address: "+c);break a}e=a>>>d.w.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=xc[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.vc=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=Pc(this.b):21==a&&this.f&&gc(this.f)&&(b=this.f.Va));return b}; k.message=function(a,b){b&&(a+=" @"+J(this,Z(this.b.Kb).F));this.na&1073741824?this.wa.push(a):this.ja&&a==this.ja||(this.ja=a,this.na&-2147483648&&this.b&&this.b.A.Z&&(this.ga(),a+=" (cpu halted)"),this.j(a),this.b&&(a=this.b,rd(a),a.ua=0,a.qa()))};function Lh(a){var b;if(!ne(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=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(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.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; +k.jb=function(a,b){if(!Zh(this,b))return!1;this.b.jb(a);return!0};k.kb=function(a,b,c){if(!Zh(this))return!1;this.K=0;a||ne(this)&&oe(this,this.b.u[7],0);try{a=sd(this.b,a);var d=this.b.kb(a);0>8;a.j("trapped to "+J(a,c&255,1)+(d?" ("+J(a,d)+")":""))}a.L=Z(a.b.u[7]);b&&1!=a.S?$h(a):ai(a)}}function Zh(a,b){var c;(c=!a.b||!tb(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.Z?(b||a.j("cpu busy or unavailable, command ignored"),!1):!ub(a.b)}k.Ha=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0}; k.Ga=function(a,b){b&&this.j(a?"suspending":"shutting down");return a?this.save():!0};k.reset=function(a){Lh(this);this.Aa=0;this.ja=null;this.K=0;this.L=Z(this.b.u[7]);this.A.Z=!1;bi(this);a||md(this)};k.save=function(){var a=new P(this);a.set(0,Vh(this.L));a.set(1,Vh(this.P));a.set(2,[this.v,this.R,this.na]);a.set(3,this.J);return a.data()}; k.restore=function(a){var b=0;void 0!==a[2]&&(this.L=Wh(a[b++]),this.P=Wh(a[b++]),this.v=a[b][0],"string"==typeof this.v&&(this.v=[this.v]),this.R=a[b][1],this.na|=a[b][2]);a[3]&&(this.J=a[3]);return!0};k.start=function(a,b){this.S||this.j("running");this.A.Z=!0;this.Sb=a;this.Ub=b}; k.stop=function(a,b){if(this.A.Z){this.A.Z=!1;this.K=b-this.Ub;if(!this.S){b="stopped";if(this.K){a-=this.Sb;var c=0d&&(d=a.b.ab(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} +function oe(a,b,c){var d=-1;c||(d=a.b.bb(b),0==d&&(b=Cd(a.b,2)));if(0d&&(d=a.b.bb(b)),65535!=(d&65535)&&(c=a.H[a.$],c.F=b,c.Oa=!1,++a.$==a.H.length&&(a.$=0)));return!1}function tf(a){var b=a.b;if(b.A.Z)throw O(b,a.b.Kb),a.ga(),-1;return!1} function Kh(a){var b,c;a.g=["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.tb=0}k.nb=function(a,b,c){var d=!0;c||ci(this,a,b,!1,!0);if(a!=this.g){var e=this.ba(b);if(-1===e)this.j("invalid address: "+J(this,b.F)),d=!1;else{var f=this.w;f.W[e>>>f.ka].nb(e&f.w,a==this.D)}}d&&(a.push(b),c?b.Oa=!0:(di(this,a,a.length-1,"set"),Lh(this)));return d}; function ci(a,b,c,d,e){var f=!1;c=a.ba(c);for(var g=1;g>>d.ka],b==a.D));h.Oa||Lh(a);break}}return f}function ei(a,b){for(var c=1;c>23)&65535,x=J(w,t);else if(8192==A)t=t.F-((f&63)<<1)&65535,x=J(w,t);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), -y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(t,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(t,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(t,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+t.F&65535));break;case 56:A=w.oa(t,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+t.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); +function ed(a,b,c,d,e){var f=!1;if(!a.tb++)for(var g=1;!f&&g>23)&65535,x=J(w,r);else if(8192==A)r=r.F-((f&63)<<1)&65535,x=J(w,r);else if(12288==A)x=J(w,f&7,1);else if(24576==A)x=J(w,f&63,1);else if(32768==A)x=J(w,f&255,1);else if(A=f&y,y&4032&&(A>>=6,y>>=6), +y&63)switch(y=A&7,A&56){case 0:x=Yh(y);break;case 8:x="@"+Yh(y);break;case 16:7>y?x="("+Yh(y)+")+":(A=w.oa(r,2),x="#"+J(w,A,0,!0));break;case 24:7>y?x="@("+Yh(y)+")+":(A=w.oa(r,2),x="@#"+J(w,A,0,!0));break;case 32:x="-("+Yh(y)+")";break;case 40:x="@-("+Yh(y)+")";break;case 48:A=w.oa(r,2);x=J(w,A,0,!0)+"("+Yh(y)+")";7==y&&(x=J(w,A+r.F&65535));break;case 56:A=w.oa(r,2),x="@"+J(w,A)+"("+Yh(y)+")",7==y&&(x="@"+J(w,A+r.F&65535))}w=x;if(!w||!w.length){h="INVALID";break}"string"!=typeof w&&(m=w[1],w=w[0]); 0b?(c=Yh(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,Pc(d)):21==b&&a.f&&gc(a.f)&&(c="SW="+J(a,a.f.Va,3));c&&(c+=" ");return c}function ji(a){var b,c="";for(b=0;6>b;b++)c+=ii(a,b);c=c+"\n"+(ii(a,6)+ii(a,7));c+=ii(a,20)+ii(a,21);return c+=hi(a,"T")+hi(a,"N")+hi(a,"Z")+hi(a,"V")+hi(a,"C")}k.pc=function(a,b){return a[0]>b[0]?1:a[0]>>0,g],r=Aa(n,l,a.pc);0>r&&n.splice(-(r+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Te:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&e>>0,g],v=Aa(n,l,a.pc);0>v&&n.splice(-(v+1),0,l)}m&&(h.a=m.replace(/''/g,'"'))}a.J.push({Ve:b,F:c,Vc:d,ha:e,nc:f})}function ki(a,b,c){var d=[],e=a.ba(b)>>>0;for(b=0;b>>0,h=f.Vc;if(e>=g&&eb)){d.u[b]=f&65535;break}a.j("unknown register: "+e);return}a.B.qa();a.j("updated registers:")}a.j(ji(a));c&&(a.L=Z(d.u[7]),ai(a,J(a,a.L.F)))}}function oi(a,b){b=ya(b);var c=b.match(/^(['"])(.*?)\1$/);c?1h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.j(m)}h[3]&&(g=h[3],f=null);f=gi(a,b,g,f);a.j(f);a.L=b;e-=b.F-l;c++}}} -function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);fa-=aa;0>fa&&(null==na[na.length-1].F?(aa=fa+aa,fa=0):fa+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(fa=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;La&&("l"==La.charAt(0)&&(La=La.substr(1)||Ii),Cc=Gh(a,La)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var kb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(kb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(kb=2,Ld=65535,Md=a.oa,Nd=a.hb):Pd=null;if(null==Pd)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=Th(a,Pd);if(Gc)for(var Hc= -2;HcSd;){for(var Ma=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< -Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Ma=Hg)break}}if(!Ma||null==Ma)break;var Kg=null;if("ks"==Mi){var Lg=Ma.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Ma=xa(Ma,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Ma);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== +function fi(a,b,c){var d=!0;try{b.length&&"end"!=b?c||a.j(">> "+b):(a.R&&(a.j("ended assemble at "+J(a,a.P.F)),a.L=a.P,a.R=!1),b="");var e=b.charAt(0);if('"'==e||"'"==e)return!0;a.ja=null;if(tb(a)&&0n||"z"na.length&&(a.j("note: only "+na.length+" available"),aa=na.length);ga-=aa;0>ga&&(null==na[na.length-1].F?(aa=ga+aa,ga=0):ga+=na.length);var Jd=[];"call"==Ag&&(Kb=1E5,Jd=["CALL"]);for(void 0!==zg&&a.j(aa+" instructions earlier:");0=na.length&&(ga=0);a.vb=aa;Cg++;Kb--}}Cg||(a.j("no "+Bg+"history available"),a.vb=void 0)}else{var Mb=Th(a,ma);if(Mb){var Cc=0;Ma&&("l"==Ma.charAt(0)&&(Ma=Ma.substr(1)||Ii),Cc=Gh(a,Ma)>>>0,65536>4||1,Ob="";Ki--&&0Fc?String.fromCharCode(Fc):"."}Ob&&(Ob+="\n");Ob+=ma+" "+Kd+(0==Pb?" "+Fg:"")}Ob&&a.j(Ob);a.mb=Mb}}}}break;case "e":if("else"==g[0])break;var lb,Ld,Md,Nd,Od=g[0],Pd=g[1];"eb"==Od?(lb=1,Ld=255,Md=a.Gb,Nd=a.Yb):"e"==Od||"ew"==Od?(lb=2,Ld=65535,Md=a.oa,Nd=a.ib):Pd=null;if(null==Pd)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=Th(a,Pd);if(Gc)for(var Hc= +2;HcSd;){for(var Na=null,Ni=256;65536>Tb.F>>>0;){Td.F=a.oa(Tb,2);if(null==Tb.F||!Ni--)break;if(!(Td.F&1)){for(var Oi=a,Ic=Td,Hg=null,Ub=Ic.F,Ig=Ub,Ud=1;6>=Ud&&Ub;Ud++){if(2< +Ud){Ic.F=Ub;var Jc=gi(Oi,Ic);if(0<=Jc.indexOf("JSR")){var Jg=Jc.indexOf(" ");if(Ub+(Jc.indexOf(" ",Jg+1)-Jg-1)/2==Ig){Hg=Jc;break}}}Ub-=2}Ic.F=Ig;if(Na=Hg)break}}if(!Na||null==Na)break;var Kg=null;if("ks"==Mi){var Lg=Na.match(/[0-9A-F]+$/);Lg&&(Kg=ni(a,Lg[0]))}Na=xa(Na,50)+" ;"+(Kg||"stack="+J(a,Tb.F));a.j(Na);Sd++}Sd||a.j("no return addresses found")}break;case "l":if("ln"==g[0]){ni(a,g[1],!0);break}f=!0;break;case "m":a:{var oa,pa=null,G=g[1];"?"==G&&(G=void 0);if(void 0!==G){var Da=0;if("all"== G)Da=1878917119,G=null;else if("on"==G)pa=!0,G=null;else if("off"==G)pa=!1,G=null;else{"keys"==G&&(G="key");"kbd"==G&&(G="keyboard");for(oa in xb)if(G==oa){Da=xb[oa];pa=!!(a.na&Da);break}if(!Da){a.j("unknown message category: "+G);break a}}if(Da)if("on"==g[2])a.na|=Da,pa=!0;else if("off"==g[2]&&(a.na&=~Da,pa=!1,1073741824==Da)){for(var Vd=0;Vd\nLicense: GPL version 3 or later ");this.j("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis ");for(b=0;b(b.J+=a))){for(a=0;af.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/().*?(<\/xsl:variable>)/,"$1PDPjs$2"), a=a.replace(/().*?(<\/xsl:variable>)/,"$1pdp11$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(n){f=null,a=n.message}else a="unrecognized XML: "+(255/g.exec(a)){var e=d[2];b("Loading "+e+"...");Ea(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var l=h[0],m,n=/( [a-z]+=)(['"])(.*?)\2/g;m=n.exec(f);)l=0>l.indexOf(m[1])?l.replace(">",m[0]+">"):l.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=l&&(g=g.replace(h[0],l))}else{c(a,"missing <"+d[1]+"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/, "");a=a.replace(d[0],g);Ui(a,b,c)}})}else c(a,null)} -function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css";r.styleSheet?r.styleSheet.cssText=m:r.appendChild(document.createTextNode(m));n.appendChild(r)}c|| +function Vi(a,b,c,d){function e(a){if(void 0===h){var b=g&&D(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=wa(a))}function f(a){e("Error: "+a);l&&(--Hi||Za(!0));l=!1}var g,h,l=!0;Hi++;mb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var n=document.head||document.getElementsByTagName("head")[0],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?Si(c,null,null,!1,e,function(d,l){l?(nb(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=h.transformNode(l))?(g.outerHTML=l,--Hi||Za(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(l),(l=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(l,g),--Hi||Za(!0)):f("invalid machine element: "+ -a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(t){f(t.message)}return l}window.embedPDP11=function(a,b,c,d){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11-dbg.map +a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?Si(b,a,d,!0,e,m):Ti(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){Za(!1);return Vi(a,b,c,d)};window.enableEvents=Za;window.sendEvent=$a;})();//# 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 f0b25cb23..cca6978dd 100644 --- a/versions/pdpjs/1.30.3/pdp11.js +++ b/versions/pdpjs/1.30.3/pdp11.js @@ -41,202 +41,202 @@ function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFul 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,fa:null,ea: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.fa=g.load;d.ea=g.exec;if(e=g.bytes)d.K=e;else if(e=g.words)for(d.K=Array(2*e.length),f=c=0;c>8&255;else if(e=g.data)for(d.K=Array(4*e.length),f=c=0;c>8&255,d.K[f++]=e[c]>>16&255,d.K[f++]=e[c]>>24&255;else d.K=g;d.X=g.symbols;d.K.length?1==d.K.length&&(u(d.K[0]),d=null):(u("Empty resource: "+a),d=null)}catch(k){u("Resource data error ("+a+"): "+k.message),d=null}else{e=[];b=b.replace(/\n/gm," ").replace(/ +$/,"").split(" ");for(c=0;cb?this.Pa=this.id:(this.na=this.id.substr(0,b),this.Pa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;y.push(this)}var La=void 0,Ma={}; +d.K[f++]=e[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?this.wa=this.id:(this.na=this.id.substr(0,b),this.wa=this.id.substr(b+1));this[a]=c;this.l={ready:!1,Fa:!1,qb:!1,O:!1,error:!1};this.kb=null;this.l.error=!1;this.o={};this.D=null;x.push(this)}var La=void 0,Ma={}; if(window){La||(La=window.location.search.substr(1));for(var Na,Oa=/\+/g,Pa=/([^&=]+)=?([^&]*)/g;Na=Pa.exec(La);)Ma[decodeURIComponent(Na[1].replace(Oa," "))]=decodeURIComponent(Na[2].replace(Oa," "))}function Qa(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=Qa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}if(window){window.PCjs||(window.PCjs={});var Ra=window.PCjs.Machines||(window.PCjs.Machines={}),y=window.PCjs.Components||(window.PCjs.Components=[])}else Ra={},y=[];function Sa(a,b,c){Ra[a]&&b&&(Ra[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.c["S"+a]=[0,!1,!1,this.tc,a]}z(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; +function Za(a){v.call(this,"Panel",a,Za);this.b=this.i=this.f=this.w=this.s=0;this.A=this.C=this.v=!1;this.F=$a;this.m={};this.c={START:[1,!0,!1,this.rc],STEP:[1,!1,!1,this.sc],ENABLE:[1,!1,!1,this.nc],CONT:[1,!0,!1,this.lc],DEP:[0,!0,!1,this.mc],EXAM:[1,!0,!1,this.oc],LOAD:[1,!0,!1,this.qc],TEST:[0,!0,!1,this.pc]};for(a=0;22>a;a++)this.c["S"+a]=[0,!1,!1,this.tc,a]}y(Za);var $a=7;function ab(a,b){return a.c[b]&&a.c[b][0]}h=Za.prototype;h.reset=function(){this.stop()}; h.$=function(a,b,c,d){if(this.j&&this.j.$(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.m[b]=d?1:0,this.s++,!0):"switch"==a?(void 0===this.c[b]&&(this.c[b]=[d?1:0]),this.o[b]=c,a=c.parentElement||c,a=a.parentElement||a,a.onmousedown=function(a,b){return function(){var c=a.c[b];bb(a, -b,c[0]=1-c[0]);c[2]=!0;c[3]&&c[3].call(a,c[0],c[4]);"STEP"!=b&&(a.A="DEP"==b,a.C="EXAM"==b)}}(this,b),a.onmouseup=a.onmouseout=function(a,b){return function(){var c=a.c[b];c[1]&&c[2]&&(bb(a,b,c[0]=1-c[0]),c[3]&&c[3].call(a,c[0],c[4]));c[2]=!1}}(this,b),!0):this.parent.$.call(this,a,b,c,d)}};h.ha=function(a,b,c,d){this.j=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.m)ib(a,c,null!=b?b:a.m[c])}function bb(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.c)bb(a,b,a.c[b][0])}function jb(a,b,c,d){a.o[b]&&(void 0===c&&(Xa(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))} -h.rc=function(a){a||this.a.l.U||(this.h.reset(),kb(this.a),ab(this,"ENABLE")&&lb(this.a))};h.sc=function(){};h.nc=function(a){a||G(this.a)};h.lc=function(a){if(!a&&!this.a.l.U)if(ab(this,"ENABLE"))lb(this.a);else{a=this.D;var b;if(b=a)a.l.Fa&&(a.l.qb=!0),b=!a.l.Fa;if(b)Va(a,!0),a.nb(0),Va(a,!1);else try{var c=this.a.nb(1);0a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.h.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new I(this);zb(a,this.D);this.h=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;J(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[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 g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||J(e,c,16)} -function xb(a,b){var c=-1,d=this.controller;a=d.ya[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 yb(a,b,c){var d=!1,e=this.controller;a=e.ya[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 Bb(a,b){if(b!=a.s){var c;a.s&&(c=(1<a;a++)this.c["S"+a][0]=0&1<a.a.Wa?8:16,c=65472<=a.b&&a.b<65472+b,b=c?1:2,c=c?15:a.g.ia;ab(a,"STEP")||(b=-b);a.b=a.b&~c|a.b+b&c;rb(a,"A",a.b,22)}function qb(a,b){a.i=b&65535;rb(a,"D",a.i,16);return a.i}function sb(a,b,c){a.m[b]=c;a.v||ib(a,b,c)}function rb(a,b,c,d){for(var e=0;e>2;this.j=this.b-1;this.A=this.C/this.b|0;this.ya=[];this.f=0;this.m=!1;this.gb=0;this.w=[];this.bc=[vb,wb,xb,yb];a=new H(this);zb(a,this.D);this.g=Array(this.A);for(b=0;b>8:e[2](f)&255):f&1&&(e=d.ya[a&-2])&&e[2]&&(c=e[2](f&-2)>>8);if(0<=c)return c;I(d,b,16);return 255}function wb(a,b,c){var d=!1,e=this.controller,f=e.ya[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 g&1&&(f=e.ya[a&-2])&&f[3]&&(g&=-2,a=f[2]?f[2](0):0,f[3](a&255|b<<8,g),d=!0);d||I(e,c,16)} +function xb(a,b){var c=-1,d=this.controller;a=d.ya[a];var e=b&65535;a&&(a[2]?c=a[2](e):a[0]&&(c=a[0](e)|a[0](e+1)<<8));if(0<=c)return c;I(d,b,16);return 65535}function yb(a,b,c){var d=!1,e=this.controller;a=e.ya[a];var f=c&65535;a&&(a[3]?(a[3](b,f),d=!0):a[1]&&(a[1](b&255,f),a[1](b>>8,f+1),d=!0));d||I(e,c,16)}function Bb(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.Ja)return l.ob+=l.Ja-f,l.Ja=f,!0;if(f>=l.Ja+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ja+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new I(a,f,p,a.b,d,e);zb(f,a.D,l);a.h[k++]=f;f=n+a.b;g-=p}if(0>=g){d!=Hb||a.gb||(a.gb+=c);c/=1024;var t;e="";t?10>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.h[(b&a.ia)>>>a.c].W(b&a.j,b)} -h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.h[c].Tb(b,a);this.f--;return a};h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.h[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.h[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.h[d].$b(c,b&65535,a);this.f--}; -function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){var k=g[0]?g[0].bind(b):null,l=g[1]?g[1].bind(b):null,n=g[2]?g[2].bind(b):null,p=g[3]?g[3].bind(b):null,t=g[5]||1;65472<=f&&65487>=f&&(!k&&n&&(k=function(a){return function(b){return a(b)&255}.bind(b)}(n)),!l&&p&&(l=function(a){return function(b,c){return a(b,c)}.bind(b)}(p)));for(var w=g[4],E=0;E>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Vb(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; -h.zd=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Vb(b))};h.gd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.Zd=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.$c=function(a){return this.a.H[1][a>>1&7]};h.Sd=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Yc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Qd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; -h.Zc=function(a){return this.a.Y[1][a>>1&7]};h.Rd=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Xc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Pd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.vd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.td=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; -h.ud=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.sd=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.fd=function(a){return this.a.H[3][a>>1&7]};h.Yd=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.dd=function(a){return this.a.H[3][(a>>1&7)+8]};h.Wd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.ed=function(a){return this.a.Y[3][a>>1&7]};h.Xd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; -h.cd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Vd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.La=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.g[a]};h.Na=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.g[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.g[6]};h.Ed=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.g[6]=a};h.Pc=function(){return this.a.g[7]};h.Hd=function(a){this.a.g[7]=a}; -h.Ma=function(a){a&=7;return this.a.B&2048?this.a.g[a]:this.a.Ha[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.g[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[1]};h.Fd=function(a){1==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.g[6]:this.a.ma[3]};h.Gd=function(a){3==(this.a.B&49152)>>14?this.a.g[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; -h.qd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.h.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.bd=function(){return 1};h.Ud=function(){};h.vc=function(){return this.a.M};h.pd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.xd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Ad=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; -h.ad=function(a){return a?this.a.Da&65280:0};h.Td=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Dd=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; -var N={},M=(N[61568]=[null,null,L.prototype.gd,L.prototype.Zd,"UNIMAP",64,1170],N[62592]=[null,null,L.prototype.$c,L.prototype.Sd,"SIPDR",8,1145],N[62608]=[null,null,L.prototype.Yc,L.prototype.Qd,"SDPDR",8,1145],N[62624]=[null,null,L.prototype.Zc,L.prototype.Rd,"SIPAR",8,1145],N[62640]=[null,null,L.prototype.Xc,L.prototype.Pd,"SDPAR",8,1145],N[62656]=[null,null,L.prototype.Bc,L.prototype.vd,"KIPDR",8,1145],N[62672]=[null,null,L.prototype.zc,L.prototype.td,"KDPDR",8,1145],N[62688]=[null,null,L.prototype.Ac, -L.prototype.ud,"KIPAR",8,1145],N[62704]=[null,null,L.prototype.yc,L.prototype.sd,"KDPAR",8,1145],N[62798]=[null,null,L.prototype.Hc,L.prototype.zd,"MMR3",1,1145],N[65382]=[null,null,L.prototype.Cc,L.prototype.wd,"LKS"],N[65402]=[null,null,L.prototype.Ec,L.prototype.yd,"MMR0",1,1145],N[65404]=[null,null,L.prototype.Fc,L.prototype.Yb,"MMR1",1,1145],N[65406]=[null,null,L.prototype.Gc,L.prototype.Yb,"MMR2",1,1145],N[65408]=[null,null,L.prototype.fd,L.prototype.Yd,"UIPDR",8,1145],N[65424]=[null,null,L.prototype.dd, -L.prototype.Wd,"UDPDR",8,1145],N[65440]=[null,null,L.prototype.ed,L.prototype.Xd,"UIPAR",8,1145],N[65456]=[null,null,L.prototype.cd,L.prototype.Vd,"UDPAR",8,1145],N[65472]=[null,null,L.prototype.La,L.prototype.Na,"R0SET0"],N[65473]=[null,null,L.prototype.La,L.prototype.Na,"R1SET0"],N[65474]=[null,null,L.prototype.La,L.prototype.Na,"R2SET0"],N[65475]=[null,null,L.prototype.La,L.prototype.Na,"R3SET0"],N[65476]=[null,null,L.prototype.La,L.prototype.Na,"R4SET0"],N[65477]=[null,null,L.prototype.La,L.prototype.Na, -"R5SET0"],N[65478]=[null,null,L.prototype.Mc,L.prototype.Ed,"R6KERNEL"],N[65479]=[null,null,L.prototype.Pc,L.prototype.Hd,"R7KERNEL"],N[65480]=[null,null,L.prototype.Ma,L.prototype.Oa,"R0SET1",1,1145],N[65481]=[null,null,L.prototype.Ma,L.prototype.Oa,"R1SET1",1,1145],N[65482]=[null,null,L.prototype.Ma,L.prototype.Oa,"R2SET1",1,1145],N[65483]=[null,null,L.prototype.Ma,L.prototype.Oa,"R3SET1",1,1145],N[65484]=[null,null,L.prototype.Ma,L.prototype.Oa,"R4SET1",1,1145],N[65485]=[null,null,L.prototype.Ma, -L.prototype.Oa,"R5SET1",1,1145],N[65486]=[null,null,L.prototype.Nc,L.prototype.Fd,"R6SUPER",1,1145],N[65487]=[null,null,L.prototype.Oc,L.prototype.Gd,"R6USER",1,1145],N[65504]=[null,null,L.prototype.wc,L.prototype.qd,"CTRL",1,1170],N[65520]=[null,null,L.prototype.Sb,L.prototype.Zb,"LSIZE",1,1170],N[65522]=[null,null,L.prototype.Sb,L.prototype.Zb,"HSIZE",1,1170],N[65524]=[null,null,L.prototype.bd,L.prototype.Ud,"SYSID",1,1170],N[65526]=[null,null,L.prototype.vc,L.prototype.pd,"CPUERR",1,1170],N[65528]= -[null,null,L.prototype.Dc,L.prototype.xd,"MB",1,1170],N[65530]=[null,null,L.prototype.Ic,L.prototype.Ad,"PIR"],N[65532]=[null,null,L.prototype.ad,L.prototype.Td,"SL"],N[65534]=[null,null,L.prototype.Lc,L.prototype.Dd,"PSW"],N);M[65506]=M[65504];M[65508]=M[65504];M[65510]=M[65504];M[65512]=M[65504];M[65514]=M[65504];M[65516]=M[65504];M[65518]=M[65504]; -Ha(function(){for(var a=D(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);else{a=this.a=Array(this.size>> +function Eb(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.ob+=l.Ka-f,l.Ka=f,!0;if(f>=l.Ka+l.ob){p=l.size-(f-n);p>g&&(p=g);l.ob=f-l.Ka+p;f=n+a.b;g-=p;k++;continue}}return Gb(1,f,g)}f=new H(a,f,p,a.b,d,e);zb(f,a.D,l);a.g[k++]=f;f=n+a.b;g-=p}return 0>=g?(d!=Hb||a.gb||(a.gb+=c),a.status((c>>10)+"Kb "+Ib[d]+" at "+ka(b)),!0):Gb(2,b,c)} +function Db(a,b,c){var d=[];for(b>>>=a.c;0>>=a.c;0>>a.c].yb(b&a.j,b)}function Lb(a,b){3932160<=b&&(b=Kb(a.a,b));return a.g[(b&a.ia)>>>a.c].W(b&a.j,b)}h.lb=function(a){3932160<=a&&(a=Kb(this.a,a));var b=a&this.j,c=(a&this.ia)>>>this.c;this.m=!1;this.f++;a=this.g[c].Tb(b,a);this.f--;return a}; +h.Ya=function(a,b){3932160<=a&&(a=Kb(this.a,a));this.m=!1;this.f++;this.g[(a&this.ia)>>>this.c].Fb(a&this.j,b&255,a);this.f--};function Mb(a,b,c){3932160<=b&&(b=Kb(a.a,b));a.g[(b&a.ia)>>>a.c].pb(b&a.j,c&65535,b)}h.mb=function(a,b){3932160<=a&&(a=Kb(this.a,a));var c=a&this.j,d=(a&this.ia)>>>this.c;this.m=!1;this.f++;this.g[d].$b(c,b&65535,a);this.f--}; +function Nb(a){for(var b=0,c=[],d=0;da.a.Wa)){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 E=k[4],V=0;V>5&3;b.bb=a>>1&15;var c=0;a&257&&(c=4,a&1&&(c|=2));b.Ba!=c&&(b.Ba=c,Ub(b))}};h.Fc=function(){var a=this.a.Ca;a&65280&&(a=(a<<8|a>>8)&65535);return a};h.Gc=function(){return this.a.Ab};h.Hc=function(){return this.a.Ga}; +h.Ad=function(a){var b=this.a;1170>b.Wa&&(a&=-49);b.Ga!=a&&(b.Ga=a,b.Nb=a&16?4194303:262143,Ub(b))};h.hd=function(a){a=a>>1&63;var b=this.a.Za[a>>1];return a&1?b>>16:b&65535};h.ae=function(a,b){b=b>>1&63;var c=b>>1;this.a.Za[c]=b&1?this.a.Za[c]&65535|(a&63)<<16:this.a.Za[c]&-65536|a&65534};h.ad=function(a){return this.a.H[1][a>>1&7]};h.Ud=function(a,b){this.a.H[1][b>>1&7]=a&65295};h.Zc=function(a){return this.a.H[1][(a>>1&7)+8]};h.Sd=function(a,b){this.a.H[1][(b>>1&7)+8]=a&65295}; +h.$c=function(a){return this.a.Y[1][a>>1&7]};h.Td=function(a,b){b=b>>1&7;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Yc=function(a){return this.a.Y[1][(a>>1&7)+8]};h.Rd=function(a,b){b=(b>>1&7)+8;this.a.Y[1][b]=a;this.a.H[1][b]&=65295};h.Bc=function(a){return this.a.H[0][a>>1&7]};h.wd=function(a,b){this.a.H[0][b>>1&7]=a&65295};h.zc=function(a){return this.a.H[0][(a>>1&7)+8]};h.ud=function(a,b){this.a.H[0][(b>>1&7)+8]=a&65295};h.Ac=function(a){return this.a.Y[0][a>>1&7]}; +h.vd=function(a,b){b=b>>1&7;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.yc=function(a){return this.a.Y[0][(a>>1&7)+8]};h.td=function(a,b){b=(b>>1&7)+8;this.a.Y[0][b]=a;this.a.H[0][b]&=65295};h.gd=function(a){return this.a.H[3][a>>1&7]};h.$d=function(a,b){this.a.H[3][b>>1&7]=a&65295};h.ed=function(a){return this.a.H[3][(a>>1&7)+8]};h.Yd=function(a,b){this.a.H[3][(b>>1&7)+8]=a&65295};h.fd=function(a){return this.a.Y[3][a>>1&7]};h.Zd=function(a,b){b=b>>1&7;this.a.Y[3][b]=a;this.a.H[3][b]&=65295}; +h.dd=function(a){return this.a.Y[3][(a>>1&7)+8]};h.Xd=function(a,b){b=(b>>1&7)+8;this.a.Y[3][b]=a;this.a.H[3][b]&=65295};h.Ma=function(a){a&=7;return this.a.B&2048?this.a.Ha[a]:this.a.h[a]};h.Oa=function(a,b){b&=7;this.a.B&2048?this.a.Ha[b]=a:this.a.h[b]=a};h.Mc=function(){return this.a.B&49152?this.a.ma[0]:this.a.h[6]};h.Fd=function(a){this.a.B&49152?this.a.ma[0]=a:this.a.h[6]=a};h.Pc=function(){return this.a.h[7]};h.Id=function(a){this.a.h[7]=a}; +h.Na=function(a){a&=7;return this.a.B&2048?this.a.h[a]:this.a.Ha[a]};h.Pa=function(a,b){b&=7;this.a.B&2048?this.a.h[b]=a:this.a.Ha[b]=a};h.Nc=function(){return 1==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[1]};h.Gd=function(a){1==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[1]=a};h.Oc=function(){return 3==(this.a.B&49152)>>14?this.a.h[6]:this.a.ma[3]};h.Hd=function(a){3==(this.a.B&49152)>>14?this.a.h[6]=a:this.a.ma[3]=a};h.wc=function(a){return this.a.Wb[a-65504>>1]}; +h.rd=function(a,b){this.a.Wb[b-65504>>1]=a};h.Sb=function(a){if(65520==a){a=0;switch(Hb){case Hb:a=this.g.gb}a=(a>>6)-1}else a=0;return a};h.Zb=function(){};h.cd=function(){return 1};h.Wd=function(){};h.vc=function(){return this.a.M};h.qd=function(){this.a.M=0};h.Dc=function(){return this.a.Vb};h.yd=function(a,b){b&1||(a&=255);this.a.Vb=a};h.Ic=function(a){return a?this.a.Bb:0};h.Bd=function(a){var b=this.a;if(a&=65024){var c=a>>9;do a+=34;while(c>>=1)}b.Bb=a;b.u|=2}; +h.bd=function(a){return a?this.a.Da&65280:0};h.Vd=function(a){this.a.Da=a|255};h.Lc=function(){return Wb(this.a)};h.Ed=function(a){Xb(this.a,a&-1809|Wb(this.a)&1808);this.a.u|=128};h.Yb=function(){}; +var M={},L=(M[61568]=[null,null,K.prototype.hd,K.prototype.ae,"UNIMAP",64,1170],M[62592]=[null,null,K.prototype.ad,K.prototype.Ud,"SIPDR",8,1145],M[62608]=[null,null,K.prototype.Zc,K.prototype.Sd,"SDPDR",8,1145],M[62624]=[null,null,K.prototype.$c,K.prototype.Td,"SIPAR",8,1145],M[62640]=[null,null,K.prototype.Yc,K.prototype.Rd,"SDPAR",8,1145],M[62656]=[null,null,K.prototype.Bc,K.prototype.wd,"KIPDR",8,1145],M[62672]=[null,null,K.prototype.zc,K.prototype.ud,"KDPDR",8,1145],M[62688]=[null,null,K.prototype.Ac, +K.prototype.vd,"KIPAR",8,1145],M[62704]=[null,null,K.prototype.yc,K.prototype.td,"KDPAR",8,1145],M[62798]=[null,null,K.prototype.Hc,K.prototype.Ad,"MMR3",1,1145],M[65382]=[null,null,K.prototype.Cc,K.prototype.xd,"LKS"],M[65402]=[null,null,K.prototype.Ec,K.prototype.zd,"MMR0",1,1145],M[65404]=[null,null,K.prototype.Fc,K.prototype.Yb,"MMR1",1,1145],M[65406]=[null,null,K.prototype.Gc,K.prototype.Yb,"MMR2",1,1145],M[65408]=[null,null,K.prototype.gd,K.prototype.$d,"UIPDR",8,1145],M[65424]=[null,null,K.prototype.ed, +K.prototype.Yd,"UDPDR",8,1145],M[65440]=[null,null,K.prototype.fd,K.prototype.Zd,"UIPAR",8,1145],M[65456]=[null,null,K.prototype.dd,K.prototype.Xd,"UDPAR",8,1145],M[65472]=[null,null,K.prototype.Ma,K.prototype.Oa,"R0SET0"],M[65473]=[null,null,K.prototype.Ma,K.prototype.Oa,"R1SET0"],M[65474]=[null,null,K.prototype.Ma,K.prototype.Oa,"R2SET0"],M[65475]=[null,null,K.prototype.Ma,K.prototype.Oa,"R3SET0"],M[65476]=[null,null,K.prototype.Ma,K.prototype.Oa,"R4SET0"],M[65477]=[null,null,K.prototype.Ma,K.prototype.Oa, +"R5SET0"],M[65478]=[null,null,K.prototype.Mc,K.prototype.Fd,"R6KERNEL"],M[65479]=[null,null,K.prototype.Pc,K.prototype.Id,"R7KERNEL"],M[65480]=[null,null,K.prototype.Na,K.prototype.Pa,"R0SET1",1,1145],M[65481]=[null,null,K.prototype.Na,K.prototype.Pa,"R1SET1",1,1145],M[65482]=[null,null,K.prototype.Na,K.prototype.Pa,"R2SET1",1,1145],M[65483]=[null,null,K.prototype.Na,K.prototype.Pa,"R3SET1",1,1145],M[65484]=[null,null,K.prototype.Na,K.prototype.Pa,"R4SET1",1,1145],M[65485]=[null,null,K.prototype.Na, +K.prototype.Pa,"R5SET1",1,1145],M[65486]=[null,null,K.prototype.Nc,K.prototype.Gd,"R6SUPER",1,1145],M[65487]=[null,null,K.prototype.Oc,K.prototype.Hd,"R6USER",1,1145],M[65504]=[null,null,K.prototype.wc,K.prototype.rd,"CTRL",1,1170],M[65520]=[null,null,K.prototype.Sb,K.prototype.Zb,"LSIZE",1,1170],M[65522]=[null,null,K.prototype.Sb,K.prototype.Zb,"HSIZE",1,1170],M[65524]=[null,null,K.prototype.cd,K.prototype.Wd,"SYSID",1,1170],M[65526]=[null,null,K.prototype.vc,K.prototype.qd,"CPUERR",1,1170],M[65528]= +[null,null,K.prototype.Dc,K.prototype.yd,"MB",1,1170],M[65530]=[null,null,K.prototype.Ic,K.prototype.Bd,"PIR"],M[65532]=[null,null,K.prototype.bd,K.prototype.Vd,"SL"],M[65534]=[null,null,K.prototype.Lc,K.prototype.Ed,"PSW"],M);L[65506]=L[65504];L[65508]=L[65504];L[65510]=L[65504];L[65512]=L[65504];L[65514]=L[65504];L[65516]=L[65504];L[65518]=L[65504]; +Ha(function(){for(var a=C(document,"pdp11","device"),b=0;b>1),this.a=new Int32Array(this.b,0,this.size>>2),ec(this,ac?fc:gc);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},na: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},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P: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]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&J(this.h, -c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&J(this.h,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&jc(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function jc(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);jc(a,b,void 0);lc(a,b,void 0)} -var mc=[],hc=[I.prototype.N,I.prototype.qa,I.prototype.na,I.prototype.xa],kc=[I.prototype.F,I.prototype.oa,I.prototype.R,I.prototype.sa];if(Ya)var gc=[I.prototype.C,I.prototype.da,I.prototype.P,I.prototype.ra],fc=[I.prototype.J,I.prototype.pa,I.prototype.aa,I.prototype.wa]; -function nc(a,b){x.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.wa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.xa=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.ld.bind(this);F(this)}z(nc);var oc=["power","reset"];h=nc.prototype; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.D=d;for(b=0;b=a.xa&&(a.xa+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),G(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} -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.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=A(a.id);for(c=0;ca.da/a.wa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.wa!=b){a.wa=b;b=a.wa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} +H.prototype={constructor:H,parent:null,save:function(){var a,b;if(this.controller)a=null;else if(Ya)for(a=Array(this.size>>2),b=0;b>8,c)},N:function(a){return this.a[a>>2]>>>((a&3)<<3)&255},na:function(a,b){a&1&&I(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},qa:function(a,b){var c=a>>2;a=(a&3)<<3;this.a[c]=this.a[c]&~(255<>2;a=(a&3)<<3;24>a?this.a[c]=this.a[c]&~(65535<>8);this.ta=!0},F:function(a,b){return this.I(a,b)},R:function(a,b){return this.Tb(a,b)},oa:function(a,b,c){this.j?this.f(a,b,c):this.Fb(a,b,c)},sa:function(a,b,c){this.j?this.f(a,b,c):this.$b(a,b,c)},C:function(a){return this.o[a]},J:function(a){return this.o[a]},P:function(a,b){a&1&&I(this.g,b,64);return this.c.getUint16(a,!0)},aa:function(a,b){a&1&&I(this.g,b,64);return this.s[a>>1]},da:function(a,b){this.o[a]=b;this.ta=!0},pa:function(a,b){this.o[a]=b;this.ta=!0},ra:function(a,b,c){a&1&&I(this.g, +c,64);this.c.setUint16(a,b,!0);this.ta=!0},wa:function(a,b,c){a&1&&I(this.g,c,64);this.s[a>>1]=b;this.ta=!0}};function zb(a,b,c){a.D=b;a.i=a.m=0;c&&((a.i=c.i)&&ic(a,kc,!1),(a.m=c.m)&&lc(a,kc,!1))}function lc(a,b,c){c&&a.m||(a.Eb=!a.j&&b[1]||a.f,a.pb=!a.j&&b[3]||a.A);if(c||void 0===c)a.Fb=b[1]||a.f,a.$b=b[3]||a.A}function ic(a,b,c){c&&a.i||(a.yb=b[0]||a.v,a.W=b[2]||a.w);if(c||void 0===c)a.I=b[0]||a.v,a.Tb=b[2]||a.w}function ec(a,b){b||(b=mc);ic(a,b,void 0);lc(a,b,void 0)} +var mc=[],hc=[H.prototype.N,H.prototype.qa,H.prototype.na,H.prototype.xa],kc=[H.prototype.F,H.prototype.oa,H.prototype.R,H.prototype.sa];if(Ya)var gc=[H.prototype.C,H.prototype.da,H.prototype.P,H.prototype.ra],fc=[H.prototype.J,H.prototype.pa,H.prototype.aa,H.prototype.wa]; +function nc(a,b){v.call(this,"CPU",a,nc);var c=a.multiplier||1;this.fb=a.cycles||b;this.qa=c;this.vb=Math.round(this.fb/1E4)/100;this.xa=this.vb*this.qa;this.l.U=!1;this.l.Cb=!1;this.l.Ua=a.autoStart;this.l.hb=!1;this.cb=this.Ia=0;this.eb=a.csStart;this.Qa=a.csInterval;this.Ra=a.csStop;this.I=[];this.Qb=this.md.bind(this);D(this)}y(nc);var oc=["power","reset"];h=nc.prototype; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.D=d;for(b=0;b=a.Ia&&(a.Ia+=a.Qa,c=!0);0<=a.Ra&&a.Ra<=sc(a)&&(a.Qa=a.Ra=-1,rc(a),F(a),c=!0);c&&a.T(sc(a)+" cycles: checksum="+m(a.cb))}} +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.j)if(a=d.j,a.l.O)a=!0;else{var b=null,c,k=z(a.id);for(c=0;ca.da/a.xa&&(b=1);a.qa=b;b=a.vb*a.qa;if(a.xa!=b){a.xa=b;b=a.xa.toFixed(2)+"Mhz";var d=a.o.setSpeed;d&&(d.textContent=b);a.T("target speed: "+b)}c&&a.j&&vc(a.j)}nb(a,a.aa);a.aa=0;a.R=ra();a.oa=0;uc(a)}function Qb(a,b){var c=a.I.length;a.I.push([-1,b]);return c}function Sb(a,b,c){0<=b&&ba.I[b][0]&&(c=a.fb*a.qa/1E3*c|0,a.I[b][0]=c+wc(a))}function mb(a,b){for(var c=a.I.length-1;0<=c;c--){var d=a.I[c];0>d[0]||(d[0]-=b,0>=d[0]&&(d[0]=-1,d[1]()))}} function wc(a,b){var c=a.pa-=a.a;a.a=a.F=0;b&&(a.pa=0);return c} -h.ld=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){G(this); -this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; -function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function G(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} -function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}z(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&G(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; -function Ac(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.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[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.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ia=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.h&&Vb(a)}function Vb(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.hd,a.pb=a.$d,Bb(a.h,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.h,16))}function Bc(a,b,c){a.Kb=b;P(a,b);!c&&a.D&&(G(a)||a.D.c())}h.Jb=function(){return 0}; -h.save=function(){var a=new Q(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.h));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(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.ma[c]=a.g[6],a.g[6]=a.ma[a.v]);a.B=b;a.u|=2}function S(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(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.ra){var d=!1;0>a.Ia?a.Ia=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ia>>2&12288);d&&(a.M|=4,a.g[6]=4);Ic(a,a.Ia);Ic(a,a.g[7]);P(a,e);a.u&=-113;a.Ia=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);P(a,b);Xb(a,c);a.u&=-17} +h.md=function(){if(this.l.U){this.wb>=this.fb&&uc(this,!0);this.Ta=0;this.$a=ra();if(this.oa){var a=this.$a-this.oa;a>this.Ob&&(this.R+=a,this.R>this.$a&&(this.R=this.$a))}try{do{for(var b,c=this.l.hb?1:this.ib,d=this.I.length-1;0<=d;d--){var e=this.I[d];0>e[0]||c>e[0]&&(c=e[0])}b=c;try{this.nb(b)}catch(f){if("number"!=typeof f)throw f;}b=wc(this,!0);this.Ta+=b;this.aa+=b;ob(this,b);mb(this,b);this.Sa-=b;if(0>=this.Sa){this.Sa+=this.ib;15<=++this.Pb&&(this.va(),this.Pb=0);break}}while(this.l.U)}catch(f){F(this); +this.j&&this.j.stop(ra(),sc(this));Xa(this,f.stack||f.message);return}if(this.l.U){a=setTimeout;b=this.Qb;this.oa=ra();c=this.Ob;this.Ta&&(c=Math.round(c*this.Ta/this.ib));c-=this.oa-this.$a;if(d=this.oa-this.R)this.da=Math.round(this.aa/(10*d))/100,864E5<=d&&(this.sa=0,tc(this));if(0>c||this.dac&&(this.R-=c),c=0;this.wb+=this.Ta;this.oa+=c;a(b,c)}}}; +function lb(a){var b;a.l.error?(a.T(a.toString()+" error"),b=!0):b=!1;if(!b)if(a.l.U)a.T(a.toString()+" busy");else{tc(a);a.l.U=!0;a.l.Cb=!0;if(b=a.o.run)b.textContent="Halt";a.j&&a.j.start(a.R,sc(a));setTimeout(a.Qb,0)}}h.nb=function(){return 0};function F(a){var b=!1;if(a.l.U){wc(a);nb(a,a.aa);a.aa=0;a.l.U=!1;if(b=a.o.run)b.textContent="Run";a.j&&a.j.stop(ra(),sc(a));b=!0}a.l.complete=void 0;return b} +function xc(a){this.Wa=+a.model||1170;this.Kb=a.addrReset||0;nc.call(this,a,6666667);this.decode=1120==this.Wa?yc.bind(this):zc.bind(this);Ac(this);this.ra=0;this.N=null;this.l.complete=!1}y(xc,nc);h=xc.prototype;h.reset=function(){this.status("model "+this.Wa);this.l.U&&F(this);Ac(this);qc(this);this.l.error=!1;this.parent.reset.call(this)}; +function Ac(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.Kb];a.Ha=[0,0,0,0,0,0];a.ma=[0,0,0,0];a.v=0;a.bb=0;a.jc=[4,2,0,1];a.H=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[65535,65535,65535,65535,65535,65535,65535,65535],[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.Za=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0];a.Wb=[0,0,0,0,0,0,0,0];a.Vb=0;a.u=0;a.A=a.C=0;a.c=a.b=a.rb=0;a.Ja=-1;kb(a)}function kb(a){a.Da=255;a.M=0;a.Bb=0;a.w=0;a.Ca=0;a.Ab=0;a.Ga=0;a.Ba=0;a.ab=0;a.Nb=262143;a.N=null;a.g&&Ub(a)}function Ub(a){a.Ba?(a.P=65536,a.J=a.ic,a.W=a.jd,a.pb=a.be,Bb(a.g,a.Ga&16?22:18)):(a.P=0,a.J=a.hc,a.W=a.Ub,a.pb=a.ac,Bb(a.g,16))}function Bc(a,b,c){a.Kb=b;O(a,b);!c&&a.D&&(F(a)||a.D.c())}h.Jb=function(){return 0}; +h.save=function(){var a=new P(this);a.set(0,[]);a.set(1,[this.sa,this.qa]);a.set(2,Nb(this.g));return a.data()};h.restore=function(a){var b=a[1];this.sa=b[1];tc(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.ma[c]=a.h[6],a.h[6]=a.ma[a.v]);a.B=b;a.u|=2}function R(a,b){a.u&128||(a.s=a.i=b,a.f=0)}function Ec(a,b,c){a.u&128||(a.s=a.i=a.m=b,a.f=c||0)}function Fc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^b)&(d^b))}function Gc(a,b){a.u&128||(a.s=a.i=a.m=b,a.f=a.s^a.m>>1)}function Hc(a,b,c,d){a.u&128||(a.s=a.i=a.m=b,a.f=(c^d)&(d^b))} +function J(a,b,c){if(!a.ra){var d=!1;0>a.Ja?a.Ja=Wb(a):a.v||(b=4,d=!0);a.w&57344||(a.Ca=63222,a.Ab=b);a.v=0;var e=a.W(b|a.P),f=a.W(b+2&65535|a.P);Xb(a,f&-12289|a.Ja>>2&12288);d&&(a.M|=4,a.h[6]=4);Ic(a,a.Ja);Ic(a,a.h[7]);O(a,e);a.u&=-113;a.Ja=-1;a.u|=8;if(26!=c)throw b;}}function Jc(a){var b=Kc(a),c=Kc(a)&-1793;a.B&49152&&(c=c&-225|a.B&63712);O(a,b);Xb(a,c);a.u&=-17} function Kb(a,b){var c=b>>13&31;31>c&&a.Ga&32&&(b=a.Za[c]+(b&8190)&4194302,3932160<=b&&4186112>b&&console.log("panic(898)"));return b} -function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;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.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ia&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), -b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.g[6]|a.P);a.g[6]=a.g[6]+2&65535;return b}function Ic(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(Dc(a,2)),e=e+a.g[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.g[c]&65535,e=a.W(e|a.P)|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.lb=function(a){if(!this.Ba)return this.h.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; -h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.h.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.h.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.h,a)};h.hd=function(a){return Lb(this.h,Lc(this,a,2))};h.ac=function(a,b){Mb(this.h,a,b&65535)};h.$d=function(a,b){Mb(this.h,Lc(this,a,4),b)}; -function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.g[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.h,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.g[e]=d:a.ma[a.B>>12&3]=d} -function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.h,c)):a=a.g[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.h,a.J(b,c,2)):a.g[c]} -function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.h,e)))):a.g[e]=a.g[e]&65280|d.call(a,c,a.g[e])}function U(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.h,e,d.call(a,c,Lb(a.h,e)))):a.g[e]=d.call(a,c,a.g[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.g[e]=c?d&1?c<<24>>24&65535:a.g[e]&-256|c&255:a.g[e]&-256;return c} -function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.h,a.J(b,d,4),c):a.g[d]=c&65535;return c}function V(a,b,c){c&&(P(a,a.g[7]+(b<<24>>23)),a.a-=2);a.a-=3} -h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=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.Bb&224)>>5,e=this.N&&this.N.Ka>d?this.N:null;e&&(c=e.nd,d=e.Ka);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),K(this,c,26),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(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;S(this,a);return a}function dd(a,b){a=b&~a;S(this,a<<8);return a}function ed(a,b){a|=b;S(this,a);return a}function fd(a,b){a|=b;S(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} +function Lc(a,b,c){var d,e,f;if(!(c&a.Ba))return b;d=b>>13;a.Ga&a.jc[a.v]||(d&=7);e=a.H[a.v][d];f=(a.Y[a.v][d]<<6)+(b&8191)&a.Nb;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.ab=a.v,a.bb=d;b=!1;g&&(g&57344&&(0<=a.Ja&&(g|=128),a.w&57344||(a.w=a.w|g|a.ab<<5|a.bb<<1), +b=!0),a.w&61440||!(4191360>f||4194239>>a.c].Eb(b&a.j,c&255,b)}function Kc(a){var b=a.W(a.h[6]|a.P);a.h[6]=a.h[6]+2&65535;return b}function Ic(a,b){var c=a.h[6]-2&65535;a.h[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.h[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.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.W(e)|g;a.a-= +8;break;case 6:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535|g,a.a-=6,e;case 7:return e=a.W(Dc(a,2)),e=e+a.h[c]&65535,e=a.W(e|a.P)|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&&!a.v&&d&4&&0>=f&&(a.h[6]<=a.Da||65534<=a.h[6])&&(a.h[6]<=a.Da-32?(a.M|=4,a.h[6]=4,J(a,4,24)):(a.M|=8,a.u|=64));return e}h.lb=function(a){if(!this.Ba)return this.g.lb(a);this.ra++;a=this.Ub(Lc(this,a,2));this.ra--;return a}; +h.Ya=function(a,b){this.Ba?(this.ra++,Mc(this,Lc(this,a,5),b),this.ra--):this.g.Ya(a,b)};h.mb=function(a,b){this.Ba?(this.ra++,this.ac(Lc(this,a,4),b),this.ra--):this.g.mb(a,b)};h.hc=function(a,b,c){return Nc(this,a,b,c)};h.ic=function(a,b,c){return Lc(this,Nc(this,a,b,c),c)};h.Ub=function(a){return Lb(this.g,a)};h.jd=function(a){return Lb(this.g,Lc(this,a,2))};h.ac=function(a,b){Mb(this.g,a,b&65535)};h.be=function(a,b){Mb(this.g,Lc(this,a,4),b)}; +function Oc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?(d=Nc(a,b,d,2),c&65536||61440!==(a.B&61440)&&(d&=65535),a.v=a.B>>12&3,c=a.W(d|c&a.P),a.v=a.B>>14&3):c=6!=d||(a.B>>2&12288)===(a.B&12288)?a.h[d]:a.ma[a.B>>12&3];return c}function Pc(a,b,c,d){a.w&57344||(a.Ca=22);var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=Nc(a,b,e,4),c&65536||(e&=65535),a.v=a.B>>12&3,e=Lc(a,e|c&65536,4),a.v=a.B>>14&3,Mb(a.g,e,d)):6!=e||(a.B>>2&12288)===(a.B&12288)?a.h[e]=d:a.ma[a.B>>12&3]=d} +function Qc(a,b){b>>=6;var c=a.C=b&7;(b=a.A=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Rc(a,b){b>>=6;var c=a.C=b&7;return(b=a.A=(b&56)>>3)?Lb(a.g,a.J(b,c,2)):a.h[c]}function Sc(a,b){var c=a.b=b&7;b=a.c=(b&56)>>3;return Nc(a,b,c,8)}function Tc(a,b){var c=a.b=b&7;(b=a.c=(b&56)>>3)?(c=a.J(b,c,3),a=Jb(a.g,c)):a=a.h[c]&255;return a}function Uc(a,b){var c=a.b=b&7;return(b=a.c=(b&56)>>3)?Lb(a.g,a.J(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.rb=a.J(b,e,7),Mc(a,e,d.call(a,c,Jb(a.g,e)))):a.h[e]=a.h[e]&65280|d.call(a,c,a.h[e])}function T(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?(e=a.J(b,e,6),Mb(a.g,e,d.call(a,c,Lb(a.g,e)))):a.h[e]=d.call(a,c,a.h[e])}function Vc(a,b,c,d){var e=a.b=b&7;(b=a.c=(b&56)>>3)?Mc(a,a.J(b,e,5),c):a.h[e]=c?d&1?c<<24>>24&65535:a.h[e]&-256|c&255:a.h[e]&-256;return c} +function Wc(a,b,c){var d=a.b=b&7;(b=a.c=(b&56)>>3)?Mb(a.g,a.J(b,d,4),c):a.h[d]=c&65535;return c}function U(a,b,c){c&&(O(a,a.h[7]+(b<<24>>23)),a.a-=2);a.a-=3} +h.nb=function(a){this.l.complete=!0;var b=a?this.l.Cb?0:1:-1;this.l.Cb=!1;this.pa=this.a=a;do{if(this.u){this.u&112&&(this.u&32?J(this,168,28):this.u&64?J(this,4,30):this.u&16&&J(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.Bb&224)>>5,e=this.N&&this.N.La>d?this.N:null;e&&(c=e.od,d=e.La);d>(this.B&224)>>5?(this.u&4&&(Dc(this,2),this.u&=-5),J(this,c,26),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(Cc(this))}while(0>1|b<<16;Gc(this,a);return a&65535}function bd(a,b){a=b&2048|b>>1|b<<8;Gc(this,a<<8);return a&255}function cd(a,b){a=b&~a;R(this,a);return a}function dd(a,b){a=b&~a;R(this,a<<8);return a}function ed(a,b){a|=b;R(this,a);return a}function fd(a,b){a|=b;R(this,a<<8);return a}function gd(a,b){a=~b|65536;Ec(this,a);return a&65535}function hd(a,b){a=~b|256;Ec(this,a<<8);return a&255} function id(a,b){a=b-a;this.u&128||(this.s=this.i=a,this.f=b&(b^a));return a&65535}function jd(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 kd(a,b){a=b+a;this.u&128||(this.s=this.i=a,this.f=a&(b^a));return a&65535}function ld(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 md(a,b){a=-b;Ec(this,a,a&b&32768);return a&65535}function nd(a,b){a=-b;Ec(this,a<<8,(a&b&128)<<8);return a&255} function od(a,b){a=b<<1|this.m>>16&1;Gc(this,a);return a&65535}function pd(a,b){a=b<<1|this.m>>16&1;Gc(this,a<<8);return a&255}function qd(a,b){a=(this.m&65536|b)>>1|b<<16;Gc(this,a);return a&65535}function rd(a,b){a=((this.m&65536)>>8|b)>>1|b<<8;Gc(this,a<<8);return a&255}function sd(a,b){var c=b-a;Hc(this,c,a,b);return c&65535}function td(a,b){var c=b-a;Hc(this,c<<8,a<<8,b<<8);return c&255}function ud(a,b){this.u&128||(this.s=this.i=b&65280,this.f=this.m=0);return(b<<8|b>>8)&65535} -function vd(a,b){a^=b;S(this,a);return a&65535}function wd(a){U(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(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 yd(a){var b=Uc(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 zd(a){V(this,a,!R(this))}function Ad(a){V(this,a,R(this))} -function Bd(a){U(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){T(this,a,Qc(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){U(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,Qc(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,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){S(this,(Qc(this,a)&Tc(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 Hd(a){V(this,a,this.i&65535?0:4)}function Id(a){V(this,a,!this.za()==!(this.f&32768))}function Jd(a){V(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){V(this,a,!R(this)&&!!(this.i&65535))} -function Ld(a){V(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){V(this,a,R(this)||(this.i&65535?0:4))}function Nd(a){V(this,a,!this.za()!=!(this.f&32768))}function Od(a){V(this,a,this.za())}function Pd(a){V(this,a,!!(this.i&65535))}function Qd(a){V(this,a,!this.za())}function Rd(){K(this,12,1);this.a-=5}function Sd(a){V(this,a,!0)}function Td(a){V(this,a,!(this.f&32768))}function Ud(a){V(this,a,this.f&32768?2:0)} +function vd(a,b){a^=b;R(this,a);return a&65535}function wd(a){T(this,a,Rc(this,a),Xc);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function xd(a){var b=Uc(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 yd(a){var b=Uc(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 zd(a){U(this,a,!Q(this))}function Ad(a){U(this,a,Q(this))} +function Bd(a){T(this,a,Rc(this,a),cd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}function Cd(a){S(this,a,Qc(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){T(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){S(this,a,Qc(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){R(this,Rc(this,a)&Uc(this,a));this.a-=this.c?4+(this.C&&6<=this.b?1:0):(this.A?4:3)+(7==this.b?2:0)}function Gd(a){R(this,(Qc(this,a)&Tc(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 Hd(a){U(this,a,this.i&65535?0:4)}function Id(a){U(this,a,!this.za()==!(this.f&32768))}function Jd(a){U(this,a,!!(this.i&65535)&&!this.za()==!(this.f&32768))}function Kd(a){U(this,a,!Q(this)&&!!(this.i&65535))} +function Ld(a){U(this,a,(this.i&65535?0:4)||!this.za()!=!(this.f&32768))}function Md(a){U(this,a,Q(this)||(this.i&65535?0:4))}function Nd(a){U(this,a,!this.za()!=!(this.f&32768))}function Od(a){U(this,a,this.za())}function Pd(a){U(this,a,!!(this.i&65535))}function Qd(a){U(this,a,!this.za())}function Rd(){J(this,12,1);this.a-=5}function Sd(a){U(this,a,!0)}function Td(a){U(this,a,!(this.f&32768))}function Ud(a){U(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 Vd(a){var b=Rc(this,a);a=Uc(this,a);Hc(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 Wd(a){var b=Qc(this,a)<<8;a=Tc(this,a)<<8;Hc(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=Uc(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 Yd(){K(this,24,2);this.a-=25} -function Zd(){this.B&49152?(this.M|=128,K(this,4,3)):this.D?this.D.b():G(this);this.a-=7}function $d(){K(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;P(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.g[a]);this.g[a]=this.g[7];P(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; -function fe(a){var b=Rc(this,a);this.F=this.a;S(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);S(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; -function ie(a){var b=Uc(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)P(this,this.g[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){U(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} -function pe(a){U(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){K(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){U(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){K(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].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&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} +function Xd(a){var b=Uc(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 Yd(){J(this,24,2);this.a-=25} +function Zd(){this.B&49152?(this.M|=128,J(this,4,3)):this.D?this.D.b():F(this);this.a-=7}function $d(){J(this,16,4);this.a-=25}var ae=[0,7,7,10,7,11,9,13];function be(a){this.F=this.a;O(this,Sc(this,a));this.a=this.F-ae[this.c]}var ce=[0,14,14,17,14,18,16,20];function de(a){this.F=this.a;var b=Sc(this,a);a=a>>6&7;Ic(this,this.h[a]);this.h[a]=this.h[7];O(this,b);this.a=this.F-ce[this.c]}var ee=[3,9,9,13,10,14,12,16,4,9,9,13,10,14,13,17]; +function fe(a){var b=Rc(this,a);this.F=this.a;R(this,Wc(this,a,b));this.a=this.F-ee[(this.A?8:0)+this.c]+(7!=this.b||this.c?0:2)}function ge(a){var b=Qc(this,a);R(this,Vc(this,a,b,1)<<8);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)}var he=[7,13,13,17,14,18,17,21]; +function ie(a){var b=Uc(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)O(this,this.h[7]-((a&63)<<1)),this.a+=1;this.a-=6}function oe(a){T(this,a,Rc(this,a),sd);this.a-=this.c?9+(this.C&&6<=this.b?1:0):(this.A?5:3)+(7==this.b?2:0)} +function pe(a){T(this,a,0,ud);this.a-=this.c?9:3+(7==this.b?2:0)}function qe(){J(this,28,5);this.a-=5}function re(){this.u|=4;Dc(this,-2);this.a-=3}function se(a){T(this,a,Rc(this,a),vd);this.a-=this.c?9:3+(7==this.b?2:0)}function Y(){J(this,8,6)}function yc(a){te[a>>12].call(this,a)}function ue(a){ve[a>>6&3].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&15].call(this,a)}function Ce(a){De[a&15].call(this,a)} function Ee(a){Fe[a>>6&3].call(this,a)}function Ge(a){He[a>>6&3].call(this,a)}function Ie(a){Je[a>>6&3].call(this,a)} -var te=[function(a){Ke[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,gd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,kd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){U(this,a,0, -md);this.a-=this.c?11:6},function(a){U(this,a,R(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,R(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){U(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,od);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,ad);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){U(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], -Me=[function(a){Ne[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Ne=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,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],De=[je,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],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, -Vc(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)}],He=[function(a){T(this,a,0,nd);this.a-=this.c?11:6},function(a){T(this,a,R(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,R(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? -2:0)}],Je=[function(a){T(this,a,0,rd);this.a-=this.c?9+(this.rb&1):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+(this.rb&1):3+(7==this.b?2:0)},function(a){T(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Oe[a>>12].call(this,a)} -var Oe=[function(a){Pe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Qe[a>>8&15].call(this,a)},function(a){Re[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Pe=[function(a){Se[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Te[a>>6&3].call(this,a)},Y,Y],Te=[function(a){a=this.g[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);P(this,this.g[5]);this.g[6]=a+2&65535;this.g[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F= -this.a;Pc(this,a,0,b);S(this,b);this.a=this.F-he[this.c]},function(a){S(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Se=[function(a){Ue[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,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)},Ae,Ce,pe,pe,pe,pe],Ue=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Qe=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Re=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){Ve[a>>6& -3].call(this,a)},Y,Y],Ve=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);S(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);S(this,b);this.a=this.F-he[this.c]},Y]; -function We(a){x.call(this,"ROM",a,We);this.X=this.b=null;this.i=a.addr;this.c=a.size;this.f=a.alias;this.j=a.file;this.m=q(this.j);if(this.j){a=this.j;var b=la(this.m);"json"!=b&&"hex"!=b&&(a=v()+"/api/v1/dump?file="+this.j+"&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.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.b=a.K,c.X=a.X):c.j=null);Xe(c)})}}z(We);We.prototype.ha=function(a,b,c,d){this.h=b;this.a=c;this.D=d;Xe(this)}; -We.prototype.ka=function(){this.X&&(this.D&&this.D.a(this.id,this.i,this.c,this.X),delete this.X);return!0};We.prototype.ja=function(){return!0}; -function Xe(a){if(!Wa(a)){if(a.j){if(!a.b||!a.h)return;a.c||(a.c=a.b.length);if(a.b.length!=a.c)Xa(a,"ROM size ("+m(a.b.length,8,!0)+") does not match specified size ("+m(a.c,8,!0)+")");else{var b;b=a.i;if(Eb(a.h,b,a.c,dc)){var c;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)),t=k,w=n-=6;0=b.length)break;l+=b[k++]&255;if(l&255)break;if(w)for(;w--;)a.a.Ya(p++,b[t++]&255);else p&1?G(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,cf);F(this)}; -h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.Pa)return;b=pa(b[1]);if(this.v=Ta(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.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!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(){df(this)};h.save=function(){var a=new Q(this);a.set(0,[]);return a.data()};h.restore=function(){return df(this)};function df(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=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.T(this.m), -this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ef={},cf=(ef[65392]=[null,null,Z.prototype.Rc,Z.prototype.Jd,"RCSR"],ef[65394]=[null,null,Z.prototype.Qc,Z.prototype.Id,"RBUF"],ef[65396]=[null,null,Z.prototype.kd,Z.prototype.be,"XCSR"],ef[65398]=[null,null,Z.prototype.jd,Z.prototype.ae,"XBUF"],ef);Ha(function(){for(var a=D(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&&hf(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;hf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; -h.ha=function(a,b,c,d){this.j=a;this.h=b;this.a=c;this.D=d;this.J=jf(a);var e=this;if((this.c=pc(this.j,"autoMount")||this.c)&&"string"==typeof this.c)try{this.c=eval("("+this.c+")")}catch(f){u("PC11 auto-mount error: "+f.message+" ("+this.c+")"),this.c=null}this.N=Tb(56,4);this.R=Qb(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.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&sf(a,b,c,d,e.K,e.fa,e.ea)); -a.l.Fa=!1;a.m&&(a.m--,a.m||F(a));pf(a)})}function mf(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.ub?"":e)+"&format=json"));return!!r(f, -null,!0,function(b,c,d){zf(a,b,c,d)})} -function zf(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,b,c);try{if(0g&&0c.indexOf("0x")&&'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+ -c+")");if(k.length)if(1==k.length)u(k[0]);else{a.V=k.length;a.Z=k[0].length;a.S=k[0][0].length;var l=k[0][0][0];a.ga=l&&l.length||512;for(d=c=0;d>2,p=l.pattern;void 0===p&&(p=l.pattern=0);var t=l.data;if(void 0===t){var w=l.bytes;if(void 0!==w&&w.length){for(var E=n<<2,xa=w.length;xa>2,e=Array(d),f=0;f>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,Y,function(a){Le[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Ke=[function(a){Me[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,Y,Y,Y],ve=[function(a){Ec(this,Wc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,gd);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)},function(a){T(this,a,1,id);this.a-=this.c?9:3+(7==this.b?2:0)}],xe=[function(a){T(this,a,0, +md);this.a-=this.c?11:6},function(a){T(this,a,Q(this)?1:0,Xc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,Q(this)?1:0,sd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Uc(this,a);Ec(this,a);this.a-=this.c?4:3+(7==this.b?2:0)}],ze=[function(a){T(this,a,0,qd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){T(this,a,0,od);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)},function(a){T(this,a,0,Zc);this.a-=this.c?9:3+(7==this.b?2:0)}], +Me=[function(a){Oe[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,Y,Ae,Ce,pe,pe,pe,pe],Oe=[Zd,re,le,Rd,$d,ke,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y],Be=[je,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],De=[je,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],Le=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,Y,Y,Y],Fe=[function(a){Ec(this, +Vc(this,a,0));this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,hd);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)},function(a){S(this,a,1,jd);this.a-=this.c?9:3+(7==this.b?2:0)}],He=[function(a){S(this,a,0,nd);this.a-=this.c?11:6},function(a){S(this,a,Q(this)?1:0,Yc);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,Q(this)?1:0,td);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){a=Tc(this,a);Ec(this,a<<8);this.a-=this.c?4:3+(7==this.b? +2:0)}],Je=[function(a){S(this,a,0,rd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,pd);this.a-=this.c?9:3+(7==this.b?2:0)},function(a){S(this,a,0,bd);this.a-=this.c?9+(this.rb&1):3+(7==this.b?2:0)},function(a){S(this,a,0,$c);this.a-=this.c?9:3+(7==this.b?2:0)}];function zc(a){Pe[a>>12].call(this,a)} +var Pe=[function(a){Qe[a>>8&15].call(this,a)},fe,Vd,Fd,Bd,Dd,wd,function(a){Re[a>>8&15].call(this,a)},function(a){Se[a>>8&15].call(this,a)},ge,Wd,Gd,Cd,Ed,oe,Y],Qe=[function(a){Te[a>>4&15].call(this,a)},Sd,Pd,Hd,Id,Nd,Jd,Ld,de,de,ue,we,ye,function(a){Ue[a>>6&3].call(this,a)},Y,Y],Ue=[function(a){a=this.h[7]+((a&63)<<1)&65535;var b=this.W(a|this.P);O(this,this.h[5]);this.h[6]=a+2&65535;this.h[5]=b;this.a-=8},function(a){a=Oc(this,a,0);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F= +this.a;Pc(this,a,0,b);R(this,b);this.a=this.F-he[this.c]},function(a){R(this,Wc(this,a,this.za?65535:0));this.a-=this.c?9:3+(7==this.b?2:0)}],Te=[function(a){Ve[a&15].call(this,a)},Y,Y,Y,be,be,be,be,me,function(a){a&8?(this.B&49152||(this.B=this.B&-2017|(a&7)<<5,this.u|=1),this.a-=5):J(this,8,6)},Ae,Ce,pe,pe,pe,pe],Ve=[Zd,re,le,Rd,$d,ke,function(){Jc(this);this.a-=13},Y,Y,Y,Y,Y,Y,Y,Y,Y],Re=[ie,ie,Xd,Xd,xd,xd,yd,yd,se,se,Y,Y,Y,Y,ne,ne],Se=[Qd,Od,Kd,Md,Td,Ud,zd,Ad,Yd,qe,Ee,Ge,Ie,function(a){We[a>>6& +3].call(this,a)},Y,Y],We=[Y,function(a){a=Oc(this,a,65536);Ic(this,a);R(this,a);this.a-=11},function(a){var b=Kc(this);this.F=this.a;Pc(this,a,65536,b);R(this,b);this.a=this.F-he[this.c]},Y]; +function Xe(a){v.call(this,"ROM",a,Xe);this.X=this.c=null;this.i=a.addr;this.b=a.size;this.m=!1;this.f=a.alias;this.j=a.file;this.s=q(this.j);if(this.j){a=this.j;var b=la(this.s);"json"!=b&&"hex"!=b&&(a=ua()+"/api/v1/dump?file="+this.j+"&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.j=null):(Sa(c.na,a,b),(a=ta(a,b))?(c.c=a.K,c.X=a.X):c.j=null);Ye(c)})}}y(Xe);h=Xe.prototype; +h.ha=function(a,b,c,d){this.g=b;this.a=c;this.D=d;Ye(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 Ye(a){if(!Wa(a)){if(a.j){if(!a.c||!a.g)return;a.b||(a.b=a.c.length);if(a.c.length!=a.b)Xa(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+G){var c={};b=(c[b]=[Xe.prototype.Xc,Xe.prototype.Qd,null,null,null,a.b>>1],c);if(cb(a.g,a,b,256,a.wa)){b=a.m=!0;break a}}else if(Eb(a.g,b,a.b,dc)){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.Ya(p++,b[u++]&255);else p&1?F(a.a):Bc(a.a,p,f);g=!0}else k++;else k+=2}if(!g&&(null==c&&(c=e),null!=c)){for(e=0;e=b)a.preventDefault&&a.preventDefault(),64e.w&&(e.w-=32),e.b|=128,e.b&64&&Rb(e.a,e.aa))});this.da=Tb(52,4);this.P=Qb(this.a,function(){e.c|=128;e.c&64&&Rb(e.a,e.da)});cb(b,this,df);D(this)}; +h.Mb=function(){if(!this.v){var a=pc(this.j,"connection");if(a){var b=a.split("->");if(2==b.length){var c=pa(b[0]);if(c!=this.wa)return;b=pa(b[1]);if(this.v=Ta(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.na+"."+c+" connected to "+b);return}}}}this.status("Unable to establish connection: "+a)}}};h.ka=function(a,b){if(!b)if(this.Mb(),!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(){ef(this)};h.save=function(){var a=new P(this);a.set(0,[]);return a.data()};h.restore=function(){return ef(this)};function ef(a){a.w=0;a.b=0;a.c=128;a.i=[];return!0}h.zb=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.T(this.m), +this.m="";10!=a&&(this.m+=String.fromCharCode(a))}this.c&=-129;Sb(this.a,this.P,1E3/Math.round(this.I/10))}};var ff={},df=(ff[65392]=[null,null,Z.prototype.Rc,Z.prototype.Kd,"RCSR"],ff[65394]=[null,null,Z.prototype.Qc,Z.prototype.Jd,"RBUF"],ff[65396]=[null,null,Z.prototype.ld,Z.prototype.de,"XCSR"],ff[65398]=[null,null,Z.prototype.kd,Z.prototype.ce,"XBUF"],ff);Ha(function(){for(var a=C(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&&jf(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;jf(d,q(b,!0),b,1,a)}return!1};return!0;case "readProgress":return this.o[b]=c,!0}return!1}; +h.ha=function(a,b,c,d){this.j=a;this.g=b;this.a=c;this.D=d;this.J=kf(a);var e=this;if((this.c=pc(this.j,"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=Tb(56,4);this.R=Qb(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):ua()+"/api/v1/dump?path="+encodeURIComponent(c)+"&format=json");return!!r(f,null,!0,function(e,f,g){var k=0>g&&a.j&&!a.j.l.O;g?a.G('Unable to load tape "'+b+'" (error '+g+": "+e+")",k):(Sa(a.na,e,f),(e=ta(e,f))&&tf(a,b,c,d,e.K,e.fa,e.ea)); +a.l.Fa=!1;a.m&&(a.m--,a.m||D(a));qf(a)})}function nf(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=ua()+"/api/v1/dump?"+d+"="+encodeURIComponent(c)+(a.ub?"":e)+"&format=json"));return!!r(f, +null,!0,function(b,c,d){Af(a,b,c,d)})} +function Af(a,b,c,d){var e=null;a.c=!1;var f=0>d&&a.j&&!a.j.l.O;if(d)a.controller.G('Unable to load disk "'+a.ua+'" (error '+d+": "+b+")",f);else{Sa(a.controller.na,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.S=k[0][0].length;var l=k[0][0][0];a.ga=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 E=n<<2,V=w.length;V>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 ("+ +function Cf(a,b){var c=a.Z*a.S,d=b/c|0;return dg)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.ua+": "+c);return b}; -h.toJSON=function(){var a;a=0;for(var b;b=Bf(this,a++);)Df(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 Df(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 O(a){x.call(this,"RL11",a,O);this.f=a.autoMount||null;this.s=0;this.b=Array(4);this.A=!Ba("Mobi")&&window&&"FileReader"in window}z(O);h=O.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){u("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&&Ef(d,a)},!0;case "loadDrive":return this.o[b]= -c,c.onclick=function(){var a=d.o.listDisks;a&&Ff(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=Bf(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";Ef(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Gf(this)};h.save=function(){return(new Q(this)).data()}; -h.restore=function(a){return Gf(this,a[0])};function Jf(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+'"')}Lf(a,e,b,c,!1,d)}else Kf(a,e)} -function Lf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Kf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,yf(new uf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} -h.ec=function(a,b,c,d,e){var f;a.tb=!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.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||F(this));Ef(this,a.xb)}; -function If(a,b,c,d){if((a=a.o.listDisks)&&a.options){for(var e=0;e'+b+"");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.o[b]=c,c.onchange=function(){var a=ja(c.value);null!=a&&Ff(d,a)},!0;case "loadDrive":return this.o[b]= +c,c.onclick=function(){var a=d.o.listDisks;a&&Gf(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=Cf(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";Ff(this,0)}}return!0};h.ja=function(a){return a?this.save():!0};h.reset=function(){Hf(this)};h.save=function(){return(new P(this)).data()}; +h.restore=function(a){return Hf(this,a[0])};function Kf(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+'"')}Mf(a,e,b,c,!1,d)}else Lf(a,e)} +function Mf(a,b,c,d,e,f){var g=-1,k=a.b[b];k.Ea.toLowerCase()!=d.toLowerCase()&&(g++,Lf(a,b,!0),k.tb?a.G("RL11 busy"):(k.tb=!0,e&&(k.sb=!0,a.s++),k.jb=!!f,zf(new vf(a,k,"preload"),c,d,f,a.ec)&&g++));return g} +h.ec=function(a,b,c,d,e){var f;a.tb=!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.xb)),b=null);b?(a.ca=b,a.ua=c,a.Ea=d,this.G('Mounted disk "'+c+'" in drive '+("RL"+a.xb),a.sb||e),this.j&&vc(this.j)):a.jb=!1;a.sb&&(a.sb=!1,--this.s||D(this));Ff(this,a.xb)}; +function Jf(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.xc=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){if(!n){n=a.ca.seek(b,c,d+1);if(!n){k=5120;break}p=0}var t,w;if(0>(t=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.h,f,t|w<<8);if(Pb(this.h)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; -h.rd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var t=Lb(this.h,f);if(Pb(this.h)){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++,t&255)||!a.ca.write(n,p++,t>>8)){k=5120;break}if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; -h.Md=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.xc;case 10:b||(b=this.rd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||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.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Kd=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Nd=function(a){this.c=a};h.Wc=function(){return this.m};h.Od=function(a){this.m=a};h.Tc=function(){return this.w};h.Ld=function(a){this.w=a&63}; -var Mf={},Hf=(Mf[63744]=[null,null,O.prototype.Uc,O.prototype.Md,"RLCS"],Mf[63746]=[null,null,O.prototype.Sc,O.prototype.Kd,"RLBA"],Mf[65284]=[null,null,O.prototype.Vc,O.prototype.Nd,"RLDA"],Mf[65286]=[null,null,O.prototype.Wc,O.prototype.Od,"RLMP"],Mf[65288]=[null,null,O.prototype.Tc,O.prototype.Ld,"RLBE"],Mf); -function Nf(a,b,c){x.call(this,"Computer",a,Nf);this.l.O=!1;Of(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Pf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Qf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.h=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=A(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)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;bPf){if(Rf(d,this.v)){this.i=new Q(this,"1.30.3","failsafe");Rf(this.i)&&(Wf(this,d),a=2,Xf(this.i));this.i.set("timestamp",sa());Yf(this.i);var e=this.b&&!this.m;if(1==a||ua("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Vf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Rf(d,g):("error"== -f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Xf(d),Rf(d)?(c=Vf(d),e=!0):c=!1))}e&&Uf(this,c?d:null)}else 2==a&&d.clear()}else Uf(this);delete this.v;delete this.w}e=A(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&(Zf(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Wf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; -function Wf(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.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} -function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new Q(a,"1.30.3"),g=new Q(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.l.O=!1,!1===d&&(e=null)));for(var k=A(a.id),l=0;l(b.w+=a))){for(a=0;a(u=a.ca.read(n,p++))||0>(w=a.ca.read(n,p++))){k=5120;break}Mb(this.g,f,u|w<<8);if(Pb(this.g)){k=8192;break}f+=2;if(p>=l.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)}; +h.sd=function(a,b,c,d,e,f,g){for(var k=0,l=a.ca,n=null,p;e--;){var u=Lb(this.g,f);if(Pb(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.ga&&(n=null,++d>=l.S&&(d=0,++c>=l.Z&&(c=0,++b>=l.V)))){k=5120;break}}return g(k,b,c,d,e,f)};h.Uc=function(){return this.L&65535}; +h.Nd=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.xc;case 10:b||(b=this.sd),d=this.c>>7,e=this.c&64?0:1,f=this.c&63,d>=c.V||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.fc.bind(this)))}a&&(this.L|=129,this.L&64&&Rb(this.a,this.F))}};h.Sc=function(){return this.v};h.Ld=function(a){this.v=a&65534};h.Vc=function(){return this.c};h.Od=function(a){this.c=a};h.Wc=function(){return this.m};h.Pd=function(a){this.m=a};h.Tc=function(){return this.w};h.Md=function(a){this.w=a&63}; +var Nf={},If=(Nf[63744]=[null,null,N.prototype.Uc,N.prototype.Nd,"RLCS"],Nf[63746]=[null,null,N.prototype.Sc,N.prototype.Ld,"RLBA"],Nf[65284]=[null,null,N.prototype.Vc,N.prototype.Od,"RLDA"],Nf[65286]=[null,null,N.prototype.Wc,N.prototype.Pd,"RLMP"],Nf[65288]=[null,null,N.prototype.Tc,N.prototype.Md,"RLBE"],Nf); +function Of(a,b,c){v.call(this,"Computer",a,Of);this.l.O=!1;Pf(this,b);this.A=pc(this,"autoPower",a);this.j=0;this.N=a.busWidth||a.buswidth;this.b=Qf;this.v=null;this.m=this.I=!1;this.P=pc(this,"url")||"";(Math.random()+.1).toString(36);this.c=Rf(this);if(this.a=Ua("CPU",this.id)){this.D=Ua("Debugger",this.id);this.g=new ub({id:this.na+".bus",busWidth:this.N},this.a,this.D);var d,e=z(this.id);if((this.f=Ua("Panel",this.id))&&this.f.Va)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;bQf){if(Sf(d,this.v)){this.i=new P(this,"1.30.3","failsafe");Sf(this.i)&&(Xf(this,d),a=2,Yf(this.i));this.i.set("timestamp",sa());Zf(this.i);var e=this.b&&!this.m;if(1==a||va("Click OK to restore the previous PDPjs machine state, or CANCEL to reset the machine.")){if(c=Wf(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?Sf(d,g):("error"== +f&&"no machine state"!=g?(this.G("Error: "+g),"unable to verify user"==g&&(Aa("user",""),this.c=null)):this.T(f+": "+g),Yf(d),Sf(d)?(c=Wf(d),e=!0):c=!1))}e&&Vf(this,c?d:null)}else 2==a&&d.clear()}else Vf(this);delete this.v;delete this.w}e=z(this.id);for(f=0;fa[1];a=a[2];this.R=!0;this.l.O=!0;var d=this.o.power;d&&(d.textContent="Shutdown");this.a&&($f(this,this.a,b,c,a),this.va(),this.a.Ua());this.F&&(Xf(this,b),b.clear());!c&&this.i&&(this.i.clear(),delete this.i);this.j=0}; +function Xf(a,b){if(va("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.P;d.user=c;d.type="bug";d.data=b;r("http://www.pcjs.org/api/v1/report",d,!0)}} +function bg(a,b,c){var d,e="none";if(a.j)return null;a.j--;var f=new P(a,"1.30.3"),g=new P(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&&F(a.a),d=a.a.ja(b,c),"object"===typeof d&&f.set(a.a.id,d),c&&(a.a.l.O=!1,!1===d&&(e=null)));for(var k=z(a.id),l=0;l(b.w+=a))){for(a=0;af.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);ig(a,b,c)}})}else c(a,null)} -function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&D(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[a]={};try{if(g=document.getElementById(a)){var n;if("object"==typeof resources&&(n=resources.css)){var p=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));p.appendChild(t)}c|| +function jg(a,b,c,d){function e(a){if(void 0===k){var b=g&&C(g,"machine-warning");k=b&&b[0]||g}k&&(k.innerHTML=oa(a))}function f(a){e("Error: "+a);l&&(--fg||Ja(!0));l=!1}var g,k,l=!0;fg++;Ra[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?gg(c,null,null,!1,e,function(d,l){l?(Sa(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(l=k.transformNode(l))?(g.outerHTML=l,--fg||Ja(!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),--fg||Ja(!0)):f("invalid machine element: "+ a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?gg(b,a,d,!0,e,n):hg(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){Ja(!1);return jg(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();//# sourceMappingURL=/tmp/pdpjs/1.30.3/pdp11.map